forked from Intellindust-AI-Lab/DEIMv2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeimv2_hgnetv2_atto_coco.yml
More file actions
123 lines (102 loc) · 2.68 KB
/
Copy pathdeimv2_hgnetv2_atto_coco.yml
File metadata and controls
123 lines (102 loc) · 2.68 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
__include__: [
'../dataset/coco_detection.yml',
'../runtime.yml',
'../base/dataloader.yml',
'../base/optimizer.yml',
'../base/deimv2.yml',
]
output_dir: ./outputs/deimv2_hgnetv2_atto_coco
DEIM:
encoder: LiteEncoder
HGNetv2:
name: 'Atto'
return_idx: [2]
freeze_at: -1
freeze_norm: False
use_lab: True
LiteEncoder:
in_channels: [256]
feat_strides: [16]
# intra
hidden_dim: 64
# cross
expansion: 0.34
depth_mult: 0.5
act: 'silu'
DEIMTransformer:
feat_channels: [64, 64]
feat_strides: [16, 32]
hidden_dim: 64
num_levels: 2
num_points: [4, 2]
num_layers: 3
eval_idx: -1
num_queries: 100
# FFN
dim_feedforward: 160
# New options for DEIMv2
share_bbox_head: True
use_gateway: False
# Increase to search for the optimal ema
epoches: 500 # 468 + 32
## Our LR-Scheduler
warmup_iter: 4000
flat_epoch: 250 # 4 + epoch // 2, e.g., 40 = 4 + 72 / 2
no_aug_epoch: 32
lr_gamma: 0.5
optimizer:
type: AdamW
params:
- params: '^(?=.*backbone)(?!.*norm|bn).*$'
lr: 0.001
- params: '^(?=.*backbone)(?=.*norm|bn).*$'
lr: 0.001
weight_decay: 0.
- params: '^(?=.*(?:encoder|decoder))(?=.*(?:norm|bn)).*$' # except bias
weight_decay: 0.
lr: 0.002
betas: [0.9, 0.999]
weight_decay: 0.0001
eval_spatial_size: [320, 320]
train_dataloader:
total_batch_size: 128
dataset:
transforms:
ops:
- {type: Mosaic, output_size: 160, 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: 12}
- {type: RandomHorizontalFlip}
- {type: Resize, size: [320, 320], }
- {type: SanitizeBoundingBoxes, min_size: 12}
- {type: ConvertPILImage, dtype: 'float32', scale: True}
- {type: ConvertBoxes, fmt: 'cxcywh', normalize: True}
policy:
epoch: [4, 250, 400] # list
mosaic_prob: 0.3
collate_fn:
mixup_prob: 0.0
mixup_epochs: [40000, 15000]
copyblend_prob: 0.0
copyblend_epochs: [40000, 15000]
stop_epoch: 468 # 468 + 32
ema_restart_decay: 0.9999
base_size: 320
base_size_repeat: ~
val_dataloader:
total_batch_size: 256
dataset:
transforms:
ops:
- {type: Resize, size: [320, 320], }
- {type: ConvertPILImage, dtype: 'float32', scale: True}
shuffle: False
num_workers: 16
DEIMCriterion:
losses: ['mal', 'boxes'] # , 'local'
use_uni_set: False
matcher:
matcher_change_epoch: 450 # FIX This