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.
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.
- First clone this repository using comment "git clone git@github.com:NuSa-Nutrition-Scan/Food-Classification.git"
- Install requirements needed
- If you want to do training data, you can access it at Computer Vision.ipynb
- If you want to do a deployment to run the script, you can use Demo-deploy-with-gradio.py
- my_model_1 Folder of Food Classification saved models that contain model architecture and weights of parameters.
- Computer Vision.ipynb Jupyter Notebook for building and training Food Classification Models that include pre-processing untill deployment with help of gradio library
- Demo-deploy-with-gradio 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.
- requirements.txt List of python package that we use to training and deploying our food classification model
- In this feature, we use four branches where everyone tries to get the most effective model accuracy.