Skip to content

Commit

Permalink
transfer learning approach added
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Dec 26, 2023
1 parent ccd550d commit e0edfdd
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 101 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Deep Waste
You can find the research paper utilized in this study [here](https://www.aimspress.com/article/doi/10.3934/ctr.2023008), descriptive analysis of the data [here](https://colab.research.google.com/drive/1JPwI75T_PMlTITO3tDmIhGEVsIREnGHa?usp=sharing) and the process of developing this app [here](https://medium.com/@sumn2u/deep-learning-approach-to-manage-household-waste-via-mobile-app-4186292b266b).
You can find the research paper utilized in this study [here](https://www.aimspress.com/article/doi/10.3934/ctr.2023008), descriptive analysis of the data [here](https://colab.research.google.com/drive/1JPwI75T_PMlTITO3tDmIhGEVsIREnGHa?usp=sharing) and the process of developing this app [here](https://medium.com/@sumn2u/deep-learning-approach-to-manage-household-waste-via-mobile-app-4186292b266b). The transfer learning study can be found [here](https://www.kaggle.com/code/sumn2u/garbage-classification-transfer-learning).

## Summary

Expand Down Expand Up @@ -34,7 +34,8 @@ Here are some of its features:

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](https://pytorch.org) and [Keras](https://keras.io/api/applications/#mobilenet) provide the pre-trained models [DenseNet121](https://keras.io/api/applications/densenet/#densenet121-function) and [MobileNet](https://keras.io/api/applications/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](https://github.com/garythung/trashnet) to classify garbage material.
[Torch](https://pytorch.org) and [Keras](https://keras.io/api/applications/#mobilenet) provide the pre-trained models [DenseNet121](https://keras.io/api/applications/densenet/#densenet121-function) and [MobileNet](https://keras.io/api/applications/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](https://github.com/garythung/trashnet) to classify garbage material. Transfer learning model is applied in V2 using [Garbage Dataset](https://www.kaggle.com/datasets/sumn2u/garbage-classification-v2).

Then resutlant model are then converted into `tflite` file, making it accessible for processing in mobile devices

## Challenges
Expand Down
Binary file added assets/images/battery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/biological.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/clothes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/shoes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion lib/controller/category_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,27 @@ class CategoryNotifier extends ChangeNotifier {
id: "1006",
name: "Trash",
imageURL: "assets/images/trash.png",
points: 35)
points: 20),
Category(
id: "1007",
name: "Battery",
imageURL: "assets/images/battery.png",
points: 10),
Category(
id: "1008",
name: "Biological",
imageURL: "assets/images/biological.png",
points: 18),
Category(
id: "1009",
name: "Clothes",
imageURL: "assets/images/clothes.png",
points: 22),
Category(
id: "1010",
name: "Shoes",
imageURL: "assets/images/shoes.png",
points: 15)
];

UnmodifiableListView<Category> get categories =>
Expand Down
28 changes: 26 additions & 2 deletions lib/controller/item_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,33 @@ class ItemNotifier extends ChangeNotifier {
Item(
id: "1006",
name: "Trash",
count: 2,
count: 0,
imageURL: "assets/images/trash.png",
points: 35)
points: 35),
Item(
id: "1007",
name: "Battery",
count: 0,
imageURL: "assets/images/battery.png",
points: 10),
Item(
id: "1008",
name: "Biological",
count: 0,
imageURL: "assets/images/biological.png",
points: 18),
Item(
id: "1009",
name: "Clothes",
count: 0,
imageURL: "assets/images/clothes.png",
points: 22),
Item(
id: "1010",
name: "Shoes",
count: 0,
imageURL: "assets/images/shoes.png",
points: 15)
];

UnmodifiableListView<Item> get items => UnmodifiableListView(_items);
Expand Down
105 changes: 16 additions & 89 deletions paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -153,97 +153,24 @@ @article{narayan_deepwaste:_2021
}


@article{feng_office_2020,
title = {Office garbage intelligent classification based on inception-v3 transfer learning model},
volume = {1487},
issn = {1742-6588, 1742-6596},
url = {https://iopscience.iop.org/article/10.1088/1742-6596/1487/1/012008},
doi = {10.1088/1742-6596/1487/1/012008},
abstract = {Abstract
With the increase in garbage production, the problem of garbage pollution is becoming more and more serious. Garbage recognition and classification can reduce the environmental burden, but there are still some challenges. Image classification, an image processing method that separates different categories of objects according to different characteristics reflected in the image information. This paper collected and produced an image data set with 2313 photos of different office garbage, and proposed an intelligent classification garbage can to solve the realistic problems. That method based on transfer techniques to retain the excellent feature extraction ability of the Inception-v3 model of TensorFlow, which can recognize objects through the convolutional neural network model. The experimental results showed that the garbage classification effect was obvious and the average accuracy rate reached 95.33\%.},
number = {1},
urldate = {2023-12-18},
journal = {Journal of Physics: Conference Series},
author = {Feng, Jie-wen and Tang, Xiao-yu},
month = mar,
year = {2020},
pages = {012008},
}

@article{yong_application_2023,
title = {Application of {MobileNetV2} to waste classification},
volume = {18},
issn = {1932-6203},
url = {https://dx.plos.org/10.1371/journal.pone.0282336},
doi = {10.1371/journal.pone.0282336},
abstract = {Today, the topic of waste separation has been raised for a long time, and some waste separation devices have been installed in large communities. However, the vast majority of domestic waste is still not properly sorted and put out, and the disposal of domestic waste still relies mostly on manual classification. The research in this paper applies deep learning to this persistent problem, which has important significance and impact. The domestic waste is classified into four categories: recyclable waste, kitchen waste, hazardous waste and other waste. The garbage classification model trained based on MobileNetV2 deep neural network can classify domestic garbage quickly and accurately, which can save a lot of labor, material and time costs. The absolute accuracy of the trained network model is 82.92\%. In comparison with CNN network model, the classification accuracy of MobileNetV2 model is 15.42\% higher than that of CNN model. In addition, the trained model is light enough to be better applied to mobile.},
language = {en},
number = {3},
urldate = {2023-12-18},
journal = {PLOS ONE},
author = {Yong, Liying and Ma, Le and Sun, Dandan and Du, Liping},
editor = {Hammad, Mohamed},
month = mar,
year = {2023},
pages = {e0282336},
}

@inproceedings{lee_novel_2021,
address = {Yogyakarta, Indonesia},
title = {Novel classification method of plastic wastes with optimal hyperparameter tuning of {Inception}\_ResnetV2},
isbn = {9781665433945},
url = {https://ieeexplore.ieee.org/document/9563917/},
doi = {10.1109/ICOIACT53268.2021.9563917},
urldate = {2023-12-18},
booktitle = {2021 4th {International} {Conference} on {Information} and {Communications} {Technology} ({ICOIACT})},
publisher = {IEEE},
author = {Lee, Sahng-Won},
month = aug,
year = {2021},
pages = {274--279},
}

@inproceedings{girsang_convolutional_2022,
address = {Laguboti, North Sumatra, Indonesia},
title = {Convolutional neural network using res-net for organic and anorganic waste classification},
isbn = {9798350399073},
url = {https://ieeexplore.ieee.org/document/10034869/},
doi = {10.1109/ICOSNIKOM56551.2022.10034869},
urldate = {2023-12-18},
booktitle = {2022 {IEEE} {International} {Conference} of {Computer} {Science} and {Information} {Technology} ({ICOSNIKOM})},
publisher = {IEEE},
author = {Girsang, Abba Suganda and Yunanda, Rezky and Syahputra, Muhammad Edo and Peranginangin, Ezra},
month = oct,
year = {2022},
pages = {01--06},
}

@inproceedings{nurahmadan_mobile_2021,
address = {Jakarta, Indonesia},
title = {A mobile based waste classification using mobilenets-v1 architecture},
isbn = {9781665427333},
url = {https://ieeexplore.ieee.org/document/9699161/},
doi = {10.1109/ICIMCIS53775.2021.9699161},
urldate = {2023-12-18},
booktitle = {2021 {International} {Conference} on {Informatics}, {Multimedia}, {Cyber} and {Information} {System} ({ICIMCIS}},
publisher = {IEEE},
author = {Nurahmadan, Irzan Fajari and Arjuna, Roihan Mufli and Prasetyo, Herlambang Dwi and Hogantara, Pandu Ananto and Isnainiyah, Ika Nurlaili and Wirawan, Rio},
month = oct,
year = {2021},
pages = {279--284},
}
@article{5288526,
author={Pan, Sinno Jialin and Yang, Qiang},
journal={IEEE Transactions on Knowledge and Data Engineering},
title={A Survey on Transfer Learning},
year={2010},
volume={22},
number={10},
pages={1345-1359},
doi={10.1109/TKDE.2009.191}}

@inproceedings{rismiyati_xception_2020,
address = {Semarang, Indonesia},
title = {Xception architecture transfer learning for garbage classification},
isbn = {9781728195261},
url = {https://ieeexplore.ieee.org/document/9299017/},
doi = {10.1109/ICICoS51170.2020.9299017},
urldate = {2023-12-18},
booktitle = {2020 4th {International} {Conference} on {Informatics} and {Computational} {Sciences} ({ICICoS})},
publisher = {IEEE},
author = {{Rismiyati} and Endah, Sukmawati Nur and {Khadijah} and Shiddiq, Ilman Nabil},
month = nov,
year = {2020},
pages = {1--4},
@misc{suman_kunwar_2023,
title={Garbage Dataset},
url={https://www.kaggle.com/ds/2814684},
DOI={10.34740/KAGGLE/DS/2814684},
publisher={Kaggle},
author={Suman Kunwar},
year={2023}
}
14 changes: 7 additions & 7 deletions paper/paper.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

---
title: 'Deep-Waste: An app that manages household waste using deep learning'
title: 'Deep-Waste: An app that manages household waste using transfer learning'
tags:
- Waste Classification
- Machine Learning
- Flutter
- Firebase
- Python
- Transfer Learning
authors:
- name: Suman Kunwar
orcid: 0000-0002-4345-1050
Expand All @@ -21,7 +22,7 @@ bibliography: paper.bib


# Summary
Deep Waste[^1] is a mobile application that leverages state-of-the art computer vision and deep learning technologies to accurately classify waste materials into six categories: trash, plastic, paper, metal, glass, and cardboard. This innovative solution was developed to address the challenges of costly, imprecise, and unclear waste classification methods. Deep Waste has undergone rigorous testing on a variety of neural network architectures and real-world images, achieving an impressive average precision of 92% on the test set. By enabling efficient waste processing, reducing greenhouse gas emissions, and promoting sustainable practices, this app has the potential to transform the field of waste management.
Deep Waste[^1] is a mobile application that leverages state-of-the art computer vision and deep learning technologies to accurately classify waste materials into ten categories: battery, biological, trash, plastic, paper, shoes, clothes, metal, glass, and cardboard. This innovative solution was developed to address the challenges of costly, imprecise, and unclear waste classification methods. Deep Waste has undergone rigorous testing on a variety of neural network architectures and real-world images, achieving an impressive average precision of 97% on the test set. By enabling efficient waste processing, reducing greenhouse gas emissions, and promoting sustainable practices, this app has the potential to transform the field of waste management.

[^1]: Previously known as MWaste.

Expand All @@ -31,15 +32,14 @@ The escalating global waste crisis, projected to surge by 70% by 2050 without in

Recent advancements leverage deep learning models to streamline waste sorting and management [@liu_image_2022]. These models, like RWNet and ConvoWaste, exhibit high accuracy, emphasizing the role of accurate waste disposal in mitigating climate change and reducing greenhouse gas emissions. Some studies incorporate IoT and waste grid segmentation to classify and segregate waste items in real time [@m_technical_2023].

Integration of machine learning models with mobile devices presents a promising avenue for precise waste management [@narayan_deepwaste:_2021]. The use of optimized deep learning techniques in an app demonstrates potential, achieving an accuracy of 0.881 in waste classification. However, limitations persist, prompting the introduction of Deep Waste, a mobile app employing computer vision to classify waste into six types. Tested on various neural network architectures, Deep Waste attains a remarkable 92% precision on the test set, functioning both online and offline.
Integration of machine learning models with mobile devices presents a promising avenue for precise waste management [@narayan_deepwaste:_2021]. The use of optimized deep learning techniques in an app demonstrates potential, achieving an accuracy of 0.881 in waste classification. However, limitations persist, prompting the introduction of Deep Waste, a mobile app employing computer vision to classify waste into ten types.

Using transfer learning [@5288526], Deep Waste attains a remarkable 97% precision on the test set, functioning both online and offline.


# Workflow
The app uses the [TrashNet](https://github.com/garythung/trashnet) dataset to recognize different types of waste materials including plastic, glass, paper, and organic waste with various machine learning models, including InceptionV3 [@feng_office_2020], MobileNetV2 [@yong_application_2023], InceptionResnet V2 [@lee_novel_2021], ResNet [@girsang_convolutional_2022], MobileNet[@nurahmadan_mobile_2021], and Xception[@rismiyati_xception_2020].


The app also provides information on how to dispose of the waste and what recycling options are available. This approach can be customized to meet the user's specific needs, including local waste management regulations and individual household waste disposal habits and preferences. The home screen of the app is show in \autoref{fig:deep_waste_app}
# Workflow
The app uses the Garbage Dataset [@suman_kunwar_2023] to recognize different types of waste materials including plastic, metal, glass, biological, paper, battery, trash, cardboard, shoes and clothes using Transfer Learning. The app also provides information on how to dispose of the waste and what recycling options are available. This approach can be customized to meet the user's specific needs, including local waste management regulations and individual household waste disposal habits and preferences. The home screen of the app is show in \autoref{fig:deep_waste_app}

![Deep Waste App Home Screen\label{fig:deep_waste_app}](deep-waste-app.png){width="100%"}

Expand Down

0 comments on commit e0edfdd

Please sign in to comment.