mukopikmin / bounding-box-augmentation

Augment dataset (images and annotations) for object detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bounding Box Augmentation

Example of augmentating image with bounding boxes. This code is based on aleju/imgaug.

Augmentable annotation format is Pascal VOC only.

Examples

original.jpg

Above image can be augmented to the following images.

Example 1 Example 2 Example 3 Example 4
example1.jpg example2.jpg example3.jpg example4.jpg

Requirements

  • Python3
  • Pipenv

Usage

Prepare virtualenv with pipenv.

pipenv install

Put files(Images and Annotations) to augment in input/. (Do not create sub directories.)

Run script.

pipenv run python augment.py

Augmented images and annotations are generated in output/. If there is no bounding boxes in the image, Annotation files (*.xml) are moved to empty/.

About

Augment dataset (images and annotations) for object detection

License:MIT License


Languages

Language:Python 100.0%