RobotZero / eval /source /robot_tools /droid /scripts /cleanup_frames.sh
JiayiWuLeo's picture
Add source_all batch 5/10
8ca7ffa verified
Raw History Blame Contribute Delete
637 Bytes
#!/bin/bash
# Remove per-frame PNG dirs from batch outputs (keep videos), except the two
# demo episodes that intentionally keep frames. Also drop stereo MP4s in data/.
# Safe to re-run.
KEEP1="TRI+52ca9b6a+2023-11-27-10h-39m-12s"
KEEP2="RAIL+80edfcb1+2023-04-12-15h-49m-43s"
OUT=/home/wujiayir/robot_tools/droid/out
DATA=/home/wujiayir/robot_tools/droid/data
find "$OUT" -mindepth 3 -maxdepth 3 -type d \
\( -name render -o -name mask -o -name normal \) \
! -path "$OUT/$KEEP1/*" ! -path "$OUT/$KEEP2/*" \
-exec rm -rf {} + 2>/dev/null
find "$DATA" -name "*stereo*" -type f -delete 2>/dev/null
echo "cleanup done $(date)"