The purpose of this project is to enhance the fundamental understanding of Convolutional Neural Network, have a handful of experience working with Tensorflow and Keras libraries, and apply transfer learning techniques to see how the model changes.
Also, as a future dog parent, understanding the difference between breeds and get familiar with them will be helpful to select the best dog that fits your lifestyle.
The dataset is from Stanford University, with a total of 20580 images and 120 breeds. Also, we can do one extra step to help us better understand the difference between dogs, which is to use the American Kennel Club's List of Breeds by Group information to assign 120 breeds into 9 groups. By doing that, we may able to discover more insights about puppies.
We will try to build a CNN model from scratch and here is the structure of this project.
The CNN consists of 3 layers:
- Convolution (filter)
- Pooling
- Fully Connected
Our final CNN baseline model consists of 5 layers. With a total of 4 filter and pooling layers and 1 fully connected layer.
Inception V3 Model is a pre-trained model on more than a million images, 1,000 classes from the ImageNet database developed by Google. It has stacked layers compare to the traditional CNN model and it is up to 48 layers. V3 here means version 3.
The core idea of Inception V3:
- Multiple fitter layers with different sizes running at the same level.
- 1x1 convolution before processing 3v3 or 5v5 filter layers to reduce the dimension of the image.
120 Breeds | 9 Groups | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
An Example of CNN Confusion Matrix
120 Breeds | 9 Groups | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
An Example of CNN Confusion Matrix
An Example of Puppy being Misclassified
- Small Sample Size (20580 images for 120 breeds – Average 172 Images).
- Images include many surrounding features that are not helpful to identify the breed.
- No standard of features. Puppy will grow in different sizes and has different features (eg, puppy ears will grow bigger overtimes).
We can always add more functionalities to it, such as identify other animals. If the image is a cat, we will not make any prediction of the breed. We can also develop an interactive application to allow users to upload their images and see which breed they look similar to.