Skip to content

LahiRumesh/Object-Detection_Data-Augmentation

Repository files navigation

Image Augmentation for Object Detection

Images augmentation for Object detection tasks

Getting Started

This pipeline can use to Augment data in CSV Annotation Format

(CSV Annotation) Format:

CSV_format

Make sure that, your csv file in this order.

Installation

Clone this repo with:

git clone [email protected]:LahiRumesh/Object-Detection_Data-Augmentation.git
cd Object-Detection_Data-Augmentation/

Install required packages :

pip install -r requirements.txt

Image Augmentation

Make changes to user_inputs.ini ,

[USER_DATA]
IMAGE_FOLDER=images   # Folder path which contain images
INPUT_CSV=train.csv   # CSV file path with 
AUGMENT_FOLDER=image_output  # Images save into this directory after augmentaion
AUGMENT_CSV=output.csv  # CSV file which contain augmentation values

If you want to Rotate Image set ROTATE_IMAGES=True

[Random_Rotate]
ROTATE_IMAGES=True 
ROTATE_VALUE=45

Further more If you want to Rotate and Resize the images in same time, set ROTATE_IMAGES=True & RESIZE_IMAGES=True

[Random_Rotate]
ROTATE_IMAGES=True 
ROTATE_VALUE=45

[Resize]
RESIZE_IMAGES=True 
RESIZE_VALUE=416

Make sure to Select atleast one Augmentation Type, Make your changes and save user_inputs.ini file

python augmentation.py

Acknowledgements

Data Augmentation For Object Detection for more information.