All Projects → debidatta → Syndata Generation

debidatta / Syndata Generation

Licence: mit
Code used to generate synthetic scenes and bounding box annotations for object detection. This was used to generate data used in the Cut, Paste and Learn paper

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Syndata Generation

Detectron Self Train
A PyTorch Detectron codebase for domain adaptation of object detectors.
Stars: ✭ 99 (-53.74%)
Mutual labels:  object-detection, faster-rcnn
Sightseq
Computer vision tools for fairseq, containing PyTorch implementation of text recognition and object detection
Stars: ✭ 116 (-45.79%)
Mutual labels:  object-detection, faster-rcnn
Robust Physical Attack
Physical adversarial attack for fooling the Faster R-CNN object detector
Stars: ✭ 115 (-46.26%)
Mutual labels:  object-detection, faster-rcnn
Data generator object detection 2d
A data generator for 2D object detection
Stars: ✭ 73 (-65.89%)
Mutual labels:  object-detection, data-augmentation
Iterdet
[S+SSPR2020] IterDet: Iterative Scheme for Object Detection in Crowded Environments
Stars: ✭ 143 (-33.18%)
Mutual labels:  object-detection, faster-rcnn
Tf Object Detection
Simpler app for tensorflow object detection API
Stars: ✭ 91 (-57.48%)
Mutual labels:  object-detection, faster-rcnn
Hrnet Maskrcnn Benchmark
Object detection with multi-level representations generated from deep high-resolution representation learning (HRNetV2h).
Stars: ✭ 116 (-45.79%)
Mutual labels:  object-detection, faster-rcnn
Keras Faster Rcnn
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Stars: ✭ 28 (-86.92%)
Mutual labels:  object-detection, faster-rcnn
Tensorflow Anpr
Automatic Number (License) Plate Recognition using Tensorflow Object Detection API
Stars: ✭ 142 (-33.64%)
Mutual labels:  object-detection, faster-rcnn
Easy Faster Rcnn.pytorch
An easy implementation of Faster R-CNN (https://arxiv.org/pdf/1506.01497.pdf) in PyTorch.
Stars: ✭ 141 (-34.11%)
Mutual labels:  object-detection, 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 (-6.54%)
Mutual labels:  object-detection, faster-rcnn
Py R Fcn Multigpu
Code for training py-faster-rcnn and py-R-FCN on multiple GPUs in caffe
Stars: ✭ 192 (-10.28%)
Mutual labels:  object-detection, faster-rcnn
Traffic Light Detector
Detect traffic lights and classify the state of them, then give the commands "go" or "stop".
Stars: ✭ 37 (-82.71%)
Mutual labels:  object-detection, faster-rcnn
Driving In The Matrix
Steps to reproduce training results for the paper Driving in the Matrix: Can Virtual Worlds Replace Human-Generated Annotations for Real World Tasks?
Stars: ✭ 96 (-55.14%)
Mutual labels:  object-detection, faster-rcnn
Tensornets
High level network definitions with pre-trained weights in TensorFlow
Stars: ✭ 982 (+358.88%)
Mutual labels:  object-detection, faster-rcnn
Bmaskr Cnn
Boundary-preserving Mask R-CNN (ECCV 2020)
Stars: ✭ 116 (-45.79%)
Mutual labels:  object-detection, faster-rcnn
Dataaugmentationforobjectdetection
Data Augmentation For Object Detection
Stars: ✭ 812 (+279.44%)
Mutual labels:  object-detection, data-augmentation
Keras object detection
Convert any classification model or architecture trained in keras to an object detection model
Stars: ✭ 28 (-86.92%)
Mutual labels:  object-detection, faster-rcnn
Copy Paste Aug
Copy-paste augmentation for segmentation and detection tasks
Stars: ✭ 132 (-38.32%)
Mutual labels:  object-detection, data-augmentation
Dockerface
Face detection using deep learning.
Stars: ✭ 173 (-19.16%)
Mutual labels:  object-detection, faster-rcnn

SynDataGeneration

This code is used to generate synthetic scenes for the task of instance/object detection. Given images of objects in isolation from multiple views and some background scenes, it generates full scenes with multiple objects and annotations files which can be used to train an object detector. The approach used for generation works welll with region based object detection methods like Faster R-CNN.

Pre-requisites

  1. OpenCV (pip install opencv-python)
  2. PIL (pip install Pillow)
  3. Poisson Blending (Follow instructions here
  4. PyBlur (pip install pyblur)

To be able to generate scenes this code assumes you have the object masks for all images. There is no pre-requisite on what algorithm is used to generate these masks as for different applications different algorithms might end up doing a good job. However, we recommend Pixel Objectness with Bilinear Pooling to automatically generate these masks. If you want to annotate the image manually we recommend GrabCut algorithms(here, here, here)

Setting up Defaults

The first section in the defaults.py file contains paths to various files and libraries. Set them up accordingly.

The other defaults refer to different image generating parameters that might be varied to produce scenes with different levels of clutter, occlusion, data augmentation etc.

Running the Script

python dataset_generator.py [-h] [--selected] [--scale] [--rotation]
                            [--num NUM] [--dontocclude] [--add_distractors]
                            root exp

Create dataset with different augmentations

positional arguments:
  root               The root directory which contains the images and
                     annotations.
  exp                The directory where images and annotation lists will be
                     created.

optional arguments:
  -h, --help         show this help message and exit
  --selected         Keep only selected instances in the test dataset. Default
                     is to keep all instances in the roo directory.
  --scale            Add scale augmentation.Default is to not add scale
                     augmentation.
  --rotation         Add rotation augmentation.Default is to not add rotation
                     augmentation.
  --num NUM          Number of times each image will be in dataset
  --dontocclude      Add objects without occlusion. Default is to produce
                     occlusions
  --add_distractors  Add distractors objects. Default is to not use
                     distractors

Training an object detector

The code produces all the files required to train an object detector. The format is directly useful for Faster R-CNN but might be adapted for different object detectors too. The different files produced are:

  1. labels.txt - Contains the labels of the objects being trained
  2. annotations/*.xml - Contains annotation files in XML format which contain bounding box annotations for various scenes
  3. images/*.jpg - Contain image files of the synthetic scenes in JPEG format
  4. train.txt - Contains list of synthetic image files and corresponding annotation files

There are tutorials describing how one can adapt Faster R-CNN code to run on a custom dataset like:

  1. https://github.com/rbgirshick/py-faster-rcnn/issues/243
  2. http://sgsai.blogspot.com/2016/02/training-faster-r-cnn-on-custom-dataset.html

Paper

The code was used to generate synthetic scenes for the paper Cut, Paste and Learn: Surprisingly Easy Synthesis for Instance Detection.

If you find our code useful in your research, please consider citing:

@InProceedings{Dwibedi_2017_ICCV,
author = {Dwibedi, Debidatta and Misra, Ishan and Hebert, Martial},
title = {Cut, Paste and Learn: Surprisingly Easy Synthesis for Instance Detection},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {Oct},
year = {2017}
}
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].