Coder Social home page Coder Social logo

food-detection's Introduction

Food-detection

This repo contains the code for training and testing 2D food segmentation models. The link for the dataset and the models are provided below. I have used detectron2 library for training and inference. So, you first need to download the detectron2 library in your local machine. GPU is preferred for training and inference. You also need to download the cuda and cudnn. Detectron2 is based on pytorch so it's better to use the pytorch version which detectron2 is using.

You can run the notebook train.ipynb for training the model. You need to specify the datapath in your local machine after the installation process. The dataset.ipynb notebook contains the code for preparing the dataset in coco format. I have already done this so it doesn't need to be run. For testing the model, you can used test.py file. You need to specify the trained model path and the testing image path inside the file.

Link for dataset and model: https://drive.google.com/drive/folders/1m1BUic3ay83nhl_FsU3zmPTUxfaXtCpm?usp=sharing

You need to download the dataset, unzip and place it into your local system. The datset is divided into test and train with their respective annotatations in COCO format. I have already trained one model named 'model.pth' for maskrcnn_resnet_101. You can also used that directly in test.py. This also contains the results inferenced on our trained model.

Before testing, please install all the library in requirements.txt

food-detection's People

Contributors

dipesh-commits avatar

Watchers

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