-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
125 lines (111 loc) · 2.83 KB
/
main.py
File metadata and controls
125 lines (111 loc) · 2.83 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
from SDR.baseline.train import train as train_baseline
from SDR.baseline.inference import inference as inference_baseline
from SDR.archboost.train import train as train_archboost
from SDR.archboost.inference import inference as inference_archboost
from SDR.databoost.train import train as train_databoost
from SDR.test import *
"""
Baseline
"""
# train_baseline(
# data_dir='./data/ori_train/',
# save_dir='./output/baseline/',
# holefilling_kernel_size=7,
# holefilling_iter=30,
# batch_size=8,
# epoch=10000,
# learning_rate=5e-3,
# weight_decay=1e-1,
# alpha=1.0,
# beta=0.2,
# )
# test_d2n(
# data_dir='./data/ori_train/',
# save_dir='./output/archboost/',
# is_learnable_d2n=False,
# )
# inference_baseline(
# data_dir='./data/ori_test/',
# save_dir='./output/baseline/inference/',
# model_path='./result_sota/baseline/weight.pth',
# holefilling_kernel_size=7,
# holefilling_iter=30,
# batch_size=1,
# )
"""
ArchBoost
"""
# train_archboost(
# data_dir='./data/ori_train/',
# save_dir='./output/archboost/',
# holefilling_kernel_size=13,
# holefilling_iter=30,
# batch_size=8,
# epoch=10000,
# learning_rate=5e-3,
# weight_decay=1e-1,
# lr_scheduling=True,
# alpha=1.0,
# beta=0.2,
# ## ArchBoost setting
# smooth_initial=True,
# learnable_d2n=True,
# auxiliary_loss=True,
# lambda_aux=0.2,
# ## Save setting
# save_checkpoint=True,
# )
# test_d2n(
# data_dir='./data/ori_train/',
# save_dir='./output/archboost/',
# is_avgpool_d2n=True,
# )
# inference_archboost(
# data_dir='./data/ori_test/',
# save_dir='./output/archboost/inference/',
# model_path='./result_sota/archboost/weight.pth',
# holefilling_kernel_size=13,
# holefilling_iter=30,
# batch_size=1,
# # ArchBoost setting
# smooth_initial=True,
# learnable_d2n=True,
# )
"""
DataBoost
"""
# train_databoost(
# data_dir='./data/aug0.002/', # './data/ori_test/',
# save_dir='./output/databoost/',
# ####
# model_path='./result_sota/archboost/weight.pth',
# has_gt=False,
# ####
# holefilling_kernel_size=13,
# holefilling_iter=30,
# batch_size=8,
# epoch=5000,
# learning_rate=1e-3,
# weight_decay=1e-1,
# lr_scheduling=True,
# alpha=1.0,
# beta=0.2,
# ## ArchBoost setting
# smooth_initial=True,
# learnable_d2n=True,
# auxiliary_loss=True,
# lambda_aux=0.2,
# ## Save setting
# save_checkpoint=True,
# )
inference_archboost(
data_dir='./data/ori_test/',
save_dir='./output/databoost/inference/',
model_path='./result_sota/databoost/weight.pth',
holefilling_kernel_size=13,
holefilling_iter=30,
batch_size=1,
# ArchBoost setting
smooth_initial=True,
learnable_d2n=True,
)