1
+
2
+ #! Note: set N_vocab to 1500 for brandenburg_gate and Sacre coeur dataset, 3200 for trevi fountain datasets
3
+ # use command --use_cache to use prepared dataset as described in docs/dataset.md for speeding up training
4
+ # set --encode_a to use the proposed cross ray appearance transfer module
5
+ # set --use_mask to use the proposed transient handling module
6
+
7
+ # cd /mnt/cephfs/home/yangyifan/yangyifan/code/learnToSyLf/CR-NeRF
8
+ # source /mnt/cephfs/home/yangyifan/miniconda/etc/profile.d/conda.sh
9
+ # conda activate crnerf
10
+ nerf_out_dim1=64
11
+ exp_name1=" train/reproduce-ds2-20231111"
12
+ model_mode1=" 1-1"
13
+ decoder=' linearStyle'
14
+ echo !! modify the following path!!
15
+ ckpt_path1=" /mnt/cephfs/dataset/NVS/nerfInWild/experimental_results/ckpts/${exp_name1} /last.ckpt"
16
+ root_dir1=" /mnt/cephfs/dataset/NVS/nerfInWild/brandenburg_gate/"
17
+ dataset_name1=' phototourism'
18
+ save_dir1=/mnt/cephfs/dataset/NVS/nerfInWild/experimental_results
19
+ decoder_num_res_blocks=1
20
+ img_downscale=2 # #Change this to 2 if you want to reproduce the results with image resolution downscale ratio = 2, note that downscale =2 requires more training and inference time due to the larger image size.
21
+
22
+
23
+
24
+ # train#
25
+ # CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python train_mask_grid_sample.py --root_dir $root_dir1 --dataset_name phototourism --save_dir /mnt/cephfs/dataset/NVS/nerfInWild/experimental_results --img_downscale $img_downscale --N_importance 64 --N_samples 64 --num_epochs 20 --batch_size 1024 --optimizer adam --lr 5e-4 --lr_scheduler cosine --N_emb_xyz 15 --N_vocab 1500 --maskrs_max 5e-2 --maskrs_min 6e-3 --maskrs_k 1e-3 --maskrd 0 --N_a 48 --weightKL 1e-5 --weightRecA 1e-3 --weightMS 1e-6 --chunk 1310720 --encode_a --encode_c --encode_random --model_mode 1-1 --decoder linearStyle --decoder_num_res_blocks $decoder_num_res_blocks --nerf_out_dim $nerf_out_dim1 --use_cache --proj_name style_gnerf --num_gpus 8 --use_mask --exp_name $exp_name1
26
+
27
+
28
+
29
+
30
+ # test#
31
+ cd /mnt/cephfs/dataset/NVS/nerfInWild/experimental_results/logs/$exp_name1 /codes
32
+
33
+ # render image#
34
+ CUDA_VISIBLE_DEVICES=3 python eval.py \
35
+ --root_dir $root_dir1 \
36
+ --save_dir $save_dir1 \
37
+ --dataset_name $dataset_name1 --scene_name $exp_name1 \
38
+ --split test_test --img_downscale $img_downscale \
39
+ --N_samples 256 --N_importance 256 --N_emb_xyz 15 \
40
+ --N_vocab 1500 \
41
+ --ckpt_path $ckpt_path1 \
42
+ --chunk 2048 --img_wh 320 240 --encode_a --decoder $decoder --decoder_num_res_blocks $decoder_num_res_blocks --nerf_out_dim $nerf_out_dim1
43
+
44
+
45
+ # calculate metrics#
46
+ CUDA_VISIBLE_DEVICES=0 python eval_metric.py \
47
+ --root_dir $root_dir1 \
48
+ --save_dir $save_dir1 \
49
+ --dataset_name $dataset_name1 --scene_name $exp_name1 \
50
+ --split test_test --img_downscale $img_downscale \
51
+ --img_wh 320 240
0 commit comments