HomeTechnologyTensorflow used for Image Classification

Tensorflow used for Image Classification

Reading Time: 2 minutes

What is TensorFlow?

Tensorflow is an open-source library for numerical computation and large-scale machine learning that ease Google Brain TensorFlowthe process of acquiring data, training models, serving predictions, and refining prospective results.

How Tensorflow and Keras used for Image Classification

This blogs shows how to classify images of wheat classes. It creates an image classifier using a keras.Sequential model, and masses data using preprocessing.image_dataset_from_directory. You will achieve practical experience with the following concepts:

  1. Examine and understand data
  2. Build an enter pipeline
  3. Build the model
  4. Train the model
  5. Test the model
  6. Improve the model and repeat the process

Import TensorFlow and other libraries

1633191484 841 Tensorflow used for Image Classification

Download and discover the dataset

1633191484 280 Tensorflow used for Image Classification

Configure the Model for Training

1633191486 582 Tensorflow used for Image Classification

Model Fitting

1633191487 252 Tensorflow used for Image Classification


After Training the model we get the model file in .h5 filename. and by using that model file we can generate the probability score of grains in the image. As of now we have taken a wholesome grains image so here the model has predicted 100 % wholesome grains and as I have used object detection so the red mark have been showing few wholesome grains on the image.

1633191488 939 Tensorflow used for Image Classification

Github Link and Officical Link


Official Colab notebook for Reference



Most Popular