Downloads · 30 days
0
kendrickfff/my_resnet50_garbage_classification
my_resnet50_garbage_classification is a image classification model from kendrickfff. Use it when you need a label for an image. The card lists the license as mit.
This model is a garbage classification system built on the ResNet50 architecture, fine-tuned for classifying household garbage into 12 distinct categories: paper, cardboard, biological, metal, plastic, green-glass, br…
Downloads · 30 days
0
Access
Public
Updated Oct 7, 2024
Repo size
94.5 MB
Likes
0
Public
Click a slice to open those files.
.pth94.5 MB · 100%
From the Hugging Face model README
This model is a garbage classification system built on the ResNet50 architecture, fine-tuned for classifying household garbage into 12 distinct categories: paper, cardboard, biological, metal, plastic, green-glass, brown-glass, white-glass, clothes, shoes, batteries, and trash. The model was trained on a dataset sourced from the Kaggle Garbage Classification Dataset by Mostafa Abla. The purpose of this model is to assist in sorting household waste for better recycling efficiency.
Base Model: ResNet50 (pre-trained on ImageNet).
Modifications: The final fully connected layer was modified to output 12 classes instead of the default 1000 classes used in ImageNet.
This model is intended for environmental conservation efforts through waste sorting and recycling. It can be implemented in waste management systems, where a camera captures images of garbage and sorts them into appropriate categories for recycling.
While this model can help with waste sorting, there are some important considerations to keep in mind:
The training was conducted on a single GPU to speed up computation.
The model was trained using the Kaggle Garbage Classification Dataset https://www.kaggle.com/datasets/mostafaabla/garbage-classification/data. The dataset contains 15,150 images of household garbage spread across 12 classes. The images were split into training and validation sets to evaluate the model performance.
The model's performance was evaluated on the validation set. Below are the key metrics:
train Loss: 1.0083 Acc: 0.6850 valid Loss: 0.6304 Acc: 0.7985 Epoch 1 completed in 2109.20 seconds.
train Loss: 0.7347 Acc: 0.7687 valid Loss: 0.8616 Acc: 0.7307 Epoch 2 completed in 2183.41 seconds.
train Loss: 0.6510 Acc: 0.7913 valid Loss: 0.5594 Acc: 0.8260 Epoch 3 completed in 2174.55 seconds.
train Loss: 0.5762 Acc: 0.8126 valid Loss: 0.4006 Acc: 0.8655 Epoch 4 completed in 2166.46 seconds.
train Loss: 0.5478 Acc: 0.8210 valid Loss: 0.3968 Acc: 0.8793 Epoch 5 completed in 2189.89 seconds.
train Loss: 0.5223 Acc: 0.8272 valid Loss: 0.4051 Acc: 0.8729 Epoch 6 completed in 2185.71 seconds.
train Loss: 0.4974 Acc: 0.8355 valid Loss: 0.3223 Acc: 0.9094 Epoch 7 completed in 2184.83 seconds.
train Loss: 0.3464 Acc: 0.8870 valid Loss: 0.2221 Acc: 0.9338 Epoch 8 completed in 2184.53 seconds.
train Loss: 0.2896 Acc: 0.9049 valid Loss: 0.2125 Acc: 0.9338 Epoch 9 completed in 2181.82 seconds.
train Loss: 0.2604 Acc: 0.9136 valid Loss: 0.2076 Acc: 0.9326
Training complete in 362m 11s
Best val Acc: 0.9338
Training Time: Approximately 12 minutes on a single GPU for 10 epochs.
The model showed high accuracy in predicting common categories such as plastic, paper, and metal, but struggled with classes like shoes and clothes, reflecting the challenges of web-scraped images for such categories.
This ResNet50-based garbage classification model shows promising performance for sorting household waste into multiple categories. It can be used in waste management systems to automate and optimize the recycling process. Future work includes improving data quality by collecting real-world garbage images, fine-tuning the model, and addressing potential biases.
Further details and the code for this model can be found in the experiment tracking system.