aliasz commited on
Commit
324cb75
·
verified ·
1 Parent(s): 8c88fbe

Uploaded Heidelberg_trichome_testset4

Browse files
Heidelberg_trichome_testset4/det_rein_dinov2_mask2former.py ADDED
@@ -0,0 +1,666 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ReduceOnPlateauLR_patience = 50
2
+ albu_train_transforms = [
3
+ dict(
4
+ p=0.25,
5
+ transforms=[
6
+ dict(
7
+ alpha=20,
8
+ approximate=True,
9
+ border_mode=0,
10
+ interpolation=4,
11
+ mask_value=(
12
+ 0,
13
+ 0,
14
+ 0,
15
+ ),
16
+ p=0.5,
17
+ same_dxdy=True,
18
+ sigma=15,
19
+ type='ElasticTransform'),
20
+ dict(
21
+ alpha=40,
22
+ approximate=True,
23
+ border_mode=0,
24
+ interpolation=4,
25
+ mask_value=(
26
+ 0,
27
+ 0,
28
+ 0,
29
+ ),
30
+ p=0.5,
31
+ same_dxdy=False,
32
+ sigma=15,
33
+ type='ElasticTransform'),
34
+ ],
35
+ type='OneOf'),
36
+ dict(p=0.05, type='AdvancedBlur'),
37
+ ]
38
+ auto_scale_lr = dict(base_batch_size=16, enable=False)
39
+ batch_augments = [
40
+ dict(
41
+ img_pad_value=0,
42
+ mask_pad_value=0,
43
+ pad_mask=True,
44
+ pad_seg=False,
45
+ seg_pad_value=255,
46
+ size=(
47
+ 512,
48
+ 512,
49
+ ),
50
+ type='BatchFixedSizePad'),
51
+ ]
52
+ batch_size = 2
53
+ classes = ('trichome', )
54
+ crop_size = (
55
+ 1024,
56
+ 768,
57
+ )
58
+ custom_hooks = [
59
+ dict(type='NumClassCheckHook'),
60
+ dict(interval=200, type='MemoryProfilerHook'),
61
+ dict(interval=200, type='CheckInvalidLossHook'),
62
+ dict(type='EMAHook'),
63
+ ]
64
+ custom_imports = dict(
65
+ allow_failed_imports=False, imports=[
66
+ 'mmpretrain.models',
67
+ ])
68
+ data_preprocessor = dict(
69
+ batch_augments=[
70
+ dict(
71
+ img_pad_value=0,
72
+ mask_pad_value=0,
73
+ pad_mask=True,
74
+ pad_seg=False,
75
+ seg_pad_value=255,
76
+ size=(
77
+ 512,
78
+ 512,
79
+ ),
80
+ type='BatchFixedSizePad'),
81
+ ],
82
+ bgr_to_rgb=True,
83
+ mask_pad_value=0,
84
+ mean=[
85
+ 123.675,
86
+ 116.28,
87
+ 103.53,
88
+ ],
89
+ pad_mask=True,
90
+ pad_seg=False,
91
+ pad_size_divisor=32,
92
+ seg_pad_value=255,
93
+ std=[
94
+ 58.395,
95
+ 57.12,
96
+ 57.375,
97
+ ],
98
+ type='DetDataPreprocessor')
99
+ data_root = 'train/data/Stomata_detection/'
100
+ dataset_type = 'CocoDataset'
101
+ default_hooks = dict(
102
+ checkpoint=dict(
103
+ by_epoch=True,
104
+ interval=9999999999,
105
+ max_keep_ckpts=1,
106
+ rule='greater',
107
+ save_best='coco/segm_mAP',
108
+ save_last=False,
109
+ type='CheckpointHook'),
110
+ early_stopping=dict(
111
+ monitor='coco/segm_mAP',
112
+ patience=150,
113
+ rule='greater',
114
+ type='EarlyStoppingHook'),
115
+ logger=dict(interval=200, type='LoggerHook'),
116
+ param_scheduler=dict(type='ParamSchedulerHook'),
117
+ sampler_seed=dict(type='DistSamplerSeedHook'),
118
+ timer=dict(type='IterTimerHook'),
119
+ visualization=dict(draw=True, interval=10, type='DetVisualizationHook'))
120
+ default_scope = 'mmdet'
121
+ dinov2_checkpoint = 'train/checkpoints/dinov2_converted.pth'
122
+ early_stopping_patience = 150
123
+ embed_multi = dict(decay_mult=0.0, lr_mult=1.0)
124
+ env_cfg = dict(
125
+ cudnn_benchmark=False,
126
+ dist_cfg=dict(backend='nccl'),
127
+ mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
128
+ find_unused_parameters = True
129
+ fp16 = dict(loss_scale='dynamic')
130
+ image_size = (
131
+ 512,
132
+ 512,
133
+ )
134
+ launcher = 'pytorch'
135
+ load_pipeline = [
136
+ dict(to_float32=True, type='LoadImageFromFile'),
137
+ dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
138
+ dict(prob=0.5, type='RandomFlip'),
139
+ dict(type='PhotoMetricDistortion'),
140
+ dict(
141
+ img_border_value=(
142
+ 0,
143
+ 0,
144
+ 0,
145
+ ),
146
+ interpolation='lanczos',
147
+ prob=0.5,
148
+ type='GeomTransform'),
149
+ dict(keep_ratio=True, scale=(
150
+ 1024,
151
+ 768,
152
+ ), type='Resize'),
153
+ ]
154
+ log_level = 'INFO'
155
+ log_processor = dict(by_epoch=True, type='LogProcessor', window_size=50)
156
+ lr = 9.375e-05
157
+ max_epochs = 300
158
+ model = dict(
159
+ backbone=dict(
160
+ block_chunks=0,
161
+ depth=24,
162
+ embed_dim=1024,
163
+ ffn_bias=True,
164
+ ffn_layer='mlp',
165
+ img_size=512,
166
+ init_cfg=dict(
167
+ checkpoint='train/checkpoints/dinov2_converted.pth',
168
+ type='Pretrained'),
169
+ init_values=1e-05,
170
+ mlp_ratio=4,
171
+ num_heads=16,
172
+ patch_size=16,
173
+ proj_bias=True,
174
+ qkv_bias=True,
175
+ reins_config=dict(
176
+ embed_dims=1024,
177
+ link_token_to_query=True,
178
+ lora_dim=16,
179
+ num_layers=24,
180
+ patch_size=16,
181
+ token_length=100,
182
+ type='LoRAReins'),
183
+ type='ReinsDinoVisionTransformer'),
184
+ data_preprocessor=dict(
185
+ batch_augments=[
186
+ dict(
187
+ img_pad_value=0,
188
+ mask_pad_value=0,
189
+ pad_mask=True,
190
+ pad_seg=False,
191
+ seg_pad_value=255,
192
+ size=(
193
+ 512,
194
+ 512,
195
+ ),
196
+ type='BatchFixedSizePad'),
197
+ ],
198
+ bgr_to_rgb=True,
199
+ mask_pad_value=0,
200
+ mean=[
201
+ 123.675,
202
+ 116.28,
203
+ 103.53,
204
+ ],
205
+ pad_mask=True,
206
+ pad_seg=False,
207
+ pad_size_divisor=32,
208
+ seg_pad_value=255,
209
+ std=[
210
+ 58.395,
211
+ 57.12,
212
+ 57.375,
213
+ ],
214
+ type='DetDataPreprocessor'),
215
+ init_cfg=None,
216
+ panoptic_fusion_head=dict(
217
+ init_cfg=None,
218
+ loss_panoptic=None,
219
+ num_stuff_classes=0,
220
+ num_things_classes=1,
221
+ type='MaskFormerFusionHead'),
222
+ panoptic_head=dict(
223
+ enforce_decoder_input_project=False,
224
+ feat_channels=256,
225
+ in_channels=[
226
+ 1024,
227
+ 1024,
228
+ 1024,
229
+ 1024,
230
+ ],
231
+ loss_cls=dict(
232
+ class_weight=[
233
+ 1.0,
234
+ 0.1,
235
+ ],
236
+ loss_weight=2.0,
237
+ reduction='mean',
238
+ type='CrossEntropyLoss',
239
+ use_sigmoid=False),
240
+ loss_dice=dict(
241
+ activate=True,
242
+ eps=1.0,
243
+ loss_weight=5.0,
244
+ naive_dice=True,
245
+ reduction='mean',
246
+ type='DiceLoss',
247
+ use_sigmoid=True),
248
+ loss_mask=dict(
249
+ loss_weight=5.0,
250
+ reduction='mean',
251
+ type='CrossEntropyLoss',
252
+ use_sigmoid=True),
253
+ num_queries=100,
254
+ num_stuff_classes=0,
255
+ num_things_classes=1,
256
+ num_transformer_feat_level=3,
257
+ out_channels=256,
258
+ pixel_decoder=dict(
259
+ act_cfg=dict(type='ReLU'),
260
+ encoder=dict(
261
+ layer_cfg=dict(
262
+ ffn_cfg=dict(
263
+ act_cfg=dict(inplace=True, type='ReLU'),
264
+ embed_dims=256,
265
+ feedforward_channels=1024,
266
+ ffn_drop=0.0,
267
+ num_fcs=2),
268
+ self_attn_cfg=dict(
269
+ batch_first=True,
270
+ dropout=0.0,
271
+ embed_dims=256,
272
+ num_heads=8,
273
+ num_levels=3,
274
+ num_points=4)),
275
+ num_layers=6),
276
+ norm_cfg=dict(num_groups=32, type='GN'),
277
+ num_outs=3,
278
+ positional_encoding=dict(normalize=True, num_feats=128),
279
+ type='MSDeformAttnPixelDecoder'),
280
+ positional_encoding=dict(normalize=True, num_feats=128),
281
+ strides=[
282
+ 4,
283
+ 8,
284
+ 16,
285
+ 32,
286
+ ],
287
+ transformer_decoder=dict(
288
+ init_cfg=None,
289
+ layer_cfg=dict(
290
+ cross_attn_cfg=dict(
291
+ batch_first=True, dropout=0.0, embed_dims=256,
292
+ num_heads=8),
293
+ ffn_cfg=dict(
294
+ act_cfg=dict(inplace=True, type='ReLU'),
295
+ embed_dims=256,
296
+ feedforward_channels=2048,
297
+ ffn_drop=0.0,
298
+ num_fcs=2),
299
+ self_attn_cfg=dict(
300
+ batch_first=True, dropout=0.0, embed_dims=256,
301
+ num_heads=8)),
302
+ num_layers=9,
303
+ return_intermediate=True),
304
+ type='ReinMask2FormerHead'),
305
+ test_cfg=dict(
306
+ filter_low_score=True,
307
+ instance_on=True,
308
+ iou_thr=0.8,
309
+ max_per_image=100,
310
+ panoptic_on=False,
311
+ semantic_on=False),
312
+ train_cfg=dict(
313
+ assigner=dict(
314
+ match_costs=[
315
+ dict(type='ClassificationCost', weight=2.0),
316
+ dict(
317
+ type='CrossEntropyLossCost', use_sigmoid=True, weight=5.0),
318
+ dict(eps=1.0, pred_act=True, type='DiceCost', weight=5.0),
319
+ ],
320
+ type='HungarianAssigner'),
321
+ importance_sample_ratio=0.75,
322
+ num_points=12544,
323
+ oversample_ratio=3.0,
324
+ sampler=dict(type='MaskPseudoSampler')),
325
+ type='Mask2Former')
326
+ n_gpus = 6
327
+ num_classes = 1
328
+ num_stuff_classes = 0
329
+ num_things_classes = 1
330
+ num_workers = 16
331
+ optim_wrapper = dict(
332
+ clip_grad=dict(max_norm=0.01, norm_type=2),
333
+ constructor='PEFTOptimWrapperConstructor',
334
+ optimizer=dict(
335
+ betas=(
336
+ 0.9,
337
+ 0.999,
338
+ ),
339
+ eps=1e-08,
340
+ lr=9.375e-05,
341
+ type='AdamW',
342
+ weight_decay=0.05),
343
+ paramwise_cfg=dict(
344
+ custom_keys=dict(
345
+ backbone=dict(decay_mult=1.0, lr_mult=0.1),
346
+ level_embed=dict(decay_mult=0.0, lr_mult=1.0),
347
+ query_embed=dict(decay_mult=0.0, lr_mult=1.0),
348
+ query_feat=dict(decay_mult=0.0, lr_mult=1.0)),
349
+ norm_decay_mult=0.0),
350
+ type='OptimWrapper')
351
+ optimizer_config = dict(
352
+ cumulative_iters=4, type='GradientCumulativeOptimizerHook')
353
+ original_batch_size = 16
354
+ original_lr = 0.0001
355
+ original_n_gpus = 8
356
+ output_dir = '2025.04.14_Heidelberg_4testset4'
357
+ param_scheduler = [
358
+ dict(
359
+ begin=0,
360
+ by_epoch=True,
361
+ convert_to_iter_based=True,
362
+ end=30,
363
+ end_factor=1.0,
364
+ start_factor=0.001,
365
+ type='LinearLR',
366
+ verbose=False),
367
+ dict(
368
+ T_max=270,
369
+ begin=30,
370
+ by_epoch=True,
371
+ convert_to_iter_based=True,
372
+ end=300,
373
+ eta_min=9.375e-07,
374
+ eta_min_ratio=None,
375
+ type='CosineAnnealingLR',
376
+ verbose=False),
377
+ dict(
378
+ by_epoch=True,
379
+ factor=0.75,
380
+ monitor='coco/bbox_mAP',
381
+ patience=50,
382
+ rule='greater',
383
+ type='ReduceOnPlateauLR',
384
+ verbose=False),
385
+ ]
386
+ randomness = dict(deterministic=False, seed=42)
387
+ resume = None
388
+ test_cfg = dict(type='ValLoop')
389
+ test_dataloader = dict(
390
+ batch_size=2,
391
+ dataset=dict(
392
+ ann_file='val_sahi/sahi_coco.json',
393
+ backend_args=None,
394
+ data_prefix=dict(img='val_sahi/', seg='annotations/panoptic_val2017/'),
395
+ data_root='train/data/Stomata_detection/',
396
+ metainfo=dict(classes=('trichome', )),
397
+ pipeline=[
398
+ dict(to_float32=True, type='LoadImageFromFile'),
399
+ dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
400
+ dict(keep_ratio=True, scale=(
401
+ 1024,
402
+ 768,
403
+ ), type='Resize'),
404
+ dict(
405
+ meta_keys=(
406
+ 'img_id',
407
+ 'img_path',
408
+ 'img',
409
+ 'img_shape',
410
+ 'ori_shape',
411
+ 'scale_factor',
412
+ 'gt_bboxes',
413
+ 'gt_ignore_flags',
414
+ 'gt_bboxes_labels',
415
+ 'gt_masks',
416
+ ),
417
+ type='PackDetInputs'),
418
+ ],
419
+ test_mode=False,
420
+ type='CocoDataset'),
421
+ drop_last=False,
422
+ num_workers=16,
423
+ persistent_workers=True,
424
+ sampler=dict(shuffle=False, type='DefaultSampler'))
425
+ test_evaluator = dict(
426
+ ann_file='train/data/Stomata_detection/val_sahi/sahi_coco.json',
427
+ backend_args=None,
428
+ format_only=False,
429
+ metric=[
430
+ 'bbox',
431
+ 'segm',
432
+ ],
433
+ type='CocoMetric')
434
+ test_pipeline = [
435
+ dict(to_float32=True, type='LoadImageFromFile'),
436
+ dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
437
+ dict(keep_ratio=True, scale=(
438
+ 1024,
439
+ 768,
440
+ ), type='Resize'),
441
+ dict(
442
+ meta_keys=(
443
+ 'img_id',
444
+ 'img_path',
445
+ 'img',
446
+ 'img_shape',
447
+ 'ori_shape',
448
+ 'scale_factor',
449
+ 'gt_bboxes',
450
+ 'gt_ignore_flags',
451
+ 'gt_bboxes_labels',
452
+ 'gt_masks',
453
+ ),
454
+ type='PackDetInputs'),
455
+ ]
456
+ train_ann_file = 'train_sahi/sahi_coco.json'
457
+ train_cfg = dict(max_epochs=300, type='EpochBasedTrainLoop', val_interval=1)
458
+ train_dataloader = dict(
459
+ batch_sampler=dict(type='AspectRatioBatchSampler'),
460
+ batch_size=2,
461
+ dataset=dict(
462
+ dataset=dict(
463
+ ann_file='train_sahi/sahi_coco.json',
464
+ backend_args=None,
465
+ data_prefix=dict(
466
+ img='train_sahi/', seg='annotations/panoptic_train2017/'),
467
+ data_root='train/data/Stomata_detection/',
468
+ filter_cfg=dict(filter_empty_gt=True, min_size=32),
469
+ metainfo=dict(classes=('trichome', )),
470
+ pipeline=[
471
+ dict(to_float32=True, type='LoadImageFromFile'),
472
+ dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
473
+ dict(prob=0.5, type='RandomFlip'),
474
+ dict(type='PhotoMetricDistortion'),
475
+ dict(
476
+ img_border_value=(
477
+ 0,
478
+ 0,
479
+ 0,
480
+ ),
481
+ interpolation='lanczos',
482
+ prob=0.5,
483
+ type='GeomTransform'),
484
+ dict(keep_ratio=True, scale=(
485
+ 1024,
486
+ 768,
487
+ ), type='Resize'),
488
+ ],
489
+ type='CocoDataset'),
490
+ pipeline=[
491
+ dict(
492
+ bbox_occluded_thr=50,
493
+ mask_occluded_thr=1000,
494
+ max_num_pasted=5,
495
+ paste_by_box=False,
496
+ selected=True,
497
+ type='CopyPaste'),
498
+ dict(
499
+ by_mask=True,
500
+ min_gt_bbox_wh=(
501
+ 10,
502
+ 10,
503
+ ),
504
+ min_gt_mask_area=10,
505
+ type='FilterAnnotations'),
506
+ dict(
507
+ meta_keys=(
508
+ 'img_path',
509
+ 'img',
510
+ 'gt_bboxes',
511
+ 'gt_ignore_flags',
512
+ 'gt_bboxes_labels',
513
+ 'gt_masks',
514
+ ),
515
+ type='PackDetInputs'),
516
+ ],
517
+ type='MultiImageMixDataset'),
518
+ num_workers=16,
519
+ persistent_workers=True,
520
+ sampler=dict(shuffle=True, type='DefaultSampler'))
521
+ train_dataset = dict(
522
+ dataset=dict(
523
+ ann_file='train_sahi/sahi_coco.json',
524
+ backend_args=None,
525
+ data_prefix=dict(
526
+ img='train_sahi/', seg='annotations/panoptic_train2017/'),
527
+ data_root='train/data/Stomata_detection/',
528
+ filter_cfg=dict(filter_empty_gt=True, min_size=32),
529
+ metainfo=dict(classes=('trichome', )),
530
+ pipeline=[
531
+ dict(to_float32=True, type='LoadImageFromFile'),
532
+ dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
533
+ dict(prob=0.5, type='RandomFlip'),
534
+ dict(type='PhotoMetricDistortion'),
535
+ dict(
536
+ img_border_value=(
537
+ 0,
538
+ 0,
539
+ 0,
540
+ ),
541
+ interpolation='lanczos',
542
+ prob=0.5,
543
+ type='GeomTransform'),
544
+ dict(keep_ratio=True, scale=(
545
+ 1024,
546
+ 768,
547
+ ), type='Resize'),
548
+ ],
549
+ type='CocoDataset'),
550
+ pipeline=[
551
+ dict(
552
+ bbox_occluded_thr=50,
553
+ mask_occluded_thr=1000,
554
+ max_num_pasted=5,
555
+ paste_by_box=False,
556
+ selected=True,
557
+ type='CopyPaste'),
558
+ dict(
559
+ by_mask=True,
560
+ min_gt_bbox_wh=(
561
+ 10,
562
+ 10,
563
+ ),
564
+ min_gt_mask_area=10,
565
+ type='FilterAnnotations'),
566
+ dict(
567
+ meta_keys=(
568
+ 'img_path',
569
+ 'img',
570
+ 'gt_bboxes',
571
+ 'gt_ignore_flags',
572
+ 'gt_bboxes_labels',
573
+ 'gt_masks',
574
+ ),
575
+ type='PackDetInputs'),
576
+ ],
577
+ type='MultiImageMixDataset')
578
+ train_pipeline = [
579
+ dict(
580
+ bbox_occluded_thr=50,
581
+ mask_occluded_thr=1000,
582
+ max_num_pasted=5,
583
+ paste_by_box=False,
584
+ selected=True,
585
+ type='CopyPaste'),
586
+ dict(
587
+ by_mask=True,
588
+ min_gt_bbox_wh=(
589
+ 10,
590
+ 10,
591
+ ),
592
+ min_gt_mask_area=10,
593
+ type='FilterAnnotations'),
594
+ dict(
595
+ meta_keys=(
596
+ 'img_path',
597
+ 'img',
598
+ 'gt_bboxes',
599
+ 'gt_ignore_flags',
600
+ 'gt_bboxes_labels',
601
+ 'gt_masks',
602
+ ),
603
+ type='PackDetInputs'),
604
+ ]
605
+ val_ann_file = 'val_sahi/sahi_coco.json'
606
+ val_cfg = dict(type='ValLoop')
607
+ val_dataloader = dict(
608
+ batch_size=2,
609
+ dataset=dict(
610
+ ann_file='val_sahi/sahi_coco.json',
611
+ backend_args=None,
612
+ data_prefix=dict(img='val_sahi/', seg='annotations/panoptic_val2017/'),
613
+ data_root='train/data/Stomata_detection/',
614
+ metainfo=dict(classes=('trichome', )),
615
+ pipeline=[
616
+ dict(to_float32=True, type='LoadImageFromFile'),
617
+ dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
618
+ dict(keep_ratio=True, scale=(
619
+ 1024,
620
+ 768,
621
+ ), type='Resize'),
622
+ dict(
623
+ meta_keys=(
624
+ 'img_id',
625
+ 'img_path',
626
+ 'img',
627
+ 'img_shape',
628
+ 'ori_shape',
629
+ 'scale_factor',
630
+ 'gt_bboxes',
631
+ 'gt_ignore_flags',
632
+ 'gt_bboxes_labels',
633
+ 'gt_masks',
634
+ ),
635
+ type='PackDetInputs'),
636
+ ],
637
+ test_mode=False,
638
+ type='CocoDataset'),
639
+ drop_last=False,
640
+ num_workers=16,
641
+ persistent_workers=True,
642
+ sampler=dict(shuffle=False, type='DefaultSampler'))
643
+ val_evaluator = dict(
644
+ ann_file='train/data/Stomata_detection/val_sahi/sahi_coco.json',
645
+ backend_args=None,
646
+ format_only=False,
647
+ metric=[
648
+ 'bbox',
649
+ 'segm',
650
+ ],
651
+ type='CocoMetric')
652
+ val_interval = 1
653
+ visualizer = dict(
654
+ name='visualizer',
655
+ type='DetLocalVisualizer',
656
+ vis_backends=[
657
+ dict(type='LocalVisBackend'),
658
+ dict(
659
+ init_kwargs=dict(
660
+ name='2025.04.14_Heidelberg_4testset4', project='StomataPy'),
661
+ type='WandbVisBackend'),
662
+ ])
663
+ wandb_project = 'StomataPy'
664
+ warmup_epochs = 30
665
+ with_cp = True
666
+ work_dir = 'Models//2025.04.14_Heidelberg_4testset4'
Heidelberg_trichome_testset4/dinov2_detector.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:886170c3cf88b6ef444eedb0a251f670cb40c17a0c79930de2811deb4d9c36a9
3
+ size 1412415811