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:    ArrowInvalid
Message:      Failed to parse string: 'UBERON:0002114' as a scalar of type double
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
                  return get_rows(
                         ^^^^^^^^^
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/utils.py", line 77, in get_rows
                  rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2543, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2060, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2092, in _iter_arrow
                  pa_table = cast_table_to_features(pa_table, self.features)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2197, in cast_table_to_features
                  arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 1795, in wrapper
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2002, in cast_array_to_feature
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 1797, in wrapper
                  return func(array, *args, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2002, in cast_array_to_feature
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 1797, in wrapper
                  return func(array, *args, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2086, in cast_array_to_feature
                  return array_cast(
                         ^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 1797, in wrapper
                  return func(array, *args, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 1949, in array_cast
                  return array.cast(pa_type)
                         ^^^^^^^^^^^^^^^^^^^
                File "pyarrow/array.pxi", line 1135, in pyarrow.lib.Array.cast
                File "/usr/local/lib/python3.12/site-packages/pyarrow/compute.py", line 412, in cast
                  return call_function("cast", [arr], options, memory_pool)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "pyarrow/_compute.pyx", line 604, in pyarrow._compute.call_function
                File "pyarrow/_compute.pyx", line 399, in pyarrow._compute.Function.call
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: Failed to parse string: 'UBERON:0002114' as a scalar of type double

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.

HPA10M Dataset

A large-scale immunohistochemistry (IHC) image dataset derived from the Human Protein Atlas (HPA, https://www.proteinatlas.org/), containing approximately 10.5 million pathology and tissue images with detailed annotations.

Dataset Overview

Statistic Value
Total Images 10,495,672
Training Set 10,493,672 images (10,497 tar files)
Validation Set 2,000 images (1 tar file)
Image Types Pathology (7,970,595) / Tissue (2,525,077)
Format JPEG images + JSON metadata

Directory Structure

hpa10m/
β”œβ”€β”€ README.md                              # This file
β”œβ”€β”€ example_images/                        # Sample images for preview
β”œβ”€β”€ hpa10m_train/                          # Training data (WebDataset tar files)
β”‚   β”œβ”€β”€ hpa10m_train_0000.tar             # Training shards (10,497 files)
β”‚   β”œβ”€β”€ hpa10m_train_0001.tar
β”‚   β”œβ”€β”€ ...
β”œβ”€β”€ hpa10m_validation/                     # Validation data
β”‚   └── hpa10m_validation.tar              # All validation samples (2,000 images)
└── hpa10m_tar_summary/                    # Metadata index files
    └── all.feather                        # Complete index of all images

Data Format

Tar Archives (WebDataset Format)

Each tar file contains paired .jpg and .json files organized by:

  • Image category: pathology/ or tissue/
  • Gene prefix: Two-letter gene name prefix (e.g., AB/, CD/)

JSON Metadata Structure

Each image has a corresponding JSON file with rich annotations:

{
  "metadata": {
    "height": 3000,
    "width": 3000,
    "name": "image_filename.jpg",
    "format": ".jpg"
  },
  "custom_metadata": {
    "gene": "TEKT3",
    "ensembl_id": "ENSG00000125409",
    "uniprot_id": "Q9BXF9",
    "tissue": "skin cancer",
    "cell_type": "Tumor cells",
    "patient_id": 3354,
    "patient_age": 92,
    "patient_sex": "male",
    "snomed_code": "M-80703;T-01000",
    "snomed_text": "Squamous cell carcinoma, NOS;Skin",
    "staining_intensity": "negative",
    "staining_location": "none",
    "staining_quantity": "none",
    "generic_caption": "Immunohistochemical staining of human skin cancer...",
    "caption_1": "Detailed caption describing the image...",
    "caption_2": "Alternative caption...",
    "url": "http://images.proteinatlas.org/...",
    "bboxes": [[x, y, w, h], ...],
    "rle_mask": "encoded_segmentation_mask",
    "area_px": 3883806,
    "area_fraction": 0.431534
  }
}

Index Files (Feather Format)

The hpa10m_tar_summary/all.feather file contains an index of all images with columns:

Column Description
tar_filename Source tar archive name
split Dataset split (train/validation)
name Full path within tar archive
type Image type (pathology/tissue)
img_offset Byte offset of image in tar
img_size Image file size in bytes
json_offset Byte offset of JSON in tar
json_size JSON file size in bytes

Key Annotations

Clinical Information

  • gene: Gene name (e.g., "TEKT3")
  • ensembl_id: Ensembl gene ID (e.g., "ENSG00000125409")
  • uniprot_id: UniProt protein ID (e.g., "Q9BXF9")
  • tissue: Tissue or cancer type (e.g., "skin cancer")
  • uberon_id: UBERON ontology ID
  • cell_type: Cell type (e.g., "Tumor cells")
  • patient_id: Patient identifier
  • patient_age: Patient age
  • patient_sex: Patient sex ("male" / "female")
  • snomed_code: SNOMED-CT code (e.g., "M-80703;T-01000")
  • snomed_text: SNOMED-CT description (e.g., "Squamous cell carcinoma, NOS;Skin")

Staining Characteristics

  • staining_intensity: "negative", "weak", "moderate", "strong"
  • staining_location: "nuclear", "cytoplasmic/membranous", "cytoplasmic/membranous,nuclear", "none"
  • staining_quantity: "none", "<25%", "25-75%", ">75%"

Segmentation Data

  • bboxes: Bounding boxes in [[x, y, width, height], ...] format
  • rle_mask: Segmentation mask
  • area_px: Segmented area in pixels
  • area_fraction: Fraction of image covered by segmentation

Natural Language Captions

  • generic_caption: Standardized description
  • caption_1: Detailed scientific description
  • caption_2: Alternative description

Other Metadata

  • url: Original image URL from Human Protein Atlas
  • image_md5: MD5 hash of original image
  • file_size_kb: Image file size in KB

Usage

Loading Index with Pandas

import pandas as pd

# Load complete index
df = pd.read_feather("hpa10m_tar_summary/all.feather")

# Filter by split
train_df = df[df["split"] == "train"]
val_df = df[df["split"] == "validation"]

# Filter by image type
pathology_df = df[df["type"] == "pathology"]
tissue_df = df[df["type"] == "tissue"]

Data Source

This dataset is derived from the Human Protein Atlas (https://www.proteinatlas.org/), a comprehensive resource for protein expression in human tissues and cancers.

License

Please refer to the Human Protein Atlas data usage terms at https://www.proteinatlas.org/about/licence for licensing information.

πŸ“§ Contact

For questions or suggestions, please contact: jjnirschl@wisc.edu or zhi.huang@pennmedicine.upenn.edu

Downloads last month
12,412