DOG BREED CLASSIFIER

1 0
  • 0 Collaborators

A Dynamic Deep Learning Model that accurately determines the breed of a dog by the application of Convolutional Neural Networks. ...learn more

Project status: Published/In Market

Artificial Intelligence

Code Samples [1]

Overview / Usage

Developed a dynamic Deep Learning Model that accurately predicts the breed of a specific dog upon the feeding the Neural Network with the image containing a dog or a human , but the model prerogatively predicts the breed of the dog if the being specified in the image is a dog or else it says an alternate message of not a dog and breed cannot be determined and greets the image to be a human.

Since this project only concentrates on classifying between a dog and a human and precisely shows the inferential difference between a dog and a human.

The core theme of the project lies in the application of Convolutional Neural Networks where the images are been fed into the most complex network of the CNN's that eventually generates a dynamic inference upon the images fed to the network.

Methodology / Approach

Precisely the project involves a lot of Pythonic implementation of KERAS, SCIKIT-LEARN in the Data Acquisition phase.

Initially, in the Data Acquisition phase, the data sets related to Dogs and Humans are loaded into the current Jupyter Namespace.

A starter code of Detecting Humans is developed by the application of HAAR FEATURE-BASED CASCADE CLASSIFICATION, that precisely detects the human signs in a given image. The feed for the Haar Cascades Model consists of pre-trained images that are reposited under GitHub.

A dynamic Human Detector involving a pythonic scripting is written for detecting the human faces in the input dataset and the model is checked for the accuracy of detecting the human faces against unseen data and the performances are noted and at the later part of the implementation it is clearly specified that an image uploaded must be a perfect one i.e., clean and not be a noisy or blurry one, since the noisy data images can be problematic to the Haar Cascades Model, since it can't generate smart inferences from the noisy and irregular images. After the implementation, the Dog images are trained using a ResNet-50 model for accurately determining the dog breeds at the initial scale and the pre-processing phase is done against the Keras library of Python, and a dynamic Dog Detector is developed that kickstarts the classification of dog breeds by the application of the ResNet-50 model. The Dog Detector model is tested for the accuracy and noted.

The Main theme of the project is the implementation of Convolutional Neural Networks(CNN's), which is fed with the input data. The CNN Architecture especially is quite compatible with the given data set and is not that complex. The architecture in combination with the kernels of size 2, which states that the model doesn't have too many parameters and this makes sure that the model is not prone to overfitting which is not a big issue as the model is running for just 5 epochs. And an important fact is that the reduced size of the neural network indicates that it run's faster. The important fact to note is that the architecture applies a series of convolutional layers, followed by a 'Max Pooling Layer'. And each convolutional layer changes the output of the previous layer to generate a new set of filters. and it generates much more filters with the last layer generating 128 filters. The Rectified Linear Units(ReLU) functionality is applied to each specific pixel in the image after each convolutional layer. It replaces negative values with '0', which potentially helps the neural network understand the non-linear relationships. We can observe that after the ReLU is applied, then it is followed by a 'Max Pooling Layer'.
The potential advantage of a 'Max-Pooling Layer' is, it reduces the filter size which increases the pace of training and thereby decreasing the scope of overfitting.
The later layers are used for analyzing complex patterns in the data i.e., dog and human faces. The final layer 'Dense' with 'softmax' activation function which states that each unit is completely connected to the previous layer. The 'softmax' function is calculated by the normalization of outputs of each sigmoid functions. In this case there a total of 133 outputs.
In most cases, selecting an activation function manually shows good performance than the default linear activation function implemented by using Keras. Hence, by the application of ReLU's we can help the neural network not to overfit the training data.

After training the prescribed model with the input data, a benchmark Xception Model is designed using Transfer Learning and the model is trained and tested against the input data.

The final part of the project involves developing a DOG BREED DETECTOR function that accurately classifies the breed of the dog if it is a dog or else it declares that it as a human by a greeting message and eventually involves testing of the function by unseen data.

Technologies Used

Artificial Intelligence
Deep Learning
Convolutional Neural Networks ( CNN's )
Python
Keras
Haar Cascades Feature Based Classification
Accuracy Score - Performance Metric
ResNet-50 Model
VGG-19 Model
Xception Model
Transfer Learning
Computer Vision

Repository

https://goo.gl/DkDFZt

Comments (0)