A readable Keras port of the original SSD detector
Most SSD code is write-only; this Keras port adds thorough comments, working weights, and notebooks so you can understand and adapt the architecture.

What it does
This is a faithful Keras reimplementation of the original Single Shot MultiBox Detector (SSD) from Wei Liu et al., complete with ported Caffe weights for SSD300 and SSD512. It reproduces the original Pascal VOC mAP scores—within a tenth of a point in some cases—and wraps everything in Jupyter notebooks for training, inference, and evaluation. A miniature SSD7 variant is included for quick experiments on smaller GPUs or simpler detection tasks.
The interesting bit
The author treats documentation as a feature, not an afterthought: every layer, anchor box, and loss detail is annotated for low-level study. There is even a dedicated tutorial on sub-sampling pretrained weights for transfer learning, which is the kind of boring-but-valuable plumbing most repos leave as an exercise to the reader.
Key highlights
- Ported weights and scratch-trained models match the original Caffe mAP on Pascal VOC (
SSD300“07+12” scores 0.771 vs. the original 0.772). - Includes a toy
SSD7architecture that hits 127 FPS on a mobile GTX 1070, useful for prototyping even if it is not state-of-the-art. - Extensive inline comments and separate
ssd_encoder_decoderutilities demystify anchor matching and non-maximum suppression. - Opinionated benchmarking: the author measures FPS at batch size 1, arguing that batch-8 throughput is a misleading metric for sequential detection.
Caveats
- Locked to an older stack: TensorFlow 1.x and Keras 2.x; Theano and CNTK backends are explicitly unsupported.
- Training the full
SSD300orSSD512from scratch will “probably fail” unless you load the convolutionalized VGG-16 weights first. - The
SSD7traffic examples are admittedly cherry-picked from a partially trained model after only 10,000 steps.
Verdict
Grab this if you are trying to learn how SSD actually works under the hood or need a documented starting point for custom base networks. Skip it if you want a modern, production-ready detector on current TensorFlow versions.
Frequently asked
- What is pierluigiferrari/ssd_keras?
- Most SSD code is write-only; this Keras port adds thorough comments, working weights, and notebooks so you can understand and adapt the architecture.
- Is ssd_keras open source?
- Yes — pierluigiferrari/ssd_keras is open source, released under the Apache-2.0 license.
- What language is ssd_keras written in?
- pierluigiferrari/ssd_keras is primarily written in Python.
- How popular is ssd_keras?
- pierluigiferrari/ssd_keras has 1.9k stars on GitHub.
- Where can I find ssd_keras?
- pierluigiferrari/ssd_keras is on GitHub at https://github.com/pierluigiferrari/ssd_keras.