🌟 Inspiration

Tracking calories is an essential part of healthy living, but the process is often tedious. Most existing apps rely on manual entry, which is time-consuming and prone to error. We wanted to simplify this process by building a tool that could estimate calories directly from a photo. The idea was to combine our interests in AI, healthcare, and usability into a single project that makes nutrition tracking effortless.

🍽️ What it does

CaloriePhotoTracker allows users to upload a photo of their food and instantly get:

A breakdown of each identified food item.

Estimated calorie counts for each item.

A total calorie estimate for the whole meal.

In short: snap a photo → get your calorie report.

⚙️ How we built it

Frontend: Built with Streamlit for a lightweight and interactive UI.

AI Model: Used OpenAI’s gpt-4-vision-preview via LangChain’s ChatOpenAI for multimodal reasoning.

Image Handling: Processed images with PIL and encoded them in Base64 for the model input.

Prompt Engineering: Designed structured prompts so the model outputs calories in a clear, itemized format.

Deployment: Packaged as a single Streamlit app that can run locally or be deployed online.

🚧 Challenges we ran into

Portion Size Estimation: Calories vary widely based on portion size, and inferring that from an image is non-trivial.

Consistency of Outputs: Getting the model to stick to a structured format required multiple iterations of prompt tuning.

Performance: Vision model responses sometimes take longer, so we had to balance speed with accuracy.

Accuracy vs. Practicality: Deciding whether the app should prioritize “quick estimates” or “scientific precision.”

🏆 Accomplishments that we're proud of

Successfully integrated vision AI with a user-friendly app interface.

Built a working calorie estimation system that feels intuitive and fast.

Learned how to encode and process images effectively for multimodal inputs.

Created a foundation that could be scaled into a more advanced nutrition-tracking tool.

📚 What we learned

How to work with multimodal models that combine text and images.

The power of prompt engineering in shaping reliable outputs.

Best practices for building apps with Streamlit.

That nutrition AI is not just a technical challenge, but also a human-centered design problem.

🔮 What's next for CaloriePhotoTracker

Improved Portion Estimation: Incorporating object detection or depth cues for more accurate calorie counts.

Daily Logging: Adding features to track multiple meals and calculate daily intake.

Database Integration: Cross-referencing AI outputs with a nutrition database (e.g., USDA FoodData Central).

Mobile App: Building a mobile version for quick, on-the-go calorie tracking.

Wearable Integration: Connecting with fitness trackers for a holistic view of diet and health.

Built With

Share this project:

Updates