This project implements a waste classification system that uses a custom YOLO model for detecting and categorizing waste materials. It integrates with an Arduino to communicate the classification results.
- Real-time waste classification using a webcam and YOLO model.
- Categorizes items into burnable and non-burnable waste.
- Sends classification results to an Arduino for further processing.
- Web interface for streaming video and viewing detection results.
- Python 3.8 or higher
- See
requirements.txt
for a complete list of dependencies.
-
Clone the repository:
git clone https://github.com/Afnanksalal/customyolowastesorting.git cd repository-name
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Place your YOLO model file (
best.pt
) in the project directory.
-
Connect your Arduino to the computer and ensure the correct COM port is set in the code.
-
Run the FastAPI application:
python main.py
-
Open your web browser and go to
http://localhost:8000
to access the web interface. -
The webcam feed will display detected waste items, and the classification status will be sent to the Arduino.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.