One of the main drawbacks of working with image recognition is the lack of variety in some of the images available. This may cause the convolutional neural network to not operate as optimally as we would like, and return less than ideal results due to the lack of variety in the training data. There are techniques available to bypass that shortcoming and we discuss one of them in this section.
Once again much of the heavy lifting is already done for us. We will use a popular Python package, augmentor
, that is frequently used with machine learning and deep learning modeling to generate additional versions of existing images distorted and augmented for variety.
The package will first have to be pip
installed using the following script: pip install augmentor
We should then have confirmation that the package is installed, as seen in the following screenshot:
We will then need to import the pipeline class from augmentor:
from Augmentor import Pipeline...