convolutional-neural-network-image_recognition_case_study

Computer Vision Case Study in image recognition to classify an image to a binary class, based on Convolutional Neural Networks (CNN), with TensorFlow and Keras in Python, to identify from an image whether it is an image of a dog or cat. (Includes: Data, Case Study Paper, Code)

Stars
19
Committers
1

Image Recognition with Convolutional Neural Networks

Why: To identify the class which an image belongs a dog image class or a cat image class.

How: Using 8K images of dogs and cats to train Convolutional Neural Network(CNN) to predict whether the input image is a dog image or a cat image.

Note that this caase sstuddy is inspired fromthe following Udemy Deep Learning Course:

Case Study

This is a Computer Vision Case Study with an Image recognition model that classifies an image to a binary class. Image recognition model based on Convolutional Neural Network (CNN) to identify from an image whether it is dog or a cat image. In this case study we use 8000 images of dogs and cats to train and test a Convolutional Neural Network (CNN) model that takes an image as an input and give as an output a class of 0 (cat) or 1 (dog) suggesting whether it is a dog or a cat picture. This image recognition model is based on CNN.

The Case Study Paper and Python Code contain the followin information

  • Problem statement
  • Data overview
  • Data Preprocessing
  • Model building
  • CNN Initialization
  • Model compiling
  • Model fitting
  • Example prediction

Training Data

We use training data consisting of 8000 images of dogs and cats to train the CNN model. Here are few examples of such images:

Model Application and Evaluation

To test the accuracy of the trained model we picked a pair of images and used the trained model to predict the class of each of these pair of two images, one of whiich is a dog image and the other one is a cate image. We would like to know the probability of each of this images belonging to a Cat class and Dog class. This will help us to evaluate the trained and tested CNN model to observe to which class does the model classify the following pictures:

After compiling the model the CNN model accurately classified the first picture to a dog class and the second picture to a cat class. Following is a snapshot of a Python output. In the lower part you can see the predicted class of the first image and the second image, respectively.

Methodology

Convolutional Neural Networks (CNN)

This case study is based on CNN model and the Case Study Paper includes detailed description of all the steps and processes that CNN's include such as:

  • Convolutional Operation
  • Pooling
  • Flattening

Model Evaluation

Important evaluation steps, described in detail in Case Study Paper , that help the CNN model to train and make accurate predictions such as:

  • Loss Functions for CNN (SoftMax and Cross-Entropy)
  • Loss Function Optimizers (SGD and Adam Optimizer)
  • Activation Functions (Rectifier and Sigmoid)

Where to find details about DL libraries: Tensorflow & Keras

Badges
Extracted from project README
Related Projects