data augmentation tool to generate data for object detection and segmentation (random synthesis)
- python 2.7
- opencv-python
- numpy
- imutils
- data-augmentation
- bg (background images)
- 1.jpg
- 2.jpg
- ...
- 100.jpg
- dataset (save path)
- Images: Synthesized rgb images
- labels: labels for YOLO training
- Masks: Masks for each object (segmentation data, maximum value=1)
- images (object images without background)
- 01_0001.png
- 01_0002.png
- ...
- 02_0003.png
- bg (background images)
- Object images and background images must be the same as given format.
- Object images must be cropped to fit the object.
- Run synthesis.py
python synthesis.py
- Change config.json according to your configuration.
- NUM_MIN_OBJ: Minimum number of objects to be synthesized into one picture
- NUM_MAX_OBJ: Maximum number of objects to be synthesized into one picture
- SCALE_MIN: Minimum size of objects (pixel)
- SCALE_MIN: Maximum size of objects (pixel)
- NUM_IMAGES: Number of images to create
- Run synthesis.py
python synthesis.py

