The goal of this kernel was to build a clean image classificator that includes Data Augmentation as well as Model Evaluating and Fine-Tuning. I tried to create a general approach of solving this kind of problems for image classifications which can be reused for different kind of image data.
The Dataset can be found and downloaded here on Kaggle.
git clone https://github.com/JanMarcelKezmann/Animal-Classificator-Convolutional-Neural-Network.git
pip install -r requirements.txt
Just open the .ipynb code in a Notebook of your choice and run it.
Because the code was written in the colaboratory of Google you can simply open it in there and run it after uploading the data to the drive.
Evaluated were two different convolutional neural networks: The Inception V3 and the Inception ResNet V2.
The best result was achieved even before trying to fine-tune the models.
Model | Inception V3 | Inception ResNet V2 |
---|---|---|
Loss: | 0.9624 | 0.8385 |
Accuracy: | 85.29 % | 89.33 % |
<Checking out a couple of images I found out that some pictures were put into the wrong folder in the original dataset. This means that for example a dog picture is put into the horse folder.
This could potentially result in a worse accuracy for about 1 % which is not huge but still relevant.