All Projects → HiKapok → Ssd.tensorflow

HiKapok / Ssd.tensorflow

Licence: apache-2.0
State-of-the-art Single Shot MultiBox Detector in Pure TensorFlow, QQ Group: 758790869

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ssd.tensorflow

Rectlabel Support
RectLabel - An image annotation tool to label images for bounding box object detection and segmentation.
Stars: ✭ 338 (+1.2%)
Mutual labels:  ssd, yolo, faster-rcnn
Cv Papers
计算机视觉相关论文整理、记录、分享; 包括图像分类、目标检测、视觉跟踪/目标跟踪、人脸识别/人脸验证、OCR/场景文本检测及识别等领域。欢迎加星,欢迎指正错误,同时也期待能够共同参与!!! 持续更新中... ...
Stars: ✭ 738 (+120.96%)
Mutual labels:  ssd, yolo, faster-rcnn
Object Detection Api Tensorflow
Object Detection API Tensorflow
Stars: ✭ 267 (-20.06%)
Mutual labels:  ssd, yolo
Vehicle Detection
Compare FasterRCNN,Yolo,SSD model with the same dataset
Stars: ✭ 130 (-61.08%)
Mutual labels:  ssd, yolo
Mmdetection
OpenMMLab Detection Toolbox and Benchmark
Stars: ✭ 17,646 (+5183.23%)
Mutual labels:  ssd, faster-rcnn
Ssds.pytorch
Repository for Single Shot MultiBox Detector and its variants, implemented with pytorch, python3.
Stars: ✭ 570 (+70.66%)
Mutual labels:  ssd, yolo
Tf Object Detection
Simpler app for tensorflow object detection API
Stars: ✭ 91 (-72.75%)
Mutual labels:  ssd, faster-rcnn
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 (+1636.23%)
Mutual labels:  ssd, faster-rcnn
DL.EyeSight
Mainly use SSD, YOLO and other models to solve the target detection problem in image and video !
Stars: ✭ 48 (-85.63%)
Mutual labels:  yolo, ssd
Real-Time-Object-Detection-API-using-TensorFlow
A Transfer Learning based Object Detection API that detects all objects in an image, video or live webcam. An SSD model and a Faster R-CNN model was pretrained on Mobile net coco dataset along with a label map in Tensorflow. This model were used to detect objects captured in an image, video or real time webcam. Open CV was used for streaming obj…
Stars: ✭ 50 (-85.03%)
Mutual labels:  ssd, faster-rcnn
lightDenseYOLO
A real-time object detection app based on lightDenseYOLO Our lightDenseYOLO is the combination of two components: lightDenseNet as the CNN feature extractor and YOLO v2 as the detection module
Stars: ✭ 20 (-94.01%)
Mutual labels:  yolo, faster-rcnn
Ssd Tensorflow
Single Shot MultiBox Detector in TensorFlow
Stars: ✭ 4,066 (+1117.37%)
Mutual labels:  ssd, yolo
objdet web
Image object detection demo(YOLO,SSD,etc.) running as a Flask web server.
Stars: ✭ 52 (-84.43%)
Mutual labels:  yolo, ssd
Ios tensorflow objectdetection example
An iOS application of Tensorflow Object Detection with different models: SSD with Mobilenet, SSD with InceptionV2, Faster-RCNN-resnet101
Stars: ✭ 126 (-62.28%)
Mutual labels:  ssd, faster-rcnn
Pytorchnethub
项目注释+论文复现+算法竞赛
Stars: ✭ 341 (+2.1%)
Mutual labels:  ssd, faster-rcnn
Traffic Sign Detection
Traffic Sign Detection. Code for the paper entitled "Evaluation of deep neural networks for traffic sign detection systems".
Stars: ✭ 200 (-40.12%)
Mutual labels:  ssd, faster-rcnn
Tensornets
High level network definitions with pre-trained weights in TensorFlow
Stars: ✭ 982 (+194.01%)
Mutual labels:  yolo, faster-rcnn
Object-Detection-Tensorflow
Object Detection API Tensorflow
Stars: ✭ 275 (-17.66%)
Mutual labels:  yolo, ssd
object-tracking
Multiple Object Tracking System in Keras + (Detection Network - YOLO)
Stars: ✭ 89 (-73.35%)
Mutual labels:  yolo, faster-rcnn
Mmdetection To Tensorrt
convert mmdetection model to tensorrt, support fp16, int8, batch input, dynamic shape etc.
Stars: ✭ 262 (-21.56%)
Mutual labels:  ssd, faster-rcnn

State-of-the-art Single Shot MultiBox Detector in TensorFlow

This repository contains codes of the reimplementation of SSD: Single Shot MultiBox Detector in TensorFlow. If your goal is to reproduce the results in the original paper, please use the official codes.

There are already some TensorFlow based SSD reimplementation codes on GitHub, the main special features of this repo inlcude:

  • state of the art performance(77.8%mAP) when training from VGG-16 pre-trained model (SSD300-VGG16).
  • the model is trained using TensorFlow high level API tf.estimator. Although TensorFlow provides many APIs, the Estimator API is highly recommended to yield scalable, high-performance models.
  • all codes were writen by pure TensorFlow ops (no numpy operation) to ensure the performance and portability.
  • using ssd augmentation pipeline discribed in the original paper.
  • PyTorch-like model definition using high-level tf.layers API for better readability ^-^.
  • high degree of modularity to ease futher development.
  • using replicate_model_fn makes it flexible to use one or more GPUs.

New Update(77.9%mAP): using absolute bbox coordinates instead of normalized coordinates, checkout here.

Usage

  • Download Pascal VOC Dataset and reorganize the directory as follows:

     VOCROOT/
     	   |->VOC2007/
     	   |    |->Annotations/
     	   |    |->ImageSets/
     	   |    |->...
     	   |->VOC2012/
     	   |    |->Annotations/
     	   |    |->ImageSets/
     	   |    |->...
     	   |->VOC2007TEST/
     	   |    |->Annotations/
     	   |    |->...
    

    VOCROOT is your path of the Pascal VOC Dataset.

  • Run the following script to generate TFRecords.

     python dataset/convert_tfrecords.py --dataset_directory=VOCROOT --output_directory=./dataset/tfrecords
    
  • Download the pre-trained VGG-16 model (reduced-fc) from here and put them into one sub-directory named 'model' (we support SaverDef.V2 by default, the V1 version is also available for sake of compatibility).

  • Run the following script to start training:

     python train_ssd.py
    
  • Run the following script for evaluation and get mAP:

     python eval_ssd.py
     python voc_eval.py
    

    Note: you need first modify some directory in voc_eval.py.

  • Run the following script for visualization:

     python simple_ssd_demo.py
    

All the codes was tested under TensorFlow 1.6, Python 3.5, Ubuntu 16.04 with CUDA 8.0. If you want to run training by yourself, one decent GPU will be highly recommended. The whole training process for VOC07+12 dataset took ~120k steps in total, and each step (32 samples per-batch) took ~1s on my little workstation with single GTX1080-Ti GPU Card. If you need run training without enough GPU memory you can try half of the current batch size(e.g. 16), try to lower the learning rate and run more steps, watching the TensorBoard until convergency. BTW, the codes here had also been tested under TensorFlow 1.4 with CUDA 8.0, but some modifications to the codes are needed to enable replicate model training, take following steps if you need:

  • copy all the codes of this file to your local file named 'tf_replicate_model_fn.py'
  • add one more line here to import module 'tf_replicate_model_fn'
  • change 'tf.contrib.estimator' in here and here to 'tf_replicate_model_fn'
  • now the training process should run perfectly
  • before you run 'eval_ssd.py', you should also remove this line because of the interface compatibility

This repo is just created recently, any contribution will be welcomed.

Results (VOC07 Metric)

This implementation(SSD300-VGG16) yield mAP 77.8% on PASCAL VOC 2007 test dataset(the original performance described in the paper is 77.2%mAP), the details are as follows:

sofa bird pottedplant bus diningtable cow bottle horse aeroplane motorbike
78.9 76.2 53.5 85.2 75.5 85.0 48.6 86.7 82.2 83.4
sheep train boat bicycle chair cat tvmonitor person car dog
82.4 87.6 72.7 83.0 61.3 88.2 74.5 79.6 85.3 86.4

You can download the trained model(VOC07+12 Train) from GoogleDrive for further research.

For Chinese friends, you can also download both the trained model and pre-trained vgg16 weights from BaiduYun Drive, access code: tg64.

Here is the training logs and some detection results:

Too Busy TODO

  • Adapting for CoCo Dataset
  • Update version SSD-512
  • Transfer to other backbone networks

Known Issues

  • Got 'TypeError: Expected binary or unicode string, got None' while training
    • Why: There maybe some inconsistent between different TensorFlow version.
    • How: If you got this error, try change the default value of checkpoint_path to './model/vgg16.ckpt' in train_ssd.py. For more information issue6 and issue9.
  • Nan loss during training
    • Why: This is caused by the default learning rate which is a little higher for some TensorFlow version.

    • How: I don't know the details about the different behavior between different versions. There are two workarounds:

      • Adding warm-up: change some codes here to the following snippet:
      tf.app.flags.DEFINE_string(
      'decay_boundaries', '2000, 80000, 100000',
      'Learning rate decay boundaries by global_step (comma-separated list).')
      tf.app.flags.DEFINE_string(
      'lr_decay_factors', '0.1, 1, 0.1, 0.01',
      'The values of learning_rate decay factor for each segment between boundaries (comma-separated list).')
      
      • Lower the learning rate and run more steps until convergency.
  • Why this re-implementation perform better than the reported performance
    • I don't know

Citation

Use this bibtex to cite this repository:

@misc{kapok_ssd_2018,
  title={Single Shot MultiBox Detector in TensorFlow},
  author={Changan Wang},
  year={2018},
  publisher={Github},
  journal={GitHub repository},
  howpublished={\url{https://github.com/HiKapok/SSD.TensorFlow}},
}

Discussion

Welcome to join in QQ Group(758790869) for more discussion

Apache License, Version 2.0

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].