THE LITTER COACH
The Litter Coach is an AI-powered project utilizing YOLOv8 object detection
to clarify the type of litter, as biodegradable and non-biodegradable to promote environmental cleanliness and aid waste management.
Key Features
- **AI-Powered Object Detection:** Utilizes machine learning to accurately identify various types of litter.
- **YOLOv8 Model Integration:** Employs the high-performance YOLOv8 architecture for efficient and robust detection.
- **Real-time Webcam Inference:** Capable of live object detection directly from a webcam feed.
- **Litter Type Classification:** Identifies specific items like plastic bottles, banana peels, soda cans, and notebooks.
- **Biodegradability Classification:** Categorizes detected litter as either "Biodegradable" or "Non-Biodegradable" based on its type.
- **Environmental Contribution:** Aims to promote cleanliness, assist in waste segregation, and raise awareness about proper waste disposal.
Core Technologies Used
Frontend:
- **Python:** The primary programming language.
- **YOLOv8 (You Only Look Once v8):** The cutting-edge machine learning model architecture for real-time object detection.
- **Ultralytics Library:** The official Python library that provides the implementation and tools for using YOLOv8.
- **OpenCV (cv2):** Used for handling webcam input, displaying the live video feed, drawing bounding boxes, and other image processing tasks.
- **Git & GitHub:** For version control and hosting the project's codebase.
Tutorial & GitHub Repository
Getting Started (Local Development)
To set up and run The Litter Coach project on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/garimaa001/The-Litter-Coach.git
-
Navigate to the project directory:
cd The-Litter-Coach
-
Python Environment and Dependencies Setup:
- Create a Virtual Environment (Recommended):
python -m venv venv
- Activate the Virtual Environment:
- On Windows (PowerShell/CMD):
.\venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows (PowerShell/CMD):
- Install Required Python Packages:
Ensure you have a
requirements.txt
file in your project root.If not, you might need to create it (e.g., by running
pip freeze > requirements.txt
or manually list them).pip install -r requirements.txt
Alternatively, if you prefer to install directly (without a
requirements.txt
):pip install ultralytics opencv-python
- Create a Virtual Environment (Recommended):
-
Model Weights Setup:
Ensure your trained YOLOv8 model weights (
best.pt
)runs/detect/litter_coach_detection_v13/weights/best.pt
If your model is elsewhere, update the
model_path
variable inwebcam_predict.py
accordingly. -
Run Real-time Litter Detection:
With your virtual environment activated, execute the main script:
python webcam_predict.py
Press
q
to quit the webcam feed.