Inspiration
There is a huge concern for effective waste management and environmental sustainability due to the lack of proper classification of waste on a personal level, which is what inspired me to create this project. There are so many recyclable materials ending up in landfills, so I saw an opportunity to use A.I. to simplify the process of waste categorization. This application is an accessible, user-friendly solution to encourage better recycling habits and minimize waste pollution. It is also a great way to educate children who are unaware of waste categorization to use our app to help them learn more about the different types of waste in order to reinforce recycling into their daily habits.
What it does
Waste Classification AI is an intelligent application that classifies images of waste into predefined categories, such as plastic, paper, metal, and more. Users can take or upload photos of waste, and the app instantly predicts the category with a confidence score, helping users identify the proper disposal or recycling method.
How we built it
The project consists of two main components:
Backend:
- Built using Flask, TensorFlow, and Python.
- A pre-trained MobileNetV2 model was fine-tuned to classify waste into 12 categories.
- Flask serves as the API to handle image uploads, preprocess the data, and perform predictions.
- The backend is deployed on Railway for easy accessibility.
Frontend:
- Developed using React Native for cross-platform compatibility.
- Users can upload images from their gallery or take photos directly using their device camera.
- The app sends the image to the backend and displays the classification results in real-time.
- Tested locally on Expo Go for seamless iOS development and debugging.
Challenges I ran into
- Dataset Limitations: Some categories were underrepresented, which affected classification accuracy. For instance, aluminum cans were sometimes misclassified as plastic.
- Deployment Hurdles: Configuring the backend on Railway required careful attention to dependencies and environment settings.
- Python Version Compatibility: Ensuring compatibility between the Python version and TensorFlow was challenging, as some versions caused compatibility issues and required adjustments during the development process.
- Time Constraints: With limited time for the hackathon, we couldn't retrain the model to address misclassifications effectively.
- Image Processing on Mobile: Ensuring that the image is clear with good lighting improved accuracy compared to blurry, dim-lit images.
Accomplishments that I am proud of
- Successfully deploying a machine learning model to classify waste with decent accuracy.
- Building a fully functional mobile app that enables users to classify waste by either taking a photo or uploading one.
- Overcoming deployment challenges and ensuring smooth communication between the frontend and backend.
- Creating a project with social and environmental impact potential.
What I learned
- How to fine-tune pre-trained models for custom classification tasks.
- The intricacies of deploying a Flask app with TensorFlow models on cloud platforms like Railway.
- Integrating React Native with backend APIs for real-time data handling.
- Debugging cross-platform mobile apps and handling edge cases, such as file format validation and unexpected API responses.
What's next for Waste Classification A.I.
- Improving Model Accuracy: Collecting more balanced datasets to address underrepresented categories or inaccurate predictions.
- Expanding Categories: Adding more waste categories and enabling users to contribute labeled data for continuous model training.
- Cross-Platform Deployment: Deploying the app on both iOS and Android for broader accessibility.
- Offline Mode: Allowing local inference for predictions without requiring internet connectivity, enhancing usability in remote areas.
- Community Feedback: Engaging with users to identify areas for improvement and adding requested features.
Built With
- expo-go
- expo.io
- flask
- javascript
- kaggle-dataset
- mobilenetv2
- python
- railway
- react-native
- tensorflow
Log in or sign up for Devpost to join the conversation.