Skip to content

wilbur-caper/SSD_FPN_GIoU

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSD_FPN_GIoU, in PyTorch

This is a SSD experiment reposity, the purpose is to reproduce some related papers based on SSD The code references SSD: Single Shot MultiBox Object Detector, in PyTorch and mmdet. Currently, some experiments are carried out on the VOC dataset, if you want to train your own dataset, you can refer to the part of training-yourself-dataset.

Table of Contents

       

Fold-Structure

The fold structure as follow:

  • config/
    • config.py
    • init.py
  • data/
    • init.py
    • VOC.py
    • VOCdevkit/
  • model/
    • build_ssd.py
    • init.py
    • backbone/
    • neck/
    • head/
    • utils/
  • utils/
    • box/
    • detection/
    • loss/
    • init.py
  • tools/
    • train.py
    • eval.py
    • test.py
  • work_dir/

Environment

  • pytorch 0.4.1
  • python3+
  • visdom
    • for real-time loss visualization during training!
     pip install visdom
    • Start the server (probably in a screen or tmux)
     python visdom
    • Then (during training) navigate to http://localhost:8097/ (see the Train section below for training details).

Datasets

  • PASCAL VOC:Download VOC2007, VOC2012 dataset, then put VOCdevkit in the data directory

Training

Training VOC

python tools/train.py
  • Note:
    • For training, default NVIDIA GPU.
    • You can set the parameters in the train.py (see 'tools/train.py` for options)
    • In the config,you can set the work_dir to save your training weight.(see 'configs/config.py`)
    • if you want to selected the classficaiton and Regression Loss, you can to change the train_config. Now, we provide the classficaiton {FocalLoss,CrossEntropy},Regression {SmoothL1,Giou}.(see 'configs/config.py`)

Training yourself dataset

  • if you want to trainning yourself dataset, there are some steps:
  1. you need to make the dataset refer the VOC dataset, and take it to data/
  2. in the data/ ,you need make yourself-data.py, for example CRACK.py(it is my dataset), and change it according to your dataset. Also,in the init.py you can write something about your dataset
  3. change the config/ config.py, and make your dataset config,like CRACK(dict{})
  4. In the main,load your dataset.
  • In the SSD_FPN_GIoU fold:
python tools/train.py

Evaluation

  • To evaluate a trained network:
python eval.py --trained_model your_weight_address

Test

  • To test a trained network:
python test.py -- trained_model your_weight_address

if you want to visual the box, you can add the command --visbox True(default False)

Performance

VOC2007 Test mAP

  • Backbone is the ResNet50:
Test mAP(iou=0.5) mAP(iou=0.6) mAP(iou=0.75)
SSD 75.49% 70.87% 53.44 %
SSD+Gious 76.09% 71.01% 54.70 %
SSD+FPN 78.99% 73.18% 55.19 %
SSD+FPN+Gious 78.96% 73.35% 55.83 %

result

FPS

  • SSD+FPN+Gious: GTX 1080ti: ~35 FPS

Download a pre-trained network

  • Currently, we provide the following PyTorch models:

Authors

References

About

SSD改进版SSD+FPN+GIoU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.3%
  • Jupyter Notebook 12.7%