Skip to content

joao-borrego/tf-shape-detection

Repository files navigation

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.

Walkthrough

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 tests.md.

Reference

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

@article{borregoatabak2018,
  title={The impact of domain randomization on object detection: a case study on parametric shapes and synthetic textures},
  author={Dehban, Atabak and Borrego, Jo{\~a}o and Figueiredo, Rui and Moreno, Plinio and Bernardino, Alexandre and Santos-Victor, Jos{\'e}},
  booktitle="IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)",
  year={2018}
}

Dataset

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.

Acknowledgements

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

Dependencies

Our pipeline requires the following software.