A PyTorch implementation of Single Shot MultiBox Detector from the 2016 paper by Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang, and Alexander C. Berg. The official and original Caffe code can be found here.
- Install PyTorch by selecting your environment on the website and running the appropriate command.
- Clone this repository.
- Then download the dataset by following the instructions below.
- For training VOC datasets are used.
Bash scripts are given to handle the dataset downloads and setup.
PASCAL VOC: Visual Object Classes
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2007.sh # <directory># specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2012.sh # <directory>-
First download the fc-reduced VGG-16 PyTorch base network weights at: https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth
-
By default, download the file in the
Real-time-Object-Detection-and-Classification-using-SSD-Algorithm/weightsdir: -
To train SSD using the train script simply specify the parameters listed in
train.pyas a flag or manually change them.
python train.py- Note:
- For training, an NVIDIA GPU is strongly recommended for speed.
To evaluate a trained network:
python Object_detection.pyYou can specify the parameters listed in the Object_detection.py file by flagging them or manually changing them.
- SSD300 trained on VOC0712 (newest PyTorch weights)
- https://s3.amazonaws.com/amdegroot-models/ssd300_mAP_77.43_v2.pth * SSD300 trained on VOC0712 (original Caffe weights)
- https://s3.amazonaws.com/amdegroot-models/ssd_300_VOC0712.pth
- Wei Liu, et al. "SSD: Single Shot MultiBox Detector." ECCV2016.
- Original Implementation (CAFFE)