Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    ValueError
Message:      Invalid string class label skin_segment@612918f6cb5ab439f5dc4ca2e442121b8cffc563
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 274, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3074, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2591, in __iter__
                  example = _apply_feature_types_on_example(
                      example, self.features, token_per_repo_id=self.token_per_repo_id
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2508, in _apply_feature_types_on_example
                  encoded_example = features.encode_example(example)
                File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 2252, in encode_example
                  return encode_nested_example(self, example)
                File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1526, in encode_nested_example
                  {k: encode_nested_example(schema[k], obj.get(k), level=level + 1) for k in schema}
                      ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1549, in encode_nested_example
                  return schema.encode_example(obj) if obj is not None else None
                         ~~~~~~~~~~~~~~~~~~~~~^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1210, in encode_example
                  example_data = self.str2int(example_data)
                File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1147, in str2int
                  output = [self._strval2int(value) for value in values]
                            ~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1168, in _strval2int
                  raise ValueError(f"Invalid string class label {value}")
              ValueError: Invalid string class label skin_segment@612918f6cb5ab439f5dc4ca2e442121b8cffc563

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.

Skin Segmentation: combined dataset (48,794 image/mask pairs)

Image and binary skin-mask pairs for training skin segmentation models. The data combines four public sources, re-split into train and val. It is shared as one archive, skin_segment.zip (about 4.1 GB).

Contents

skin_segment/
├── train_input/    47,066 RGB images (.jpg)
├── train_output/   47,066 skin masks  (.jpg, same filename as the input)
├── val_input/       1,728 RGB images (.jpg)
└── val_output/      1,728 skin masks  (.jpg, same filename as the input)
  • Each mask has the same filename and pixel size as its image. White means skin and black means non-skin.
  • Masks are saved as 3-channel JPEG, so their edges have compression artifacts. Threshold them before use, for example with mask = (np.array(Image.open(p).convert("L")) > 127).

Sources

The filename prefix identifies the source of each pair.

Filename pattern Source Train Val Total Typical size
<32-hex-char>.jpg Fashion / full-body people photos, believed to be from Fashionpedia (iMaterialist-Fashion). See the note below. 44,783 1,157 45,940 ~682×1024
dataset_1_*_hgr1_idNN_N.jpg HGR1, the hand gesture recognition database (Silesian University of Technology) 717 182 899 174×131 to 640×480
dataset_2_NNNN.jpg TDSD, the skin detection test set of Zhu et al. (2004) 432 123 555 varied
dataset_3_NNNN.jpg Abdominal Skin Dataset (Topiwala et al., 2019) 1,134 266 1,400 227×227
Total 47,066 1,728 48,794

The HGR1, TDSD and abdominal subsets match the Dataset1_HGR, Dataset2_TDSD and Dataset8_Abdomen sets bundled by the abd-skin-segmentation project.

About the 32-hex-character subset. These files were not shipped with provenance metadata. The source is inferred from three facts: the filename format, the content (fashion photos at roughly 682×1024), and the split sizes, since the 1,157 validation images closely match Fashionpedia's 1,158-image validation split. Fashionpedia annotates garments, not skin, so these skin masks were derived separately and are not the original annotations. Spot checks found some masks that label clothing, such as trousers, as skin. Treat this subset as noisier than the three hand-annotated skin datasets.

Usage

from huggingface_hub import hf_hub_download
import zipfile

path = hf_hub_download("athosTheGiant/skin_segment", "skin_segment.zip", repo_type="dataset")
zipfile.ZipFile(path).extractall(".")
from pathlib import Path
import numpy as np
from PIL import Image

root = Path("skin_segment")
for img_path in sorted((root / "train_input").glob("*.jpg"))[:5]:
    image = Image.open(img_path).convert("RGB")
    mask = np.array(Image.open(root / "train_output" / img_path.name).convert("L")) > 127
    print(img_path.name, image.size, mask.mean())

License and terms of use

This is a redistribution of third-party data, and each subset keeps the terms of its original source:

  • HGR: "free to use for research, non-commercial purposes, provided that the following papers are cited" (see the HGR citations below).
  • TDSD: academic dataset, provided for research use.
  • Abdominal Skin Dataset: released with the Apache-2.0-licensed abd-skin-segmentation repository. Its authors ask that the paper be cited.
  • Fashionpedia: annotations are under CC BY 4.0. The images come from the web and remain subject to their original owners' rights.

Because of the HGR terms, use the combined dataset for non-commercial research only. If you are a rights holder and want content removed, please open a discussion on this repository.

Citation

If you use this data, please cite the original sources.

Abdominal Skin Dataset

@inproceedings{topiwala2019adaptation,
  author       = {Topiwala, Anirudh and Al-Zogbi, Lidia and Fleiter, Thorsten and Krieger, Axel},
  title        = {Adaptation and Evaluation of Deep Learning Techniques for Skin Segmentation on Novel Abdominal Dataset},
  booktitle    = {2019 IEEE 19th International Conference on Bioinformatics and Bioengineering (BIBE)},
  pages        = {752--759},
  year         = {2019},
  organization = {IEEE}
}

HGR (all three papers are required by the dataset's terms)

@article{kawulok2014selfadaptive,
  author  = {Kawulok, Michal and Kawulok, Jolanta and Nalepa, Jakub and Smolka, Bogdan},
  title   = {Self-adaptive algorithm for segmenting skin regions},
  journal = {EURASIP Journal on Advances in Signal Processing},
  volume  = {2014},
  number  = {170},
  year    = {2014}
}

@inproceedings{nalepa2014fast,
  author    = {Nalepa, Jakub and Kawulok, Michal},
  title     = {Fast and accurate hand shape classification},
  booktitle = {Beyond Databases, Architectures, and Structures},
  editor    = {Kozielski, S. and Mrozek, D. and Kasprowski, P. and Ma{\l}ysiak-Mrozek, B. and Kostrzewa, D.},
  series    = {Communications in Computer and Information Science},
  volume    = {424},
  pages     = {364--373},
  publisher = {Springer},
  year      = {2014}
}

@article{grzejszczak2016hand,
  author  = {Grzejszczak, Tomasz and Kawulok, Michal and Galuszka, Adam},
  title   = {Hand landmarks detection and localization in color images},
  journal = {Multimedia Tools and Applications},
  volume  = {75},
  number  = {23},
  pages   = {16363--16387},
  year    = {2016}
}

TDSD

@inproceedings{zhu2004adaptive,
  author    = {Zhu, Qiang and Wu, Ching-Tung and Cheng, Kwang-Ting and Wu, Yi-Leh},
  title     = {An adaptive skin model and its application to objectionable image filtering},
  booktitle = {Proceedings of the 12th Annual ACM International Conference on Multimedia},
  pages     = {56--63},
  year      = {2004},
  doi       = {10.1145/1027527.1027538}
}

Fashionpedia

@inproceedings{jia2020fashionpedia,
  author    = {Jia, Menglin and Shi, Mengyun and Sirotenko, Mikhail and Cui, Yin and Cardie, Claire and Hariharan, Bharath and Adam, Hartwig and Belongie, Serge},
  title     = {Fashionpedia: Ontology, Segmentation, and an Attribute Localization Dataset},
  booktitle = {European Conference on Computer Vision (ECCV)},
  year      = {2020}
}

Links

Downloads last month
44