A PyTorch Implementation of Single Shot MultiBox Detector
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
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.
Shell # First install Python server and client pip install visdom # Start the server (probably in a screen or tmux) python -m visdom.server
To make things easy, we provide bash scripts to handle the dataset downloads and setup for you. We also provide simple dataset loaders that inherit
torch.utils.data.Dataset, making them fully compatible with the
Microsoft COCO: Common Objects in Context
# specify a directory for dataset to be downloaded into, else default is ~/data/ sh data/scripts/COCO2014.sh
PASCAL VOC: Visual Object Classes
# specify a directory for dataset to be downloaded into, else default is ~/data/ sh data/scripts/VOC2007.sh #
# specify a directory for dataset to be downloaded into, else default is ~/data/ sh data/scripts/VOC2012.sh #
mkdir weights cd weights wget https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth
train.pyas a flag or manually change them.
To evaluate a trained network:
You can specify the parameters listed in the
eval.pyfile by flagging them or manually changing them.
| Original | Converted weiliu89 weights | From scratch w/o data aug | From scratch w/ data aug | |:-:|:-:|:-:|:-:| | 77.2 % | 77.26 % | 58.12% | 77.43 % |
GTX 1060: ~45.45 FPS
state_dicts(dict of weight tensors) of the latest SSD model definitions trained on different datasets.
2. If using [pip](https://pypi.python.org/pypi/pip):
# make sure pip is upgraded pip3 install --upgrade pip # install jupyter notebook pip install jupyter # Run this inside ssd.pytorch jupyter notebook
demo/demo.ipynbat http://localhost:8888 (by default) and have at it!
cv2.waitkeyfor optimal fps) or on an NVIDIA GPU
pip install imutils
python -m demo.liveopens the webcam and begins detecting!
We have accumulated the following to-do list, which we hope to complete in the near future - Still to come: * [x] Support for the MS COCO dataset * [ ] Support for SSD512 training and testing * [ ] Support for training on custom datasets
Note: Unfortunately, this is just a hobby of ours and not a full-time job, so we'll do our best to keep things up to date, but no guarantees. That being said, thanks to everyone for your continued help and feedback as it is really appreciated. We will try to address everything as soon as possible.