NutriVision AI is a smart food-recognition and nutrition-estimation web application. Using a custom-trained YOLOv8 object detection model, the app can identify up to 256 different food classes from a single image and calculate detailed macro-nutritional breakdowns (Calories, Protein, Carbs, Fat).
It features a fallback integration with the Edamam Nutrition API to accurately estimate macros for complex, multi-word dishes that aren't available in standard offline databases.
- Multi-Food Detection: Identifies multiple distinct food items on a single plate simultaneously using YOLOv8.
- Smart Nutrition Estimation: Calculates base nutrition using a bundled 500+ item offline database.
- API Fallback: Automatically queries Edamam for complex queries (e.g., "chicken curry", "beef bowl") to ensure accurate macros.
- Sleek UI: Modern, responsive dark-mode frontend with Chart.js visualization.
- Backend: Python, FastAPI, Uvicorn
- AI/ML: Ultralytics YOLOv8 (trained on UECFOOD256)
- Frontend: HTML, Vanilla JS, Tailwind CSS, Chart.js
- Python 3.9+
- A trained YOLOv8 model file (
best.pt) placed in the project root. (You can train one yourself using the providedtraining/train_cloud.ipynbon Kaggle!).
Clone the repository and install the required dependencies:
git clone https://github.com/YOUR_USERNAME/food-recognition-project.git
cd food-recognition-project
python -m venv venv
venv\Scripts\activate # (On Windows) or `source venv/bin/activate` (On Mac/Linux)
pip install -r requirements.txtStart the FastAPI server:
uvicorn backend.main:app --reloadOpen frontend/index.html in any modern web browser to use the interface!