Generate and Extend your Custom Dataset [Script]


As you know, it really requires a lot of data, especially, accurate data in order to also achieve a successful model at the end of the training process. Considering sometimes data, which is completely custom and really hard to find high quality ones on the internet, this script is going to increase your current data size by a few times with different methods of image manipulation to give you a much more accurate and stable model at the end.

Custom Input Data

Based on your current available data, this simple script will go over, and extend your current dataset by using image manipulation methods as following:

  • Blurred
  • Black and White
  • Noisy
  • Flip (over X, Y, Center)
  • Bright
  • Hue
  • More to come…



Run the script

Windows $python

Linux & MacOS$python3

Folder Structure


└── BlackAndWhite
│ └──

└── Blur
│ └──

└── Brightness
│ └──

└── Flip
│ └──

└── Hue
│ └──

└── Noise
│ └──

└── Shear
│ └──



└── src
└── input
│ └── image1.jpg
│ │
│ └── image2.jpg
│ │
│ └── image3.jpg
│ │
│ └── image4.jpg
│ │
│ └── image5.jpg
└── output

Features to come

Current version of the script allows the users to prepare their data before annotating them. However, in the next version, script will also be ready to be easily used by the users on a ready to train data, where the script itself will also generate the label data of the given inputs by itself automatically, letting user only spend a few seconds on the generation, and then directly set on training.

New image manipulation methods to increase the data as much as we can and more!


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store