StackPointers

Be Coded….

Python

Create your own TensorFlow Image classifier

Getting Started with TensorFlow
This document introduces the TensorFlow programming environment and shows you how to solve the image classification problem in TensorFlow.

Prerequisites

Prior to using the sample code in this document, you’ll need to do the following:

Install TensorFlow.

Getting the sample code

Take the following steps to get the sample code we’ll be going through:

Clone the TensorFlow Models repository from GitHub by entering the following command:

Change directory within that branch to the location containing the examples used in this document:

Here to download batch of images you can use chrome extension called Fatkun Batch Download Image, So Search image you want to download.

Next Click on Fatkun Batch Download Image in the top corner.  Then download all the image.

After Downloading the images copy the Downloaded folder to the project folder.

Usage

You will get full source code here.

You just need to make a “classifier” directory with a directory “data” inside it with all your images For example

and then put your image on it. This “classifier” directory will have your samples but also trained classifier after execution of “train.sh”.

Train process

Just type

And it will do anything for you !

Guess process

Just type for a single guess

To guess an entire directory

Example of result

Use an absolute file path for classifier and images because the script dos not support relative path (volume mounting)

For Further Reading:

Tensorflow Image-Processing

CodeLabs by google

1 Comment

  1. StackPointers

    For more new article regarding AI, visit https://towardsdatascience.com/data-science/home

Leave a Reply

Theme by Anders Norén