Coder Social home page Coder Social logo

product-classification-using-self-designed-dataset's Introduction

Product Classification using Self Designed DataSet

This project is all about creating your own dataset from scratch and making a robust classifier. There are in total four classes namely Coke Can, ThumbsUp Can, Mirinda Bottle, Tide Packet! The predictions of the network are stored in the Results folder.
The model achieves ~97%-98% accuracy on the data stored in the Results folder with almost 100% accuracy on the training set.
The data was collected in two ways:
  1. Clicking pictures from iPhone 6S plus and,
  2. Recording videos from Laptop.

One of the key aspect while collecting the training data was to make sure all the products have similar backgrounds so that the network learns the meaningful and discriminative features of the products in the images and not the Background.

Second most important part was to make sure that the distribution of the validation data is almost the same as the testing data. This helped me to boost the performance of my network a lot since I made the architectural and hyperparameter changes based on the validation data that had the distribution similar to what I would expect in a real-life scenario (testing environment).

From the Results section it should be clear to you that the background in the images is quite diverse and the model is able to classify almost all of the products correctly.

Link to the Video: Product Classification using Self Designed DataSet Playlist

  1. Install virtual environment
pip3 install virtualenv
  1. Initiate virtual environment
virtualenv venv
  1. Activate virtualenv
source venv/bin/activate
  1. Install the requirements
pip3 install -r requirements.txt
  1. To create your own dataset from videos, run the below command by specifying the video (from path) and frames (to path). You shall expect for a 1 min. video 60 frames.
python3 video_to_images.py
  1. Both training and testing (on images) is in the Classification.ipynb notebook, which can be opened in a jupyter notebook. Otherwise, run the below command in your virtual environment. Make sure to specify correct training and validation data paths.
python3 Classification.py
  1. To test the model in real-time using your laptop's web camera the webcamera.py script can be useful. Multi-threading is used to avoid the delay in reading each frame and model's prediction on each frame. Both .ipynb and .py files are present in the repository.
python3 Web_Camera.py

product-classification-using-self-designed-dataset's People

Contributors

aditya-ai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.