Git Product home page Git Product logo

grocery-product-classification's Introduction

Multi class object classification using Freiburg Groceries Dataset

Implementation of the paper "A Hierarchical Grocery Store Image Dataset with Visual and Semantic Labels"

Citing

If you find this code useful in your research, please consider citing the blog:

@misc{sagarmulti,
  Author = {Abhinav Sagar},
  Title = {Multi Class Object Classification for Retail Products},
  Year = {2019},
  Journal = {Towards Data Science},
}

Check out the corresponding medium blog post https://towardsdatascience.com/multi-class-object-classification-for-retail-products-aa4ecaaaa096.

The Freiburg Groceries Dataset consists of 5000 256x256 RGB images of 25 food classes. I have used Transfer Learning using pre trained VGG weights to make a model for multi class image classification. It can be of great use in automatic image classification to help a food and groceries retailer reduce human effort in the inventory management process of its warehouse and retail outlets.

The paper can be found here and the dataset here. The full dataset is provided in this repository for convenience.

sample

Environment and tools

  1. Jupyter Notebook
  2. Numpy
  3. Pandas
  4. Scikit-image
  5. Matplotlib
  6. Scikit-learn
  7. Keras

Installation

pip install numpy pandas scikit-image matplotlib scikit-learn keras

jupyter notebook

Results

Loss/Accuracy vs Epoch

loss/accuracy

ROC-AUC curve

roc-auc

Correct/Incorrect classification samples

results

The model is able to reach a validation accuracy of 60% which is quite good considering the number of classes(25) with 100-200 images in each category. Feel free to use different architectures and play with the hyperparameters for better results.

License

MIT License

Copyright (c) 2019 Abhinav Sagar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

grocery-product-classification's People

Contributors

abhinavsagar avatar

Watchers

James Cloos 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.