GithubHelp home page GithubHelp logo

prashant905 / grocery-product-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sayakpaul/grocery-product-detection

0.0 0.0 0.0 36.42 MB

This repository builds a product detection model to recognize products from grocery shelf images.

License: Apache License 2.0

Python 0.03% Jupyter Notebook 99.97%

grocery-product-detection's Introduction

Grocery-Product-Detection

This repository builds a product detection model to recognize products from grocery shelf images. The dataset comes from here. Everything from data preparation to model training is done using Colab Notebooks so that no setup is required locally. All the relevant commentaries have been included inside the Colab Notebooks.

Repository organization

├── Colabs
│   ├── GroceryDataset_EDA_Prep.ipynb: EDA and data preparation notebook. 
│   ├── GroceryDataset_Evaluation.ipynb: Runs evaluation on the test images with the trained model.
│   ├── GroceryDataset_Inference.ipynb: Performs inference with the trained model.
│   └── GroceryDataset_Model_Training.ipynb: Trains an SSD MobileDet model using TFOD API.
├── Deliverables
│   ├── image2products.json: Contains test image names as keys and the number of products contained in each image as values.
│   └── metrics.json: mAP, precision and recall computed on test set.
├── Misc Files
│   ├── confusion_matrix.csv: Confusion matrix computed on the test set using the trained model.
│   ├── generate_tfrecord.py: Generates TFRecords from the provided dataset. 
│   └── ssdlite_mobiledet_dsp_320x320_products_sync_4x4.config: Configuration file needed by the TFOD API. 
└── README.md

Results

Following snaps taken from TensorBoard after loading the evaluation logs (logs are available here) -

As we can see with 10k training steps the metrics keep on shining. I believe with more sophisticated hyperparameter tuning and a longer training schedule performance can further be improved.

Notes

  • The provided dataset is converted to TFRecords for easy compatibility with the TFOD API. Further notes are available inside the Colabs/GroceryDataset_EDA_Prep.ipynb notebook.
  • Augmentation used
    • Horizontal flips
    • Random crops
  • Detection network used: SSD MobileDet.
  • Training hyperparameters are available inside Misc\ Files/ssdlite_mobiledet_dsp_320x320_products_sync_4x4.config file.
  • Precision and recall reported in Deliverables/metrics.json are mean values computed over the [email protected] and [email protected] columns of Misc\ Files/confusion_matrix.csv.
  • A threshold of 0.6 was used in order to obtain the number of products per test image.

Trained model files

Find them here. If you are looking for the checkpoints, the latest ones are prefixed with model.ckpt-10000. There's also a frozen inference graph.

Dataset citation

@article{varol16a,
      TITLE = {{Toward Retail Product Recognition on Grocery Shelves}},
      AUTHOR = {Varol, G{"u}l and Kuzu, Ridvan S.},
      JOURNAL = {ICIVC},
      YEAR = {2014}
}

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.