New era of A.I., machine learning, and robotics, its time for the machines to perform tasks characteristic of human intelligence. Machines use their own senses to do things like planning, pattern recognizing, understanding natural language, learning and solving problems. And Image Recognition is one of its senses!!! So, why not create our own Image Recognition Classifier, and that too with a few lines of code, thanks to the modern day machine learning libraries. Let’s get started !!
A simple image recognition tool that classifies whether the image is of a dog or a cat. The idea is to create a simple Cars/Bikes Image classifier and then applying the concepts on a bigger scale.
Anaconda-Anaconda is a free and open source distribution of the Python and R programming languages for data science and machine learning related applications, that aims to simplify package management and deployment. You can download it from the link below according to your system https://www.anaconda.com/download/
Jupyter Notebook-The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Its uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.
Tensorflow — TensorFlow is an open-source software library for dataflow programming across a range of tasks. Download link — https://www.tensorflow.org/install/install_windows
Keras — Keras is an open source neural network library written in Python. Activate Tensorflow env and install keras using ‘pip install keras’.
CNN — Convolution Neural network , a class of deep, feed-forward artificial neural networks, most commonly applied to analyzing visual imagery. Here is a very good explanation to what it actually is -https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/
Its time to get into action and here is the plan —
1)Collecting the Dataset
2)Importing Libraries and Splitting the Dataset
3)Building the CNN
4)Full Connection
5)Data Augmentation
6)Training our Network
7)Testing
In order to train our machine, we need a huuuuggge amount of data so that our model can learn from them by identifying out certain relations and common features related to the objects.
To use the powers of the libraries, we first need to import them. After importing the libraries, we need to split our data into two parts- taining_set and test_set.
This is most important step for our network. It consists of three parts - 1)Convolution
2)Polling
3)Flattening
Full connection is connecting our convolutional network to a neural network and then compiling our network.
While training your data, you need a lot of data to train upon. Suppose we have a limited number of images for our network.
So, we completed all the steps of construction and its time to train our model.
Now lets test a random image.
You can even try it with your own image and see what it predicts. Whether you look close to a Car or a Bike.