Skip to content

This Python script uses OpenCV to apply image augmentation techniques to all images in a specified folder. The generated images can be useful for machine learning models. With clear instructions, this project provides an easy-to-use solution for generating augmented images using OpenCV.

Notifications You must be signed in to change notification settings

ozi-dev/Image-Augmentation-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Image Data Augmentation using OpenCV

This code is designed to perform image data augmentation on a folder of images using OpenCV library at Google Colab. This technique is used to increase the size of the available dataset by creating multiple new and distinct images from the existing ones. The code can be used for any image dataset, just make sure to specify the correct path to the input folder and output folder. For scraping images visit repo that written by me: img-scraper

Prerequisites

  • Google Colab account
  • Python 3.x
  • OpenCV
  • Numpy

Installation

  1. Clone this repository by running the following command in your terminal:
git clone https://github.com/your_username/Image-Augmentation.git
  1. Install required packages using pip:
pip install opencv-python google-colab numpy
  1. Add the images you want to augment to a new folder in your Google Drive account.

Usage

  1. Open art_augmentation.ipynb file in Google Colab.
  2. Replace "your_folder_name" and "your_output_folder_name" with the names of your input and output folders respectively.
  3. Run each cell of the notebook step-by-step.

After running the script, new images will be generated and saved to the output folder in your Google Drive account.

Augmentation Techniques Used

The following augmentation techniques are applied to each image:

  • Flipping the image horizontally
  • Rotating the image by 90 degrees clockwise
  • Applying Gaussian blur to the image
  • Converting the image to grayscale
  • Converting the image to HSV color space

Contact

Author: Oğuzhan Öztürk

Email: oguzhanozturk0@outlook.com

About

This Python script uses OpenCV to apply image augmentation techniques to all images in a specified folder. The generated images can be useful for machine learning models. With clear instructions, this project provides an easy-to-use solution for generating augmented images using OpenCV.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages