All Projects → Robust-Jay → SSD-Resnet-Attention-FeatureFusion

Robust-Jay / SSD-Resnet-Attention-FeatureFusion

Licence: MIT License
SSD 改进:backbone增加resnet,并针对resnet加入attention机制,为了充分利用细节特征和语义特征,还加入了特征融合模型

Programming Languages

python
139335 projects - #7 most used programming language
Cuda
1817 projects
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

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:

VOC_ROOT
|__ VOC2007
    |_ JPEGImages
    |_ Annotations
    |_ ImageSets
    |_ SegmentationClass
|__ VOC2012
    |_ JPEGImages
    |_ Annotations
    |_ ImageSets
    |_ SegmentationClass
|__ ...

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:

COCO_ROOT
|__ annotations
    |_ instances_valminusminival2014.json
    |_ instances_minival2014.json
    |_ instances_train2014.json
    |_ instances_val2014.json
    |_ ...
|__ train2014
    |_ <im-1-name>.jpg
    |_ ...
    |_ <im-N-name>.jpg
|__ val2014
    |_ <im-1-name>.jpg
    |_ ...
    |_ <im-N-name>.jpg
|__ ...

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

Configs:
    Backbone: Resnet50
    Input size: 300
    SE: False
    CBAM: False
    FUSION: False
Run:
    python train.py --config-file configs/resnet50_ssd300_voc0712.yaml

Train sample 2

Configs:
    Backbone: Resnet50
    Input size: 300
    SE: False
    CBAM: False
    FUSION: True
Run:
    python train.py --config-file configs/resnet50_ssd300_voc0712_feature_fusion.yaml

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].