All Projects → georgesung → Ssd_tensorflow_traffic_sign_detection

georgesung / Ssd_tensorflow_traffic_sign_detection

Licence: mit
Implementation of Single Shot MultiBox Detector in TensorFlow, to detect and classify traffic signs

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ssd tensorflow traffic sign detection

A Pytorch Tutorial To Object Detection
SSD: Single Shot MultiBox Detector | a PyTorch Tutorial to Object Detection
Stars: ✭ 2,398 (+422.44%)
Mutual labels:  object-detection, ssd
Mmdetection
OpenMMLab Detection Toolbox and Benchmark
Stars: ✭ 17,646 (+3744.44%)
Mutual labels:  object-detection, ssd
Vip
Video Platform for Action Recognition and Object Detection in Pytorch
Stars: ✭ 175 (-61.87%)
Mutual labels:  object-detection, ssd
Ssd Pytorch
SSD: Single Shot MultiBox Detector pytorch implementation focusing on simplicity
Stars: ✭ 107 (-76.69%)
Mutual labels:  object-detection, ssd
Ssd Pytorch
SSD目标检测算法(Single Shot MultiBox Detector)(简单,明了,易用,全中文注释,单机多卡训练,视频检测)( If you train the model on a single computer and mutil GPU, this program will be your best choice , easier to use and easier to understand )
Stars: ✭ 276 (-39.87%)
Mutual labels:  object-detection, ssd
Ssd keras
A Keras port of Single Shot MultiBox Detector
Stars: ✭ 1,763 (+284.1%)
Mutual labels:  object-detection, ssd
Paddledetection
Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Stars: ✭ 5,799 (+1163.4%)
Mutual labels:  object-detection, ssd
Ssd Knowledge Distillation
A PyTorch Implementation of Knowledge Distillation on SSD
Stars: ✭ 51 (-88.89%)
Mutual labels:  object-detection, ssd
Object Detection Api Tensorflow
Object Detection API Tensorflow
Stars: ✭ 267 (-41.83%)
Mutual labels:  object-detection, ssd
Mmdetection To Tensorrt
convert mmdetection model to tensorrt, support fp16, int8, batch input, dynamic shape etc.
Stars: ✭ 262 (-42.92%)
Mutual labels:  object-detection, ssd
Ssd Tensorflow
Single Shot MultiBox Detector in TensorFlow
Stars: ✭ 4,066 (+785.84%)
Mutual labels:  object-detection, ssd
Rectlabel Support
RectLabel - An image annotation tool to label images for bounding box object detection and segmentation.
Stars: ✭ 338 (-26.36%)
Mutual labels:  object-detection, ssd
Tf Object Detection
Simpler app for tensorflow object detection API
Stars: ✭ 91 (-80.17%)
Mutual labels:  object-detection, ssd
Ssd keras
简明 SSD 目标检测模型 keras version(交通标志识别 训练部分见 dev 分支)
Stars: ✭ 152 (-66.88%)
Mutual labels:  object-detection, ssd
Ssd
High quality, fast, modular reference implementation of SSD in PyTorch
Stars: ✭ 1,060 (+130.94%)
Mutual labels:  object-detection, ssd
Traffic Sign Detection
Traffic Sign Detection. Code for the paper entitled "Evaluation of deep neural networks for traffic sign detection systems".
Stars: ✭ 200 (-56.43%)
Mutual labels:  object-detection, ssd
Tensorflow Face Detection
A mobilenet SSD based face detector, powered by tensorflow object detection api, trained by WIDERFACE dataset.
Stars: ✭ 711 (+54.9%)
Mutual labels:  object-detection, ssd
Pytorch Ssd
MobileNetV1, MobileNetV2, VGG based SSD/SSD-lite implementation in Pytorch 1.0 / Pytorch 0.4. Out-of-box support for retraining on Open Images dataset. ONNX and Caffe2 support. Experiment Ideas like CoordConv.
Stars: ✭ 1,054 (+129.63%)
Mutual labels:  object-detection, ssd
Ssd Variants
PyTorch implementation of several SSD based object detection algorithms.
Stars: ✭ 233 (-49.24%)
Mutual labels:  object-detection, ssd
Fastmot
High-performance multiple object tracking based on YOLO, Deep SORT, and optical flow
Stars: ✭ 284 (-38.13%)
Mutual labels:  object-detection, ssd

SSD in TensorFlow: Traffic Sign Detection and Classification

Overview

Implementation of Single Shot MultiBox Detector (SSD) in TensorFlow, to detect and classify traffic signs. This implementation was able to achieve 40-45 fps on a GTX 1080 with an Intel Core i7-6700K.

Note this project is still work-in-progress. The main issue now is model overfitting. I am currently working on pre-training on VOC2012 first, then performing transfer learning over to traffic sign detection.

Currently only stop signs and pedestrian crossing signs are detected. Example detection images are below.

example1 example2 example3 example4 example5 example6

The model was trained on the LISA Traffic Sign Dataset, a dataset of US traffic signs.

Dependencies

  • Python 3.5+
  • TensorFlow v0.12.0
  • Pickle
  • OpenCV-Python
  • Matplotlib (optional)

How to run

Clone this repository somewhere, let's refer to it as $ROOT

To run predictions using the pre-trained model:

  • Download the pre-trained model to $ROOT
  • cd $ROOT
  • python inference.py -m demo
    • This will take the images from sample_images, annotate them, and display them on screen
  • To run predictions on your own images and/or videos, use the -i flag in inference.py (see the code for more details)
    • Note the model severly overfits at this time

Training the model from scratch:

  • Download the LISA Traffic Sign Dataset, and store it in a directory $LISA_DATA
  • cd $LISA_DATA
  • Follow instructions in the LISA Traffic Sign Dataset to create 'mergedAnnotations.csv' such that only stop signs and pedestrian crossing signs are shown
  • cp $ROOT/data_gathering/create_pickle.py $LISA_DATA
  • python create_pickle.py
  • cd $ROOT
  • ln -s $LISA_DATA/resized_images_* .
  • ln -s $LISA_DATA/data_raw_*.p .
  • python data_prep.py
    • This performs box matching between ground-truth boxes and default boxes, and packages the data into a format used later in the pipeline
  • python train.py
    • This trains the SSD model
  • python inference.py -m demo

Differences between original SSD implementation

Obivously, we are only detecting certain traffic signs in this implementation, whereas the original SSD implemetation detected a greater number of object classes in the PASCAL VOC and MS COCO datasets. Other notable differences are:

  • Uses AlexNet as the base network
  • Input image resolution is 400x260
  • Uses a dynamic scaling factor based on the dimensions of the feature map relative to original image dimensions

Performance

As mentioned above, this SSD implementation was able to achieve 40-45 fps on a GTX 1080 with an Intel Core i7 6700K.

The inference time is the sum of the neural network inference time, and Non-Maximum Suppression (NMS) time. Overall, the neural network inference time is significantly less than the NMS time, with the neural network inference time generally between 7-8 ms, whereas the NMS time is between 15-16 ms. The NMS algorithm implemented here has not been optimized, and runs on CPU only, so further effort to improve performance can be done there.

Dataset characteristics

The entire LISA Traffic Sign Dataset consists of 47 distinct traffic sign classes. Since we are only concered with a subset of those classes, we only use a subset of the LISA dataset. Also, we ignore all training samples where we do not find a matching default box, further reducing our dataset's size. Due to this process, we end up with very little data to work with.

In order to improve on this issue, we can perform image data augmentation, and/or pre-train the model on a larger dataset (e.g. VOC2012, ILSVRC)

Training process

Given the small size of our pruned dataset, I chose a train/validation split of 95/5. The model was trained with Adadelta optimizers, with the default parameters provided by TensorFlow. The model was trained over 200 epochs, with a batch size of 32.

Areas of improvement

There are multiple potential areas of improvement in this project:

  • Pre-train the model on VOC2012 and/or ILSVRC
  • Image data augmentation
  • Hyper-parameter tuning
  • Optimize NMS alogorithm, or leverage existing optimized NMS algorithm
  • Implement and report mAP metric
  • Try different base networks
  • Expand to more traffic sign classes
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].