Skip to content

shri30a/PantryAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PantryAI

AI-powered smart cooking assistant that uses computer vision, generative AI, and ingredient-based retrieval to recommend personalized recipes from food users already have at home.

Python Computer Vision Gemini AI License


Overview

PantryAI is an intelligent cooking assistant that transforms ingredients into personalized meal recommendations using computer vision and generative AI.

Instead of manually searching recipes, users simply upload or scan available ingredients. PantryAI detects the ingredients, maintains an inventory, and generates recipes tailored to the user's pantry.

The project combines modern AI techniques, including image understanding, ingredient recognition, and large language models, to create an intuitive cooking experience.


Features

  • Image-based ingredient recognition
  • Pantry inventory management
  • AI-generated recipe recommendations
  • Personalized cooking suggestions
  • Ingredient availability matching
  • Recipe generation using Google Gemini
  • REST API backend
  • Modern responsive frontend
  • Modular machine learning pipeline

Demo Workflow

  1. Upload or scan ingredients
  2. Computer vision detects available food items
  3. Pantry inventory is updated automatically
  4. User requests recipe recommendations
  5. Gemini generates customized recipes using available ingredients
  6. Recipes are displayed through the web interface

System Architecture

                Image Upload
                      │
                      ▼
        Computer Vision Detection
                      │
                      ▼
          Ingredient Recognition
                      │
                      ▼
            Pantry Inventory
                      │
                      ▼
        Gemini Recipe Generation
                      │
                      ▼
        Personalized Recipe Output

Technology Stack

Languages

  • Python
  • JavaScript
  • HTML
  • CSS

AI / Machine Learning

  • Google Gemini API
  • Computer Vision
  • Image Classification
  • Ingredient Detection

Backend

  • Flask
  • REST APIs
  • JSON

Frontend

  • HTML
  • CSS
  • JavaScript

Tools

  • Git
  • GitHub
  • OpenCV
  • VS Code

Repository Structure

PantryAI/
│
├── backend/          # Backend API
├── ML/               # Machine learning models
├── pantryAI/         # Frontend application
├── .gitignore
└── package-lock.json

Core AI Pipeline

1. Ingredient Detection

Images are processed using computer vision techniques to identify visible food items.


2. Inventory Management

Detected ingredients are automatically stored in a virtual pantry, allowing users to maintain an up-to-date inventory.


3. Recipe Generation

Available ingredients are supplied to Google's Gemini model, which generates complete recipes while prioritizing ingredients already present in the pantry.


4. User Experience

Recipes are returned through a clean web interface that minimizes food waste and simplifies meal planning.


Example Use Case

Input

Eggs
Milk
Spinach
Cheddar Cheese
Bread
Tomatoes

Generated Recipe

Spinach & Cheddar Breakfast Sandwich

• Toast bread
• Scramble eggs with spinach
• Melt cheddar
• Add sliced tomatoes
• Assemble sandwich

Engineering Highlights

  • Modular AI architecture
  • End-to-end full-stack application
  • Computer vision integration
  • LLM-powered recipe generation
  • API-driven backend
  • Scalable project organization
  • Separation of frontend, backend, and ML components

Skills Demonstrated

  • Artificial Intelligence
  • Computer Vision
  • Prompt Engineering
  • REST API Development
  • Full-Stack Development
  • Machine Learning Integration
  • Python Development
  • Software Architecture

Future Improvements

  • Barcode scanning
  • Nutritional analysis
  • Grocery list generation
  • Meal planning calendar
  • User authentication
  • Cloud deployment
  • Recipe rating system
  • Mobile application
  • Voice assistant integration

Installation

Clone the repository

git clone https://github.com/shri30a/PantryAI.git

Move into the project

cd PantryAI

Install dependencies

pip install -r requirements.txt

or

npm install

depending on the component being executed.

Run the backend

python app.py

Open the frontend and begin using PantryAI.


Project Goals

The objective of PantryAI is to demonstrate how modern AI systems can combine computer vision with large language models to solve a practical consumer problem. By leveraging ingredient recognition and intelligent recipe generation, PantryAI simplifies meal planning while encouraging users to make better use of the food they already own.


License

This repository is intended for educational and portfolio purposes.


Author

Shrihan Anikapati

Electrical & Computer Engineering (Honors) + Mathematics
The University of Texas at Austin

Interested in AI, Machine Learning, Computer Vision, and Full-Stack Software Engineering.

About

AI-powered smart cooking assistant using computer vision and retrieval-augmented recipe recommendations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors