From 35faddb3b53b38b463605b8167c3c0534f412c42 Mon Sep 17 00:00:00 2001 From: hollydinkel Date: Mon, 25 Mar 2024 09:19:21 -0700 Subject: [PATCH] [FIX] minimum working process_data.sh script? --- .../create_cameras_xml.py | 2 +- process_data.sh | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/astrobee_data_processing_scripts/create_cameras_xml.py b/astrobee_data_processing_scripts/create_cameras_xml.py index a62ed4a..21000ac 100644 --- a/astrobee_data_processing_scripts/create_cameras_xml.py +++ b/astrobee_data_processing_scripts/create_cameras_xml.py @@ -16,7 +16,7 @@ images_dir = f'./data/{args.date}/{args.robot}/bayer/survey{args.survey}' poses_dir = f'./data/{args.date}/{args.robot}/pose/survey{args.survey}' poses = sorted(os.listdir(poses_dir)) -fastcd_data_dir = f'./fast_change_detection/example/dataset/{args.date}_{args.robot}_survey{args.survey}' +fastcd_data_dir = f'./fast_change_detection/data/{args.date}-{args.robot}-survey{args.survey}' try: os.mkdir(fastcd_data_dir) except FileExistsError: diff --git a/process_data.sh b/process_data.sh index 0de6a53..898b5ef 100755 --- a/process_data.sh +++ b/process_data.sh @@ -9,20 +9,20 @@ export DATE=20230419 export ROBOT=bsharp source $ASTROBEE/devel/setup.bash -# mkdir $DATA +mkdir $DATA -# # Install dependencies -# apt-get update -# apt-get install -y python3-pip -# pip install numpy --upgrade -# pip install gdown pyquaternion pandas +# Install dependencies +apt-get update +apt-get install -y python3-pip +pip install numpy --upgrade +pip install gdown pyquaternion pandas -# # Download data -# cd $DATA && gdown https://drive.google.com/uc?id=1qNCRl9XceINrHLFUp4pBti9I4oJO2zf1 -# unzip data.zip -# cp data/ ../ -# rm -rf data/ -# rm $DATA/data.zip +# Download data +cd $DATA && gdown https://drive.google.com/uc?id=1qNCRl9XceINrHLFUp4pBti9I4oJO2zf1 +unzip data.zip +cp data/ ../ +rm -rf data/ +rm $DATA/data.zip for SURVEY_NUMBER in 2 3 4 do @@ -33,6 +33,6 @@ do rm -rf $DATA/$DATE/$ROBOT/bayer/survey$SURVEY/0 $DATA/$DATE/$ROBOT/bayer/survey$SURVEY/invalid $DATA/$DATE/$ROBOT/bayer/survey$SURVEY/rotation cd $DATA && python3 $ASTROBEE_CHANGE_DETECTION/astrobee_data_processing_scripts/process_sequential_poses.py $SURVEY $DATE $ROBOT && rm *.txt cd $DATA/$DATE/$ROBOT/bayer/survey$SURVEY && ls -v | nl -v 0 | while read n f; do mv -n "$f" "Image$n.JPG"; done - cp -r $DATA/$DATE/$ROBOT/bayer/survey$SURVEY $FASTCD/ + mkdir -p $FASTCD/data/$DATE-$ROBOT-survey$SURVEY/images cd $ASTROBEE_CHANGE_DETECTION && python3 astrobee_data_processing_scripts/create_cameras_xml.py $SURVEY $DATE $ROBOT done \ No newline at end of file