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