SmartBite is an AI tool that identifies food dishes in photos, providing details about ingredients, allergens, macronutrients, and calories. Improve your health and well-being with conscious and balanced eating. 🍽️🌿
Try it now at the GitHub Pages of this repository or at Hugging Face site.
It was created as a result of a final project for AI Saturdays 🤖 ALICANTE, with the idea of developing an AI-based tool that recognizes a food dish in a photograph and identifies its ingredients, allergens, macronutrients, and calories (approximate per portion/grams) for that dish.
It could help improve people's health and well-being. By helping them be aware of what they eat, it can help prevent diseases related to obesity and diabetes. Additionally, it aims to promote a balanced and sustainable diet by informing about the importance of proper nutrition.
Sergio Maciá |
Javier Maciá |
Antonio Díaz-Parreño |
- It was trained using the InceptionV3 model from the Keras library of Tensorflow.
- Currently, the model has an approximate accuracy rate of 84% and a loss of 0.9252.
- In the
model
folder, you can find a more detailed document about the model evaluation (scoring). - It was trained with 101 dishes that can be seen here.
In the google-collab
folder, you can find a couple of Notebooks to train and use the model for making predictions. In the notebooks, you'll find the code divided into blocks and explained step by step.
If you prefer to run it on your machine, follow the instructions in the Requirements section.
If you run the Google Collab notebooks, no installation on your machine is necessary. You will find instructions about the project dependencies in the notebook itself.
If you decide to download the project and run it on your machine, you will need:
- Python, to run the scripts.
- Python v3.12.3 was used for development. You can install it here
- Tensorflow v2.16.1, to run the model.
- Gradio, to generate a web interface from where to upload images.
- Git LFS, since the model weighs more than 100MB, it is necessary to handle large files in git.
If you want to train or fine-tune the model using the same project configuration, in the scripts
folder you have the Python scripts used both to train the model and to use it for making predictions.
The dataset used is called Food101. You can find more information in datasource/images