SplatAtlas / tools /batch_render_coadaptgs_nonsynth.sh
KCBtheone's picture
Upload SplatAtlas benchmark pipeline code
23e73f9 verified
Raw
History Blame Contribute Delete
3.07 kB
#!/bin/bash
set -u
ROOT="/root/autodl-tmp/SplatAtlas"
LOG="$ROOT/tools/batch_coadaptgs_render.log"
: > "$LOG"
source /root/miniconda3/etc/profile.d/conda.sh
conda activate /root/autodl-tmp/envs/co_adaptation_3dgs
export PYTHONPATH=/root/autodl-tmp/CoAdaptGS:/root/autodl-tmp/SplatAtlas:$PYTHONPATH
cd "$ROOT"
# scene source_path resolution
declare -a JOBS=(
# T&T (resolution 2)
"auditorium /root/autodl-tmp/dataset/tnt/auditorium 2"
"ballroom /root/autodl-tmp/dataset/tnt/ballroom 2"
"barn /root/autodl-tmp/dataset/tnt/barn 2"
"caterpillar /root/autodl-tmp/dataset/tnt/caterpillar 2"
"courtroom /root/autodl-tmp/dataset/tnt/courtroom 2"
"lighthouse /root/autodl-tmp/dataset/tnt/lighthouse 2"
"museum /root/autodl-tmp/dataset/tnt/museum 2"
"palace /root/autodl-tmp/dataset/tnt/palace 2"
"playground /root/autodl-tmp/dataset/tnt/playground 2"
"temple /root/autodl-tmp/dataset/tnt/temple 2"
"train /root/autodl-tmp/dataset/tnt/train 2"
"truck /root/autodl-tmp/dataset/tnt/truck 2"
# 360 outdoor (resolution 4)
"bicycle /root/autodl-tmp/dataset/360/bicycle 4"
"flowers /root/autodl-tmp/dataset/360/flowers 4"
"garden /root/autodl-tmp/dataset/360/garden 4"
"stump /root/autodl-tmp/dataset/360/stump 4"
"treehill /root/autodl-tmp/dataset/360/treehill 4"
# 360 indoor (resolution 2)
"bonsai /root/autodl-tmp/dataset/360/bonsai 2"
"counter /root/autodl-tmp/dataset/360/counter 2"
"kitchen /root/autodl-tmp/dataset/360/kitchen 2"
"room /root/autodl-tmp/dataset/360/room 2"
# Deep Blending (resolution 1)
"DrJohnson /root/autodl-tmp/dataset/deepblending_clean/DrJohnson 1"
"Playroom /root/autodl-tmp/dataset/deepblending_clean/Playroom 1"
)
OK=0; FAIL=0; SKIP=0
for job in "${JOBS[@]}"; do
read -r scene src res <<<"$job"
model="$ROOT/outputs/coadaptgs_$scene"
ply="$model/point_cloud/iteration_30000/point_cloud.ply"
echo "" | tee -a "$LOG"
echo "================ $scene (res=$res) ================" | tee -a "$LOG"
if [ ! -f "$ply" ]; then
echo "[SKIP] PLY not found: $ply" | tee -a "$LOG"
SKIP=$((SKIP+1)); continue
fi
if [ ! -d "$src" ]; then
echo "[SKIP] source not found: $src" | tee -a "$LOG"
SKIP=$((SKIP+1)); continue
fi
python scripts/main_render.py \
--method coadaptgs \
--source_path "$src" \
--model_path "$model" \
--resolution "$res" >>"$LOG" 2>&1
rc=$?
rd_count=$(ls "$model/renders_test_30000"/*.png 2>/dev/null | wc -l)
gd_count=$(ls "$model/gt_test_30000"/*.png 2>/dev/null | wc -l)
if [ $rc -eq 0 ] && [ $rd_count -gt 0 ] && [ $gd_count -gt 0 ]; then
echo "[OK] $scene renders=$rd_count gt=$gd_count" | tee -a "$LOG"
OK=$((OK+1))
else
echo "[FAIL] $scene rc=$rc renders=$rd_count gt=$gd_count" | tee -a "$LOG"
FAIL=$((FAIL+1))
fi
done
echo "" | tee -a "$LOG"
echo "=== SUMMARY: OK=$OK FAIL=$FAIL SKIP=$SKIP ===" | tee -a "$LOG"