Member-only story

Data Augmentation — Imgaug Library

Buse Köseoğlu
4 min readMay 14, 2021

You can access the repo I prepared on the subject from my github account.

Data enhancement is to generate new data by changing the original data.

In order for a model to learn the data, enough data should be given to the model. Sometimes the data we have may not be sufficient for the model to learn and we may need to increase our data. In this case, the first thing that comes to mind may be to go wherever we have obtained the data and collect some more data. But this solution takes a lot of time and effort. Instead, we can enlarge the data set we have and bring it to a form that the model can learn with data augmentation techniques. The data we create with data augmentation techniques is called synthetic data.

In this article, we will examine the imgaug library used with data augmentation.

Before running the scripts below, you must install the necessary libraries.

Upload the Photo

Imgaug library does not have a function to read photo. So we will use the imageio library to import the photo. If you want, you can also use OpenCv. OpenCV reads photos in BGR format but supports imgaug RGB format. So don’t forget to convert BGR to RGB if you import with

--

--

Responses (1)