Skip to content

sumn2u/deep-waste-app

Deep Waste

Build Status License

[Updates: Jan 2024] The transfer learning study with updated dataset can be found here.

You can find the research paper utilized in this study here, descriptive analysis of the data here and the process of developing this app here.

Summary

An app that use waste classification machine learning model to classify the waste and manage it effectively. It a standalone app and works without internet.

Instructions

Background

Waste identification is a crucial step in the waste management process that enables facilities to properly handle, recycle, and reduce their waste, while also ensuring compliance with regulations and tracking their progress over time. The integration of machine learning models with mobile devices can enhance the precision, ease, and effectiveness of waste management endeavors, as well as furnish valuable information for monitoring and decreasing waste.

In this app, we have prepared a substantial collection of waste images and trained a machine learning model. The trained model is then installed on a mobile device, enabling real-time waste identification. By simply capturing an image of the waste with their mobile device, users can receive an instant classification of the waste into categories such as paper, plastic, glass, metal, and more, via the machine learning model. With this approach, one can have many advantages such as:

  • Convenience: By using mobile devices, waste identification can be performed anywhere, at any time, making it more accessible and convenient for users.
  • Increased Accuracy: Machine learning models are trained on large datasets, which can result in improved accuracy compared to manual waste classification.
  • Real-time Feedback: By using a mobile device, users receive instant feedback on the type of waste they are dealing with, allowing them to make informed decisions on how to properly manage the waste.
  • Data Collection: The data collected through mobile waste identification can be used to track waste generation and management efforts over time, helping to identify areas for improvement and set new waste reduction goals.

Features

Here are some of its features:

📸 Snap or upload a picture of a waste
📱 Install the app on your phone for easy access
♻️ Learn how to recycle effectively using AI
🥤 Keep track of how many waste items you've recycled
🏆 Get rewarded for each managed waste
🌍 Help to make our earth cleaner
✨...and much more to come - all for free & no sign in needed!

Deep Waste - Making waste management fun and easy   | Product Hunt

How is it used?

After training the AI model, we export it to TensorFlow Lite for mobile device compatibility. Using the app, users take or upload a picture of their waste, which the model then analyzes and provides suggestions for waste management. When users successfully manage their waste, they receive rewards. To enhance the accuracy of the system, users can submit incorrect predictions and specify the type of waste.

Data sources and AI methods

Torch and Keras provide the pre-trained models DenseNet121 and MobileNet, respectively, which we utilize for our image recognition models. These models were initially trained on ImageNet. We then fine-tuned MobileNet using the TrashNet data collection to classify garbage material. Then resutlant model are then converted into tflite file, making it accessible for processing in mobile devices

Challenges

This project classifies most of the waste but for some, it's still a problem. These images whose accuracy is less than 45 or with wrong prediction needs to be find into the model so that machine can learn from it. Besides that, some of the devices has problem running the model resulting crashing the whole application.

REST API?

The REST API of the deep waste model can be found here.

What next?

The plan is to add a way to support internationlization. The language support will help to reach more people and lessen the boundries.

Demo

Deep Waste

Available on

Google Play

App Store

Getting started

  1. Install Flutter. See https://flutter.io/setup/

  2. and clone this repository.

  3. Move to deep-waste-app directory.

  4. Run flutter run command.

Structure

The main classes are under lib directory.

directory | description

assets
├── models
# waste classification model
lib
├── ...
├── components                   # reusable components
├── constants                    # constants used in project
├── models                     # data structure to define the shape of data
├── screens                    # different view used in the app
├── controller                    # an intermidiate between view and model responsible for updating model and manupluates the view of the app    
├── test                    # Test files (alternatively `spec` or `tests`)
└── routes.dart             # maps urls for navigation
└── ...

Contributing

Contributions are always welcome. Feel free to report Issue or send Pull Request.

Acknowledgments

License

BSD 3-Clause License

Copyright (c) 2023, Suman Kunwar

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Feel free to reach out to us at sumn2u@gmail.com, to Suman directly if you have any questions or feedback! Hope you find this useful 💜