-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnanodet-plus-m_ConvNeXt_320X192_DSM_Dataset_class4_20220211_fukang.yml
136 lines (135 loc) · 3.52 KB
/
nanodet-plus-m_ConvNeXt_320X192_DSM_Dataset_class4_20220211_fukang.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
# nanodet-plus-m_320
# COCO mAP(0.5:0.95) = 0.270
# AP_50 = 0.418
# AP_75 = 0.281
# AP_small = 0.083
# AP_m = 0.278
# AP_l = 0.451
save_dir: workspace/test
model:
weight_averager:
name: ExpMovingAverager
decay: 0.9998
arch:
name: NanoDetPlus
detach_epoch: 10
backbone:
name: ConvNeXt
out_stages: [1,2,3]
depths: [3,3,3,3]
# dims: [24, 32, 64, 96]
fpn:
name: GhostPAN
in_channels: [192, 384, 768]
out_channels: 96
kernel_size: 5
num_extra_level: 1
use_depthwise: True
activation: LeakyReLU
head:
name: NanoDetPlusHead
num_classes: 4
input_channel: 96
feat_channels: 96
stacked_convs: 2
kernel_size: 5
strides: [8, 16, 32, 64]
activation: LeakyReLU
reg_max: 7
norm_cfg:
type: BN
loss:
loss_qfl:
name: QualityFocalLoss
use_sigmoid: True
beta: 2.0
loss_weight: 1.0
loss_dfl:
name: DistributionFocalLoss
loss_weight: 0.25
loss_bbox:
name: GIoULoss
loss_weight: 2.0
# Auxiliary head, only use in training time.
aux_head:
name: SimpleConvHead
num_classes: 4
input_channel: 192
feat_channels: 192
stacked_convs: 4
strides: [8, 16, 32, 64]
activation: LeakyReLU
reg_max: 7
data:
train:
name: CocoDataset
img_path: /home/chenpengfei/dataset/DSM_Dataset_class4_20220211_fukang/train/image
ann_path: /home/chenpengfei/dataset/DSM_Dataset_class4_20220211_fukang/train/train.json
input_size: [320,192] #[w,h]
keep_ratio: False
load_mosaic: 0.0 # 增加mosaic数据增强
cut_mosaic: 0.0 # 变形版mosaic
pipeline:
perspective: 0.0 # 透视or仿射变换
scale: [0.6, 1.4] # 放缩
stretch: [[0.8, 1.2], [0.8, 1.2]] # 拉伸
rotation: 0 # 旋转
shear: 0 # 裁剪
translate: 0.2 # 平移
flip: 0.5 # 左右翻转
brightness: 0.2 # 亮度
contrast: [0.6, 1.4] # 对比度
saturation: [0.5, 1.2] # 饱和度
normalize: [[72.0, 72.0, 72.0], [64.0, 64.0, 64.0]]
val:
name: CocoDataset
img_path: /home/chenpengfei/dataset/DSM_Dataset_class4_20220211_fukang/val/image
ann_path: /home/chenpengfei/dataset/DSM_Dataset_class4_20220211_fukang/val/val.json
input_size: [320,192] #[w,h]
keep_ratio: False
pipeline:
normalize: [[72.0, 72.0, 72.0], [64.0, 64.0, 64.0]]
device:
gpu_ids: [7] # Set like [0, 1, 2, 3] if you have multi-GPUs
workers_per_gpu: 10
batchsize_per_gpu: 128
schedule:
# resume: workspace/nanodet-plus-m_ConvNeXt_3333_320X192_28-09fukang/model_last.ckpt
# load_model: /home/chenpengfei/nanodet/workspace/nanodet-plus-m_ConvNeXt_3333_320X192_DSMhand_smoke3/model_best/model_best.ckpt
# optimizer:
# name: AdamW
# lr: 0.001
# weight_decay: 0.05
# warmup:
# name: linear
# steps: 500
# ratio: 0.0001
# total_epochs: 300
# lr_schedule:
# name: CosineAnnealingLR
# T_max: 300
# eta_min: 0.00005
# val_intervals: 10
#grad_clip: 35
optimizer:
name: SGD
lr: 0.14
momentum: 0.9
weight_decay: 0.0001
warmup:
name: linear
steps: 400
ratio: 0.1
total_epochs: 300
lr_schedule:
name: MultiStepLR
milestones: [ 250,275,295 ]
gamma: 0.1
val_intervals: 10
grad_clip: 35
evaluator:
name: CocoDetectionEvaluator
save_key: mAP
log:
interval: 50
class_names: ['face', 'hand', 'cigarette', 'cellphone']