| --- |
| dataset_info: |
| features: |
| - name: image |
| dtype: image |
| - name: label |
| dtype: |
| class_label: |
| names: |
| '0': cardboard |
| '1': glass |
| '2': metal |
| '3': paper |
| '4': plastic |
| '5': trash |
| - name: label_id |
| dtype: int64 |
| - name: label_name |
| dtype: string |
| - name: source_dataset |
| dtype: string |
| - name: original_label |
| dtype: string |
| - name: image_context |
| dtype: string |
| splits: |
| - name: train |
| num_bytes: 1450173709 |
| num_examples: 20894 |
| - name: validation |
| num_bytes: 282857438 |
| num_examples: 4477 |
| - name: test |
| num_bytes: 279046679 |
| num_examples: 4478 |
| download_size: 2068691097 |
| dataset_size: 2012077826 |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train-* |
| - split: validation |
| path: data/validation-* |
| - split: test |
| path: data/test-* |
| license: mit |
| task_categories: |
| - image-classification |
| language: |
| - en |
| tags: |
| - waste-classification |
| - trash-classification |
| - image-classification |
| size_categories: |
| - 1K<n<10K |
| --- |
| # Dataset Card for Waste Classification Harmonized Dataset |
|
|
| ## Dataset Details |
|
|
| ### Dataset Description |
|
|
| This dataset is a harmonized image classification dataset for waste classification. It combines multiple waste-related image datasets into a unified label structure with six target classes: |
|
|
| * `cardboard` |
| * `glass` |
| * `metal` |
| * `paper` |
| * `plastic` |
| * `trash` |
|
|
| The dataset is designed for training and evaluating computer vision models for waste classification, especially in the context of recycling and real-world trash recognition. The original datasets used different label names and different levels of class granularity, so their labels were mapped into one common classification scheme. |
|
|
| The final dataset contains **29,849 images**. |
|
|
| * **License:** MIT |
| |
| ### Dataset Sources |
|
|
| This project combines and harmonizes the following public waste-classification datasets: |
|
|
| #### TrashNet |
|
|
| * **Source:** Kaggle — TrashNet by Feyza Ozkefe |
| * **Link:** https://www.kaggle.com/datasets/feyzazkefe/trashnet |
| * **Notes:** Contains six TrashNet-style classes: `cardboard`, `glass`, `metal`, `paper`, `plastic`, and `trash`. |
| * **Used for:** Base label structure and additional image data. |
| * **License:** MIT |
|
|
| #### Household Garbage Dataset |
|
|
| * **Source:** Kaggle — Recyclable and Household Waste Classification |
| * **Link:** https://www.kaggle.com/datasets/alistairking/recyclable-and-household-waste-classification/data |
| * **Notes:** Contains household garbage classes with `default` and `real_world` image contexts. |
| * **Used for:** Additional training data and real-world robustness evaluation. |
| * **License:** MIT |
|
|
| #### The Garbage Dataset / Garbage Classification V2 |
|
|
| * **Source:** Kaggle — Garbage Classification V2 |
| * **Link:** https://www.kaggle.com/datasets/sumn2u/garbage-classification-v2 |
| * **Notes:** Only the `original` folder was used. The `standardized_256` and `standardized_384` folders were ignored to avoid duplicate or near-duplicate images. |
| * **Used for:** Additional training data after label harmonization. |
| * **License:** MIT |
|
|
| #### TriCascade WasteImage |
|
|
| * **Source:** Kaggle — TriCascade WasteImage Dataset |
| * **Link:** https://www.kaggle.com/datasets/salam035/waste-datasets |
| * **Used for:** Additional training data after label harmonization. |
| * **License:** MIT |
| ## Uses |
|
|
| ### Direct Use |
|
|
| This dataset can be used for: |
|
|
| * image classification |
| * waste classification |
| * recycling-related computer vision experiments |
| * transfer learning |
| * fine-tuning pretrained vision models |
| * comparing image classification architectures |
| * evaluating model robustness across different image sources |
|
|
| Suitable model architectures include, but are not limited to: |
|
|
| * ResNet |
| * ConvNeXt |
| * DeiT |
| * EfficientNet |
| * MLP-Mixer |
| * Vision Transformer variants |
|
|
| ### Out-of-Scope Use |
|
|
| This dataset is not intended for direct deployment in production-level recycling systems without further validation. |
|
|
| The dataset should not be used as the only evaluation source for real-world waste sorting systems, because real-world environments may include: |
|
|
| * multiple objects in one image |
| * damaged or dirty waste objects |
| * unusual lighting conditions |
| * occlusion |
| * mixed materials |
| * unseen waste categories |
| * local recycling rules that differ by region |
|
|
| The dataset is also not suitable for fine-grained waste classification such as distinguishing between PET, HDPE, organic waste, batteries, electronic waste, or hazardous materials. |
|
|
| ## Dataset Structure |
|
|
| Each sample contains an image, a harmonized label, and metadata about the original source. |
|
|
| Example sample: |
|
|
| ```python |
| { |
| "image": "<PIL.Image.Image>", |
| "label": 4, |
| "label_id": 4, |
| "label_name": "plastic", |
| "source_dataset": "household_garbage", |
| "original_label": "plastic_soda_bottles", |
| "image_context": "real_world" |
| } |
| ``` |
|
|
| ### Fields |
|
|
| | Field | Description | |
| | ---------------- | ---------------------------------------------------------------------------------------------------- | |
| | `image` | Image file loaded as a Hugging Face image feature | |
| | `label` | Integer class label used for training | |
| | `label_id` | Integer ID of the harmonized label | |
| | `label_name` | Name of the harmonized class | |
| | `source_dataset` | Name of the dataset from which the image originated | |
| | `original_label` | Original label before harmonization | |
| | `image_context` | Context information about the image, for example `real_world`, `default`, or source-specific context | |
|
|
| ### Label Mapping |
|
|
| | Label ID | Label Name | |
| | -------: | ---------- | |
| | 0 | cardboard | |
| | 1 | glass | |
| | 2 | metal | |
| | 3 | paper | |
| | 4 | plastic | |
| | 5 | trash | |
|
|
| ### Label Distribution |
|
|
| The final harmonized dataset contains **29,849 images** across six classes. |
|
|
| | Label | Count | |
| | --------- | ----: | |
| | cardboard | 4,849 | |
| | glass | 5,000 | |
| | metal | 5,000 | |
| | paper | 5,000 | |
| | plastic | 5,000 | |
| | trash | 5,000 | |
|
|
| Most classes were limited to **5,000 images per label** to reduce class imbalance. The `cardboard` class contains **4,849 images**, because fewer images were available after harmonization and filtering. |
|
|
| ### Data Splits |
|
|
| | Split | Number of Images | |
| | ---------- | ---------------: | |
| | train | 20,894 | |
| | validation | 4,477 | |
| | test | 4,478 | |
|
|
| Total: **29,849 images** |
|
|
| ## Dataset Creation |
|
|
| ### Curation Rationale |
|
|
| Waste classification datasets often use different class names, different label granularities, and different image conditions. For example, one dataset may use a broad label such as `plastic`, while another may contain more specific labels such as `plastic_soda_bottles`, `plastic_food_containers`, or `plastic_cup_lids`. |
|
|
| The goal of this dataset is to create a unified and practical waste-classification dataset with a common label structure. This makes it easier to train and compare different image classification models under the same classification task. |
|
|
| ### Source Data |
|
|
| The source data consists of waste images from multiple public Kaggle datasets. These datasets contain images of recyclable and non-recyclable waste objects, including cardboard, glass, metal, paper, plastic, and general trash. |
|
|
| The original datasets use different label names, image contexts, and levels of class granularity. Therefore, their labels were mapped into one shared six-class structure: |
|
|
| * `cardboard` |
| * `glass` |
| * `metal` |
| * `paper` |
| * `plastic` |
| * `trash` |
|
|
| The original dataset name and original label are preserved in the metadata fields `source_dataset` and `original_label`. |
|
|
| ### Annotations |
|
|
| The dataset does not introduce completely new manual annotations for every image. Instead, it harmonizes existing source labels into a shared six-class label structure. |
|
|
| #### Annotation Process |
|
|
| The annotation process consisted mainly of label harmonization. Source-specific labels were mapped to one of the following final classes: |
|
|
| * `cardboard` |
| * `glass` |
| * `metal` |
| * `paper` |
| * `plastic` |
| * `trash` |
|
|
| For example: |
|
|
| * `plastic_soda_bottles` → `plastic` |
| * `plastic_food_containers` → `plastic` |
| * `plastic_cup_lids` → `plastic` |
|
|
| The original labels are preserved in the dataset metadata. |
|
|
| #### Who are the annotators? |
|
|
| The original annotations were provided by the creators of the source datasets. The harmonized label mapping was created during the dataset preparation process. |
|
|
| #### Personal and Sensitive Information |
|
|
| This dataset contains images of waste objects. It is not intended to contain personal, sensitive, or private information. |
|
|
| However, because the dataset contains real-world images from multiple sources, there is a possibility that some images may include background objects or environmental details. Users should inspect the dataset before using it in privacy-sensitive applications. |
|
|
| ## Bias, Risks, and Limitations |
|
|
| This dataset has several limitations: |
|
|
| 1. **Source bias** |
| The dataset combines images from different sources. Each source may have different image styles, backgrounds, camera qualities, object positions, and lighting conditions. |
|
|
| 2. **Background bias** |
| Some images may contain clean or artificial backgrounds, while others may contain more realistic environments. A model trained on this dataset may learn background patterns instead of only learning the waste object. |
|
|
| 3. **Label noise** |
| Some images may contain multiple objects, unclear objects, damaged waste items, or objects made of mixed materials. In such cases, a single label may not fully describe the image. |
|
|
| 4. **Limited taxonomy** |
| The dataset only contains six broad classes. It does not distinguish between more specific waste categories such as organic waste, batteries, electronics, hazardous materials, or different plastic types. |
|
|
| 5. **Near-duplicate images** |
| Since the dataset was created from multiple sources, there may be duplicate or near-duplicate images. Users should perform duplicate detection if they need a strict evaluation setup. |
|
|
| 6. **Real-world generalization** |
| Good performance on this dataset does not guarantee good performance in real recycling facilities or outdoor waste-detection scenarios. |
|
|
| ### Recommendations |
|
|
| Users should evaluate models with more than accuracy alone. Recommended metrics include: |
|
|
| * macro F1-score |
| * per-class precision |
| * per-class recall |
| * confusion matrix |
| * validation loss |
| * test loss |
|
|
| Macro F1-score is especially recommended because each waste class should be treated equally. |
|
|
| For stronger evaluation, users should consider source-aware testing. For example, they can train on some source datasets and test on a different source dataset to measure domain generalization. |
| **APA:** |
|
|
| Lavassani, A. (2026). *Waste Classification Harmonized Dataset*. Hugging Face. |
|
|
| ## Glossary |
|
|
| **Harmonization** |
| The process of mapping labels from different datasets into one shared label structure. |
|
|
| **Source dataset** |
| The original dataset from which an image was taken. |
|
|
| **Original label** |
| The label assigned to the image in its original dataset before harmonization. |
|
|
| **Image context** |
| Metadata describing the visual context or source-specific image condition, such as real-world or default images. |
|
|
| **Macro F1-score** |
| An evaluation metric that calculates the F1-score for each class separately and then averages them equally. This is useful when all classes are important. |
|
|
| ## More Information |
|
|
| This dataset was created as part of a machine learning project for waste image classification. The project focuses on dataset harmonization, model comparison, transfer learning, and fine-tuning pretrained computer vision models. |
|
|