Datasets:
You need to agree to share your Hugging Face information to access this dataset
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
SegPath is released by its authors under CC BY-NC-SA 4.0 for non-commercial use. By requesting access you agree to those terms, to cite the SegPath paper, and to share any derivative under the same licence.
Log in or Sign Up to review the conditions and access this dataset content.
SegPath in the nuclei store format
A faithful conversion of SegPath (Komura and others, 2023) into one store format shared by several histology datasets: images and masks in sharded Zarr, one row per image in Parquet. All 158,687 images are here, at their original 984 px and 0.220818 um/px, in the train, val and test splits as distributed. Every pixel of every image and mask was checked equal to the original PNG files on 03-11-2026. The original data, its licence and its citation requirements are unchanged.
Source and licence
- Source: SegPath, eight Zenodo records, one per antibody, listed below. Each H&E section was restained by immunofluorescence for one antibody, and the thresholded signal became the mask.
- Licence: CC BY-NC-SA 4.0, as stated by each source record. This copy carries the same licence. Commercial use is not allowed. For commercial use, ask the authors, as the records say.
- Cite, as the source asks: Komura, D., Onoyama, T., Shinbo, K., Odaka, H., Hayakawa, M., Ochi, M., Herdiantoputri, R. R., Endo, H., Katoh, H., Ikeda, T., Ushiku, T., Ishikawa, S. (2023). Restaining-based annotation for cancer histology segmentation to overcome annotation-related limitations among pathologists. Patterns, 4(2), 100688. doi:10.1016/j.patter.2023.100688
What changed in the conversion
- Pixels: the H&E PNG files, read as RGB and stored unchanged. No crop and no resampling.
- Masks: the source's binary mask (0 background, 1 target) becomes one
semanticarray, whose value is the cell type's code. The codes are shared by all eight stores, so masks can be stacked. - Each image keeps its split from the source's
train_val_testcolumn. The source's slide ID is kept inslide. - Each image's
annotated_classesnames the one cell type it was tested for. A mask says nothing about the other seven.
Layout
One store per antibody, each laid out as below:
native/segpath_erg/card.json what the dataset is: source, licence, scale and its
evidence, label origin, class names, arrays present
native/segpath_erg/data.zarr Zarr v3, sharded, Zstd level 3, CRC32C checksums
images uint8 (10,647, 3, 984, 984) RGB
semantic uint8 (10,647, 984, 984) 0 background, or the cell type's code
native/segpath_erg/images.parquet one row per image
native/segpath_erg/objects.parquet empty: SegPath has no per-nucleus labels
Images stay at the source's size and scale, and nothing here is cut for an experiment. Each
image's split is in images.parquet. Slicing, resampling, merging classes and joining datasets
happen when an experiment reads the store.
images.parquet columns: image (row number, the index into the arrays), key (the file name
without its ending), height, width, um_per_px, split, patient (not reported), slide,
organ (not reported), group (the slide), annotated_classes, label_origin,
intensity_low and intensity_high (per-channel percentiles), and parent_image, parent_x,
parent_y, parent_scale (empty here: they record where a slice came from when one is built
from this store).
| Store | Antibody | Cell type | Code | train | val | test | Total | Source record |
|---|---|---|---|---|---|---|---|---|
segpath_panck |
panCK | epithelium | 1 | 21,912 | 2,259 | 2,338 | 26,509 | https://zenodo.org/records/7412731 |
segpath_asma |
alpha-SMA | smooth muscle | 2 | 25,748 | 2,489 | 2,941 | 31,178 | https://zenodo.org/records/7412732 |
segpath_cd235a |
CD235a | red blood cell | 3 | 21,595 | 2,224 | 2,090 | 25,909 | https://zenodo.org/records/7412580 |
segpath_cd3cd20 |
CD3 and CD20 | lymphocyte | 4 | 10,453 | 1,082 | 738 | 12,273 | https://zenodo.org/records/7412529 |
segpath_cd45rb |
CD45RB | leukocyte | 5 | 20,518 | 1,988 | 2,299 | 24,805 | https://zenodo.org/records/7412739 |
segpath_erg |
ERG | endothelium | 6 | 9,497 | 613 | 537 | 10,647 | https://zenodo.org/records/7412512 |
segpath_mist1 |
MIST1 | plasma cell | 7 | 11,320 | 947 | 964 | 13,231 | https://zenodo.org/records/7412500 |
segpath_mnda |
MNDA | myeloid cell | 8 | 12,315 | 894 | 926 | 14,135 | https://zenodo.org/records/7412690 |
| All | 133,358 | 12,496 | 12,833 | 158,687 |
Reading the store
With zarr (3.x) and pandas:
import json
import pandas as pd
import zarr
store = "native/segpath_erg"
card = json.load(open(f"{store}/card.json"))
codes = card["declaration"]["semantic_classes"]
root = zarr.open_group(f"{store}/data.zarr", mode="r")
images = pd.read_parquet(f"{store}/images.parquet")
train = images[images["split"] == "train"]
row = train.iloc[0]
image = root["images"][row.image] # (3, 984, 984) uint8
mask = root["semantic"][row.image] # (984, 984) uint8
cell_type = row.annotated_classes[0] # the one type this image was tested for
target = mask == codes.index(cell_type)
Limits
- A mask marks one cell type. A pixel of 0 means not that type, not background of every type.
- The distributed splits share slides: patches of one slide appear in train, val and test.
An evaluation that needs unseen slides must build its own split from
slide. slideholds the antibody, the cell type and a slide number, such asERG_Endothelium_040. Inside one antibody, group byslide. Slide numbers repeat across antibodies, and the source records do not say whether one number is the same tissue in each. Until that is confirmed, group across antibodies by the trailing number, which can only make a split stricter.- Masks come from thresholded immunofluorescence, so they inherit its staining and registration errors. Nothing was corrected.
- Models trained on this data inherit the non-commercial licence.
- Downloads last month
- -