Dog breed classifier (Data Scientist Nanodegree program - Udacity)

Project Overview:

The ability to differentiate between humans and dogs. The dog/human classifier has many real-world applications. In this project, deep learning is used as an effective method to solve the problem.

 

Problem Statement:

We have photos of dogs and humans. We would like to recognize what is in the photos, is it a human or a dog.

 

Metrics:

To validate our results, we used the accuracy as the metric. The accuracy is the number of correct predictions made divided by the total number of predictions made, multiplied by 100 to turn it into a percentage.

 

Understanding the business:

There is several photos of dogs and humans, defining the proper class for the picture will help us to apply the same knowledge in other areas of object classification.

 

Preparation of data:

The data consists of images for dogs and humans (2 datasets) in the form of training set, validation set, and testing set for the dog dataset. The human dataset is human faces files to test premade model. The data was already labeled and required to transform them to the correct type and shape to be used in the training/testing processes.

After importing the data in the following steps:




It is necessary to convert the images to tensors to be understood by our neural network.




Modeling:

Many models have been tested to find the model with the highest accuracy.

Firstly, we tried to create a classification model from the scratch using CNN:


Then Transfer learning using VGG16:


Finally transfer learning using VGG19.


Evaluation:

After finishing all the training, the models have been evaluated on the testing dataset. The models’ accuracies were around 5%, 45%, 72% for the raw CNN model, VGG16, and VGG19 respectively.

 

Deployment:

The results of this analysis have been deployed in form of Jupyter notebook function and can be used in making Desktop/Web/Mobile application to predict the dog breeds.

The function will take a photo path as an argument and it will show it and provide statement about the photo in case any human/dogs detected or none of them.

 

Final Results:

Here are some results of the model when tested on some images from the internet.




Conclusion:

Using neural networks are quite powerful, especially in image recognition systems. Even though they require big datasets and high computational power but having a classification accuracy around 72% is a great start and there is a huge chance for improvement through model fine-tuning, improving the data quality, increase the datasets and increase the number of epochs. The final VGG19 model can classify dogs by breeds.

 

References:

Accuracy: here

Github repository: here

 

 

 

 

 

No comments:

Post a Comment

Pages