-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_config.py
40 lines (36 loc) · 1.35 KB
/
data_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
class DataConfig:
data_name = ""
root_dir = ""
label_transform = ""
def get_data_config(self, data_name):
self.data_name = data_name
if data_name == 'LEVIR':
self.label_transform = "norm"
self.root_dir = './CDData/LEVIR-CD-256/'
elif data_name == 'DSIFN':
self.label_transform = "norm"
self.root_dir = './CDData/DSIFN_256/'
elif data_name == 'WHU':
self.label_transform = "norm"
self.root_dir = './CDData/WHU-CD-256/'
elif data_name == 'CDD':
self.label_transform = "norm"
self.root_dir = './CDData/CDD-CD-256/'
elif data_name == 'TYPO':
self.label_transform = "norm"
self.root_dir = './CDData/TYPO/'
elif data_name == 'quick_start_LEVIR':
self.root_dir = './samples_LEVIR/'
elif data_name == 'quick_start_DSIFN':
self.root_dir = './samples_DSIFN/'
elif data_name == 'tipc_LEVIR':
self.root_dir = './test_tipc/data/mini_dataset/'
self.label_transform = "norm"
else:
raise TypeError('%s has not defined' % data_name)
return self
if __name__ == '__main__':
data = DataConfig().get_data_config(data_name='LEVIR')
print(data.data_name)
print(data.root_dir)
print(data.label_transform)