Snap What You Have, Cook What You Can.
SnapNcook is an AI-powered web application that helps you cook smarter and reduce food waste. Just snap a photo of your fridge or kitchen items and our custom-trained YOLOv11 model detects ingredients, and we suggest recipes based on what’s available. Optionally, Gemini API integration helps enhance recipe suggestions.
- Ingredient detection using YOLOv11
- FastAPI-powered backend
- Recipe suggestion system (Gemini-enhanced)
- Static frontend with HTML/CSS/JS
- Gemini API integration via
.env - Future-ready for voice, grocery suggestions, and more!
| Layer | Technology |
|---|---|
| Model | YOLOv11 (Ultralytics best.pt) |
| Backend | Python, FastAPI |
| Frontend | HTML, CSS, JavaScript |
| API | Gemini (Google) |
snapncook/
│
├── app/
│ ├── main.py # FastAPI backend entry point
│ ├── model_loader.py # Loads YOLOv8 model
│ ├── image_processor.py # Image handling logic
│ ├── best.pt # Trained YOLOv8 model
│ └── .env # Environment variables (ignored in Git)
│
├── static/
│ └── css/style.css # UI styles
│ └── script.js # Frontend JS logic
│
├── templates/
│ └── index.html # Main HTML page
│
├── model results/ # Output images from detection
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Clone the Repository
git clone https://github.com/yourusername/snapncook.git
cd snapncook/app
- Install Python Dependencies
pip install -r ../requirements.txt
- Add .env File
GEMINI_API_KEY=your-gemini-api-key-here
- Run the FastAPI Server
uvicorn main:app --reload
This project uses the latest YOLOv8 via the Ultralytics package, sometimes referred to as YOLOv11 due to its community-enhanced capabilities.
- Voice-based ingredient input
- Grocery list generator
- Save and share favorite recipes
- Nutrition breakdowns
- More advanced recipe AI using Gemini Pro Vision
PRs and feedback are always welcome! Fork the repo, create a feature branch, and submit a pull request.