acrobat-patches-v3 / hf_README.md
ahmedayman4a's picture
Upload folder using huggingface_hub
6eb917b verified
metadata
license: cc-by-4.0
task_categories:
  - image-to-image
  - image-segmentation
language: en
tags:
  - pathology
  - breast-cancer
  - virtual-staining
  - ihc
  - h-and-e
  - whole-slide-image
  - acrobat
  - computational-pathology
size_categories:
  - 10M<n<100M
pretty_name: ACROBAT Registered H&E-IHC Patches v3

ACROBAT Registered H&E-IHC Patches v3

H&E-IHC patch pairs extracted from registered ACROBAT whole-slide images. All IHC slides were warped into H&E space by VALIS — patches at the same (x, y) coordinates in HE and IHC are perfectly aligned.

Key Features

  • 205 patients — full ACROBAT breast cancer dataset
  • 9,658 HE patches at 1024×1024 px, 0.92 µm/px (10X)
  • 31K IHC pairs: ER (8,385), PGR (8,453), HER2 (5,543), KI67 (8,439)
  • WSI thumbnails — 512×512 low-res H&E per patient for region-context training
  • WSI dimensions — per-patient for coordinate normalization
  • VALID registration — all IHC slides warped into H&E space
  • Filtered — edge-overlap verification, cross-stain consistency, cellularity ranking
  • HDF5 format with LZF compression

Quick Facts

Property Value
File patches_v3.h5
Size 105 GB
Format HDF5, LZF compression, uint8
Patients 205
Patch size 1024 × 1024 px
Resolution 0.92 µm/px (10X)
Stride 1024 px (non-overlapping)

HDF5 Schema

patches_v3.h5
├── he                    uint8  (9658, 1024, 1024, 3)
├── er                    uint8  (8385, 1024, 1024, 3)
├── pgr                   uint8  (8453, 1024, 1024, 3)
├── her2                  uint8  (5543, 1024, 1024, 3)
├── ki67                  uint8  (8439, 1024, 1024, 3)
├── index/
│   ├── patient_id        int32  (9658,)          patient ID for each HE patch
│   ├── coord_x           int32  (9658,)          H&E level-0 x coordinate
│   ├── coord_y           int32  (9658,)          H&E level-0 y coordinate
│   ├── pair_er           int32  (8385, 2)        [he_idx, er_idx] pairs
│   ├── pair_pgr          int32  (8453, 2)
│   ├── pair_her2         int32  (5543, 2)
│   ├── pair_ki67         int32  (8439, 2)
│   ├── edge_overlap_er   float32 (8385,)
│   ├── edge_overlap_pgr  float32 (8453,)
│   ├── edge_overlap_her2 float32 (5543,)
│   └── edge_overlap_ki67 float32 (8439,)
├── patient_{id}/          (v3) per-patient group
│   ├── thumbnail          uint8  (512, 512, 3)   low-res H&E WSI thumbnail
│   └── .attrs: wsi_width, wsi_height
└── metadata/
    └── created_at         string

Sparse Pairs

Pair arrays are sparse. Not every HE position has an IHC counterpart for every stain. Use pair_{stain}[i, 0] for the HE index and pair_{stain}[i, 1] for the IHC index.

Usage

import h5py
import torch
import numpy as np

with h5py.File("patches_v3.h5", "r") as f:
    # Load ER pairs
    pairs_er = f["index/pair_er"][:]
    he_idx, er_idx = pairs_er[0]

    # Get patches
    he_patch = f["he"][he_idx]        # (1024, 1024, 3) uint8
    er_patch = f["er"][er_idx]        # (1024, 1024, 3) uint8

    # Patient info
    pid = int(f["index/patient_id"][he_idx])
    x, y = f["index/coord_x"][he_idx], f["index/coord_y"][he_idx]

    # Thumbnail (v3)
    thumb = f[f"patient_{pid}/thumbnail"][:]  # (512, 512, 3)
    wsi_w = f[f"patient_{pid}"].attrs["wsi_width"]
    wsi_h = f[f"patient_{pid}"].attrs["wsi_height"]

Content Filtering

Filter Threshold Removes
HE content std >= 15, tissue >= 0.05 Adipose, blank glass
IHC content std >= 8 Blank IHC patches
Edge-overlap Dice >= 0.08 Misregistered IHC
Cross-stain consistency Majority rule Single-stain failures
Per-patient cap 150 top by cellularity Redundant patches
Grid stride 1024 px Non-overlapping grid

Citation

If you use this dataset, please cite the ACROBAT challenge and UNIStainNet:

@inproceedings{weitz2023acrobat,
  title={ACROBAT -- a multi-stain breast cancer dataset for virtual staining},
  author={Weitz, Philippe and others},
  booktitle={MICCAI},
  year={2023}
}