Image Detection Using Tensorflow

Naveen Mishra

Naveen Mishra

Ghaziabad, Uttar Pradesh

1 0
  • 0 Collaborators

This is a generic setup and can be used to classify almost any kind of image. I created a small demo that classifies two random image data sets - one male and one female photo and returns a prediction score denoting the possibility of it being a photo of a male or female. ...learn more

Project status: Concept

RealSense™, HPC, Artificial Intelligence

Intel Technologies
Intel Opt ML/DL Framework, Intel CPU

Overview / Usage

A generic image detection program that uses Google's Machine Learning library, Tensorflow and a pre-trained Deep Learning Convolutional Neural Network model called Inception.

This model has been pre-trained for the ImageNet Large Visual Recognition Challenge using the data from 2012, and it can differentiate between 1,000 different classes, like Dalmatian, dishwasher etc. The program applies Transfer Learning to this existing model and re-trains it to classify a new set of images.

Methodology / Approach

  1. Prepare the image data sets:
    In order to start the transfer learning process, a folder named training_dataset needs to be created in the root of the project folder. This folder will contain the image data sets for all the subjects, for whom the classification is to be performed.

  2. Go to the project directory and run -

                  $ bash train.sh
    

This script installs the Inception model and initiates the re-training process for the specified image data sets.
Once the process is complete, it will return a training accuracy somewhere between 85% - 100%.
The training summaries, retrained graphs, and retrained labels will be saved in a folder named tf_files.

  1. Classify objects:
    python3 classify.py
    This opens up the file dialog using which you can select your input file.

  2. The result is shown in the given image file.

Technologies Used

  1. Python and its library
  2. Deep Learning and ML library
Comments (0)