Code Monkey home page Code Monkey logo

foodrecognition's Introduction

Food Recognition/ Ingredient Recognition

  • 사진 안에 있는 음식이 어떤 음식인지 인식할 수 있는 인공지능 모델 개발
  • 사진 안에 있는 식재료가 어떤 식재료인지 인식할 수 있는 인공지능 모델 개발

Getting Started

You can start on any computer that can learn deep learning. If you want to learn fast, use GPU-workstation.

Training Prerequisites

python version == 3.6.9
torch~=1.9.1
torchvision~=0.10.1
Pillow~=7.0.0
natsort~=7.0.1
sklearn~=0.0
scikit-learn~=0.24.2
tqdm~=4.42.0
numpy~=1.18.1
tensorflow~=2.2.0
tensorflow-gpu~=2.2.0
tensorboard~=2.7.0
matplotlib~=3.1.2
pip install -r requirements.txt
  • If you only try inference,
torch~=1.9.1
torchvision~=0.10.1
Pillow~=7.0.0
natsort~=7.0.1
numpy~=1.18.1

How can I request Checkpoint?

If you respond to GoogleForms, we will share the download link within a few days. Currently, the shared checkpoint is ResNet152.

Running the Test

  • Use TorchScript
test_model = torch.jit.load('./jit_traced_torch_model_name.pt', map_location='cpu')
sample_data = torch.randn(1, 3, 512, 512) # (1, channel, width, height)
out_data = test_model(sample_data)
  • pytorch
python inference.py --config configure_name.json --image image_name.jpg --label labels.txt

Quick Start Training Guide

  1. You need to create a configuration first.
  2. Then execute the following command:
python train.py --configuration configuration_name.json

Dataset

Support TorchScript

Baseline Results - Food Recognition

Pretrained Model Accuracy Loss epoch note
VGG16 0.077 5.001 - early stop, the performance is terrible
RESNET50 81.94 0.78 60 early stop,
RESNET152 73.77 0.973 20 comming soon!
WIDERESNET50_2 72.52 0.998 20 comming soon!
MOBILENET V2 81.96 0.72 240 cool, stop training
DENSENET121 45.94 4.3338e+7 40 early stop,

Baseline Results - Ingredient Recognition

Pretrained Model Accuracy Loss epoch note dataset num of class
VGG16 - - - poor accuracy INGD_V1 (private) 58
RESNET50 - - - poor accuracy INGD_V1 (private) 58
RESNET152 95.44 0.68 250 fruits and vegs only Food and Vegetable Image Dataset 58
RESNET152 92.19 0.41 376 nice accuracy INGD_V1 (private) 58
WIDERESNET50_2 - - - poor accuracy INGD_V1 (private) 58
MOBILENET V2 82.55 0.70 282 not bad INGD_V1 (private) 58
DENSENET121 - - - poor accuracy INGD_V1 (private) 58

Stage2 Result - Ingredient Recognition

Pretrained Model Accuracy Loss epoch note dataset num of class
RESNET152 83.03 0.71 40 now available! INGD_V2 (private) 238
MOBILENET V2 comming soon! INGD_V2 (private) 238

Built With

  • waverDeep - model architecture, setup train/test pipeline

Computing resources

GPU RESOURCE RAM COUNT NOTE
NVIDIA TITAN RTX 24G 2 training
NVIDIA GeForce GTX 1080TI 12G 1 develop, test or etc

License

This project is licensed under the MIT License - see the LICENSE.md file for details

foodrecognition's People

Contributors

waverdeep avatar

Stargazers

 avatar  avatar  avatar Seyoung Kim avatar

Watchers

Seyoung Kim avatar  avatar

foodrecognition's Issues

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.