Datasets:
Add P2C1 metadata + SMPL-X + previews
Browse files- scripts/upload_capture.sh +4 -1
- scripts/upload_remaining.sh +51 -0
scripts/upload_capture.sh
CHANGED
|
@@ -47,8 +47,11 @@ echo "=== [1/5] stage $CAPTURE ==============================================="
|
|
| 47 |
--staging "$STAGING" $EXTRACT
|
| 48 |
|
| 49 |
echo "=== [2/5] consolidate SMPL-X ==========================================="
|
|
|
|
|
|
|
|
|
|
| 50 |
"$PY" "$HERE/consolidate_smplx.py" "$CAPTURE" --dataset-root "$DATASET_ROOT" \
|
| 51 |
-
--out "$STAGING/data/$CAPTURE/smplx.npz"
|
| 52 |
|
| 53 |
# capture.json is written before smplx.npz exists on a first run -> refresh it
|
| 54 |
"$PY" "$HERE/stage_capture.py" "$CAPTURE" --dataset-root "$DATASET_ROOT" \
|
|
|
|
| 47 |
--staging "$STAGING" $EXTRACT
|
| 48 |
|
| 49 |
echo "=== [2/5] consolidate SMPL-X ==========================================="
|
| 50 |
+
# --expect-first-frame 0 is the d=0 guard: every capture's per-frame npz must start at
|
| 51 |
+
# frame 0. A source still carrying the old 1-based labelling is refused rather than
|
| 52 |
+
# silently published one frame out.
|
| 53 |
"$PY" "$HERE/consolidate_smplx.py" "$CAPTURE" --dataset-root "$DATASET_ROOT" \
|
| 54 |
+
--out "$STAGING/data/$CAPTURE/smplx.npz" --expect-first-frame 0
|
| 55 |
|
| 56 |
# capture.json is written before smplx.npz exists on a first run -> refresh it
|
| 57 |
"$PY" "$HERE/stage_capture.py" "$CAPTURE" --dataset-root "$DATASET_ROOT" \
|
scripts/upload_remaining.sh
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# upload_remaining.sh [PxCy ...] -- upload a known-complete set of captures, SEQUENTIALLY.
|
| 3 |
+
#
|
| 4 |
+
# Tracking is finished, so there is no watching / polling / retry-until-ready logic here:
|
| 5 |
+
# this just walks a fixed list and uploads each one in turn.
|
| 6 |
+
#
|
| 7 |
+
# Sequential on purpose. The link to HF is ~1 MB/s and shared, so running captures in
|
| 8 |
+
# parallel does not add throughput, it just interleaves them and makes a stall in one
|
| 9 |
+
# capture look like a stall in all of them.
|
| 10 |
+
#
|
| 11 |
+
# Each capture is independent: a failure is logged and the loop moves on, so one bad
|
| 12 |
+
# capture cannot block the other five. upload_large_folder resumes per capture, so
|
| 13 |
+
# re-running this script after any failure costs only what is actually missing.
|
| 14 |
+
#
|
| 15 |
+
# Run detached (NOT tmux -- a tmux server restart on this shared box has killed an
|
| 16 |
+
# upload before):
|
| 17 |
+
# setsid nohup ./scripts/upload_remaining.sh > logs/seq.log 2>&1 < /dev/null &
|
| 18 |
+
set -uo pipefail
|
| 19 |
+
|
| 20 |
+
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
| 21 |
+
BASE="$(dirname "$HERE")"
|
| 22 |
+
LOGDIR="$BASE/logs"; mkdir -p "$LOGDIR"
|
| 23 |
+
|
| 24 |
+
CAPTURES=("$@")
|
| 25 |
+
if [ ${#CAPTURES[@]} -eq 0 ]; then
|
| 26 |
+
CAPTURES=(P2C1 P2C2 P3C2 P4C1 P4C2 P5C2)
|
| 27 |
+
fi
|
| 28 |
+
|
| 29 |
+
STAMP="$(date +%Y%m%d_%H%M%S)"
|
| 30 |
+
SUMMARY="$LOGDIR/seq_summary_${STAMP}.txt"
|
| 31 |
+
echo "sequential upload of ${#CAPTURES[@]} captures: ${CAPTURES[*]}" | tee "$SUMMARY"
|
| 32 |
+
echo "started $(date)" | tee -a "$SUMMARY"
|
| 33 |
+
|
| 34 |
+
for c in "${CAPTURES[@]}"; do
|
| 35 |
+
log="$LOGDIR/seq_${c}_${STAMP}.log"
|
| 36 |
+
echo "" | tee -a "$SUMMARY"
|
| 37 |
+
echo "########## $c start $(date +%H:%M:%S) -> $log" | tee -a "$SUMMARY"
|
| 38 |
+
t0=$(date +%s)
|
| 39 |
+
"$HERE/upload_capture.sh" "$c" > "$log" 2>&1
|
| 40 |
+
rc=$?
|
| 41 |
+
t1=$(date +%s)
|
| 42 |
+
echo "########## $c exit=$rc elapsed=$(( (t1-t0)/60 ))m$(( (t1-t0)%60 ))s" | tee -a "$SUMMARY"
|
| 43 |
+
if [ $rc -ne 0 ]; then
|
| 44 |
+
echo " LAST 15 LINES OF $log:" | tee -a "$SUMMARY"
|
| 45 |
+
tail -15 "$log" | sed 's/^/ /' | tee -a "$SUMMARY"
|
| 46 |
+
fi
|
| 47 |
+
done
|
| 48 |
+
|
| 49 |
+
echo "" | tee -a "$SUMMARY"
|
| 50 |
+
echo "finished $(date)" | tee -a "$SUMMARY"
|
| 51 |
+
echo "ALL DONE" | tee -a "$SUMMARY"
|