Back to Tiny Dnn

Single Shot MultiBox Detector (SSD)

examples/ssd_detection/README.md

1.0.0a31.6 KB
Original Source

Single Shot MultiBox Detector (SSD)

A TinyDNN 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.

Prerequisites for this example

  • Download PyTorch pretrained models from here
  • Convert PyTorch models to TinyDNN with following commands
mkdir models
python convert_models.py /path/to/model models

Use SSD in Object Detection

./example_ssd_test /folder/to/models/ /path/to/image

You will get output similar to following:

Bounding box coordinates:
x_min = 19.6578, x_max = 66.2639, y_min = 240.801, y_max = 270.333, class = 1, score = 0.989524
x_min = -3.73388, x_max = 302.883, y_min = 43.5821, y_max = 202.043, class = 1, score = 0.900133
x_min = 17.771, x_max = 54.9812, y_min = 237.505, y_max = 259.987, class = 1, score = 0.660543

If you see the following message:

Failed to load weights from models/01.weights
Failed to load weights from models/02.weights
...
Failed to load weights from models/18.weights

Please make sure the path of weight files.

Detection Results

Here's an example of object detection results produced by SSD.