Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
256
1.02k
End of preview. Expand in Data Studio

SpectralWaste Segmentation → FiftyOne (Grouped RGB + Hyperspectral)

preview

The labeled split of SpectralWaste, rebuilt as a grouped FiftyOne dataset pairing each colour frame with its hyperspectral cube.

The recordings come from a working waste-sorting plant, looking down at the conveyor as material passes. Each frame is captured twice over, once in colour and once by a shortwave infrared camera reading 224 bands from about 900 to 1700 nm. Material that looks identical in colour separates in the infrared, which is what makes the pairing worth having: a black basket against black plastic is nearly invisible in one and obvious in the other.

852 annotated frames from 88 acquisition sessions recorded between 2022-09-28 and 2023-06-09, with six waste categories drawn over them.

Installation

pip install fiftyone

Usage

import fiftyone as fo
import fiftyone.utils.huggingface as fouh

dataset = fouh.load_from_hub(
    "Voxel51/SpectralWaste-Segmentation",
    name="SpectralWaste-Segmentation",
    persistent=True,
)
fo.launch_app(dataset)

The App opens on the colour frames. Switch to the infrared rendering, or pull the frames holding a given category:

dataset.group_slice = "hsi"

view = dataset.match({"classes": "filament"})
fo.launch_app(dataset, view=view)

The cube itself is the third slice, carried as a 224-band TIFF rather than as anything viewable:

import tifffile

dataset.group_slice = "cube"
cube = tifffile.imread(dataset.first().filepath)
print(cube.shape, cube.dtype)  # (224, 256, 256) uint16

What you get

Each sample is a group of three:

  • rgb, the colour frame at 256x256, carrying the drawn segmentation mask as ground_truth
  • hsi, a false-colour rendering of the cube at 256x256, carrying the mask transferred onto it
  • cube, the hyperspectral cube itself, 224 bands of uint16 at 256x256, as a TIFF

The rendering maps three bands to red, green and blue, picked across the sensor's range at roughly 1600, 1250 and 1000 nm and each stretched between its own 2nd and 98th percentile. It exists so the two modalities can be compared by eye; the cube beside it is unchanged from the release.

Every slice of a group carries the same descriptive fields, so a view can filter on any of them: sample_id, sequence_id, recorded, timestamp, split, hsi_bands, classes, num_classes, class_coverage, labeled_fraction and mask_agreement. The split is also a tag.

Split Frames
train 514
validation 167
test 171

Categories

Class Frames Median share of frame Median mask agreement
bag 520 11.2% 0.79
film 259 16.5% 0.81
video_tape 231 2.5% 0.70
basket 209 12.5% 0.75
filament 83 0.7% 0.63
cardboard 47 7.2% 0.85

53 frames carry no foreground at all, which is the belt running empty.

How far the two masks agree

The release draws its annotations on the colour frame and transfers them onto the hyperspectral one rather than labelling the infrared independently. mask_agreement is how much the two foregrounds overlap, so it says how far that transfer held for a given frame. Across the annotated frames it runs 0.69 at the lower quartile, 0.78 at the median and 0.84 at the upper.

It depends almost entirely on how big the object is. On frames holding a single category the median runs 0.81 for bag, 0.84 for film, 0.39 for video_tape, 0.82 for basket, 0.27 for filament, 0.90 for cardboard, and agreement correlates with the share of the frame the annotation covers at 0.44. A few pixels of misalignment costs a thin strand its whole overlap and barely touches a bag, so the transferred mask is dependable for the bulky categories and not for the thin ones.

The field is on every sample, so a view can exclude the frames where the transfer failed:

view = dataset.match({"mask_agreement": {"$gte": 0.7}})

Notes on the conversion

The release ships as WebDataset tar shards. The media is unpacked here so each frame, mask and cube is a file the App and the loader address directly, and the per-frame figures above are computed from the masks rather than carried over.

The source frames and cubes are already aligned and resized to 256x256 by the authors' own preprocessing. Nothing here rescales or re-encodes them.

Only the 852 annotated frames are republished. The release also holds 6,801 unannotated frames, another 201 GB of cubes with nothing to browse or evaluate against; they stay at the source, where the sharded form serves a training loop better than this one would.

The original full-resolution acquisitions are a separate release again. This is the segmentation benchmark, at the resolution the paper's experiments used.

License & attribution

The source dataset is released under CC BY 4.0, and this conversion is distributed under the same license. Attribution is required.

Changes from the source: the WebDataset shards unpacked into per-frame media, a false-colour rendering added for each cube, and the per-frame class coverage and mask agreement computed and carried as fields. The frames, cubes and masks are the release's own bytes.

Citation

@inproceedings{casao2024spectralwaste,
  title     = {{SpectralWaste} Dataset: Multimodal Data for Waste Sorting Automation},
  author    = {Casao, Sara and Pe{\~n}a, Fernando and Sabater, Alberto and Castill{\'o}n, Rosa and Su{\'a}rez, Dar{\'i}o and Montijano, Eduardo and Murillo, Ana C.},
  booktitle = {2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  pages     = {5852--5858},
  year      = {2024},
  doi       = {10.1109/IROS58592.2024.10801797}
}
Downloads last month
185