|
#!/bin/bash |
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
|
|
|
echo "SAVVY-Bench AEA Processing Script" |
|
echo "=================================" |
|
|
|
|
|
echo "Checking system requirements..." |
|
df -h . | tail -1 | awk '{print "Available disk space: " $4}' |
|
echo "Estimated space needed: 350GB" |
|
echo "Estimated processing time: 4-6 hours" |
|
echo "" |
|
|
|
|
|
|
|
if [ ! -d "${SCRIPT_DIR}/egolifter" ]; then |
|
echo "Error: EgoLifter directory not found, please run: git submodule update --init --recursive" |
|
exit 1 |
|
fi |
|
|
|
if [ ! -f "${SCRIPT_DIR}/Aria Everyday Activities Dataset.json" ]; then |
|
echo "Error: Configuration file 'Aria Everyday Activities Dataset.json' not found" |
|
exit 1 |
|
fi |
|
|
|
if [ ! -f "${SCRIPT_DIR}/aea/video_ids.txt" ]; then |
|
echo "Error: Video ID file 'aea/video_ids.txt' not found" |
|
exit 1 |
|
fi |
|
|
|
|
|
echo "Step 1/4: Downloading AEA data..." |
|
python "${SCRIPT_DIR}/scripts/download_aea_videos.py" |
|
|
|
|
|
echo "Step 2/4: Processing data (undistortion)..." |
|
python "${SCRIPT_DIR}/scripts/process_aea_data.py" |
|
|
|
|
|
echo "Step 3/4: Extracting and processing audio (channels 5,6)..." |
|
if python "${SCRIPT_DIR}/scripts/extract_vrs_audio.py" "${SCRIPT_DIR}/aea/video_ids.txt" "${SCRIPT_DIR}/aea/aea_data" "${SCRIPT_DIR}/aea/aea_processed"; then |
|
echo "β Audio extraction completed" |
|
else |
|
echo "β Audio extraction encountered issues, but continuing..." |
|
fi |
|
|
|
|
|
echo "Step 4/4: Converting undistorted frames to MP4..." |
|
if python "${SCRIPT_DIR}/scripts/process_videos.py" "${SCRIPT_DIR}/aea/video_ids.txt" "${SCRIPT_DIR}/aea/aea_processed" "${SCRIPT_DIR}/aea/aea_processed"; then |
|
echo "β Video conversion completed" |
|
else |
|
echo "β Video conversion encountered issues, but continuing..." |
|
fi |
|
|
|
echo "All processing completed!" |
|
echo "Data saved in: ${SCRIPT_DIR}/aea/aea_processed/" |
|
echo "Structure:" |
|
echo " aea/aea_processed/" |
|
echo " βββ {video_id}/" |
|
echo " β βββ audio/{video_id}.wav (channels 5,6)" |
|
echo " β βββ video/{video_id}.mp4 (from undistorted frames)" |
|
echo " β βββ images/ (undistorted frames)" |