-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
48 lines (37 loc) · 1.34 KB
/
Copy pathconfig.py
File metadata and controls
48 lines (37 loc) · 1.34 KB
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
import os
from io import TextIOWrapper
class Config:
def __init__(self):
# seed
self.seed = 1337
# [Wildtrack, MultiviewX, Terrace]
self.dataset = 'Wildtrack'
# Paths
self.dino_path = '/path/to/dinov2'
self.clip_path = '/path/to/CLIP/RN50.pt'
self.pseudo_mask_path = os.path.join('tmp', f'{self.dataset}Mask')
self.data_path = os.path.join('/path/to/all/datasets/', self.dataset)
# DINOv2, CLIP, ResNet18
self.dino_dim = 768
self.use_clip = True
self.resnet_down = 8
self.resnet_dim = 512
# num_gpus * one_gpu, cameras, resnet_dim, patch_h, path_w
self.one_gpu = 1
self.num_epochs = 60
self.lr =1e-2
self.log_freq = 1
self.vis_freq = 10
# For larger test set of Terrace, val_begin = 40 to save time
self.save_freq = 1
self.val_begin = 1
self.use_vis_func = True
self.use_bev_err = True
self.color_lambda = 1
self.sil_lambda = 1
self.bev_lambda = 1
def print_conf(self):
print('\n'.join(['%s:%s' % item for item in self.__dict__.items()]))
def write_conf(self, log: TextIOWrapper):
log.write('\n'.join(['%s:%s' % item for item in self.__dict__.items()])+'\n')
log.flush()