huggingface / dataset-viewer

Backend that powers the dataset viewer on Hugging Face dataset pages through a public API.
https://huggingface.co/docs/dataset-viewer
Apache License 2.0
688 stars 76 forks source link

Support segmented images #172

Open severo opened 2 years ago

severo commented 2 years ago

Issue proposed by @NielsRogge

eg https://huggingface.co/datasets/scene_parse_150

Capture d’écran 2022-03-04 à 10 56 05

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?

severo commented 2 years ago

Upstream issue in datasets: https://github.com/huggingface/datasets/issues/3838

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

severo commented 9 months ago

Also: see internal Slack thread: https://huggingface.slack.com/archives/C02EK7C3SHW/p1703097195609209