Re‑annotated and Segmented TrashNet Dataset for Waste Classification in YOLO Format

Published: 6 August 2026| Version 1 | DOI: 10.17632/f6y37w8hxb.1
Contributors:
,
,

Description

This dataset is a meticulously re-annotated instance segmentation version of the original TrashNet dataset [1], which was initially created for image classification tasks. While the original dataset provided 2,527 images across six waste categories, it lacked the precise pixel-level boundaries essential for robotic manipulation and automated sorting systems. Our re-annotation transforms this classification dataset into a high-quality instance segmentation benchmark, providing polygon masks suitable for training models that require geometric precision, such as those used in robotic grasping applications. Dataset Characteristics Total Images: 2,527 high-resolution RGB images Classes: 6 recyclable material categories Annotation Format: YOLO segmentation format (polygon masks with .txt files) Average Vertices per Polygon: 24.3 Annotation Quality: Manual verification ensuring IoU > 0.92 between annotated polygons and visible object boundaries Split Distribution: Training: 1,765 images (~70%) Validation: 504 images (~20%) Test: 258 images (~10%) Class Distribution Class Number of Images Glass 502 Paper 600 Cardboard 405 Plastic 467 Metal 415 Trash 138 Total 2,527 Key Features Instance Segmentation Annotations: Unlike the original classification labels, each object is annotated with a detailed polygon mask, enabling pixel-level segmentation. Geometric Precision: With an average of 24.3 vertices per polygon and IoU > 0.92, the annotations are suitable for training high-precision segmentation models. YOLO-Compatible Format: Annotations are provided in YOLO polygon segmentation format, with a data.yaml configuration file for seamless integration with YOLO-based frameworks (YOLOv8, YOLO11, etc.). Balanced Splits: Careful partitioning ensures balanced class distribution across training, validation, and test sets. Motivation The original TrashNet dataset [1] was designed for classification and bounding box detection, which do not provide the spatial precision required for tasks like robotic grasping or automated pneumatic sorting. This re-annotation addresses that gap by providing high-quality polygon masks that capture the exact contours of waste objects, even for challenging materials such as transparent glass and crumpled plastics. Applications Training instance segmentation models for automated waste sorting Developing robotic grasping systems for recycling facilities Evaluating attention mechanisms for visually ambiguous materials Benchmarking segmentation algorithms on recyclable waste streams Citation If you use this dataset in your research, please cite: Rohit, N.-U.-H., Tabassum, F., & Raihan, A. (2026). Re‑annotated and Segmented TrashNet Dataset for Waste Classification in YOLO Format [Data set]. Mendeley Data. https://doi.org/[YOUR-DOI] Additionally, please cite the original TrashNet dataset: [1] G. Thung and M. Yang. "Classification of Trash for Recyclability Status." CS229 Project Report, Stanford University, 2016.

Files

Steps to reproduce

1. Obtain original data: Download the original TrashNet classification dataset (2,527 images, 6 classes: Glass, Paper, Cardboard, Plastic, Metal, Trash) from the official Stanford CS229 repository. 2.Annotation tool: Upload all images to Roboflow (or any compatible polygon annotation tool such as CVAT or LabelMe). 3. Polygon annotation: For each image, manually draw precise polygon masks around each object, converting the original classification labels into instance segmentation masks. Target an average of 24.3 vertices per polygon to capture fine object contours. 4. Manual verification and correction: Approximately 15% of automatically suggested boundaries require manual correction, particularly for transparent materials (glass) and crumpled objects (plastic bags). Perform rigorous manual quality control to ensure Intersection over Union (IoU) > 0.92 between the annotated polygon and the actual visible object boundary. 5. Export format: Export the annotations in YOLO segmentation format (polygon vertices normalized to image dimensions, saved as .txt files alongside corresponding images). 6. Dataset split: Partition the dataset into: Training set: 70% (1,765 images) Validation set: 20% (504 images) Test set: 10% (258 images) Ensure balanced class distribution across all splits.

Institutions

Categories

Computer Science, Artificial Intelligence, Computer Vision, Environmental Science, Environmental Engineering, Waste Management, Image Processing, Pattern Recognition

Licence