huggingface / huggingface/dataset-viewer
Support segmented images
- Dominant language
- Python
- Stars
- 899
- Forks
- 130
- Avg merge
- 9h 26m
- Merged PRs (30d)
- 14
Description
Issue proposed by @NielsRogge
eg https://huggingface.co/datasets/scene_parse_150

Every pixel in the images of the `annotation` column has a value that gives its class, and the dataset itself is associated with a color palette (eg https://github.com/open-mmlab/mmsegmentation/blob/98a353b674c6052d319e7de4e5bcd65d670fcf84/mmseg/datasets/ade.py#L47) that maps every class with a color.
So we might want to render the image as a colored image instead of a black and white one.
cc @mariosasko: how could I get the color palette information after `load_dataset()`? Is it managed by the `datasets` library?
Contributor guide
Research direction
Start by tracing how the dataset viewer handles the `annotation` column after `load_dataset()` and review the linked scene_parse_150 example and palette reference. Done means segmented images render with class colors rather than black and white, with the source of the palette information clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100