A simple Flask-based web application that uses YOLOv8 for trash vs. recycling classification. Users can upload an image, and the app will detect and label objects (e.g., plastics, bottles, cans) to help streamline waste sorting.
- Flask API with an endpoint (
/classify) to accept image uploads. - YOLOv8 integration for object detection.
- Returns bounding boxes, labels, and confidence scores in JSON.
- Lightweight and easy to deploy, with no need to commit large model files into Git.
app.py: Contains the Flask routes and code to load/run the YOLO model.requirements.txt: Python packages needed to run the app (Flask, PyTorch, ultralytics, etc.).weights/: Place your YOLOv8best.ptfile here (excluded from Git by default)..gitignore: Ensures you don’t commit large files or virtual environments.
git clone https://github.com/<YourUsername>/<YourRepo>.git
cd TrashDetectorWebsitepip install -r requirements.txtpython app.py