Skip to the content.

🍽️ AI Calorie Counter | GPT-4o-Powered Nutrition Estimator

image

📖 Introduction

AI Calorie Counter is an AI-based web application that estimates the number of calories in a meal by analyzing an image. Powered by OpenAI’s GPT-4o vision model and built with Flask, this app provides detailed breakdowns of food items and their estimated caloric values — all from a single photo.

💡 You can use the app either through a web interface or directly from the command line.

🚨 Disclaimer: This tool is for educational purposes only and should not be used for medical or dietary decisions.

🚀 Features

✔️ AI-Powered Calorie Estimation – Uses GPT-4o to analyze food images
✔️ Image Upload Support – Get instant calorie insights from a photo
✔️ Detailed JSON Output – Includes reasoning, food list, and total calories
✔️ Web Interface with Flask – Simple and intuitive for any user
✔️ Command-Line Usage – Easily estimate calories via terminal
✔️ Local Execution – No data is sent externally beyond OpenAI’s API

🏗️ Technologies

📦 Installation

1️⃣ Clone the Repository

git clone https://github.com/Yacine-Mekideche/ai-calorie-counter.git
cd ai-calorie-counter

2️⃣ Set Up Your Environment

Add in .env your OpenAI API key inside:

OPENAI_API_KEY=your_openai_key_here

3️⃣ Create a Virtual Environment

Using Conda:

conda create -n calorie-counter python=3.12
conda activate calorie-counter

Or using venv:

python -m venv venv
source venv/bin/activate  # Mac/Linux
venv\Scripts\activate     # Windows

4️⃣ Install Dependencies

pip install -r requirements.txt

📦 Installation

▶️ Run the Web App

python server.py

Then open your browser and go to: http://localhost:5000

You’ll be able to upload a meal photo and get calorie estimations directly in the UI.


🎯 Demo

AI Calorie Counter - Demo Video

📬 Contact Me

💡 Let’s connect! Whether you’re interested in AI, Machine Learning, or tech collaborations, feel free to reach out.

Website
LinkedIn
GitHub
Malt
YouTube

📩 Email for business inquiries: contact@iacine.tech


© 2025 IAcine. All rights reserved.