paper
https://arxiv.org/pdf/1804.02767v1.pdf
網絡結構圖

性能上遠超Darknet-19,但在效率上同樣優於ResNet-101和ResNet-152。下表是在ImageNet上的實驗結果:

網絡詳細結構圖:

網絡簡版結構圖:

數據處理
train_pipeline = [
dict(type='LoadImageFromFile', to_float32=True),
dict(type='LoadAnnotations', with_bbox=True),
dict(type='ZeroOneNormalize'),
dict(type='RandomJitter', jitter=(0.3, 0.3), img_scale=(1440, 864)),
dict(type='RandomDistort', hue=0.1, saturation=1.5, exposure=1.5),
dict(type='RandomTransform', img_scale=(1440, 864)),
dict(type='RandomFlipCv2', flip_code=[1]),
dict(type='NormalizeCoord', cxcywh=True),
dict(type='DefaultFormatBundle'),
dict(type='ParametersSetting', tensor=True),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])
]
Default anchors
通過IOU與Kmean計算訓練樣本中9個anchors, anchors_generate.py
Loss
Function Loss
- total loss:

- build target
- 計算當前層的每個anchor 與 target 之間的IOU,並取得最大的IOU對應的anchor的index
- 過濾因為數據增強帶來的bbox的越界, 找到best_index
- 計算object weight scale. (sc = 2 - gw * gh)
- 由best_index計算最佳的anchor對應的target, (obj_mask, noobj_mask, tx, ty, tw, th, tconf, tcls, scale)
- 正負樣本選擇:
- 用預測出來的
predict box(pb)與target box(tb)做一個IOU匹配, - 找到
pb對應tb的最大iou, 如果這個iou小於ignore_thresh就被當做負樣本
- 用預測出來的
- Loss計算
location: 使用mse loss, 乘上一個object weight scale(sc)
conf_obj and conf_noobj 使用 mse loss(均方差)
classify loss 使用ce loss(交叉熵)
- Location Loss

