926 / mind3d_trellis2 /code /run_kabl2.sh
jamie33's picture
Restore mind3d_trellis2 (docs, code, results, renders, paper)
7c61ee6 verified
Raw History Blame Contribute Delete
1.34 kB
# Continuation of run_kabl.sh: wait for the k-ablation heads and the CFG 7.5 generation, then generate the
# validation objects at CFG 50 (tokens are indexed by val_ids.txt) and evaluate.
source /home/hubin/venvs/trellis/bin/activate
cd /home/hubin/trellis_work
O=/home/hubin/trellis_work/outputs/supp/kabl
VAL=/home/hubin/trellis_work/outputs/valsel/val_ids.txt
while pgrep -f "mapper/train_ft.py --k (8|32|64) " > /dev/null || pgrep -f "variant_dirs outputs/supp/val_cfg7.5" > /dev/null; do
sleep 30
done
echo TRAIN_DONE
OMP_NUM_THREADS=8 OPENBLAS_NUM_THREADS=8 MKL_NUM_THREADS=8 python eval_shape.py --gen_dir outputs/supp/val_cfg7.5/meshes \
--test_list $VAL --out outputs/supp/val_cfg7.5/metrics.json > outputs/supp/val_cfg7.5/eval.log 2>&1 &
for K in 8 32 64; do d=$O/val_k${K}_cfg50; mkdir -p $d; ln -sf $O/k$K/sub0001/val/coef_rescaled/tokens.npy $d/tokens.npy; done
for w in 0 1; do
CUDA_VISIBLE_DEVICES=$w python gen_from_tokens.py --test_ids $VAL --variant_dirs $O/val_k8_cfg50 $O/val_k32_cfg50 \
$O/val_k64_cfg50 --cfg 50 --shard $w --num_shards 2 > $O/gen_w$w.log 2>&1 &
done
wait
for K in 8 32 64; do
d=$O/val_k${K}_cfg50
OMP_NUM_THREADS=8 OPENBLAS_NUM_THREADS=8 MKL_NUM_THREADS=8 python eval_shape.py --gen_dir $d/meshes --test_list $VAL \
--out $d/metrics.json > $d/eval.log 2>&1 &
done
wait
echo KABL_DONE