stefanwolf
commited on
Commit
•
d9938f4
1
Parent(s):
fa626df
Added models
Browse files- .gitattributes +1 -0
- models/swin_base_b32x4-fp16_fungi+val_res_384_cb_epochs_6.py +283 -0
- models/swin_base_b32x4-fp16_fungi+val_res_384_cb_epochs_6_20230524-5197a7e6.pth +3 -0
- models/swin_large_b12x6-fp16_fungi+val_res_384_cb_epochs_6.py +283 -0
- models/swinv2_base_w24_b32x4-fp16_fungi+val_res_384_cb_epochs_6.py +284 -0
- models/swinv2_base_w24_b32x4-fp16_fungi+val_res_384_cb_epochs_6_20230524-a251a50a.pth +3 -0
.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
models/*.pth filter=lfs diff=lfs merge=lfs -text
|
models/swin_base_b32x4-fp16_fungi+val_res_384_cb_epochs_6.py
ADDED
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
model = dict(
|
2 |
+
type='ImageClassifier',
|
3 |
+
backbone=dict(
|
4 |
+
type='SwinTransformer',
|
5 |
+
arch='base',
|
6 |
+
img_size=384,
|
7 |
+
stage_cfgs=dict(block_cfgs=dict(window_size=12)),
|
8 |
+
drop_path_rate=0.5,
|
9 |
+
init_cfg=dict(
|
10 |
+
type='Pretrained',
|
11 |
+
checkpoint=
|
12 |
+
'https://download.openmmlab.com/mmclassification/v0/swin-transformer/convert/swin-base_3rdparty_in21k-384px.pth',
|
13 |
+
prefix='backbone')),
|
14 |
+
neck=dict(type='GlobalAveragePooling'),
|
15 |
+
head=dict(
|
16 |
+
type='LinearClsHead',
|
17 |
+
num_classes=1604,
|
18 |
+
in_channels=1024,
|
19 |
+
init_cfg=None,
|
20 |
+
loss=dict(
|
21 |
+
type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'),
|
22 |
+
cal_acc=False),
|
23 |
+
init_cfg=[
|
24 |
+
dict(type='TruncNormal', layer='Linear', std=0.02, bias=0.0),
|
25 |
+
dict(type='Constant', layer='LayerNorm', val=1.0, bias=0.0)
|
26 |
+
],
|
27 |
+
train_cfg=dict())
|
28 |
+
rand_increasing_policies = [
|
29 |
+
dict(type='AutoContrast'),
|
30 |
+
dict(type='Equalize'),
|
31 |
+
dict(type='Invert'),
|
32 |
+
dict(type='Rotate', magnitude_key='angle', magnitude_range=(0, 30)),
|
33 |
+
dict(type='Posterize', magnitude_key='bits', magnitude_range=(4, 0)),
|
34 |
+
dict(type='Solarize', magnitude_key='thr', magnitude_range=(256, 0)),
|
35 |
+
dict(
|
36 |
+
type='SolarizeAdd',
|
37 |
+
magnitude_key='magnitude',
|
38 |
+
magnitude_range=(0, 110)),
|
39 |
+
dict(
|
40 |
+
type='ColorTransform',
|
41 |
+
magnitude_key='magnitude',
|
42 |
+
magnitude_range=(0, 0.9)),
|
43 |
+
dict(type='Contrast', magnitude_key='magnitude', magnitude_range=(0, 0.9)),
|
44 |
+
dict(
|
45 |
+
type='Brightness', magnitude_key='magnitude',
|
46 |
+
magnitude_range=(0, 0.9)),
|
47 |
+
dict(
|
48 |
+
type='Sharpness', magnitude_key='magnitude', magnitude_range=(0, 0.9)),
|
49 |
+
dict(
|
50 |
+
type='Shear',
|
51 |
+
magnitude_key='magnitude',
|
52 |
+
magnitude_range=(0, 0.3),
|
53 |
+
direction='horizontal'),
|
54 |
+
dict(
|
55 |
+
type='Shear',
|
56 |
+
magnitude_key='magnitude',
|
57 |
+
magnitude_range=(0, 0.3),
|
58 |
+
direction='vertical'),
|
59 |
+
dict(
|
60 |
+
type='Translate',
|
61 |
+
magnitude_key='magnitude',
|
62 |
+
magnitude_range=(0, 0.45),
|
63 |
+
direction='horizontal'),
|
64 |
+
dict(
|
65 |
+
type='Translate',
|
66 |
+
magnitude_key='magnitude',
|
67 |
+
magnitude_range=(0, 0.45),
|
68 |
+
direction='vertical')
|
69 |
+
]
|
70 |
+
dataset_type = 'Fungi'
|
71 |
+
data_preprocessor = dict(
|
72 |
+
num_classes=1604,
|
73 |
+
mean=[123.675, 116.28, 103.53],
|
74 |
+
std=[58.395, 57.12, 57.375],
|
75 |
+
to_rgb=True)
|
76 |
+
bgr_mean = [103.53, 116.28, 123.675]
|
77 |
+
bgr_std = [57.375, 57.12, 58.395]
|
78 |
+
train_pipeline = [
|
79 |
+
dict(type='LoadImageFromFileFungi'),
|
80 |
+
dict(
|
81 |
+
type='RandomResizedCrop',
|
82 |
+
scale=384,
|
83 |
+
backend='pillow',
|
84 |
+
interpolation='bicubic'),
|
85 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
86 |
+
dict(
|
87 |
+
type='RandAugment',
|
88 |
+
policies='timm_increasing',
|
89 |
+
num_policies=2,
|
90 |
+
total_level=10,
|
91 |
+
magnitude_level=9,
|
92 |
+
magnitude_std=0.5,
|
93 |
+
hparams=dict(pad_val=[104, 116, 124], interpolation='bicubic')),
|
94 |
+
dict(
|
95 |
+
type='RandomErasing',
|
96 |
+
erase_prob=0.25,
|
97 |
+
mode='rand',
|
98 |
+
min_area_ratio=0.02,
|
99 |
+
max_area_ratio=0.3333333333333333,
|
100 |
+
fill_color=[103.53, 116.28, 123.675],
|
101 |
+
fill_std=[57.375, 57.12, 58.395]),
|
102 |
+
dict(type='PackInputs')
|
103 |
+
]
|
104 |
+
test_pipeline = [
|
105 |
+
dict(type='LoadImageFromFileFungi'),
|
106 |
+
dict(
|
107 |
+
type='ResizeEdge',
|
108 |
+
scale=438,
|
109 |
+
edge='short',
|
110 |
+
backend='pillow',
|
111 |
+
interpolation='bicubic'),
|
112 |
+
dict(type='CenterCrop', crop_size=384),
|
113 |
+
dict(type='PackInputs')
|
114 |
+
]
|
115 |
+
train_dataloader = dict(
|
116 |
+
pin_memory=True,
|
117 |
+
persistent_workers=True,
|
118 |
+
collate_fn=dict(type='default_collate'),
|
119 |
+
batch_size=32,
|
120 |
+
num_workers=14,
|
121 |
+
dataset=dict(
|
122 |
+
type='ClassBalancedDataset',
|
123 |
+
oversample_thr=0.01,
|
124 |
+
dataset=dict(
|
125 |
+
type='Fungi',
|
126 |
+
data_root='/scratch/slurm_tmpdir/job_22252118/',
|
127 |
+
ann_file='FungiCLEF2023_train_metadata_PRODUCTION.csv',
|
128 |
+
data_prefix='DF20/',
|
129 |
+
pipeline=[
|
130 |
+
dict(type='LoadImageFromFileFungi'),
|
131 |
+
dict(
|
132 |
+
type='RandomResizedCrop',
|
133 |
+
scale=384,
|
134 |
+
backend='pillow',
|
135 |
+
interpolation='bicubic'),
|
136 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
137 |
+
dict(
|
138 |
+
type='RandAugment',
|
139 |
+
policies='timm_increasing',
|
140 |
+
num_policies=2,
|
141 |
+
total_level=10,
|
142 |
+
magnitude_level=9,
|
143 |
+
magnitude_std=0.5,
|
144 |
+
hparams=dict(
|
145 |
+
pad_val=[104, 116, 124], interpolation='bicubic')),
|
146 |
+
dict(
|
147 |
+
type='RandomErasing',
|
148 |
+
erase_prob=0.25,
|
149 |
+
mode='rand',
|
150 |
+
min_area_ratio=0.02,
|
151 |
+
max_area_ratio=0.3333333333333333,
|
152 |
+
fill_color=[103.53, 116.28, 123.675],
|
153 |
+
fill_std=[57.375, 57.12, 58.395]),
|
154 |
+
dict(type='PackInputs')
|
155 |
+
])),
|
156 |
+
sampler=dict(type='DefaultSampler', shuffle=True))
|
157 |
+
val_dataloader = dict(
|
158 |
+
pin_memory=True,
|
159 |
+
persistent_workers=True,
|
160 |
+
collate_fn=dict(type='default_collate'),
|
161 |
+
batch_size=64,
|
162 |
+
num_workers=12,
|
163 |
+
dataset=dict(
|
164 |
+
type='Fungi',
|
165 |
+
data_root='/scratch/slurm_tmpdir/job_22252118/',
|
166 |
+
ann_file='FungiCLEF2023_val_metadata_PRODUCTION.csv',
|
167 |
+
data_prefix='DF21/',
|
168 |
+
pipeline=[
|
169 |
+
dict(type='LoadImageFromFileFungi'),
|
170 |
+
dict(
|
171 |
+
type='RandomResizedCrop',
|
172 |
+
scale=384,
|
173 |
+
backend='pillow',
|
174 |
+
interpolation='bicubic'),
|
175 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
176 |
+
dict(
|
177 |
+
type='RandAugment',
|
178 |
+
policies='timm_increasing',
|
179 |
+
num_policies=2,
|
180 |
+
total_level=10,
|
181 |
+
magnitude_level=9,
|
182 |
+
magnitude_std=0.5,
|
183 |
+
hparams=dict(pad_val=[104, 116, 124],
|
184 |
+
interpolation='bicubic')),
|
185 |
+
dict(
|
186 |
+
type='RandomErasing',
|
187 |
+
erase_prob=0.25,
|
188 |
+
mode='rand',
|
189 |
+
min_area_ratio=0.02,
|
190 |
+
max_area_ratio=0.3333333333333333,
|
191 |
+
fill_color=[103.53, 116.28, 123.675],
|
192 |
+
fill_std=[57.375, 57.12, 58.395]),
|
193 |
+
dict(type='PackInputs')
|
194 |
+
]),
|
195 |
+
sampler=dict(type='DefaultSampler', shuffle=False))
|
196 |
+
val_evaluator = dict(
|
197 |
+
type='SingleLabelMetric', items=['precision', 'recall', 'f1-score'])
|
198 |
+
test_dataloader = dict(
|
199 |
+
pin_memory=True,
|
200 |
+
persistent_workers=True,
|
201 |
+
collate_fn=dict(type='default_collate'),
|
202 |
+
batch_size=64,
|
203 |
+
num_workers=12,
|
204 |
+
dataset=dict(
|
205 |
+
type='FungiTest',
|
206 |
+
data_root='data/fungi2023/',
|
207 |
+
ann_file='FungiCLEF2023_public_test_metadata_PRODUCTION.csv',
|
208 |
+
data_prefix='DF21/',
|
209 |
+
pipeline=[
|
210 |
+
dict(type='LoadImageFromFileFungi'),
|
211 |
+
dict(
|
212 |
+
type='ResizeEdge',
|
213 |
+
scale=438,
|
214 |
+
edge='short',
|
215 |
+
backend='pillow',
|
216 |
+
interpolation='bicubic'),
|
217 |
+
dict(type='CenterCrop', crop_size=384),
|
218 |
+
dict(
|
219 |
+
type='Normalize',
|
220 |
+
mean=[123.675, 116.28, 103.53],
|
221 |
+
std=[58.395, 57.12, 57.375],
|
222 |
+
to_rgb=True),
|
223 |
+
dict(type='PackInputs'),
|
224 |
+
]),
|
225 |
+
sampler=dict(type='DefaultSampler', shuffle=False))
|
226 |
+
test_evaluator = dict(
|
227 |
+
type='SingleLabelMetric', items=['precision', 'recall', 'f1-score'])
|
228 |
+
optim_wrapper = dict(
|
229 |
+
optimizer=dict(
|
230 |
+
type='AdamW',
|
231 |
+
lr=6.25e-05,
|
232 |
+
weight_decay=0.05,
|
233 |
+
eps=1e-08,
|
234 |
+
betas=(0.9, 0.999)),
|
235 |
+
paramwise_cfg=dict(
|
236 |
+
norm_decay_mult=0.0,
|
237 |
+
bias_decay_mult=0.0,
|
238 |
+
flat_decay_mult=0.0,
|
239 |
+
custom_keys=dict({
|
240 |
+
'.absolute_pos_embed': dict(decay_mult=0.0),
|
241 |
+
'.relative_position_bias_table': dict(decay_mult=0.0)
|
242 |
+
})),
|
243 |
+
clip_grad=dict(max_norm=5),
|
244 |
+
type='AmpOptimWrapper')
|
245 |
+
param_scheduler = [
|
246 |
+
dict(type='LinearLR', start_factor=0.01, by_epoch=False, end=4200),
|
247 |
+
dict(type='CosineAnnealingLR', eta_min=0, by_epoch=False, begin=4200)
|
248 |
+
]
|
249 |
+
train_cfg = dict(by_epoch=True, max_epochs=6, val_interval=1)
|
250 |
+
val_cfg = dict()
|
251 |
+
test_cfg = dict()
|
252 |
+
auto_scale_lr = dict(base_batch_size=64, enable=True)
|
253 |
+
default_scope = 'mmpretrain'
|
254 |
+
default_hooks = dict(
|
255 |
+
timer=dict(type='IterTimerHook'),
|
256 |
+
logger=dict(type='LoggerHook', interval=100),
|
257 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
258 |
+
checkpoint=dict(type='CheckpointHook', interval=1),
|
259 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
260 |
+
visualization=dict(type='VisualizationHook', enable=False))
|
261 |
+
env_cfg = dict(
|
262 |
+
cudnn_benchmark=False,
|
263 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
264 |
+
dist_cfg=dict(backend='nccl'))
|
265 |
+
vis_backends = [
|
266 |
+
dict(type='LocalVisBackend'),
|
267 |
+
dict(type='TensorboardVisBackend')
|
268 |
+
]
|
269 |
+
visualizer = dict(
|
270 |
+
type='UniversalVisualizer',
|
271 |
+
vis_backends=[
|
272 |
+
dict(type='LocalVisBackend'),
|
273 |
+
dict(type='TensorboardVisBackend')
|
274 |
+
])
|
275 |
+
log_level = 'INFO'
|
276 |
+
load_from = None
|
277 |
+
resume = False
|
278 |
+
randomness = dict(seed=None, deterministic=False)
|
279 |
+
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/swin-transformer/convert/swin-base_3rdparty_in21k-384px.pth'
|
280 |
+
custom_imports = dict(
|
281 |
+
imports=['mmpretrain_custom'], allow_failed_imports=False)
|
282 |
+
launcher = 'pytorch'
|
283 |
+
work_dir = './work_dirs/swin_base_b32x4-fp16_fungi+val_res_384_cb_epochs_6'
|
models/swin_base_b32x4-fp16_fungi+val_res_384_cb_epochs_6_20230524-5197a7e6.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5197a7e62e88740e7d950203e52a08996bcc3f6a648367c55ee9631e12220844
|
3 |
+
size 358213519
|
models/swin_large_b12x6-fp16_fungi+val_res_384_cb_epochs_6.py
ADDED
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
model = dict(
|
2 |
+
type='ImageClassifier',
|
3 |
+
backbone=dict(
|
4 |
+
type='SwinTransformer',
|
5 |
+
arch='large',
|
6 |
+
img_size=384,
|
7 |
+
stage_cfgs=dict(block_cfgs=dict(window_size=12)),
|
8 |
+
drop_path_rate=0.5,
|
9 |
+
init_cfg=dict(
|
10 |
+
type='Pretrained',
|
11 |
+
checkpoint=
|
12 |
+
'https://download.openmmlab.com/mmclassification/v0/swin-transformer/convert/swin-base_3rdparty_in21k-384px.pth',
|
13 |
+
prefix='backbone')),
|
14 |
+
neck=dict(type='GlobalAveragePooling'),
|
15 |
+
head=dict(
|
16 |
+
type='LinearClsHead',
|
17 |
+
num_classes=1604,
|
18 |
+
in_channels=1536,
|
19 |
+
init_cfg=None,
|
20 |
+
loss=dict(
|
21 |
+
type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'),
|
22 |
+
cal_acc=False),
|
23 |
+
init_cfg=[
|
24 |
+
dict(type='TruncNormal', layer='Linear', std=0.02, bias=0.0),
|
25 |
+
dict(type='Constant', layer='LayerNorm', val=1.0, bias=0.0)
|
26 |
+
],
|
27 |
+
train_cfg=dict())
|
28 |
+
rand_increasing_policies = [
|
29 |
+
dict(type='AutoContrast'),
|
30 |
+
dict(type='Equalize'),
|
31 |
+
dict(type='Invert'),
|
32 |
+
dict(type='Rotate', magnitude_key='angle', magnitude_range=(0, 30)),
|
33 |
+
dict(type='Posterize', magnitude_key='bits', magnitude_range=(4, 0)),
|
34 |
+
dict(type='Solarize', magnitude_key='thr', magnitude_range=(256, 0)),
|
35 |
+
dict(
|
36 |
+
type='SolarizeAdd',
|
37 |
+
magnitude_key='magnitude',
|
38 |
+
magnitude_range=(0, 110)),
|
39 |
+
dict(
|
40 |
+
type='ColorTransform',
|
41 |
+
magnitude_key='magnitude',
|
42 |
+
magnitude_range=(0, 0.9)),
|
43 |
+
dict(type='Contrast', magnitude_key='magnitude', magnitude_range=(0, 0.9)),
|
44 |
+
dict(
|
45 |
+
type='Brightness', magnitude_key='magnitude',
|
46 |
+
magnitude_range=(0, 0.9)),
|
47 |
+
dict(
|
48 |
+
type='Sharpness', magnitude_key='magnitude', magnitude_range=(0, 0.9)),
|
49 |
+
dict(
|
50 |
+
type='Shear',
|
51 |
+
magnitude_key='magnitude',
|
52 |
+
magnitude_range=(0, 0.3),
|
53 |
+
direction='horizontal'),
|
54 |
+
dict(
|
55 |
+
type='Shear',
|
56 |
+
magnitude_key='magnitude',
|
57 |
+
magnitude_range=(0, 0.3),
|
58 |
+
direction='vertical'),
|
59 |
+
dict(
|
60 |
+
type='Translate',
|
61 |
+
magnitude_key='magnitude',
|
62 |
+
magnitude_range=(0, 0.45),
|
63 |
+
direction='horizontal'),
|
64 |
+
dict(
|
65 |
+
type='Translate',
|
66 |
+
magnitude_key='magnitude',
|
67 |
+
magnitude_range=(0, 0.45),
|
68 |
+
direction='vertical')
|
69 |
+
]
|
70 |
+
dataset_type = 'Fungi'
|
71 |
+
data_preprocessor = dict(
|
72 |
+
num_classes=1604,
|
73 |
+
mean=[123.675, 116.28, 103.53],
|
74 |
+
std=[58.395, 57.12, 57.375],
|
75 |
+
to_rgb=True)
|
76 |
+
bgr_mean = [103.53, 116.28, 123.675]
|
77 |
+
bgr_std = [57.375, 57.12, 58.395]
|
78 |
+
train_pipeline = [
|
79 |
+
dict(type='LoadImageFromFileFungi'),
|
80 |
+
dict(
|
81 |
+
type='RandomResizedCrop',
|
82 |
+
scale=384,
|
83 |
+
backend='pillow',
|
84 |
+
interpolation='bicubic'),
|
85 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
86 |
+
dict(
|
87 |
+
type='RandAugment',
|
88 |
+
policies='timm_increasing',
|
89 |
+
num_policies=2,
|
90 |
+
total_level=10,
|
91 |
+
magnitude_level=9,
|
92 |
+
magnitude_std=0.5,
|
93 |
+
hparams=dict(pad_val=[104, 116, 124], interpolation='bicubic')),
|
94 |
+
dict(
|
95 |
+
type='RandomErasing',
|
96 |
+
erase_prob=0.25,
|
97 |
+
mode='rand',
|
98 |
+
min_area_ratio=0.02,
|
99 |
+
max_area_ratio=0.3333333333333333,
|
100 |
+
fill_color=[103.53, 116.28, 123.675],
|
101 |
+
fill_std=[57.375, 57.12, 58.395]),
|
102 |
+
dict(type='PackInputs')
|
103 |
+
]
|
104 |
+
test_pipeline = [
|
105 |
+
dict(type='LoadImageFromFileFungi'),
|
106 |
+
dict(
|
107 |
+
type='ResizeEdge',
|
108 |
+
scale=438,
|
109 |
+
edge='short',
|
110 |
+
backend='pillow',
|
111 |
+
interpolation='bicubic'),
|
112 |
+
dict(type='CenterCrop', crop_size=384),
|
113 |
+
dict(type='PackInputs')
|
114 |
+
]
|
115 |
+
train_dataloader = dict(
|
116 |
+
pin_memory=True,
|
117 |
+
persistent_workers=True,
|
118 |
+
collate_fn=dict(type='default_collate'),
|
119 |
+
batch_size=32,
|
120 |
+
num_workers=14,
|
121 |
+
dataset=dict(
|
122 |
+
type='ClassBalancedDataset',
|
123 |
+
oversample_thr=0.01,
|
124 |
+
dataset=dict(
|
125 |
+
type='Fungi',
|
126 |
+
data_root='/scratch/slurm_tmpdir/job_22252118/',
|
127 |
+
ann_file='FungiCLEF2023_train_metadata_PRODUCTION.csv',
|
128 |
+
data_prefix='DF20/',
|
129 |
+
pipeline=[
|
130 |
+
dict(type='LoadImageFromFileFungi'),
|
131 |
+
dict(
|
132 |
+
type='RandomResizedCrop',
|
133 |
+
scale=384,
|
134 |
+
backend='pillow',
|
135 |
+
interpolation='bicubic'),
|
136 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
137 |
+
dict(
|
138 |
+
type='RandAugment',
|
139 |
+
policies='timm_increasing',
|
140 |
+
num_policies=2,
|
141 |
+
total_level=10,
|
142 |
+
magnitude_level=9,
|
143 |
+
magnitude_std=0.5,
|
144 |
+
hparams=dict(
|
145 |
+
pad_val=[104, 116, 124], interpolation='bicubic')),
|
146 |
+
dict(
|
147 |
+
type='RandomErasing',
|
148 |
+
erase_prob=0.25,
|
149 |
+
mode='rand',
|
150 |
+
min_area_ratio=0.02,
|
151 |
+
max_area_ratio=0.3333333333333333,
|
152 |
+
fill_color=[103.53, 116.28, 123.675],
|
153 |
+
fill_std=[57.375, 57.12, 58.395]),
|
154 |
+
dict(type='PackInputs')
|
155 |
+
])),
|
156 |
+
sampler=dict(type='DefaultSampler', shuffle=True))
|
157 |
+
val_dataloader = dict(
|
158 |
+
pin_memory=True,
|
159 |
+
persistent_workers=True,
|
160 |
+
collate_fn=dict(type='default_collate'),
|
161 |
+
batch_size=64,
|
162 |
+
num_workers=12,
|
163 |
+
dataset=dict(
|
164 |
+
type='Fungi',
|
165 |
+
data_root='/scratch/slurm_tmpdir/job_22252118/',
|
166 |
+
ann_file='FungiCLEF2023_val_metadata_PRODUCTION.csv',
|
167 |
+
data_prefix='DF21/',
|
168 |
+
pipeline=[
|
169 |
+
dict(type='LoadImageFromFileFungi'),
|
170 |
+
dict(
|
171 |
+
type='RandomResizedCrop',
|
172 |
+
scale=384,
|
173 |
+
backend='pillow',
|
174 |
+
interpolation='bicubic'),
|
175 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
176 |
+
dict(
|
177 |
+
type='RandAugment',
|
178 |
+
policies='timm_increasing',
|
179 |
+
num_policies=2,
|
180 |
+
total_level=10,
|
181 |
+
magnitude_level=9,
|
182 |
+
magnitude_std=0.5,
|
183 |
+
hparams=dict(pad_val=[104, 116, 124],
|
184 |
+
interpolation='bicubic')),
|
185 |
+
dict(
|
186 |
+
type='RandomErasing',
|
187 |
+
erase_prob=0.25,
|
188 |
+
mode='rand',
|
189 |
+
min_area_ratio=0.02,
|
190 |
+
max_area_ratio=0.3333333333333333,
|
191 |
+
fill_color=[103.53, 116.28, 123.675],
|
192 |
+
fill_std=[57.375, 57.12, 58.395]),
|
193 |
+
dict(type='PackInputs')
|
194 |
+
]),
|
195 |
+
sampler=dict(type='DefaultSampler', shuffle=False))
|
196 |
+
val_evaluator = dict(
|
197 |
+
type='SingleLabelMetric', items=['precision', 'recall', 'f1-score'])
|
198 |
+
test_dataloader = dict(
|
199 |
+
pin_memory=True,
|
200 |
+
persistent_workers=True,
|
201 |
+
collate_fn=dict(type='default_collate'),
|
202 |
+
batch_size=64,
|
203 |
+
num_workers=12,
|
204 |
+
dataset=dict(
|
205 |
+
type='FungiTest',
|
206 |
+
data_root='data/fungi2023/',
|
207 |
+
ann_file='FungiCLEF2023_public_test_metadata_PRODUCTION.csv',
|
208 |
+
data_prefix='DF21/',
|
209 |
+
pipeline=[
|
210 |
+
dict(type='LoadImageFromFileFungi'),
|
211 |
+
dict(
|
212 |
+
type='ResizeEdge',
|
213 |
+
scale=438,
|
214 |
+
edge='short',
|
215 |
+
backend='pillow',
|
216 |
+
interpolation='bicubic'),
|
217 |
+
dict(type='CenterCrop', crop_size=384),
|
218 |
+
dict(
|
219 |
+
type='Normalize',
|
220 |
+
mean=[123.675, 116.28, 103.53],
|
221 |
+
std=[58.395, 57.12, 57.375],
|
222 |
+
to_rgb=True),
|
223 |
+
dict(type='PackInputs'),
|
224 |
+
]),
|
225 |
+
sampler=dict(type='DefaultSampler', shuffle=False))
|
226 |
+
test_evaluator = dict(
|
227 |
+
type='SingleLabelMetric', items=['precision', 'recall', 'f1-score'])
|
228 |
+
optim_wrapper = dict(
|
229 |
+
optimizer=dict(
|
230 |
+
type='AdamW',
|
231 |
+
lr=6.25e-05,
|
232 |
+
weight_decay=0.05,
|
233 |
+
eps=1e-08,
|
234 |
+
betas=(0.9, 0.999)),
|
235 |
+
paramwise_cfg=dict(
|
236 |
+
norm_decay_mult=0.0,
|
237 |
+
bias_decay_mult=0.0,
|
238 |
+
flat_decay_mult=0.0,
|
239 |
+
custom_keys=dict({
|
240 |
+
'.absolute_pos_embed': dict(decay_mult=0.0),
|
241 |
+
'.relative_position_bias_table': dict(decay_mult=0.0)
|
242 |
+
})),
|
243 |
+
clip_grad=dict(max_norm=5),
|
244 |
+
type='AmpOptimWrapper')
|
245 |
+
param_scheduler = [
|
246 |
+
dict(type='LinearLR', start_factor=0.01, by_epoch=False, end=4200),
|
247 |
+
dict(type='CosineAnnealingLR', eta_min=0, by_epoch=False, begin=4200)
|
248 |
+
]
|
249 |
+
train_cfg = dict(by_epoch=True, max_epochs=6, val_interval=1)
|
250 |
+
val_cfg = dict()
|
251 |
+
test_cfg = dict()
|
252 |
+
auto_scale_lr = dict(base_batch_size=64, enable=True)
|
253 |
+
default_scope = 'mmpretrain'
|
254 |
+
default_hooks = dict(
|
255 |
+
timer=dict(type='IterTimerHook'),
|
256 |
+
logger=dict(type='LoggerHook', interval=100),
|
257 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
258 |
+
checkpoint=dict(type='CheckpointHook', interval=1),
|
259 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
260 |
+
visualization=dict(type='VisualizationHook', enable=False))
|
261 |
+
env_cfg = dict(
|
262 |
+
cudnn_benchmark=False,
|
263 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
264 |
+
dist_cfg=dict(backend='nccl'))
|
265 |
+
vis_backends = [
|
266 |
+
dict(type='LocalVisBackend'),
|
267 |
+
dict(type='TensorboardVisBackend')
|
268 |
+
]
|
269 |
+
visualizer = dict(
|
270 |
+
type='UniversalVisualizer',
|
271 |
+
vis_backends=[
|
272 |
+
dict(type='LocalVisBackend'),
|
273 |
+
dict(type='TensorboardVisBackend')
|
274 |
+
])
|
275 |
+
log_level = 'INFO'
|
276 |
+
load_from = None
|
277 |
+
resume = False
|
278 |
+
randomness = dict(seed=None, deterministic=False)
|
279 |
+
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/swin-transformer/convert/swin-base_3rdparty_in21k-384px.pth'
|
280 |
+
custom_imports = dict(
|
281 |
+
imports=['mmpretrain_custom'], allow_failed_imports=False)
|
282 |
+
launcher = 'pytorch'
|
283 |
+
work_dir = './work_dirs/swin_base_b32x4-fp16_fungi+val_res_384_cb_epochs_6'
|
models/swinv2_base_w24_b32x4-fp16_fungi+val_res_384_cb_epochs_6.py
ADDED
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
model = dict(
|
2 |
+
type='ImageClassifier',
|
3 |
+
backbone=dict(
|
4 |
+
type='SwinTransformerV2',
|
5 |
+
arch='base',
|
6 |
+
img_size=384,
|
7 |
+
drop_path_rate=0.2,
|
8 |
+
window_size=[24, 24, 24, 12],
|
9 |
+
pretrained_window_sizes=[12, 12, 12, 6],
|
10 |
+
init_cfg=dict(
|
11 |
+
type='Pretrained',
|
12 |
+
checkpoint=
|
13 |
+
'https://download.openmmlab.com/mmclassification/v0/swin-v2/pretrain/swinv2-base-w12_3rdparty_in21k-192px_20220803-f7dc9763.pth',
|
14 |
+
prefix='backbone')),
|
15 |
+
neck=dict(type='GlobalAveragePooling'),
|
16 |
+
head=dict(
|
17 |
+
type='LinearClsHead',
|
18 |
+
num_classes=1604,
|
19 |
+
in_channels=1024,
|
20 |
+
init_cfg=None,
|
21 |
+
loss=dict(
|
22 |
+
type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'),
|
23 |
+
cal_acc=False),
|
24 |
+
init_cfg=[
|
25 |
+
dict(type='TruncNormal', layer='Linear', std=0.02, bias=0.0),
|
26 |
+
dict(type='Constant', layer='LayerNorm', val=1.0, bias=0.0)
|
27 |
+
],
|
28 |
+
train_cfg=dict())
|
29 |
+
rand_increasing_policies = [
|
30 |
+
dict(type='AutoContrast'),
|
31 |
+
dict(type='Equalize'),
|
32 |
+
dict(type='Invert'),
|
33 |
+
dict(type='Rotate', magnitude_key='angle', magnitude_range=(0, 30)),
|
34 |
+
dict(type='Posterize', magnitude_key='bits', magnitude_range=(4, 0)),
|
35 |
+
dict(type='Solarize', magnitude_key='thr', magnitude_range=(256, 0)),
|
36 |
+
dict(
|
37 |
+
type='SolarizeAdd',
|
38 |
+
magnitude_key='magnitude',
|
39 |
+
magnitude_range=(0, 110)),
|
40 |
+
dict(
|
41 |
+
type='ColorTransform',
|
42 |
+
magnitude_key='magnitude',
|
43 |
+
magnitude_range=(0, 0.9)),
|
44 |
+
dict(type='Contrast', magnitude_key='magnitude', magnitude_range=(0, 0.9)),
|
45 |
+
dict(
|
46 |
+
type='Brightness', magnitude_key='magnitude',
|
47 |
+
magnitude_range=(0, 0.9)),
|
48 |
+
dict(
|
49 |
+
type='Sharpness', magnitude_key='magnitude', magnitude_range=(0, 0.9)),
|
50 |
+
dict(
|
51 |
+
type='Shear',
|
52 |
+
magnitude_key='magnitude',
|
53 |
+
magnitude_range=(0, 0.3),
|
54 |
+
direction='horizontal'),
|
55 |
+
dict(
|
56 |
+
type='Shear',
|
57 |
+
magnitude_key='magnitude',
|
58 |
+
magnitude_range=(0, 0.3),
|
59 |
+
direction='vertical'),
|
60 |
+
dict(
|
61 |
+
type='Translate',
|
62 |
+
magnitude_key='magnitude',
|
63 |
+
magnitude_range=(0, 0.45),
|
64 |
+
direction='horizontal'),
|
65 |
+
dict(
|
66 |
+
type='Translate',
|
67 |
+
magnitude_key='magnitude',
|
68 |
+
magnitude_range=(0, 0.45),
|
69 |
+
direction='vertical')
|
70 |
+
]
|
71 |
+
dataset_type = 'Fungi'
|
72 |
+
data_preprocessor = dict(
|
73 |
+
num_classes=1604,
|
74 |
+
mean=[123.675, 116.28, 103.53],
|
75 |
+
std=[58.395, 57.12, 57.375],
|
76 |
+
to_rgb=True)
|
77 |
+
bgr_mean = [103.53, 116.28, 123.675]
|
78 |
+
bgr_std = [57.375, 57.12, 58.395]
|
79 |
+
train_pipeline = [
|
80 |
+
dict(type='LoadImageFromFileFungi'),
|
81 |
+
dict(
|
82 |
+
type='RandomResizedCrop',
|
83 |
+
scale=384,
|
84 |
+
backend='pillow',
|
85 |
+
interpolation='bicubic'),
|
86 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
87 |
+
dict(
|
88 |
+
type='RandAugment',
|
89 |
+
policies='timm_increasing',
|
90 |
+
num_policies=2,
|
91 |
+
total_level=10,
|
92 |
+
magnitude_level=9,
|
93 |
+
magnitude_std=0.5,
|
94 |
+
hparams=dict(pad_val=[104, 116, 124], interpolation='bicubic')),
|
95 |
+
dict(
|
96 |
+
type='RandomErasing',
|
97 |
+
erase_prob=0.25,
|
98 |
+
mode='rand',
|
99 |
+
min_area_ratio=0.02,
|
100 |
+
max_area_ratio=0.3333333333333333,
|
101 |
+
fill_color=[103.53, 116.28, 123.675],
|
102 |
+
fill_std=[57.375, 57.12, 58.395]),
|
103 |
+
dict(type='PackInputs')
|
104 |
+
]
|
105 |
+
test_pipeline = [
|
106 |
+
dict(type='LoadImageFromFileFungi'),
|
107 |
+
dict(
|
108 |
+
type='ResizeEdge',
|
109 |
+
scale=438,
|
110 |
+
edge='short',
|
111 |
+
backend='pillow',
|
112 |
+
interpolation='bicubic'),
|
113 |
+
dict(type='CenterCrop', crop_size=384),
|
114 |
+
dict(type='PackInputs')
|
115 |
+
]
|
116 |
+
train_dataloader = dict(
|
117 |
+
pin_memory=True,
|
118 |
+
persistent_workers=True,
|
119 |
+
collate_fn=dict(type='default_collate'),
|
120 |
+
batch_size=32,
|
121 |
+
num_workers=14,
|
122 |
+
dataset=dict(
|
123 |
+
type='ClassBalancedDataset',
|
124 |
+
oversample_thr=0.01,
|
125 |
+
dataset=dict(
|
126 |
+
type='Fungi',
|
127 |
+
data_root='/scratch/slurm_tmpdir/job_22252299/',
|
128 |
+
ann_file='FungiCLEF2023_train_metadata_PRODUCTION.csv',
|
129 |
+
data_prefix='DF20/',
|
130 |
+
pipeline=[
|
131 |
+
dict(type='LoadImageFromFileFungi'),
|
132 |
+
dict(
|
133 |
+
type='RandomResizedCrop',
|
134 |
+
scale=384,
|
135 |
+
backend='pillow',
|
136 |
+
interpolation='bicubic'),
|
137 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
138 |
+
dict(
|
139 |
+
type='RandAugment',
|
140 |
+
policies='timm_increasing',
|
141 |
+
num_policies=2,
|
142 |
+
total_level=10,
|
143 |
+
magnitude_level=9,
|
144 |
+
magnitude_std=0.5,
|
145 |
+
hparams=dict(
|
146 |
+
pad_val=[104, 116, 124], interpolation='bicubic')),
|
147 |
+
dict(
|
148 |
+
type='RandomErasing',
|
149 |
+
erase_prob=0.25,
|
150 |
+
mode='rand',
|
151 |
+
min_area_ratio=0.02,
|
152 |
+
max_area_ratio=0.3333333333333333,
|
153 |
+
fill_color=[103.53, 116.28, 123.675],
|
154 |
+
fill_std=[57.375, 57.12, 58.395]),
|
155 |
+
dict(type='PackInputs')
|
156 |
+
])),
|
157 |
+
sampler=dict(type='DefaultSampler', shuffle=True))
|
158 |
+
val_dataloader = dict(
|
159 |
+
pin_memory=True,
|
160 |
+
persistent_workers=True,
|
161 |
+
collate_fn=dict(type='default_collate'),
|
162 |
+
batch_size=64,
|
163 |
+
num_workers=12,
|
164 |
+
dataset=dict(
|
165 |
+
type='Fungi',
|
166 |
+
data_root='/scratch/slurm_tmpdir/job_22252299/',
|
167 |
+
ann_file='FungiCLEF2023_val_metadata_PRODUCTION.csv',
|
168 |
+
data_prefix='DF21/',
|
169 |
+
pipeline=[
|
170 |
+
dict(type='LoadImageFromFileFungi'),
|
171 |
+
dict(
|
172 |
+
type='RandomResizedCrop',
|
173 |
+
scale=384,
|
174 |
+
backend='pillow',
|
175 |
+
interpolation='bicubic'),
|
176 |
+
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
|
177 |
+
dict(
|
178 |
+
type='RandAugment',
|
179 |
+
policies='timm_increasing',
|
180 |
+
num_policies=2,
|
181 |
+
total_level=10,
|
182 |
+
magnitude_level=9,
|
183 |
+
magnitude_std=0.5,
|
184 |
+
hparams=dict(pad_val=[104, 116, 124],
|
185 |
+
interpolation='bicubic')),
|
186 |
+
dict(
|
187 |
+
type='RandomErasing',
|
188 |
+
erase_prob=0.25,
|
189 |
+
mode='rand',
|
190 |
+
min_area_ratio=0.02,
|
191 |
+
max_area_ratio=0.3333333333333333,
|
192 |
+
fill_color=[103.53, 116.28, 123.675],
|
193 |
+
fill_std=[57.375, 57.12, 58.395]),
|
194 |
+
dict(type='PackInputs')
|
195 |
+
]),
|
196 |
+
sampler=dict(type='DefaultSampler', shuffle=False))
|
197 |
+
val_evaluator = dict(
|
198 |
+
type='SingleLabelMetric', items=['precision', 'recall', 'f1-score'])
|
199 |
+
test_dataloader = dict(
|
200 |
+
pin_memory=True,
|
201 |
+
persistent_workers=True,
|
202 |
+
collate_fn=dict(type='default_collate'),
|
203 |
+
batch_size=64,
|
204 |
+
num_workers=12,
|
205 |
+
dataset=dict(
|
206 |
+
type='FungiTest',
|
207 |
+
data_root='data/fungi2023/',
|
208 |
+
ann_file='FungiCLEF2023_public_test_metadata_PRODUCTION.csv',
|
209 |
+
data_prefix='DF21/',
|
210 |
+
pipeline=[
|
211 |
+
dict(type='LoadImageFromFileFungi'),
|
212 |
+
dict(
|
213 |
+
type='ResizeEdge',
|
214 |
+
scale=438,
|
215 |
+
edge='short',
|
216 |
+
backend='pillow',
|
217 |
+
interpolation='bicubic'),
|
218 |
+
dict(type='CenterCrop', crop_size=384),
|
219 |
+
dict(
|
220 |
+
type='Normalize',
|
221 |
+
mean=[123.675, 116.28, 103.53],
|
222 |
+
std=[58.395, 57.12, 57.375],
|
223 |
+
to_rgb=True),
|
224 |
+
dict(type='PackInputs'),
|
225 |
+
]),
|
226 |
+
sampler=dict(type='DefaultSampler', shuffle=False))
|
227 |
+
test_evaluator = dict(
|
228 |
+
type='SingleLabelMetric', items=['precision', 'recall', 'f1-score'])
|
229 |
+
optim_wrapper = dict(
|
230 |
+
optimizer=dict(
|
231 |
+
type='AdamW',
|
232 |
+
lr=6.25e-05,
|
233 |
+
weight_decay=0.05,
|
234 |
+
eps=1e-08,
|
235 |
+
betas=(0.9, 0.999)),
|
236 |
+
paramwise_cfg=dict(
|
237 |
+
norm_decay_mult=0.0,
|
238 |
+
bias_decay_mult=0.0,
|
239 |
+
flat_decay_mult=0.0,
|
240 |
+
custom_keys=dict({
|
241 |
+
'.absolute_pos_embed': dict(decay_mult=0.0),
|
242 |
+
'.relative_position_bias_table': dict(decay_mult=0.0)
|
243 |
+
})),
|
244 |
+
clip_grad=dict(max_norm=5),
|
245 |
+
type='AmpOptimWrapper')
|
246 |
+
param_scheduler = [
|
247 |
+
dict(type='LinearLR', start_factor=0.01, by_epoch=False, end=4200),
|
248 |
+
dict(type='CosineAnnealingLR', eta_min=0, by_epoch=False, begin=4200)
|
249 |
+
]
|
250 |
+
train_cfg = dict(by_epoch=True, max_epochs=6, val_interval=1)
|
251 |
+
val_cfg = dict()
|
252 |
+
test_cfg = dict()
|
253 |
+
auto_scale_lr = dict(base_batch_size=64, enable=True)
|
254 |
+
default_scope = 'mmpretrain'
|
255 |
+
default_hooks = dict(
|
256 |
+
timer=dict(type='IterTimerHook'),
|
257 |
+
logger=dict(type='LoggerHook', interval=100),
|
258 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
259 |
+
checkpoint=dict(type='CheckpointHook', interval=1),
|
260 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
261 |
+
visualization=dict(type='VisualizationHook', enable=False))
|
262 |
+
env_cfg = dict(
|
263 |
+
cudnn_benchmark=False,
|
264 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
265 |
+
dist_cfg=dict(backend='nccl'))
|
266 |
+
vis_backends = [
|
267 |
+
dict(type='LocalVisBackend'),
|
268 |
+
dict(type='TensorboardVisBackend')
|
269 |
+
]
|
270 |
+
visualizer = dict(
|
271 |
+
type='UniversalVisualizer',
|
272 |
+
vis_backends=[
|
273 |
+
dict(type='LocalVisBackend'),
|
274 |
+
dict(type='TensorboardVisBackend')
|
275 |
+
])
|
276 |
+
log_level = 'INFO'
|
277 |
+
load_from = None
|
278 |
+
resume = False
|
279 |
+
randomness = dict(seed=None, deterministic=False)
|
280 |
+
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/swin-v2/pretrain/swinv2-base-w12_3rdparty_in21k-192px_20220803-f7dc9763.pth'
|
281 |
+
custom_imports = dict(
|
282 |
+
imports=['mmpretrain_custom'], allow_failed_imports=False)
|
283 |
+
launcher = 'pytorch'
|
284 |
+
work_dir = './work_dirs/swinv2_base_w24_b32x4-fp16_fungi+val_res_384_cb_epochs_6'
|
models/swinv2_base_w24_b32x4-fp16_fungi+val_res_384_cb_epochs_6_20230524-a251a50a.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a251a50a21746e66ee6e0f790cd35104296bc6838d3b1bc490d0c930a117f774
|
3 |
+
size 413462721
|