Edit model card

Model Card for Garbage Classification using ResNet50

Model Overview

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.

Model Architecture

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.

Intended Use

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.

Potential Use Cases:

  • Automated waste sorting systems.
  • Integration in smart recycling bins.
  • Environmental and educational tools to promote recycling.

Limitations and Ethical Considerations

While this model can help with waste sorting, there are some important considerations to keep in mind:

  • Bias in Dataset: The dataset was collected through web scraping, and some categories, such as clothes and shoes, may not reflect real-world garbage. This could cause inaccuracies in certain classes.
  • Ethical Use: The model should not be used in isolation without human oversight, especially in critical recycling operations, as there is potential for error in misclassification that could lead to incorrect waste handling.
  • Dataset Limitations: The dataset used was created in a controlled environment, not in real-world garbage scenarios. This may limit the generalizability of the model to environments where garbage is not presented in a clean, well-lit setting.

Mitchell's Ethical AI Considerations (2018)

  • Bias: The dataset contains inherent bias, as it was primarily collected through web scraping rather than real-world garbage images. For instance, images of clothes are typically of clean clothes, not actual discarded garments, which can lead to incorrect classification.
  • Fairness: The model may perform differently depending on the type of garbage presented. Since it was not trained on real-world garbage images, it might favor certain categories.
  • Transparency: The model was built using a pre-trained ResNet50 with added modifications, and the details of training and performance metrics are shared openly.
  • Mitigation: Further data collection from real-world garbage environments can improve model accuracy and fairness.

Training and Experimental Details

Training Parameters

  • Optimizer: Adam optimizer with learning rate of 0.001
  • Loss Function: CrossEntropyLoss
  • Scheduler: StepLR, decreasing the learning rate every 7 epochs by a factor of 0.1
  • Batch Size: 32
  • Number of Epochs: 10
  • Transformations:
    • Training: RandomResizedCrop, RandomRotation, HorizontalFlip, ColorJitter, Normalization.
    • Validation: Resize, CenterCrop, Normalization.

The training was conducted on a single GPU to speed up computation.

Dataset Used

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.

Model Evaluation Results

The model's performance was evaluated on the validation set. Below are the key metrics:

Epoch 1/10

train Loss: 1.0083 Acc: 0.6850 valid Loss: 0.6304 Acc: 0.7985 Epoch 1 completed in 2109.20 seconds.

Epoch 2/10

train Loss: 0.7347 Acc: 0.7687 valid Loss: 0.8616 Acc: 0.7307 Epoch 2 completed in 2183.41 seconds.

Epoch 3/10

train Loss: 0.6510 Acc: 0.7913 valid Loss: 0.5594 Acc: 0.8260 Epoch 3 completed in 2174.55 seconds.

Epoch 4/10

train Loss: 0.5762 Acc: 0.8126 valid Loss: 0.4006 Acc: 0.8655 Epoch 4 completed in 2166.46 seconds.

Epoch 5/10

train Loss: 0.5478 Acc: 0.8210 valid Loss: 0.3968 Acc: 0.8793 Epoch 5 completed in 2189.89 seconds.

Epoch 6/10

train Loss: 0.5223 Acc: 0.8272 valid Loss: 0.4051 Acc: 0.8729 Epoch 6 completed in 2185.71 seconds.

Epoch 7/10

train Loss: 0.4974 Acc: 0.8355 valid Loss: 0.3223 Acc: 0.9094 Epoch 7 completed in 2184.83 seconds.

Epoch 8/10

train Loss: 0.3464 Acc: 0.8870 valid Loss: 0.2221 Acc: 0.9338 Epoch 8 completed in 2184.53 seconds.

Epoch 9/10

train Loss: 0.2896 Acc: 0.9049 valid Loss: 0.2125 Acc: 0.9338 Epoch 9 completed in 2181.82 seconds.

Epoch 10/10

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.

Conclusion

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.

Potential Improvements

  • Real-world data collection (also preferably from items in poor or trash-like conditions) is necessary to reduce bias, as trash banks and recycling centers encourage people to separate used items into those that are reusable and those that are not suitable for use.
  • More data augmentation to handle edge cases like occluded or partially damaged garbage items.
  • Deploying the model in edge devices for real-time classification at waste management facilities.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
Unable to determine this model's library. Check the docs .