-
Notifications
You must be signed in to change notification settings - Fork 1
/
train.sh
61 lines (57 loc) · 1.86 KB
/
train.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
#BSUB -J nerf
#BSUB -n 4
#BSUB -q gpu
#BSUB -gpgpu 1
#BSUB -o out.%J
#BSUB -e err.%J
#BSUB -W 48:00
nvidia-smi
# conda activate dot
export THS_TYPE=weight
export THS_VAL=1e1 # 1e0 | 1e1
export DATA_ROOT=../../dataset/TanksAndTemple # ../../dataset/nerf_synthetic | ../../dataset/TanksAndTemple
export IN_CKPT_ROOT=~/checkpoints/DOT/pln/tt_sh25 # ~/checkpoints/DOT/pln/syn_sh16 | ~/checkpoints/DOT/pln/tt_sh25
export OUT_CKPT_ROOT=checkpoints/DOT/tt_sh25 # checkpoints/DOT/syn_sh16 | checkpoints/DOT/tt_sh25
export SCENE=Ignatius # chari | Ignatius
export CONFIG_FILE=DOT/nerf_sh/config/tt # DOT/nerf_sh/config/blender | DOT/nerf_sh/config/tt
export epochs=100
export sample_every=20
export prune_every=1
export GPUs=1
# DOT
CUDA_VISIBLE_DEVICES=$GPUs,
python -m DOT.octree.optimization \
--input $IN_CKPT_ROOT/$SCENE/octrees/tree.npz \
--config $CONFIG_FILE \
--data_dir $DATA_ROOT/$SCENE/ \
--output $OUT_CKPT_ROOT/$SCENE/dot.npz \
--thresh_type $THS_TYPE \
--thresh_val $THS_VAL \
--num_epochs $epochs \
--prune_every $prune_every \
--sample_every $sample_every
# DOT(R)
CUDA_VISIBLE_DEVICES=$GPUs,
python -m DOT.octree.optimization \
--input $IN_CKPT_ROOT/$SCENE/octrees/tree.npz \
--config $CONFIG_FILE \
--data_dir $DATA_ROOT/$SCENE/ \
--output $OUT_CKPT_ROOT/$SCENE/dot_r.npz \
--thresh_type $THS_TYPE \
--thresh_val $THS_VAL \
--num_epochs $epochs \
--prune_every $prune_every \
--sample_every $sample_every \
--recursive_prune
# Evaluation
python -m DOT.octree.evaluation \
--input $OUT_CKPT_ROOT/$SCENE/dot.npz \
--config $CONFIG_FILE \
--data_dir $DATA_ROOT/$SCENE/ \
--write_images $OUT_CKPT_ROOT/$SCENE/octrees/dot_rend
# Compression
python -m DOT.octree.compression \
$OUT_CKPT_ROOT/$SCENE/dot.npz \
--out_dir $OUT_CKPT_ROOT/$SCENE/cp \
--overwrite