forked from aipixel/GPS-Gaussian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstereo_human_config.py
61 lines (53 loc) · 2.02 KB
/
stereo_human_config.py
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
from yacs.config import CfgNode as CN
class ConfigStereoHuman:
def __init__(self):
self.cfg = CN()
self.cfg.name = ''
self.cfg.stage1_ckpt = None
self.cfg.restore_ckpt = None
self.cfg.lr = 0.0
self.cfg.wdecay = 0.0
self.cfg.batch_size = 0
self.cfg.num_steps = 0
self.cfg.dataset = CN()
self.cfg.dataset.source_id = None
self.cfg.dataset.train_novel_id = None
self.cfg.dataset.val_novel_id = None
self.cfg.dataset.use_hr_img = None
self.cfg.dataset.use_processed_data = None
self.cfg.dataset.data_root = ''
# gsussian render settings
self.cfg.dataset.bg_color = [0, 0, 0]
self.cfg.dataset.zfar = 100.0
self.cfg.dataset.znear = 0.01
self.cfg.dataset.trans = [0.0, 0.0, 0.0]
self.cfg.dataset.scale = 1.0
self.cfg.raft = CN()
self.cfg.raft.mixed_precision = None
self.cfg.raft.train_iters = 0
self.cfg.raft.val_iters = 0
self.cfg.raft.corr_implementation = 'reg_cuda' # or 'reg'
self.cfg.raft.corr_levels = 4
self.cfg.raft.corr_radius = 4
self.cfg.raft.n_downsample = 3
self.cfg.raft.n_gru_layers = 1
self.cfg.raft.slow_fast_gru = None
self.cfg.raft.encoder_dims = [64, 96, 128]
self.cfg.raft.hidden_dims = [128]*3
self.cfg.gsnet = CN()
self.cfg.gsnet.encoder_dims = None
self.cfg.gsnet.decoder_dims = None
self.cfg.gsnet.parm_head_dim = None
self.cfg.record = CN()
self.cfg.record.ckpt_path = None
self.cfg.record.show_path = None
self.cfg.record.logs_path = None
self.cfg.record.file_path = None
self.cfg.record.loss_freq = 0
self.cfg.record.eval_freq = 0
def get_cfg(self):
return self.cfg.clone()
def load(self, config_file):
self.cfg.defrost()
self.cfg.merge_from_file(config_file)
self.cfg.freeze()