File size: 1,439 Bytes
7c61ee6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Resume after the watchdog kill: export single-subject runs from best.pt, generate their test meshes, then
# evaluate everything (shape on CPU while identification + semantic run on GPU).
source /home/hubin/venvs/trellis/bin/activate
cd /home/hubin/trellis_work
O=/home/hubin/trellis_work/outputs/ft
C=50
for s in 0001 0002 0003; do
  CUDA_VISIBLE_DEVICES=$(( ${s: -1} % 2 )) python mapper/train_ft.py --k 16 --out_dir $O/single_$s --subjects $s --eval_only \
    > $O/single_${s}_export.log 2>&1 &
done
wait
D=""
for s in 0001 0002 0003; do
  d=$O/single_$s/sub$s/test_coef_rescaled_cfg$C; mkdir -p $d; ln -sf $O/single_$s/sub$s/test/coef_rescaled/tokens.npy $d/tokens.npy
  D="$D $d"
done
for w in 0 1 2 3; do
  CUDA_VISIBLE_DEVICES=$((w % 2)) python gen_from_tokens.py --variant_dirs $D --cfg $C --shard $w --num_shards 4 > $O/gen_c_w$w.log 2>&1 &
done
wait
ALL=$(ls -d $O/*/sub*/test_coef_rescaled_cfg$C)
M=""; S=""
for d in $ALL; do
  [ -f $d/metrics.json ] || OMP_NUM_THREADS=8 OPENBLAS_NUM_THREADS=8 MKL_NUM_THREADS=8 \
    python eval_shape.py --gen_dir $d/meshes --out $d/metrics.json > $d/eval.log 2>&1 &
  r=${d#$O/}; M="$M ft_$(echo $r | tr / _)=$d/meshes"; S="$S ft_$(echo $r | tr / _)=ft/$r"
done
wait
CUDA_VISIBLE_DEVICES=1 python ident_eval.py --out_dir /home/hubin/trellis_work/outputs/ident --methods $M > $O/ident.log 2>&1 &
CUDA_VISIBLE_DEVICES=0 python sem_eval.py --methods $S > $O/sem.log 2>&1 &
wait
echo FT2_DONE