-
Notifications
You must be signed in to change notification settings - Fork 102
/
dfine_hgnetv2.yml
82 lines (62 loc) · 1.48 KB
/
dfine_hgnetv2.yml
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
task: detection
model: DFINE
criterion: DFINECriterion
postprocessor: DFINEPostProcessor
use_focal_loss: True
eval_spatial_size: [640, 640] # h w
DFINE:
backbone: HGNetv2
encoder: HybridEncoder
decoder: DFINETransformer
HGNetv2:
pretrained: True
local_model_dir: weight/hgnetv2/
HybridEncoder:
in_channels: [512, 1024, 2048]
feat_strides: [8, 16, 32]
# intra
hidden_dim: 256
use_encoder_idx: [2]
num_encoder_layers: 1
nhead: 8
dim_feedforward: 1024
dropout: 0.
enc_act: 'gelu'
# cross
expansion: 1.0
depth_mult: 1
act: 'silu'
DFINETransformer:
feat_channels: [256, 256, 256]
feat_strides: [8, 16, 32]
hidden_dim: 256
num_levels: 3
num_layers: 6
eval_idx: -1
num_queries: 300
num_denoising: 100
label_noise_ratio: 0.5
box_noise_scale: 1.0
# NEW
reg_max: 32
reg_scale: 4
# Auxiliary decoder layers dimension scaling
# "eg. If num_layers: 6 eval_idx: -4,
# then layer 3, 4, 5 are auxiliary decoder layers."
layer_scale: 1 # 2
num_points: [3, 6, 3] # [4, 4, 4] [3, 6, 3]
cross_attn_method: default # default, discrete
query_select_method: default # default, agnostic
DFINEPostProcessor:
num_top_queries: 300
DFINECriterion:
weight_dict: {loss_vfl: 1, loss_bbox: 5, loss_giou: 2, loss_fgl: 0.15, loss_ddf: 1.5}
losses: ['vfl', 'boxes', 'local']
alpha: 0.75
gamma: 2.0
reg_max: 32
matcher:
type: HungarianMatcher
weight_dict: {cost_class: 2, cost_bbox: 5, cost_giou: 2}
alpha: 0.25
gamma: 2.0