Skip to content
Domain Randomization Shape Detection
Branch: master
Clone or download
Latest commit 7f1a74b Feb 27, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
models @ f1cb4e5
workspace fix paths; add missing configs Jul 16, 2018
.gitmodules initial commit Jul 13, 2018
LICENSE Initial commit Jul 13, 2018 add arXiv submission links Jul 27, 2018
ShapeDetection.ipynb fix dataset path in overlay bbox step Jul 15, 2018 fix dataset url Jul 16, 2018 add required scripts Jul 13, 2018 previous typo Feb 27, 2019 add required scripts Jul 13, 2018 fix url Jul 15, 2018

Domain Randomization vs Domain Adaptation: A Case Study on Object Category Detection

This repository holds the code used for our recent work on domain randomization. We try to study how we can use this technique in the creation of large domain-specific synthetic datasets. We conclude that this approach can be preferable to fine-tuning state-of-the-art object detection CNNs on small real image datasets, after being pre-trained on huge and available datasets such as COCO.


We provide a Jupyter notebook with a step-by-step walkthrough which includes:

  • How to preprocess image dataset and create binary TF records;
  • How to train network with several configurations (e.g. starting checkpoint, training set, learning rate);
  • How to get mAP (Mean Average Precision) curves on validation set over time;
  • How to export inference graphs and infer detections;
  • How to obtain AP metrics and precision-recall curves on test set.

The tests we performed are summarized in


We have uploaded a preprint version of our work to which can be cited as follows:

  title={Applying Domain Randomization to Synthetic Data for Object Category Detection},
  author={João Borrego, Atabak Dehban, Rui Figueiredo, Plinio Moreno, Alexandre Bernardino, José Santos-Victor},
  journal={arXiv preprint arXiv:1807.09834},


We provided the used real image dataset in our laboratory's webpage. The used synthetic datasets were generated using an open-source Domain Randomization plugin for Gazebo simulator. A detailed walkthrough on how to generate such datasets is provided here.


Our pipeline is based on Justin Francis' TensorFlow Object Detection API repository.


Our pipeline requires the following software.

You can’t perform that action at this time.