Image prediction Convolutional Neural Network

This is about an image prediction model with the help of Convolutional Neural Networks, based on fastai/fastbook.

Getting started, we downloaded 150 images via Bing Image Search, then to apply a ml model by fastai in order to be able to predict images via an image upload function, included in the model. Further, the model will be deployed via github and binder to a live URL, thus enabling the possibility to upload images taken via mobile devices and getting a live prediction on the categorization of the image.

In our scenario, we build a model based on 150 images of maine coone cats, persian cats and siamese cats that resultat in an error rate of 0.082 in the fifth epoch:

Amazingly, the amount of data needed for this was very limited, due to the pretrained model by fastai that enabled such a low error-rate.

The train loss refers to the loss of the training set in each epoch, and the valid loss refers to the loss of the validation set. Although these two differ for each epoch, in the last epoch the loss of the training set has decreased significantly, whereas the loss of the validation set is more or less on the same level as in epoch 0.

Accordingly, the confusion matrix below illustrates the relation of predictions and actuals:

As can be seen above, the only more significant error occured in concern of predicted maine coon cats, that were actually persian cats.