Commit
•
2735865
1
Parent(s):
95655d2
Add HRNet low-resolution checkpoint (#1)
Browse files- Add HRNet low-resolution checkpoint (e4fc1c64bb7978bcfabe57558e909ba4cec1f1fe)
Co-authored-by: Samir Khaki <[email protected]>
fcn-hr48-4xb2-512x1024-80k/fcn-hr48-4xb2-512x1024-80k.py
ADDED
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
crop_size = (
|
2 |
+
256,
|
3 |
+
512,
|
4 |
+
)
|
5 |
+
data_preprocessor = dict(
|
6 |
+
bgr_to_rgb=True,
|
7 |
+
mean=[
|
8 |
+
123.675,
|
9 |
+
116.28,
|
10 |
+
103.53,
|
11 |
+
],
|
12 |
+
pad_val=0,
|
13 |
+
seg_pad_val=255,
|
14 |
+
size=(
|
15 |
+
256,
|
16 |
+
512,
|
17 |
+
),
|
18 |
+
std=[
|
19 |
+
58.395,
|
20 |
+
57.12,
|
21 |
+
57.375,
|
22 |
+
],
|
23 |
+
type='SegDataPreProcessor')
|
24 |
+
data_root = '/dataset/cityscapes/'
|
25 |
+
dataset_type = 'CityscapesDataset'
|
26 |
+
default_hooks = dict(
|
27 |
+
checkpoint=dict(by_epoch=False, interval=4000, type='CheckpointHook'),
|
28 |
+
logger=dict(interval=50, log_metric_by_epoch=False, type='LoggerHook'),
|
29 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
30 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
31 |
+
timer=dict(type='IterTimerHook'),
|
32 |
+
visualization=dict(type='SegVisualizationHook'))
|
33 |
+
default_scope = 'mmseg'
|
34 |
+
env_cfg = dict(
|
35 |
+
cudnn_benchmark=True,
|
36 |
+
dist_cfg=dict(backend='nccl'),
|
37 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
|
38 |
+
img_ratios = [
|
39 |
+
0.5,
|
40 |
+
0.75,
|
41 |
+
1.0,
|
42 |
+
1.25,
|
43 |
+
1.5,
|
44 |
+
1.75,
|
45 |
+
]
|
46 |
+
launcher = 'pytorch'
|
47 |
+
load_from = 'work_dirs/fcn-hr48-4xb2-512x1024-80k/fcn-hr48-4xb2-512x1024-80k_ckpt.pth'
|
48 |
+
log_level = 'INFO'
|
49 |
+
log_processor = dict(by_epoch=False)
|
50 |
+
model = dict(
|
51 |
+
backbone=dict(
|
52 |
+
extra=dict(
|
53 |
+
stage1=dict(
|
54 |
+
block='BOTTLENECK',
|
55 |
+
num_blocks=(4, ),
|
56 |
+
num_branches=1,
|
57 |
+
num_channels=(64, ),
|
58 |
+
num_modules=1),
|
59 |
+
stage2=dict(
|
60 |
+
block='BASIC',
|
61 |
+
num_blocks=(
|
62 |
+
4,
|
63 |
+
4,
|
64 |
+
),
|
65 |
+
num_branches=2,
|
66 |
+
num_channels=(
|
67 |
+
48,
|
68 |
+
96,
|
69 |
+
),
|
70 |
+
num_modules=1),
|
71 |
+
stage3=dict(
|
72 |
+
block='BASIC',
|
73 |
+
num_blocks=(
|
74 |
+
4,
|
75 |
+
4,
|
76 |
+
4,
|
77 |
+
),
|
78 |
+
num_branches=3,
|
79 |
+
num_channels=(
|
80 |
+
48,
|
81 |
+
96,
|
82 |
+
192,
|
83 |
+
),
|
84 |
+
num_modules=4),
|
85 |
+
stage4=dict(
|
86 |
+
block='BASIC',
|
87 |
+
num_blocks=(
|
88 |
+
4,
|
89 |
+
4,
|
90 |
+
4,
|
91 |
+
4,
|
92 |
+
),
|
93 |
+
num_branches=4,
|
94 |
+
num_channels=(
|
95 |
+
48,
|
96 |
+
96,
|
97 |
+
192,
|
98 |
+
384,
|
99 |
+
),
|
100 |
+
num_modules=3)),
|
101 |
+
norm_cfg=dict(requires_grad=True, type='SyncBN'),
|
102 |
+
norm_eval=False,
|
103 |
+
type='HRNet'),
|
104 |
+
data_preprocessor=dict(
|
105 |
+
bgr_to_rgb=True,
|
106 |
+
mean=[
|
107 |
+
123.675,
|
108 |
+
116.28,
|
109 |
+
103.53,
|
110 |
+
],
|
111 |
+
pad_val=0,
|
112 |
+
seg_pad_val=255,
|
113 |
+
size=(
|
114 |
+
256,
|
115 |
+
512,
|
116 |
+
),
|
117 |
+
std=[
|
118 |
+
58.395,
|
119 |
+
57.12,
|
120 |
+
57.375,
|
121 |
+
],
|
122 |
+
type='SegDataPreProcessor'),
|
123 |
+
decode_head=dict(
|
124 |
+
align_corners=False,
|
125 |
+
channels=720,
|
126 |
+
concat_input=False,
|
127 |
+
dropout_ratio=-1,
|
128 |
+
in_channels=[
|
129 |
+
48,
|
130 |
+
96,
|
131 |
+
192,
|
132 |
+
384,
|
133 |
+
],
|
134 |
+
in_index=(
|
135 |
+
0,
|
136 |
+
1,
|
137 |
+
2,
|
138 |
+
3,
|
139 |
+
),
|
140 |
+
input_transform='resize_concat',
|
141 |
+
kernel_size=1,
|
142 |
+
loss_decode=dict(
|
143 |
+
loss_weight=1.0, type='CrossEntropyLoss', use_sigmoid=False),
|
144 |
+
norm_cfg=dict(requires_grad=True, type='SyncBN'),
|
145 |
+
num_classes=19,
|
146 |
+
num_convs=1,
|
147 |
+
type='FCNHead'),
|
148 |
+
pretrained='open-mmlab://msra/hrnetv2_w48',
|
149 |
+
test_cfg=dict(mode='whole'),
|
150 |
+
train_cfg=dict(),
|
151 |
+
type='EncoderDecoder')
|
152 |
+
norm_cfg = dict(requires_grad=True, type='SyncBN')
|
153 |
+
optim_wrapper = dict(
|
154 |
+
clip_grad=None,
|
155 |
+
optimizer=dict(lr=0.01, momentum=0.9, type='SGD', weight_decay=0.0005),
|
156 |
+
type='OptimWrapper')
|
157 |
+
optimizer = dict(lr=0.01, momentum=0.9, type='SGD', weight_decay=0.0005)
|
158 |
+
param_scheduler = [
|
159 |
+
dict(
|
160 |
+
begin=0,
|
161 |
+
by_epoch=False,
|
162 |
+
end=80000,
|
163 |
+
eta_min=0.0001,
|
164 |
+
power=0.9,
|
165 |
+
type='PolyLR'),
|
166 |
+
]
|
167 |
+
resume = False
|
168 |
+
test_cfg = dict(type='TestLoop')
|
169 |
+
test_dataloader = dict(
|
170 |
+
batch_size=1,
|
171 |
+
dataset=dict(
|
172 |
+
data_prefix=dict(
|
173 |
+
img_path='leftImg8bit/val', seg_map_path='gtFine/val'),
|
174 |
+
data_root='/dataset/cityscapes/',
|
175 |
+
pipeline=[
|
176 |
+
dict(type='LoadImageFromFile'),
|
177 |
+
dict(keep_ratio=True, scale=(
|
178 |
+
2048,
|
179 |
+
1024,
|
180 |
+
), type='Resize'),
|
181 |
+
dict(type='LoadAnnotations'),
|
182 |
+
dict(type='PackSegInputs'),
|
183 |
+
],
|
184 |
+
type='CityscapesDataset'),
|
185 |
+
num_workers=4,
|
186 |
+
persistent_workers=True,
|
187 |
+
sampler=dict(shuffle=False, type='DefaultSampler'))
|
188 |
+
test_evaluator = dict(
|
189 |
+
iou_metrics=[
|
190 |
+
'mIoU',
|
191 |
+
], type='IoUMetric')
|
192 |
+
test_pipeline = [
|
193 |
+
dict(type='LoadImageFromFile'),
|
194 |
+
dict(keep_ratio=True, scale=(
|
195 |
+
2048,
|
196 |
+
1024,
|
197 |
+
), type='Resize'),
|
198 |
+
dict(type='LoadAnnotations'),
|
199 |
+
dict(type='PackSegInputs'),
|
200 |
+
]
|
201 |
+
train_cfg = dict(max_iters=80000, type='IterBasedTrainLoop', val_interval=8000)
|
202 |
+
train_dataloader = dict(
|
203 |
+
batch_size=2,
|
204 |
+
dataset=dict(
|
205 |
+
data_prefix=dict(
|
206 |
+
img_path='leftImg8bit/train', seg_map_path='gtFine/train'),
|
207 |
+
data_root='/dataset/cityscapes/',
|
208 |
+
pipeline=[
|
209 |
+
dict(type='LoadImageFromFile'),
|
210 |
+
dict(type='LoadAnnotations'),
|
211 |
+
dict(
|
212 |
+
keep_ratio=True,
|
213 |
+
ratio_range=(
|
214 |
+
0.5,
|
215 |
+
2.0,
|
216 |
+
),
|
217 |
+
scale=(
|
218 |
+
2048,
|
219 |
+
1024,
|
220 |
+
),
|
221 |
+
type='RandomResize'),
|
222 |
+
dict(
|
223 |
+
cat_max_ratio=0.75, crop_size=(
|
224 |
+
256,
|
225 |
+
512,
|
226 |
+
), type='RandomCrop'),
|
227 |
+
dict(prob=0.5, type='RandomFlip'),
|
228 |
+
dict(type='PhotoMetricDistortion'),
|
229 |
+
dict(type='PackSegInputs'),
|
230 |
+
],
|
231 |
+
type='CityscapesDataset'),
|
232 |
+
num_workers=2,
|
233 |
+
persistent_workers=True,
|
234 |
+
sampler=dict(shuffle=True, type='InfiniteSampler'))
|
235 |
+
train_pipeline = [
|
236 |
+
dict(type='LoadImageFromFile'),
|
237 |
+
dict(type='LoadAnnotations'),
|
238 |
+
dict(
|
239 |
+
keep_ratio=True,
|
240 |
+
ratio_range=(
|
241 |
+
0.5,
|
242 |
+
2.0,
|
243 |
+
),
|
244 |
+
scale=(
|
245 |
+
2048,
|
246 |
+
1024,
|
247 |
+
),
|
248 |
+
type='RandomResize'),
|
249 |
+
dict(cat_max_ratio=0.75, crop_size=(
|
250 |
+
256,
|
251 |
+
512,
|
252 |
+
), type='RandomCrop'),
|
253 |
+
dict(prob=0.5, type='RandomFlip'),
|
254 |
+
dict(type='PhotoMetricDistortion'),
|
255 |
+
dict(type='PackSegInputs'),
|
256 |
+
]
|
257 |
+
tta_model = dict(type='SegTTAModel')
|
258 |
+
tta_pipeline = [
|
259 |
+
dict(backend_args=None, type='LoadImageFromFile'),
|
260 |
+
dict(
|
261 |
+
transforms=[
|
262 |
+
[
|
263 |
+
dict(keep_ratio=True, scale_factor=0.5, type='Resize'),
|
264 |
+
dict(keep_ratio=True, scale_factor=0.75, type='Resize'),
|
265 |
+
dict(keep_ratio=True, scale_factor=1.0, type='Resize'),
|
266 |
+
dict(keep_ratio=True, scale_factor=1.25, type='Resize'),
|
267 |
+
dict(keep_ratio=True, scale_factor=1.5, type='Resize'),
|
268 |
+
dict(keep_ratio=True, scale_factor=1.75, type='Resize'),
|
269 |
+
],
|
270 |
+
[
|
271 |
+
dict(direction='horizontal', prob=0.0, type='RandomFlip'),
|
272 |
+
dict(direction='horizontal', prob=1.0, type='RandomFlip'),
|
273 |
+
],
|
274 |
+
[
|
275 |
+
dict(type='LoadAnnotations'),
|
276 |
+
],
|
277 |
+
[
|
278 |
+
dict(type='PackSegInputs'),
|
279 |
+
],
|
280 |
+
],
|
281 |
+
type='TestTimeAug'),
|
282 |
+
]
|
283 |
+
val_cfg = dict(type='ValLoop')
|
284 |
+
val_dataloader = dict(
|
285 |
+
batch_size=1,
|
286 |
+
dataset=dict(
|
287 |
+
data_prefix=dict(
|
288 |
+
img_path='leftImg8bit/val', seg_map_path='gtFine/val'),
|
289 |
+
data_root='/dataset/cityscapes/',
|
290 |
+
pipeline=[
|
291 |
+
dict(type='LoadImageFromFile'),
|
292 |
+
dict(keep_ratio=True, scale=(
|
293 |
+
2048,
|
294 |
+
1024,
|
295 |
+
), type='Resize'),
|
296 |
+
dict(type='LoadAnnotations'),
|
297 |
+
dict(type='PackSegInputs'),
|
298 |
+
],
|
299 |
+
type='CityscapesDataset'),
|
300 |
+
num_workers=4,
|
301 |
+
persistent_workers=True,
|
302 |
+
sampler=dict(shuffle=False, type='DefaultSampler'))
|
303 |
+
val_evaluator = dict(
|
304 |
+
iou_metrics=[
|
305 |
+
'mIoU',
|
306 |
+
], type='IoUMetric')
|
307 |
+
vis_backends = [
|
308 |
+
dict(type='LocalVisBackend'),
|
309 |
+
]
|
310 |
+
visualizer = dict(
|
311 |
+
name='visualizer',
|
312 |
+
type='SegLocalVisualizer',
|
313 |
+
vis_backends=[
|
314 |
+
dict(type='LocalVisBackend'),
|
315 |
+
])
|
316 |
+
work_dir = './work_dirs/fcn-hr48-4xb2-512x1024-80k'
|
fcn-hr48-4xb2-512x1024-80k/fcn-hr48-4xb2-512x1024-80k_ckpt.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f016b92b0c7acf787eb7ad44c726f47bb90098b61d551b50a5dbf999f7bf90d1
|
3 |
+
size 536540243
|