forked from Intellindust-AI-Lab/DEIMv2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeimv2_dinov3_x_coco.yml
More file actions
94 lines (82 loc) · 2.5 KB
/
Copy pathdeimv2_dinov3_x_coco.yml
File metadata and controls
94 lines (82 loc) · 2.5 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
__include__: [
'../dataset/coco_detection.yml',
'../runtime.yml',
'../base/dataloader.yml',
'../base/optimizer.yml',
'../base/deimv2.yml',
]
output_dir: ./outputs/deimv2_dinov3_x_coco
DEIM:
backbone: DINOv3STAs
DINOv3STAs:
name: dinov3_vits16plus
weights_path: ./ckpts/dinov3_vits16plus_pretrain_lvd1689m-4057cbaa.pth
interaction_indexes: [5,8,11] # only need the [1/8, 1/16, 1/32]
finetune: True
conv_inplane: 64
hidden_dim: 256
HybridEncoder:
in_channels: [256, 256, 256]
# intra
hidden_dim: 256
dim_feedforward: 1024
# cross
expansion: 1.25
depth_mult: 1.37
DEIMTransformer:
num_layers: 6
eval_idx: -1
feat_channels: [256, 256, 256]
# reg_scale: 8
hidden_dim: 256
dim_feedforward: 2048
optimizer:
type: AdamW
params:
-
# except norm/bn/bias in self.dinov3
params: '^(?=.*.dinov3)(?!.*(?:norm|bn|bias)).*$'
lr: 0.00001
-
# including norm/bn/bias in self.dinov3
params: '^(?=.*.dinov3)(?=.*(?:norm|bn|bias)).*$'
lr: 0.00001
weight_decay: 0.
-
# including norm/bn/bias except for the self.dinov3
params: '^(?=.*(?:sta|encoder|decoder))(?=.*(?:norm|bn|bias)).*$'
weight_decay: 0.
lr: 0.0005
betas: [0.9, 0.999]
weight_decay: 0.000125
## Dense O2O: Mosaic + Mixup + CopyBlend
train_dataloader:
dataset:
transforms:
ops:
- {type: Mosaic, output_size: 320, rotation_range: 10, translation_range: [0.1, 0.1], scaling_range: [0.5, 1.5],
probability: 1.0, fill_value: 0, use_cache: True, max_cached_images: 50, random_pop: True}
- {type: RandomPhotometricDistort, p: 0.5}
- {type: RandomZoomOut, fill: 0}
- {type: RandomIoUCrop, p: 0.8}
- {type: SanitizeBoundingBoxes, min_size: 1}
- {type: RandomHorizontalFlip}
- {type: Resize, size: [640, 640], }
- {type: SanitizeBoundingBoxes, min_size: 1}
- {type: ConvertPILImage, dtype: 'float32', scale: True}
- {type: Normalize, mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225]}
- {type: ConvertBoxes, fmt: 'cxcywh', normalize: True}
policy:
epoch: [4, 29, 50] # list
collate_fn:
mixup_epochs: [4, 29]
stop_epoch: 50
copyblend_epochs: [4, 50]
base_size_repeat: 3
val_dataloader:
dataset:
transforms:
ops:
- {type: Resize, size: [640, 640], }
- {type: ConvertPILImage, dtype: 'float32', scale: True}
- {type: Normalize, mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225]}