owned this note
owned this note
Published
Linked with GitHub
Harware Classifier
===

#### Name : Tejomay Padole
#### Roll number : BT18CSE034
#### Table of Contents
[TOC]
## Our Project
Idea of our model is to reduce human effort of searching for things in a market place. We have taken a Hardware Store into consideration and implemented our model on “Mechanical Tools Dataset” available on the internet. If a customer comes into the store with the photo of some tool which he/she wants then manager searches for that tool in the store, to save time and effort our model can be implemented here.
#### Flow of the model
User gives an input image, our application takes image as input, pre-processes it, runs it through our neural network, then puts it in one of the eight classes.
For our model, we assume user will be manager of the store so flow goes like-
Manager scans the photo which will be passed as input into our model and it will give as output name of the tool and location where it is present in the store. If the tool is not present in the store our model will give as output - name and location of a tool which looks very similar to the one that customer wants.
#### Practical Applications
* If you have a bunch of images and you want to somehow classify them or run regressions, our model is a fast way to apply deep neural networks to solve the problem.
* If a customer comes to the store with a google image of some item then the shopkeeper will scan the image which will be passed as an input to our application and results of similar images with their locations(in the store) will be displayed.
* It will work like a localised search engine for the store.
* Successful Implementation of this model will reduce man power. When we go to some store and can’t find things we ask the staff working there who are appointed to help us locate items we need, with our model in action these helpers won’t be required.
* If a dataset of Grocery items is available then the same model can be used on a large scale like a supermarket.
## Dataset
The Mechanical Tools Dataset consists of 8 classes:
* Tool Box
* Hammer
* Pliers
* Rope
* Pebbel
* Wrench
* Screw Driver
It consists of minimum 210 images from each class.
## Model
### Pre-trained Inception-v3 (GoogleNet)
Inception-v3 is a convolutional neural network architecture from the Inception family that makes several improvements including using Label Smoothing, Factorized 7 x 7 convolutions, and the use of an auxiliary classifer to propagate label information lower down the network (along with the use of batch normalization for layers in the sidehead).
It has multi layer perceptron (MLP) convolutional layers instead of linear convolutional layers that include a linear filter.
Instead of adopting the traditional fully connected layers for classification in CNN, InceptionV3 directly outputs the spatial average of the feature maps from the last mlpconv layer as the confidence of categories via a global average pooling layer, and then the resulting vector is fed into the softmax layer.
#### Architecture
The architecture of an Inception v3 network is progressively built, step-by-step, as shown below:
1. Factorized Convolutions
2. Smaller convolutions
3. Auxiliary classifier
4. Grid size reduction
All the above concepts are consolidated into the final architecture.
#### Our Fine-tuned Architecture
After importing headless network, the penultimate layer of Inception-v3 is:
mixed7 with shape: (None, 17, 17, 768)
We flatten this layer out then add dense(128) layer and another dense(8) layer on top of it.
We use pre-trained weights 'imagenet' and train only the dense layers( setting previous layers as untrainable) we added, on the dataset.
#### Inputs
Our model has 8 classes and was trained on 5710 images belonging to these classes, and then it was validated on 400 images (50 belonging to each class) over 40 epochs.
##### Pre-processing
Each image is resized into shape (300, 300) with all 3 channels present.
Then we augment our inputs as shown:
```
rescale = 1./255.,
rotation_range = 40,
width_shift_range = 0.2,
height_shift_range = 0.2,
zoom_range = 0.2,
horizontal_flip = True
```
#### Results
Here is the plot of “training and validation accuracy per epoch” and “training and validation loss per epoch”.

For testing our model we have a test dataset with images from all classes, when we passed the path of an image to our model it generates the following output- Name of the tool and its location in the store.
Accuracy of our model is 87%.

#### Advantages
* In comparison to VGGNet, Inception Networks (GoogLeNet/Inception v1) have proved to be more computationally efficient, both in terms of the number of parameters generated by the network and the economical cost incurred (memory and other resources).
#### Application

#### Limitations
* If any changes are to be made to an Inception Network, care needs to be taken to make sure that the computational advantages aren’t lost. Thus, the adaptation of an Inception network for different use cases turns out to be a problem due to the uncertainty of the new network’s efficiency.
## My Contributions
* Found dataset, divided it into training and testing sets
* Performed data preprocessing on training images
* separated images into different labels for the final layer of neural network
## Team
* Tejomay Padole - BT18CSE034
* Sanchita Kasat - BT18CSE130