Dataset Viewer
Auto-converted to Parquet Duplicate
cohort
stringclasses
1 value
study_id
stringlengths
16
16
patient_hash
stringlengths
16
16
visit_date
null
eye
stringclasses
1 value
device_vendor
stringclasses
1 value
device_model
stringclasses
1 value
device_serial_hash
null
device_software_version
null
hospital_domain
stringclasses
1 value
ethnicity
stringclasses
1 value
image_quality_score
null
image_quality_band
stringclasses
1 value
diagnosis_group
listlengths
1
1
lesion_tags
listlengths
0
0
lesion_location
listlengths
0
0
layer_involvement
listlengths
0
0
severity
stringclasses
2 values
diagnosis_source
stringclasses
1 value
label_confidence
null
schema_version
stringclasses
1 value
image_id
stringlengths
52
52
file_path
stringlengths
59
59
file_format
stringclasses
1 value
modality
stringclasses
1 value
anatomy
stringclasses
1 value
device_technology
stringclasses
1 value
scan_protocol
stringclasses
1 value
scan_x_mm
null
bscan_index
null
image_height_px
int64
178
1.42k
image_width_px
int64
178
1.42k
axial_resolution_um
null
has_segmentation
bool
1 class
n_layers_visible
int64
0
0
fovea_x_norm
null
crt_um
null
choroid_thickness_um
null
oct_footprint_bbox_fundus
null
oct_footprint_bbox_slo
null
is_valid
bool
1 class
image
unknown
av_mask
null
disc_mask
null
fluid_mask
null
vessel_mask
null
public_acrima_glaucoma
ffb2797a67755d5e
ffb2797a67755d5e
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_ffb2797a67755d5e_fundus_color
public_acrima_glaucoma/ff/ffb2797a67755d5e/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
694
694
null
false
0
null
null
null
null
null
true
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, 6, 6, 6, ...
null
null
null
null
public_acrima_glaucoma
c3707bbb11793e50
c3707bbb11793e50
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_c3707bbb11793e50_fundus_color
public_acrima_glaucoma/c3/c3707bbb11793e50/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
244
244
null
false
0
null
null
null
null
null
true
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, 6, 6, 6, ...
null
null
null
null
public_acrima_glaucoma
82dc57260a35b8e6
82dc57260a35b8e6
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_82dc57260a35b8e6_fundus_color
public_acrima_glaucoma/82/82dc57260a35b8e6/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
421
421
null
false
0
null
null
null
null
null
true
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, 6, 6, 6, ...
null
null
null
null
public_acrima_glaucoma
a5f44fa2e2d319d5
a5f44fa2e2d319d5
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_a5f44fa2e2d319d5_fundus_color
public_acrima_glaucoma/a5/a5f44fa2e2d319d5/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
541
541
null
false
0
null
null
null
null
null
true
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, 6, 6, 6, ...
null
null
null
null
public_acrima_glaucoma
91b384f108b64b25
91b384f108b64b25
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_91b384f108b64b25_fundus_color
public_acrima_glaucoma/91/91b384f108b64b25/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
484
484
null
false
0
null
null
null
null
null
true
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, 6, 6, 6, ...
null
null
null
null
public_acrima_glaucoma
b75c678759632b4c
b75c678759632b4c
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_b75c678759632b4c_fundus_color
public_acrima_glaucoma/b7/b75c678759632b4c/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
286
286
null
false
0
null
null
null
null
null
true
[ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, 6, 6, 6, ...
null
null
null
null
public_acrima_glaucoma
536e37125f9a983e
536e37125f9a983e
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_536e37125f9a983e_fundus_color
public_acrima_glaucoma/53/536e37125f9a983e/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
313
313
null
false
0
null
null
null
null
null
true
"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQo(...TRUNCATED)
null
null
null
null
public_acrima_glaucoma
05166505abad7948
05166505abad7948
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_05166505abad7948_fundus_color
public_acrima_glaucoma/05/05166505abad7948/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
394
394
null
false
0
null
null
null
null
null
true
"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQo(...TRUNCATED)
null
null
null
null
public_acrima_glaucoma
bade9316130694ff
bade9316130694ff
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_bade9316130694ff_fundus_color
public_acrima_glaucoma/ba/bade9316130694ff/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
310
310
null
false
0
null
null
null
null
null
true
"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQo(...TRUNCATED)
null
null
null
null
public_acrima_glaucoma
2e8be33426765ffe
2e8be33426765ffe
null
unknown
unknown
unknown
null
null
public_acrima_glaucoma_v1
unknown
null
unknown
[ "glaucoma" ]
[]
[]
[]
unknown
folder_label
null
v1
public_acrima_glaucoma_2e8be33426765ffe_fundus_color
public_acrima_glaucoma/2e/2e8be33426765ffe/fundus_color.jpg
jpg
fundus_color
optic_disc
fundus_camera
single_shot
null
null
268
268
null
false
0
null
null
null
null
null
true
"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQo(...TRUNCATED)
null
null
null
null
End of preview. Expand in Data Studio

ZJU Eye-Pretrain Dataset

Unified multi-source ophthalmological imaging dataset for foundation model pretraining and downstream tasks.

1.18M images spanning 57 cohorts with a strict 41-column unified manifest schema.

Composition

1,179,458 images · 57 cohorts · 8 modalities, under one strict 41-column unified manifest schema. Stored as HF parquet shards in data/{private_topcon, public_fundus, public_oct, public_new}/; loadable by batch or by single cohort (57 configs, see YAML above).

modality images cohorts
OCT B-scan (oct_bscan) 839,729 22
color fundus (fundus_color) 284,685 28
SLO (slo_gray) 36,027 2
ultra-widefield fundus (uwf_fundus) 13,321 4
OCT-angiography en-face (octa_enface) 1,500 1
en-face OCT (oct_enface) 1,500 1
fluorescein angiography (fluorescein_angiography) 1,376 1
slit-lamp (slit_lamp) 1,320 1

Two cohorts are multi-modal and are counted under each modality they contribute: shanghai_topcon (private; OCT + SLO + fundus) and gamma_multimodal (OCT + fundus). Per-modality cohort counts therefore sum to 60 over 57 unique cohorts.

See DATASET_OVERVIEW.md for per-cohort devices, regions, masks and demographics.

OCT B-scan — 839,729 (22 cohorts)

cohort images cohort images
shanghai_topcon (private) 352,343 srinivasan_2014 3,231
octa500 119,600 aroi 3,072
kermany 109,309 amd_sd 3,049
olives 63,489 rvome_oct 3,012
gamma_multimodal 51,200 mmrdr_oct 2,936
areds2 38,382 octdl 1,877
uestc 35,280 chiu_dme_2015 610
c8 24,000 octid 572
neh_ut_2021 16,810 thoct1800 96
retouch 6,936 glaucoma 49
oimhs 3,859 sparsity_sdoct_2012 17

Color fundus — 284,685 (28 cohorts)

cohort images cohort images
eyepacs_combo_dr_aug 143,668 g1020_glaucoma 1,020
mfiddr_dr 34,452 fives_vessel 800
shanghai_topcon (private) 30,714 acrima_glaucoma 705
brset_multidisease 16,266 origa_glaucoma 650
ddr_dr 12,522 idrid 597
mmrdr_cfp 11,112 papila_glaucoma 488
airogs_glaucoma 9,540 rimone_glaucoma 485
odir_multidisease 6,392 adam_amd 400
lag_glaucoma 4,854 gamma_multimodal 200
rfmid_multidisease 3,200 drishti_glaucoma 101
fgadr_dr 1,842 hrf_vessel 45
messidor2_dr 1,744 stare_vessel 40
deepdrid_dr 1,600 chasedb1_vessel 28
refuge2_disc_cup 1,200 drive_vessel 20

Ultra-widefield fundus — 13,321 (4 cohorts)

cohort images task
mmrdr_uwf 10,388 DR + 7 lesions
uwf_tumor 2,031 retinal tumor
uwf_disease 700 7-class (AMD / DR / PM / RD / RVO / uveitis / normal)
deepdrid_uwf 202 DR grading

SLO — 36,027 (2 cohorts)

Confocal scanning-laser ophthalmoscopy, en-face grayscale (both near-infrared).

  • shanghai_topcon (private) — 35,985 — Topcon DRI OCT Triton near-IR SLO localizer.
  • ravir_av — 42 — Heidelberg Spectralis IR-SLO (815 nm), with artery/vein segmentation masks.

Smaller modalities (1 cohort each)

modality images cohort task
OCT-angiography en-face 1,500 octa500_octa_enface vascular maps (3 depth projections) + FAZ/vessel masks
en-face OCT 1,500 octa500_oct_enface OCT depth projections
fluorescein angiography 1,376 iovs_fa leakage (DME) + late-phase masks
slit-lamp 1,320 nuclear_cataract nuclear cataract

OCT-public quality screen: B-scans with height < 256 px were removed — the nyu_poag cohort entirely (56,576) plus 1,891 sub-256px from thoct1800/octdl.

Quick Start

from datasets import load_dataset, concatenate_datasets, Image

# === Load by batch (4 batches) ===
ds_priv = load_dataset("mayberichard/zju-eye-pretrain", "private_topcon")
ds_fun  = load_dataset("mayberichard/zju-eye-pretrain", "public_fundus")
ds_oct  = load_dataset("mayberichard/zju-eye-pretrain", "public_oct")
ds_new  = load_dataset("mayberichard/zju-eye-pretrain", "public_new")   # 32 cohorts, 8 modalities

# === Load by single cohort (57 available, see configs in YAML above) ===
ds = load_dataset("mayberichard/zju-eye-pretrain", "kermany")    # 109k
ds = load_dataset("mayberichard/zju-eye-pretrain", "octa500")    # 120k

# === IMPORTANT: cast binary columns to Image for auto-decode ===
ds = ds.cast_column("image", Image())
# For cohorts with masks (DRIVE/IDRiD/REFUGE2/AROI/OIMHS/AMD-SD/Chiu/Glaucoma/OCTA500/RETOUCH):
for col in ds["train"].features:
    if col.endswith("_mask") and str(ds["train"].features[col]) == "Value('binary')":
        ds = ds.cast_column(col, Image())

# Each row after cast:
#   image: PIL.Image                                  (auto-decoded)
#   {vessel|fov|layer|lesion|disc_cup|...}_mask: PIL.Image or None
#   image_id, study_id, patient_hash, modality, anatomy, severity, diagnosis_group, ...

# === Concat all 4 batches manually if needed ===
# Note: schemas differ across batches (mask column sets), so use only shared cols:
shared = ["image_id", "cohort", "study_id", "patient_hash", "modality",
          "anatomy", "device_vendor", "device_model", "severity",
          "diagnosis_group", "image", "bscan_index"]
all_ds = concatenate_datasets([
    ds_priv["train"].select_columns(shared).cast_column("image", Image()),
    ds_fun["train"].select_columns(shared).cast_column("image", Image()),
    ds_oct["train"].select_columns(shared).cast_column("image", Image()),
    ds_new["train"].select_columns(shared).cast_column("image", Image()),
])
# 1.18M images total, mask cols dropped (use per-batch load if you need masks)

# === Streaming for big training runs (avoids downloading all ~340 GB) ===
ds = load_dataset("mayberichard/zju-eye-pretrain", "public_oct", streaming=True)
ds = ds.cast_column("image", Image())
for row in ds["train"]:
    img = row["image"]   # PIL Image, lazy-decoded
    ...

Schema (41-column manifest, identical across all batches)

cohort, study_id, patient_hash, visit_date, eye,
device_vendor, device_model, device_serial_hash, device_software_version,
hospital_domain, ethnicity,
image_quality_score, image_quality_band,
diagnosis_group, lesion_tags, lesion_location, layer_involvement, severity,
diagnosis_source, label_confidence, schema_version,
image_id, file_path, file_format,
modality, anatomy, device_technology, scan_protocol,
scan_x_mm, bscan_index,
image_height_px, image_width_px, axial_resolution_um,
has_segmentation, n_layers_visible,
fovea_x_norm, crt_um, choroid_thickness_um,
oct_footprint_bbox_fundus, oct_footprint_bbox_slo,
is_valid

Plus per-image image bytes and per-cohort mask columns.

Captions (v2 — disease/lesion-centric)

Captions were redesigned (2026-06, replacing v1) to be disease/lesion-centric and EyeDiff-style, after early training showed the old metadata-heavy captions hurt prompt-following. Text structure (comma-separated):

{modality}, {region}, {diagnosis[+severity]}, {lesions...}

Each image has 1–3 captions at increasing specificity (level column), de-duplicated:

level example
short OCT B-scan, diabetic macular edema
medium color fundus, moderate non-proliferative diabetic retinopathy
dense OCT B-scan, macula, neovascular age-related macular degeneration, choroidal neovascularization
  • Disease/severity/lesion terms are standardized through a controlled vocabulary (code/disease_dict.py).
  • Acquisition metadata (device, dataset name, quality score, slice index, bbox, µm thickness, eye) is kept out of the prompt — it lives in the image manifest.
  • Training tip: sample one tier per image per step, and replace the caption with "" ~10% of the time for classifier-free guidance (dropout is a loader concern; empty captions are not stored).
  • Private Topcon OCT currently carries only modality, region (no disease label yet) — disease pseudo-labels are pending.

Files in captions/: captions_v2.parquet (private), public_captions_v2.parquet, oct_public_captions_v2.parquet, public_new_captions_v2.parquet, plus per-cohort *_captions_v2.parquet. Total ~2.25M caption rows (100% image coverage; short on every image, medium/dense conditional by modality). Join on image_id.

import pandas as pd
caps = pd.read_parquet("hf://datasets/MaybeRichard/zju-eye-pretrain/captions/oct_public_captions_v2.parquet")
# join on image_id with the images config

Denoising / Super-resolution test set (separate — NOT part of pretraining)

A standalone paired OCT denoising test set lives under denoising_test/, kept separate from the pretraining cohorts (its own config, split=test). It is 1,735 paired 640×640 grayscale OCT B-scans (noisy input ↔ clean target; original .tif bytes). Do not mix it into the pretraining configs.

column type note
id int pair id (1–1735)
noisy bytes noisy OCT B-scan (.tif)
clean bytes clean ground-truth (.tif)
noisy_filename / clean_filename str original names
from datasets import load_dataset
from datasets import Image
ds = load_dataset("MaybeRichard/zju-eye-pretrain", "denoising_test", split="test")
ds = ds.cast_column("noisy", Image()).cast_column("clean", Image())  # PIL decodes the TIFF bytes

Licensing

This dataset aggregates multiple sources with mixed licenses. See LICENSE for per-cohort license terms. Users are responsible for compliance with the original license of each cohort.

Private Shanghai Topcon data is included for research convenience. Commercial use is prohibited.

Citation

If you use this dataset, please cite the original source for each cohort used (see DATASET_OVERVIEW.md).

Versioning & Updates

This dataset supports incremental updates. New cohorts can be added without touching existing data via additional shards in data/<batch>/. Captions were upgraded to v2 (disease/lesion-centric) in 2026-06; the old v1 caption files were replaced.

Quality screening (2026-06): OCT-public images with width or height < 256 px were removed (58,467 imgs): the nyu_poag cohort entirely (56,576, all 64×128), most of thoct1800 (1,704, height 149) and 187 from octdl. A full pure-black scan found 0 (low-mean "dark" frames are normal OCT and were kept). OCT-public is now 18 cohorts / 430,238 images (was 19 / 488,705); private and fundus unchanged.

Downloads last month
1,246