Skip to content

Food Classification Machine Learning Model to Classify Food Image

Notifications You must be signed in to change notification settings

NuSa-Nutrition-Scan/Food-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Food Classification

This repository contains code to detect a food and find out the nutrients contained in it. This project aims to help users find out what types of food and nutrients are contained in these foods so that users can adjust their daily nutritional needs.

Through the research we have done, we found one approach to find a solution to the problem. We use the Transfer Learning approach with the help of Libraries from TensorFlow.

Overview

overview

Program flow is as follows :

  • We upload the image of the food we want to detect.
  • Then click the submit button.
  • The food image will be processed and then output in the form of the name of the food contained in the image.
  • The output from the gradio API in Hugging Face will be a JSON File that contains the food name and percentage of predicted confidence.

How to Replicate Process

  1. First clone this repository using comment "git clone git@github.com:NuSa-Nutrition-Scan/Food-Classification.git"
  2. Install requirements needed
  3. If you want to do training data, you can access it at Computer Vision.ipynb
  4. If you want to do a deployment to run the script, you can use Demo-deploy-with-gradio.py

Directory Structure

  1. my_model_1
  2. Folder of Food Classification saved models that contain model architecture and weights of parameters.
  3. Computer Vision.ipynb
  4. Jupyter Notebook for building and training Food Classification Models that include pre-processing untill deployment with help of gradio library
  5. Demo-deploy-with-gradio
  6. With the Python script that we use for building the model in Hugging Face, we deploy our Food Classification model with the help of the Gradio library, which can produce a GUI for the use of machine learning models.
  7. requirements.txt
  8. List of python package that we use to training and deploying our food classification model

Branches in This Repository

  1. In this feature, we use four branches where everyone tries to get the most effective model accuracy.