Skip to content

tqi2/CNNs-Dog-Image-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CNNs-Dog-Image-Project

Overview

The second project for Udacity Deep Learning Nanodegree program. In this project, I explored state-of-the-art CNN models for classification, built a pipeline to process real-world, user-supplied dog images. Given an image of a dog, my model will identify an estimate of the canine’s breed. If supplied an image of a human, just for fun, my code will identify the resembling dog breed.

Data

The training data for this project is located here. This dataset contains 133 different breeds of dogs and is already split into train, test, and validation sets. Place the training, testing, and validation datasets in the dogImages folder.

Environment

Python: 3.6

PyTorch: 0.4.0

GPU: NVIDIA GeForce GTX 970M

Windows: 8.1

Result

With the pretrained Resnet50, I used transfer learning on new dog image data, the models has 75% accuracy on test data for dog breed with only 5 epochs of training (took less than 10 mins). The final user app used the pretrained VGG16 as a dog detector, then used the tuned Restnet50 as dog breed classifier, for humans, I used OpenCV's implementation of Haar feature-based cascade classifiers to detect human faces in images.

I tried the app with a photo of myself, it showed I look like a Bull terrier and Trump looks like Greyhound.

me

here is an example of a Bull terrier:

melike

For Trump:

trump

here is an example of a Greyhound:

trumplike

Deliverable

Check the dog_app.ipynb for model with detail in code.

Check myphoto for the photos I tried with my app.

About

Use Convolutional Neural Networks for dog image classification in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published