Skip to content

FurkanOM/tf-ssd

Repository files navigation

Single Shot MultiBox Detector

Tensorflow SSD implementation from scratch. MobileNetV2 and VGG16 backbones are supported.

It's implemented and tested with tensorflow 2.0, 2.1, and 2.2

Usage

Project models created in virtual environment using miniconda. You can also create required virtual environment with conda.

To create virtual environment (tensorflow-2 gpu environment):

conda env create -f environment.yml

There are two different backbone, first one the legacy vgg16 backbone and the second and default one is mobilenet_v2. You can easily specify the backbone to be used with the --backbone parameter.

To train and test SSD model:

python trainer.py --backbone mobilenet_v2
python predictor.py --backbone vgg16

If you have GPU issues you can use -handle-gpu flag with these commands:

python trainer.py -handle-gpu

Examples

Trained with VOC 0712 trainval data with VGG16 backbone Trained with VOC 0712 trainval data with MobileNetV2 backbone
Man with a motorbike Horses
Photo by Harley-Davidson on Unsplash Photo by Mark Neal on Unsplash
Man with a dog Airplanes
Photo by Sebastian Herrmann on Unsplash Photo by Vishu Gowda on Unsplash

References

  • VOC 2007 Dataset [dataset]
  • VOC 2012 Dataset [dataset]
  • SSD: Single Shot MultiBox Detector [paper]
  • MobileNetV2: Inverted Residuals and Linear Bottlenecks [paper]
  • Original caffe implementation [code]
  • ParseNet: Looking Wider to See Better [paper]
  • AutoAugment: Learning Augmentation Policies from Data [paper]
  • Data Augmentation Steps for SSD [blog]

About

Tensorflow 2 single shot multibox detector (SSD) implementation from scratch with MobileNetV2 and VGG16 backbones

Topics

Resources

License

Stars

Watchers

Forks

Languages