Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot extract the features (columns) for the split 'train' of the config 'default' of the dataset.
Error code:   FeaturesError
Exception:    UnicodeDecodeError
Message:      'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 244, in compute_first_rows_from_streaming_response
                  iterable_dataset = iterable_dataset._resolve_features()
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 4645, in _resolve_features
                  features = _infer_features_from_batch(self.with_format(None)._head())
                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2866, in _head
                  return next(iter(self.iter(batch_size=n)))
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3073, in iter
                  for key, pa_table in ex_iterable.iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2581, in _iter_arrow
                  yield from self.ex_iterable._iter_arrow()
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/text/text.py", line 98, in _generate_tables
                  batch = f.read(self.config.chunksize)
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/file_utils.py", line 838, in read_with_retries
                  out = read(*args, **kwargs)
                File "<frozen codecs>", line 325, in decode
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

CLICK Trash Dataset

Real litter, real ground, real clutter. 1,126 outdoor photos, 2,213 polygon-labelled pieces of trash, shipped in YOLO and COCO formats with two label spaces: a single trash class for litter detection and 13 material classes for trash type detection.

Every mask was first proposed by Segment Anything Model 3 (SAM 3) by Meta AI and then checked and corrected by hand in Label Studio. No annotation in this release is unreviewed model output.


What is CLICK?

CLICK is an image dataset for detecting litter where it actually lies: on soil, in leaf litter, in grass, on gravel and along paths, photographed outdoors with a phone in natural light. Every piece of trash in every photo is outlined with a polygon, so the dataset supports both object detection (boxes) and instance segmentation (masks).

The same photos and polygons are shipped with two label spaces, packed together so that no photo is stored twice:

Single class Multi class
Question answered Is this object trash? Is this object trash, and what is it made of?
Classes 1, trash 13, Plastic Packet, Plastic Bottle, Paper Pack, ...
Use it for General litter detectors, clean-up robots, coverage mapping Material-aware sorting, recycling analytics, fine-grained benchmarks
Labels live in single class/ multi class/
Images and split shared images/, train / val / test shared images/, identical train / val / test

Because the split and the polygons are identical, a model trained on the single-class labels can be fine-tuned on the multi-class labels, and results on the two can be compared image for image.


Annotation pipeline: SAM 3 + Label Studio

  1. Assisted segmentation. Segment Anything Model 3 (SAM 3) by Meta AI proposed pixel-accurate masks for the litter in each photo. The masks were converted to polygon annotations.
  2. Manual verification. Every image was opened in Label Studio and checked by hand: polygon edges corrected, missed objects added, false proposals (leaves, stones, shadows) removed, and each object assigned one of 13 material classes.
  3. Export. A fixed random split (seed 42) was applied once and the reviewed polygons were written out twice, as YOLO boxes and COCO polygons, for the single-class and the multi-class label space.

Why SAM 3 first? Hand-drawing a tight polygon around a crumpled packet takes minutes; SAM 3 gives a consistent, pixel-accurate outline in one click, so human effort goes into checking rather than tracing. Why a full manual pass? Segmentation models do not know what trash is, and no segmentation model can supply the material label.


Dataset statistics

Splits, shared by both label spaces

Split Images Objects Share
train 901 1,802 80 %
val 113 221 10 %
test 112 190 10 %
Total 1,126 2,213 100 %

Images and objects

Objects per image about 2 on average; exactly 1 in 643 images; up to 29
Background images 4 photos with no litter, kept as negatives (empty YOLO file, no COCO annotations)
Resolution high-resolution phone photos, predominantly 3072 x 3072 px
Orientation EXIF rotation baked into the pixels, so labels always match what you see
Scenes soil, leaf litter, grass, gravel and paths; outdoors; natural light
File names trash (1).jpg to trash (1126).jpg, serial, no gaps

Classes

YOLO ids start at 0 and equal the line index in each classes.txt. COCO category ids start at 1.

Single class

YOLO id COCO id Class Train Val Test Total
0 1 trash 1,802 221 190 2,213

Multi class

YOLO id COCO id Class Train Val Test Total Images
0 1 Bottle Cap 12 2 0 14 13
1 2 Cardboard 5 1 5 11 6
2 3 Crumbled Paper 200 18 12 230 142
3 4 Match Box 1 0 0 1 1
4 5 Metal Can 16 1 1 18 17
5 6 Others 16 1 3 20 18
6 7 Paper Cup 68 14 5 87 66
7 8 Paper Pack 261 28 25 314 213
8 9 Plastic Bag 109 17 4 130 97
9 10 Plastic Bottle 198 22 27 247 198
10 11 Plastic Packet 893 114 105 1,112 629
11 12 Silver Foil 21 2 3 26 22
12 13 Slippers 2 1 0 3 3
All 1,802 221 190 2,213 1,122

Long-tail distribution. The balance mirrors what is actually found on the ground: Plastic Packet alone is half of all objects, while Match Box, Slippers, Cardboard and Bottle Cap have fewer than 15 instances each. Four classes have zero instances in at least one split (Bottle Cap and Slippers in test, Match Box in val and test). When training on the multi-class labels, consider class-weighted or focal losses, oversampling of rare classes, merging the rarest classes into Others, and reporting per-class metrics so rare classes are not hidden behind Plastic Packet.


Folder structure

The photos are stored once, in a shared images/ folder split into train, val and test. Each label space is a folder next to it with its own YOLO labels/, COCO annotations/, classes.txt and data.yaml. Every path inside a data.yaml is relative to the folder that contains it (train: ../images/train), with no path: key.

<dataset_root>/
|-- images/                          shared by both label spaces
|   |-- train/   trash (N).jpg       901 images
|   |-- val/                         113 images
|   `-- test/                        112 images
|
|-- single class/                    1 class: trash
|   |-- labels/
|   |   |-- train/   trash (N).txt   YOLO boxes
|   |   |-- val/
|   |   `-- test/
|   |-- annotations/                 COCO instance segmentation
|   |   |-- instances_train.json
|   |   |-- instances_val.json
|   |   `-- instances_test.json
|   |-- classes.txt
|   `-- data.yaml
|
`-- multi class/                     13 classes
    |-- labels/
    |   |-- train/
    |   |-- val/
    |   `-- test/
    |-- annotations/
    |   |-- instances_train.json
    |   |-- instances_val.json
    |   `-- instances_test.json
    |-- classes.txt
    `-- data.yaml

A label file and a COCO entry exist for every image in every split, in both label spaces. trash (N).txt in single class/labels/train/ and in multi class/labels/train/ describe the same boxes on the same photo; only the class ids differ.


Label formats

YOLO, one object per line, class cx cy w h, normalised to 0 to 1:

# single class/labels/train/trash (10).txt
0 0.446125 0.595865 0.072590 0.056970
0 0.473368 0.636447 0.037123 0.030689

# multi class/labels/train/trash (10).txt   (same boxes, 10 = Plastic Packet)
10 0.446125 0.595865 0.072590 0.056970
10 0.473368 0.636447 0.037123 0.030689

COCO, standard instance-segmentation layout with polygon segmentation, bbox as [x, y, w, h] in pixels, polygon area and iscrowd:

{
  "images":      [{"id": 2, "file_name": "trash (10).jpg", "width": 3072, "height": 3072}],
  "annotations": [{"id": 1, "image_id": 2, "category_id": 11,
                   "segmentation": [[1262.0, 1744.0, 1259.0, 1751.0, ...]],
                   "bbox": [1259.0, 1742.99, 223.0, 175.01],
                   "area": 21142.27, "iscrowd": 0}],
  "categories":  [{"id": 1, "name": "Bottle Cap"}, ..., {"id": 13, "name": "Slippers"}]
}

The YOLO box is the tight bounding box of the COCO polygon, so the two formats always agree. COCO file_name values are bare file names; prepend images/<split>/ to locate the file.


Quick start

Set ROOT to the folder where you unpacked the dataset.

Load with pycocotools

from pycocotools.coco import COCO

ROOT = "path/to/dataset"
coco = COCO(f"{ROOT}/multi class/annotations/instances_train.json")
img_dir = f"{ROOT}/images/train"
print(len(coco.getImgIds()), "images,", len(coco.getAnnIds()), "objects")

Train with Ultralytics YOLO

Ultralytics finds labels by replacing images with labels in the image folder's path, so it needs images/ and labels/ side by side. The dataset keeps one shared images/ folder with the labels inside each label space, so build a small working tree of symlinks first. One symlink per file is needed, not per folder: Ultralytics resolves a linked folder to the real photos and would then look for labels next to them. Nothing is copied, so this takes a few seconds. (On Windows, run with symlink permission or copy the files instead.)

import os, glob, yaml

ROOT = "path/to/dataset"
SPACE = "multi class"            # or "single class"
WORK = "click_work"

for split in ("train", "val", "test"):
    for kind, src in (("images", f"{ROOT}/images/{split}"), ("labels", f"{ROOT}/{SPACE}/labels/{split}")):
        dst = f"{WORK}/{kind}/{split}"
        os.makedirs(dst, exist_ok=True)
        for f in glob.glob(f"{src}/*"):
            link = f"{dst}/{os.path.basename(f)}"
            if not os.path.exists(link):
                os.symlink(os.path.abspath(f), link)

cfg = yaml.safe_load(open(f"{ROOT}/{SPACE}/data.yaml"))
cfg.update(path=os.path.abspath(WORK), train="images/train", val="images/val", test="images/test")
yaml.safe_dump(cfg, open(f"{WORK}/data.yaml", "w"))
# pip install ultralytics
from ultralytics import YOLO
YOLO("yolo11n.pt").train(data=f"{WORK}/data.yaml", imgsz=640, epochs=50)

For segmentation training, convert the COCO polygons to YOLO segment labels with ultralytics.data.converter.convert_coco and point labels at the converted folder instead.


Quality checks

Before release the dataset passed the following automated checks, in both label spaces and every split:

  • every image has a matching YOLO label file and a COCO image entry
  • every bounding box lies inside its image, with no degenerate or duplicate boxes
  • every YOLO box and class id matches its COCO polygon and category to within 0.1 % of the image size
  • image pixel dimensions match the width and height stored in COCO
  • the single-class and multi-class files describe the same images, same split and same object geometry

Citation and links

Please cite the DOI when you use CLICK in a paper, a product or a derived dataset:

@dataset{click_trash_2026,
  title     = {CLICK Trash Dataset},
  author    = {Baishya, Manjit},
  year      = {2026},
  version   = {1.0},
  publisher = {Mendeley Data},
  doi       = {10.17632/htcvvz6fm2.1},
  url       = {https://doi.org/10.17632/htcvvz6fm2.1}
}

Found a wrong label or a missed object? Report it with the image name, for example trash (362).jpg, and a short description.


Acknowledgements

  • Segment Anything Model 3 (SAM 3) by Meta AI, for first-pass segmentation proposals
  • Label Studio by HumanSignal, for the manual review and annotation tooling
  • Everyone who photographed litter so that machines can learn to see it

CLICK: you can't clean up what you can't see.

Downloads last month
83