The global waste management crisis inspired us to create RecyClean. Navigating the complexities of recycling on campus can be challenging for students juggling academics, social life, and responsibilities. Every day, waste ends up in the wrong bins due to a lack of clear guidance, making recycling inefficient and harming the environment. RecyClean simplifies sustainable living by using AI-driven real-time waste classification to provide instant, accurate disposal instructions. By making eco-friendly choices quick and effortless, RecyClean helps students contribute to a greener campus without disrupting their busy lives.
RecyClean is a real-time waste classification tool that helps users identify waste categories and dispose of waste correctly. With the help of advanced AI technologies, the system:
- Classifies Waste in Real Time: Captures live video from a webcam, detects objects using Google Vision, and classifies them into one of five waste categories: Recycling, Organic, Trash, Electronic, or Miscellaneous.
- Provides Verbal Feedback: Utilizes Google Text-to-Speech (TTS) to give users an audio response, guiding them on how to dispose of the detected object.
RecyClean integrates several technologies to deliver an intuitive and functional solution:
- Video Feed: OpenCV for capturing and displaying real-time video streams.
- AI for Object Detection: Google Vision API detects and labels objects in the video frames.
- AI for Classification: OpenAI’s GPT-3.5-turbo model classifies detected objects into appropriate waste categories.
- Text-to-Speech: Google Text-to-Speech (gTTS) converts text into speech, providing verbal instructions.
- Audio Playback: Uses the system’s native audio player or the
playsoundlibrary to play back TTS-generated audio.
- API Integration: Combining Google Vision and OpenAI APIs required careful coordination to ensure real-time performance.
- Real-Time Performance: Ensuring low latency between detection, classification, and feedback.
- Audio Playback: Cross-platform audio playback had compatibility challenges, which required fallback strategies.
- Error Handling: Managing API errors and temporary file cleanup robustly.
- Rate Limits: Handling rate limit errors from the OpenAI API effectively by implementing request throttling and optimizing API calls.
- Seamless Integration: Successfully integrated multiple APIs to create a smooth workflow.
- Real-Time Feedback: Achieved minimal delay between object detection and user feedback.
- Cross-Platform Compatibility: Designed the system to work on various operating systems.
- AI API Utilization: Effectively combining the capabilities of different AI APIs (Google Vision and OpenAI GPT-3.5-turbo).
- Real-Time Video Processing: Leveraging OpenCV for efficient video capture and display.
- Speech Synthesis: Using gTTS and system-level audio playback to enhance user interaction.
- Mobile App Development: Develop a native mobile application to make RecyClean more accessible and portable.
- Integration with IoT: Enhance functionality by integrating with IoT-enabled smart bins for automated waste sorting.
- Machine Learning Model: Replace or complement the Google Vision API with a custom-trained ML model for more specialized waste detection.
- Expanded Language Support: Add multilingual support to reach a broader audience.
- Install Python (>= 3.8).
- Install the required dependencies:
pip install -r requirements.txt
- Set up API keys:
- Google Vision API: Place the service account JSON file as
key.jsonin the project directory. - OpenAI API: Add your OpenAI API key to
config.jsonin the following format:{ "OPENAI_API_KEY": "your_openai_api_key_here" }
- Google Vision API: Place the service account JSON file as
- Run the Python script:
python secondary.py
- Controls:
- Press 'd' to detect and classify objects from the video stream.
- Press 'q' to quit the application.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please fork the repository, make your changes, and submit a pull request.
- Google Cloud Vision API: For object detection and labeling.
- OpenAI: For GPT-3.5-turbo API.
- gTTS: For text-to-speech conversion.
- OpenCV: For real-time video capture and display.
Thank you for making a difference with RecyClean!