A real-time and image-based Plastic Object Detection System built using YOLO (Ultralytics) and Streamlit.
This application detects plastic objects from uploaded images as well as through a live webcam feed, helping support environmental monitoring and waste management initiatives.
-
📷 Image Upload Detection
- Upload JPG, JPEG, or PNG images
- Automatic plastic object detection with bounding boxes
-
🎥 Real-Time Webcam Detection
- Live plastic detection using your system camera
- Adjustable confidence threshold
-
⚙️ Customizable Confidence Threshold
- Control detection sensitivity from the sidebar
-
🎨 Modern UI
- Dark-themed Streamlit interface
- Clean layout and responsive design
- Python
- Streamlit – Frontend web interface
- YOLO (Ultralytics) – Object detection model
- OpenCV – Webcam and image processing
- NumPy
- Pillow (PIL)
├── app.py # Main Streamlit application
├── best.pt # Trained YOLO model (not included in repo)
├── requirements.txt # Project dependencies
└── README.md # Project documentation
git clone https://github.com/your-username/plastic-object-detection.git
cd plastic-object-detectionpython -m venv venv
source venv/bin/activate # On Linux/Mac
venv\Scripts\activate # On Windowspip install -r requirements.txtPlace your trained YOLO model file in the project root:
best.pt
streamlit run app.pyThe app will open automatically in your browser.
-
Select detection mode from the sidebar:
- Image Upload
- Real-Time Webcam
-
Adjust the confidence threshold
-
View detected plastic objects with bounding boxes and labels
- Environmental monitoring
- Smart waste management systems
- Recycling automation
- Research & academic projects
- AI-powered sustainability solutions
- Ensure your webcam is accessible for real-time mode
best.ptmust be compatible with Ultralytics YOLO- GPU is recommended for better performance (optional)
This project is licensed under the MIT License. You are free to use, modify, and distribute this software.
Co-Founder – Unicodrex | Technical Lead – Skill Sprint
If you find this project useful:
- ⭐ Star the repository
- 🍴 Fork it
- 🧠 Contribute improvements
Contributions, issues, and feature requests are welcome!
Feel free to open a pull request or issue.