Intelligent Food Recognition & Nutrition Analysis
Food Image Calorie Estimation (Calorie AI) is a Python-based machine learning project that estimates the calorie content of food from images.
The system applies image enhancement, feature extraction, and supervised learning techniques to recognize food categories and calculate estimated calories using a nutritional reference dataset.
This project focuses on classical computer vision + machine learning pipelines, emphasizing interpretability, feature engineering, and model evaluation.
This repository contains two parallel implementations:
- Original Google Colab notebook
- Feature extraction + ML experimentation
- Model training and evaluation
- FastAPI backend
- HTML frontend (templates + static)
- Dockerized deployment
- Real-time image upload and calorie estimation
- Image Enhancement
- CLAHE (Contrast Limited Adaptive Histogram Equalization) to improve contrast and visibility
- Image Restoration
- Non-Local Means (NLM) denoising to reduce noise while preserving texture
- Feature Extraction
- HSV & LAB color histograms for color representation
- Local Binary Patterns (LBP) for texture analysis
- Machine Learning Models
- Random Forest
- Support Vector Machine (SVM)
- Logistic Regression
- Calorie Estimation
- Maps predicted food classes to calories per 100g using a CSV reference
- Computes estimated calorie values for a given portion
- Evaluation
- Accuracy scores
- Classification reports for model comparison
- Image preprocessing (enhancement & denoising)
- Feature extraction (color + texture)
- Feature vector construction
- Model training and validation
- Food category prediction
- Calorie lookup and estimation
- Python 3
- OpenCV – Image enhancement and denoising
- scikit-image – Feature extraction (LBP, HOG)
- scikit-learn – ML models and evaluation
- NumPy & Pandas – Data processing
- Joblib – Model saving and loading
-
Food-11 Dataset
https://www.kaggle.com/datasets/trolukovich/food11-image-dataset
Contains 11 food categories including Bread, Dairy, Dessert, Meat, Vegetables, and more. -
Calories.csv
- Custom dataset mapping each food category to calories per 100g
- Used as a nutritional reference for estimation
git clone https://github.com/veroonia/Calorie-Estimation.git
cd Calorie-Estimation