项目作者: withoutyourself

项目描述 :
SSD的改进:加入attention机制——SE或者CBAM;Feature Fusion
高级语言: Python
项目地址: git://github.com/withoutyourself/SSD-SE-CBAM-Resnet-Feature_Fusion.git
创建时间: 2020-03-17T06:57:30Z
项目社区:https://github.com/withoutyourself/SSD-SE-CBAM-Resnet-Feature_Fusion

开源协议:MIT License

下载


SSD Improvements

This repository is forked from the project SSD.
I improve SSD from the following aspects:
1) add Resnet backbone (Resnet50 and Resnet101)
2) add attention mechanism (Squeeze-and-Excitation Module , Convolutional Block Attention Module)
3) add feature fusion module

Train

Setting Up Datasets

Pascal VOC

For Pascal VOC dataset, make the folder structure like this:

  1. VOC_ROOT
  2. |__ VOC2007
  3. |_ JPEGImages
  4. |_ Annotations
  5. |_ ImageSets
  6. |_ SegmentationClass
  7. |__ VOC2012
  8. |_ JPEGImages
  9. |_ Annotations
  10. |_ ImageSets
  11. |_ SegmentationClass
  12. |__ ...

Where VOC_ROOT default is datasets folder in current project, you can create symlinks to datasets or export VOC_ROOT="/path/to/voc_root".

COCO

For COCO dataset, make the folder structure like this:

  1. COCO_ROOT
  2. |__ annotations
  3. |_ instances_valminusminival2014.json
  4. |_ instances_minival2014.json
  5. |_ instances_train2014.json
  6. |_ instances_val2014.json
  7. |_ ...
  8. |__ train2014
  9. |_ <im-1-name>.jpg
  10. |_ ...
  11. |_ <im-N-name>.jpg
  12. |__ val2014
  13. |_ <im-1-name>.jpg
  14. |_ ...
  15. |_ <im-N-name>.jpg
  16. |__ ...

Where COCO_ROOT default is datasets folder in current project, you can create symlinks to datasets or export COCO_ROOT="/path/to/coco_root".

Train sample 1

  1. Configs:
  2. Backbone: Resnet50
  3. Input size: 300
  4. SE: False
  5. CBAM: False
  6. FUSION: False
  7. Run:
  8. python train.py --config-file configs/resnet50_ssd300_voc0712.yaml

Train sample 2

  1. Configs:
  2. Backbone: Resnet50
  3. Input size: 300
  4. SE: False
  5. CBAM: False
  6. FUSION: True
  7. Run:
  8. python train.py --config-file configs/resnet50_ssd300_voc0712_feature_fusion.yaml

You can do custom training by modifying the .yaml files.