Skip to content

Faleesha-Zaeen/Fridge_Vision

Repository files navigation

FridgeVision

FridgeVision is a recipe recommendation engine with an integrated smart-fridge image detection feature. Upload a photo of your fridge and the app will detect ingredients (using YOLO-based object detection), combine detected and manually-entered ingredients, and recommend recipes that match what you have on hand.

Status: Active

Key Features

  • Smart Fridge Detection (YOLOv8 model) — detect fruits, vegetables, proteins, and common pantry items from a photo
  • Combine AI-detected and manual ingredients into a shopping/ingredient list
  • Recipe recommendation engine using item-based similarities and NLP on ingredient lists
  • Streamlit-based UI for quick demo and interaction

Requirements

  • Python 3.8 or later
  • pip
  • (Optional, for GPU) CUDA-enabled NVIDIA drivers and compatible PyTorch build

Required Python packages are listed in requirements.txt. The app uses the YOLOv8 model file yolov8n.pt (included) to perform object detection.

Quick setup (Windows PowerShell)

Run these commands in the project root (PowerShell):

# create and activate venv
python -m venv .venv
.\.venv\Scripts\Activate.ps1

# upgrade pip and install dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt

# Optional: run the install check
python test_installation.py

# Start the Streamlit app
streamlit run streamlit_app.py

If you prefer bash / WSL / macOS, use the equivalent python3 -m venv .venv and source .venv/bin/activate commands.

Running the detection locally

  • Open the Streamlit URL shown in the terminal (usually http://localhost:8501).
  • In the sidebar use "Smart Fridge Detection" to upload a photo (JPG/PNG).
  • Click "Detect Ingredients" and review results.

Files and project layout (important files)

  • streamlit_app.py — Streamlit web UI and main entrypoint
  • yolov8n.pt — YOLO model used for object detection (large file)
  • test_installation.py — quick dependency/test script
  • requirements.txt — Python dependencies
  • data-sample/ — sample data and CSVs
  • src/ — project source code (data, features, models, visualization)
  • FRIDGE_DETECTION_GUIDE.md — user-facing guide for the detection feature

Detailed Run & Usage Instructions

Quick Start (already shown above)

Follow the Quick setup section to create a virtual environment, install dependencies, and run the Streamlit app.

How to Use the Application

Option 1: Smart Fridge Detection (recommended)

  1. Take a clear photo of your fridge contents (good lighting, items visible).
  2. In the Streamlit sidebar open "Smart Fridge Detection" and upload your image (JPG/PNG).
  3. Click "🔍 Detect Ingredients" to run YOLOv8-based detection; detected items will populate the ingredient list.
  4. Review and optionally edit the detected ingredients, then click "🎯 Get Recipe Recommendations".

Option 2: Manual Entry

  1. Add ingredients manually in the sidebar (one per line).
  2. Optionally select meal type and dietary preferences.
  3. Click "Get Recipe Recommendations" and browse results.

Combined Approach

  • Upload an image for bulk detection and then manually add any missing items. The app will merge both sources.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors