Skip to content
pytorch version of SSD and it's enhanced methods such as RFBSSD,FSSD and RefineDet
Branch: master
Clone or download
Latest commit d86a018 Sep 25, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
data fix the bug in dataloader stop running Jun 9, 2018
demo fix std bug and refactor the code style Apr 7, 2018
doc Update Nov 25, 2017
layers fix std bug and refactor the code style Apr 7, 2018
models fix #20 Jul 6, 2018
utils add refinedet 320 Mar 24, 2018
.gitignore fix std bug and refactor the code style Apr 7, 2018
LICENSE RFB Net Detector Nov 25, 2017 Update Sep 25, 2018
coco_voc.txt fix #38 Sep 12, 2018 RFB Net Detector Nov 25, 2017 fix some typos Apr 6, 2018 fix #38 Sep 12, 2018 fix #39 Sep 11, 2018 fix rgb std Apr 7, 2018

Pytorch SSD Series

Pytorch 4.1 is suppoted on branch 0.4 now.

Support Arc:

VOC2007 Test

System mAP FPS (Titan X Maxwell)
Faster R-CNN (VGG16) 73.2 7
YOLOv2 (Darknet-19) 78.6 40
R-FCN (ResNet-101) 80.5 9
SSD300* (VGG16) 77.2 46
SSD512* (VGG16) 79.8 19
RFBNet300 (VGG16) 80.5 83
RFBNet512 (VGG16) 82.2 38
SSD300 (VGG) 77.8 150 (1080Ti)
FSSD300 (VGG) 78.8 120 (1080Ti)


System test-dev mAP Time (Titan X Maxwell)
Faster R-CNN++ (ResNet-101) 34.9 3.36s
YOLOv2 (Darknet-19) 21.6 25ms
SSD300* (VGG16) 25.1 22ms
SSD512* (VGG16) 28.8 53ms
RetinaNet500 (ResNet-101-FPN) 34.4 90ms
RFBNet300 (VGG16) 29.9 15ms*
RFBNet512 (VGG16) 33.8 30ms*
RFBNet512-E (VGG16) 34.4 33ms*

Note: * The speed here is tested on the newest pytorch and cudnn version (0.2.0 and cudnnV6), which is obviously faster than the speed reported in the paper (using pytorch-0.1.12 and cudnnV5).


System COCO minival mAP #parameters
SSD MobileNet 19.3 6.8M
RFB MobileNet 20.7* 7.4M

*: slightly better than the original ones in the paper (20.5).


  1. Installation
  2. Datasets
  3. Training
  4. Evaluation
  5. Models


  • Install PyTorch-0.2.0-0.3.1 by selecting your environment on the website and running the appropriate command.
  • Clone this repository. This repository is mainly based onRFBNet, ssd.pytorch and Chainer-ssd, a huge thank to them.
    • Note: We currently only support Python 3+.
  • Compile the nms and coco tools:

Note*: Check you GPU architecture support in utils/, line 131. Default is:

'nvcc': ['-arch=sm_52',
  • Install pyinn for MobileNet backbone:
pip install git+
  • Then download the dataset by following the instructions below and install opencv.
conda install opencv

Note: For training, we currently support VOC and COCO.


To make things easy, we provide simple VOC and COCO dataset loader that inherits making it fully compatible with the torchvision.datasets API.

VOC Dataset

Download VOC2007 trainval & test
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/ # <directory>
Download VOC2012 trainval
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/ # <directory>

COCO Dataset

Install the MS COCO dataset at /path/to/coco from official website, default is ~/data/COCO. Following the instructions to prepare minival2014 and valminusminival2014 annotations. All label files (.json) should be under the COCO/annotations/ folder. It should have this basic structure


UPDATE: The current COCO dataset has released new train2017 and val2017 sets which are just new splits of the same image sets.


mkdir weights
cd weights
  • To train RFBNet using the train script simply specify the parameters listed in as a flag or manually change them.
python -d VOC -v RFB_vgg -s 300 
  • Note:
    • -d: choose datasets, VOC or COCO.
    • -v: choose backbone version, RFB_VGG, RFB_E_VGG or RFB_mobile.
    • -s: image size, 300 or 512.
    • You can pick-up training from a checkpoint by specifying the path as one of the training parameters (again, see for options)


The test frequency can be found in the By default, it will directly output the mAP results on VOC2007 test or COCO minival2014. For VOC2012 test and COCO test-dev results, you can manually change the datasets in the file, then save the detection results and submitted to the server.


You can’t perform that action at this time.