forked from RangiLyu/nanodet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nanodet-g.yml
122 lines (120 loc) · 3.67 KB
/
nanodet-g.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
# NanoDet-g-416 is designed for edge NPU, GPU or TPU with high parallel computing power but low memory bandwidth
# COCO mAP(0.5:0.95) = 22.9
# Flops = 4.2B
# Params = 3.8M
# COCO pre-trained weight link: https://drive.google.com/file/d/10uW7oqZKw231l_tr4C1bJWkbCXgBf7av/view?usp=sharing
save_dir: workspace/nanodet_g
model:
arch:
name: OneStageDetector
backbone:
name: CustomCspNet
net_cfg: [[ 'Conv', 3, 32, 3, 2], # 1/2
[ 'MaxPool', 3, 2 ], # 1/4
[ 'CspBlock', 32, 1, 3, 1 ], # 1/4
[ 'CspBlock', 64, 2, 3, 2 ], # 1/8
[ 'CspBlock', 128, 2, 3, 2 ], # 1/16
[ 'CspBlock', 256, 3, 3, 2 ]] # 1/32
out_stages: [3,4,5]
activation: LeakyReLU
fpn:
name: PAN
in_channels: [128, 256, 512]
out_channels: 128
start_level: 0
num_outs: 3
head:
name: NanoDetHead
num_classes: 80
conv_type: Conv
activation: LeakyReLU
input_channel: 128
feat_channels: 128
stacked_convs: 1
share_cls_reg: True
octave_base_scale: 8
scales_per_octave: 1
strides: [8, 16, 32]
reg_max: 10
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
data:
train:
name: coco
img_path: coco/train2017
ann_path: coco/annotations/instances_train2017.json
input_size: [416,416] #[w,h]
keep_ratio: True
pipeline:
perspective: 0.0
scale: [0.6, 1.4]
stretch: [[1, 1], [1, 1]]
rotation: 0
shear: 0
translate: 0.2
flip: 0.5
brightness: 0.2
contrast: [0.6, 1.4]
saturation: [0.5, 1.2]
normalize: [[103.53, 116.28, 123.675], [57.375, 57.12, 58.395]]
val:
name: coco
img_path: coco/val2017
ann_path: coco/annotations/instances_val2017.json
input_size: [416,416] #[w,h]
keep_ratio: True
pipeline:
normalize: [[103.53, 116.28, 123.675], [57.375, 57.12, 58.395]]
device:
gpu_ids: [0]
workers_per_gpu: 10
batchsize_per_gpu: 128
schedule:
# resume:
# load_model: YOUR_MODEL_PATH
optimizer:
name: SGD
lr: 0.1
momentum: 0.9
weight_decay: 0.0001
warmup:
name: linear
steps: 500
ratio: 0.01
total_epochs: 190
lr_schedule:
name: MultiStepLR
milestones: [130,160,175,185]
gamma: 0.1
val_intervals: 5
evaluator:
name: CocoDetectionEvaluator
save_key: mAP
log:
interval: 10
class_names: ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus',
'train', 'truck', 'boat', 'traffic_light', 'fire_hydrant',
'stop_sign', 'parking_meter', 'bench', 'bird', 'cat', 'dog',
'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe',
'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee',
'skis', 'snowboard', 'sports_ball', 'kite', 'baseball_bat',
'baseball_glove', 'skateboard', 'surfboard', 'tennis_racket',
'bottle', 'wine_glass', 'cup', 'fork', 'knife', 'spoon', 'bowl',
'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot',
'hot_dog', 'pizza', 'donut', 'cake', 'chair', 'couch',
'potted_plant', 'bed', 'dining_table', 'toilet', 'tv', 'laptop',
'mouse', 'remote', 'keyboard', 'cell_phone', 'microwave',
'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock',
'vase', 'scissors', 'teddy_bear', 'hair_drier', 'toothbrush']