Skip to content

riaasehgal/thewasteman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

WasteMan ๐Ÿ—‘๏ธ๐Ÿ“ธ

WasteMan is a hardware-software integrated food waste detection and tracking platform. It leverages a Raspberry Pi 5 with a Pi Camera and a machine learning model to visually detect food waste, track statistics, and display them in a modern web dashboard.

๐Ÿ—๏ธ Repository Structure

  • backend/: A Node.js backend using Express and a SQLite database (better-sqlite3) to handle data persistence, session management, and API routes for the frontend.
  • ui/: A modern web dashboard built with React, Vite, and TailwindCSS for visualizing food waste metrics, managing tracking sessions, and viewing reports.
  • food_waste_detector/: Contains Python ML and hardware integration code. Uses PyTorch and a trained YOLOv11 model to perform inference on images captured via the Raspberry Pi Camera. It exposes its own REST API (via FastAPI/Uvicorn) that the backend connects to.

๐Ÿš€ Getting Started Locally

The easiest way to start the entire stack securely is by using the root start.sh script.

  1. Ensure you have Node.js and npm installed.
  2. Install the frontend and backend dependencies if you haven't already:
    cd ui && npm install
    cd ../backend && npm install
  3. Set up the Python virtual environment for the Daemon (if testing locally with Python installed).

Starting All Services

To launch the Node backend, the React UI, and the Python daemon simultaneously:

./start.sh

Stopping All Services

./start.sh stop
# Or securely press Ctrl+C while the start script is running

๐Ÿ“ Raspberry Pi 5 Setup

To deploy the food waste ML detector and capture API specifically on the Raspberry Pi 5 hardware:

cd food_waste_detector
./run_rpi5.sh

This script will:

  • Check for a connected Pi Camera.
  • Create a Python virtual environment and install PyTorch (AArch64 compatible).
  • Automatically download the required YOLOv11 food waste detection weights (~119MB).
  • Start the Uvicorn REST API on port 8000 to handle camera captures and inference.

๐Ÿ› ๏ธ Technology Stack

  • Frontend: React, Vite, TailwindCSS
  • Backend: Node.js, SQLite (better-sqlite3)
  • Machine Learning: Python, PyTorch, FastAPI
  • Hardware: Raspberry Pi 5, Raspberry Pi Camera Module

About

๐Ÿฅ‡ 1st Place, DeerHacks 2026 โ€” A smart food waste monitoring system that helps cafeterias track what's being thrown away and reduce over-preparation using computer vision and AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors