About TrashNet
TrashNet, developed by Gary Thung and Mindy Yang as a final project for Stanford’s CS 229: Machine Learning class, provides an open-source convolutional neural network (CNN) and an accompanying image dataset designed for automated waste classification. This resource is valuable for researchers and practitioners in waste management, recycling, and environmental monitoring seeking to apply machine learning to sort and identify different types of waste materials, including plastics.
The system classifies images into six categories: glass, paper, cardboard, plastic, metal, and general trash. Researchers captured the images by placing objects on a white posterboard under natural sunlight or room lighting, using Apple iPhone 7 Plus, Apple iPhone 5S, and Apple iPhone SE devices. The images are pre-processed to 512 x 384 pixels, a setting configurable by the user. The CNN achieved approximately 75% test accuracy with a 70/13/17 train/validation/test split after implementing the Kaiming weight initialization method, offering a foundational model for modelling and automated sorting applications.
Key Features of TrashNet
- Waste Image Dataset: Comprises 2527 images categorized across six classes: 501 glass, 594 paper, 403 cardboard, 482 plastic, 410 metal, and 137 general trash.
- Convolutional Neural Network (CNN): Python code for image classification, developed using TensorFlow/Keras framework (implied by typical ML class projects, and common libraries for CNNs, though not explicitly stated in the source text, it is standard for a CNN).
- Open-Source Code and Data: Both the CNN code and the collected image dataset are publicly available for research and development.
- Configurable Preprocessing: Users can modify image resizing parameters within the provided code.
Development and Validation
TrashNet originated as a machine learning project by Gary Thung and Mindy Yang at Stanford University. Their work, including details on the methodology and results, is documented in their project paper: Thung and Yang, 2016, Classification of Trash For Recyclability Status. The reported performance includes a test accuracy of approximately 75%, achieved on a 70/13/17 train/validation/test split using a Kaiming weight initialization for the convolutional neural network.
Access and Data Availability
The TrashNet code is open source and accessible via its GitHub repository. The full image dataset, approximately 3.5GB in its original format, is available for download through a Google Drive link provided within the GitHub repository, as its size exceeds standard Git LFS limits. The repository contains Python code for the CNN, allowing researchers to explore and adapt the model. While publicly available, a specific open-source license is not explicitly stated in the provided source material.
Why This Resource Belongs on Plastiverse
TrashNet directly supports microplastics research by providing a foundational tool for automated waste stream analysis, specifically including plastic waste. Its image dataset and open-source CNN model can aid in developing systems for identifying and sorting plastic materials, which is crucial for recycling efforts and preventing plastic pollution. This resource fits within Plastiverse’s focus on modelling and analytical tools that contribute to understanding and managing plastic at various stages of its lifecycle, from post-consumer waste to environmental fate.