How to build and train an image recognition solution

- Advertisement -

Once the model is properly trained, you can proceed to improve its quality. To improve the quality of a certain image recognition model, it is recommended to follow these three key steps.

- Advertisement -

#1 Increase the size of the dataset

- Advertisement -

Convolutional neural networks are sensitive to training data set sizes. So in order to significantly increase the accuracy of the prediction, your image dataset would have to reach a colossal size of millions of images per classification label.

#2 Increase data

- Advertisement -

This is an approach that is not sufficient to increase the image recognition accuracy with the dataset, and allows to obtain the desired numbers. Data augmentation refers to insignificant changes in the samples.

For example, you can modify samples by random transformations – mirror image, change angle, make it grayscale, etc. These changes allow to increase the dataset size and improve the training process in a very simple and effective way.

#3 Do cross validation (K-fold)

It is a highly efficient method that involves repeatedly splitting the dataset into training sets and validating the set with coefficients (k). The model is being learned with a training set and tested with a validation set. And then the model is saved. Once this is done, another validation set is selected and the model is trained again, until all iterations are exhausted.

The final score will include the average of all iterations. Although cross validation is a great approach, we don’t recommend using it for tasks with a large amount of classes. The thing is that in this particular case the model will not learn effectively.

Source link

- Advertisement -

Recent Articles

Related Stories