Analytics Vidhya
Published in

Analytics Vidhya

Training an Image Classifier in zero lines of code

Introduction to Zero Code TensorFlow Image Classification

Photo by Chris Ried on Unsplash

Before understanding how to train a classifier without writing any code, let us first understand the motivation behind creating this project.

Training an image classifier is a non-trivial task and requires a deep understanding of Computer Vision and Python programming. However, it is not necessary that everyone entering the field of Computer Vision is a Python wizard, hence there is a gap to fill. Zero Code TF Image Classification Trainer is designed to fill this gap in the industry as it will do all the heavy lifting for you under the hood and you only need to worry about applying your intuition to train the models.

What is Zero Code TF Image Classification Trainer?

It is a Python application built using TensorFlow and Streamlit.
It abstracts away the Python code and all you need to do is set up a few parameters on your web browser and it will take care of the model training part (check the below image for reference).

Zero Code TF Image Classification Trainer (Source — Image by author)

Coming to the most important part now, why would you want to use this application?
Well, there are multiple reasons to do so. I have listed down some of the most exciting ones below.

Reasons to use Zero Code Trainer

  • Quick Prototyping
  • Developing intuition
  • Beginner Friendly

Quick Prototyping

It does not matter whether you are an industry veteran or an intern trying to make a mark, training a deep learning model can feel overwhelming at times.
You need to focus on various factors like — dataset quality, hyperparameter tuning, data augmentations, etc. so there are plenty of challenges already.
What you do not want in this scenario is added workload of writing the code to train a model.
Using Zero Code TF Classifier, you can quickly prototype multiple models and choose the best-performing model without writing any code

Developing Intuition

Image by Author
Image by Author

Developing intuition is one of the most difficult aspects of deep learning.
Zero Code TF Classifier provides nicely formatted plots for each model that you train which makes it easier to compare the models and also develop intuition.
You will get a much better idea about which model is performing well with which dataset. The whole model analysis process is streamlined and baked into the application itself.

Beginner Friendly

Did I mention that you don’t have to write any code, I guess I did, but I will mention it again.
With literally no need to write any code, it becomes easy for someone just entering the field of Deep Learning to actually understand the process of model training and get a basic idea of how Deep Learning works.
In addition to that, you will be training the model using a GUI app, so even someone from Non-Tech background can use the application with ease.

Feature List

The application is filled with exciting features. Some of them are-

  • Support for state-of-the-art models like ResNet, MobileNet, DenseNet, etc.
  • Support for multiple Optimisers like Adam, Adagrad, etc.
  • Mixed Precision Training
  • Callbacks such as LR Decay and Early Stopping to mitigate overfitting
  • Built-in Dataset Verification
  • Optimized Tf.Data implementation for maximum GPU usage
  • Live Training Graphs
  • Built-in Image Augmentation
  • Dockerised Application

Pheew, that was a lot !!!
But these are just some of the many cool features that this application has.

If you want to get a feel of how the application works, then you can check out this video.
It demonstrates how to set up the parameters, train, monitor and analyse your model.

I hope you are sold by now. So now I will share the details on how to use the application.

How to Use

You can head over to the Getting Started section of the project’s GitHub page.
You will find all the necessary details to set up and use the application here.

Credits

This application is developed by Animikh Aich, you can get in touch with him here
You can check out the project page for more details.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store