Skip to content

mtagda/dog-breed-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dog-breed-prediction

CNN that classifies dog breeds

In order to evaluate this code, make sure that you've downloaded the required dog dataset:

  • Download the dog dataset. Unzip the folder and place it in this project's home directory, at the location /data/dog_images.

Create a CNN to Classify Dog Breeds (from Scratch)

In this section, I'm creating a CNN that classifies dog breeds from scratch:

Test Accuracy of the model created from scratch after 55 epochs: 12% (102/836)

Create a CNN to Classify Dog Breeds using Transfer Learning

Using transfer learning, I'm creating a CNN that classifies dog breeds using the pretrained ResNet50 architecture. ResNet50 is a deep residual network and a very good architecture with 50 layers perfectly suitable for image classification problems. The only adjustment I make to this pre-trained model is changing the number of output features for the last (fc) Linear layer which previously was 1000 (for detecting 1000 classes) to 133 which is the number of classes we are interested in detecting.

Test Accuracy of the model created using transfer learning after 30 epochs: 77% (649/836)

Predicting Dog Breed with the Transfer Learning Model

Sample results:

Output class: Beagle


Output class: Greyhound


Output class: Golden retriever


Output class: Pomeranian


Output class: Chow chow

About

CNN that classifies dog breeds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published