Dataset Viewer
Auto-converted to Parquet Duplicate
image_id
stringlengths
15
25
split
stringclasses
2 values
image
imagewidth (px)
384
2.84k
patient_id
stringlengths
4
7
diagnosis
stringclasses
4 values
label
int32
0
3
test_CNV-1032178-1
test
1032178
CNV
0
test_CNV-1034361-1
test
1034361
CNV
0
test_CNV-1034361-2
test
1034361
CNV
0
test_CNV-1052341-1
test
1052341
CNV
0
test_CNV-1106195-1
test
1106195
CNV
0
test_CNV-1106195-2
test
1106195
CNV
0
test_CNV-1106195-3
test
1106195
CNV
0
test_CNV-1106195-4
test
1106195
CNV
0
test_CNV-1106195-5
test
1106195
CNV
0
test_CNV-111867-1
test
111867
CNV
0
test_CNV-113353-1
test
113353
CNV
0
test_CNV-114195-1
test
114195
CNV
0
test_CNV-1150304-1
test
1150304
CNV
0
test_CNV-1150304-2
test
1150304
CNV
0
test_CNV-1150304-3
test
1150304
CNV
0
test_CNV-1168253-1
test
1168253
CNV
0
test_CNV-1168253-2
test
1168253
CNV
0
test_CNV-1183551-1
test
1183551
CNV
0
test_CNV-1184009-1
test
1184009
CNV
0
test_CNV-1196958-1
test
1196958
CNV
0
test_CNV-1246827-1
test
1246827
CNV
0
test_CNV-1256555-1
test
1256555
CNV
0
test_CNV-1256555-2
test
1256555
CNV
0
test_CNV-1256555-3
test
1256555
CNV
0
test_CNV-1256555-4
test
1256555
CNV
0
test_CNV-1267238-1
test
1267238
CNV
0
test_CNV-1274352-1
test
1274352
CNV
0
test_CNV-1284842-1
test
1284842
CNV
0
test_CNV-1357213-1
test
1357213
CNV
0
test_CNV-1403844-1
test
1403844
CNV
0
test_CNV-140780-1
test
140780
CNV
0
test_CNV-1408562-1
test
1408562
CNV
0
test_CNV-1408562-2
test
1408562
CNV
0
test_CNV-1417993-1
test
1417993
CNV
0
test_CNV-141997-1
test
141997
CNV
0
test_CNV-146149-1
test
146149
CNV
0
test_CNV-1472343-1
test
1472343
CNV
0
test_CNV-14999-1
test
14999
CNV
0
test_CNV-1512410-1
test
1512410
CNV
0
test_CNV-1532154-1
test
1532154
CNV
0
test_CNV-1569-1
test
1569
CNV
0
test_CNV-1611158-1
test
1611158
CNV
0
test_CNV-1623794-1
test
1623794
CNV
0
test_CNV-185005-1
test
185005
CNV
0
test_CNV-1959070-1
test
1959070
CNV
0
test_CNV-1959070-2
test
1959070
CNV
0
test_CNV-1977730-1
test
1977730
CNV
0
test_CNV-1980154-1
test
1980154
CNV
0
test_CNV-1993564-1
test
1993564
CNV
0
test_CNV-1993564-2
test
1993564
CNV
0
test_CNV-2024133-1
test
2024133
CNV
0
test_CNV-2030911-1
test
2030911
CNV
0
test_CNV-2039445-1
test
2039445
CNV
0
test_CNV-213463-1
test
213463
CNV
0
test_CNV-2144136-1
test
2144136
CNV
0
test_CNV-2224582-1
test
2224582
CNV
0
test_CNV-2244179-1
test
2244179
CNV
0
test_CNV-2325571-1
test
2325571
CNV
0
test_CNV-232670-1
test
232670
CNV
0
test_CNV-232670-2
test
232670
CNV
0
test_CNV-2347105-1
test
2347105
CNV
0
test_CNV-235517-1
test
235517
CNV
0
test_CNV-2377203-1
test
2377203
CNV
0
test_CNV-2405707-1
test
2405707
CNV
0
test_CNV-2415906-1
test
2415906
CNV
0
test_CNV-2419660-1
test
2419660
CNV
0
test_CNV-245643-1
test
245643
CNV
0
test_CNV-245643-2
test
245643
CNV
0
test_CNV-2517469-1
test
2517469
CNV
0
test_CNV-2551230-1
test
2551230
CNV
0
test_CNV-2609465-1
test
2609465
CNV
0
test_CNV-263536-1
test
263536
CNV
0
test_CNV-263536-2
test
263536
CNV
0
test_CNV-26628-1
test
26628
CNV
0
test_CNV-2814646-1
test
2814646
CNV
0
test_CNV-2842256-1
test
2842256
CNV
0
test_CNV-2842256-2
test
2842256
CNV
0
test_CNV-2864619-1
test
2864619
CNV
0
test_CNV-2899654-1
test
2899654
CNV
0
test_CNV-2899654-2
test
2899654
CNV
0
test_CNV-2920004-1
test
2920004
CNV
0
test_CNV-2933154-1
test
2933154
CNV
0
test_CNV-296730-1
test
296730
CNV
0
test_CNV-296730-2
test
296730
CNV
0
test_CNV-296730-3
test
296730
CNV
0
test_CNV-3068462-1
test
3068462
CNV
0
test_CNV-311613-1
test
311613
CNV
0
test_CNV-311613-2
test
311613
CNV
0
test_CNV-3237910-1
test
3237910
CNV
0
test_CNV-3265029-1
test
3265029
CNV
0
test_CNV-3327971-1
test
3327971
CNV
0
test_CNV-3369734-1
test
3369734
CNV
0
test_CNV-3397658-1
test
3397658
CNV
0
test_CNV-3397658-2
test
3397658
CNV
0
test_CNV-346788-1
test
346788
CNV
0
test_CNV-346788-2
test
346788
CNV
0
test_CNV-346788-3
test
346788
CNV
0
test_CNV-346788-4
test
346788
CNV
0
test_CNV-3523174-1
test
3523174
CNV
0
test_CNV-3617684-1
test
3617684
CNV
0
End of preview. Expand in Data Studio

OCT2017 β€” Labeled Retinal Optical Coherence Tomography Images

This dataset card was generated with the help of generative AI and checked against the original sources. If you find an error or anything unclear, please open a discussion in the Community tab of this repository.

This dataset is derived from the OCT part of the "Large Dataset of Labeled Optical Coherence Tomography (OCT) and Chest X-Ray Images" (Kermany et al., 2018), originally hosted on Mendeley Data by the University of California San Diego and the Guangzhou Women and Children's Medical Center. The images are retinal OCT B-scans, validated and labelled into four classes, and were described and analyzed in "Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning" (Cell, 2018). Here, we provide the OCT images only, at their original resolution. We kept the original JPEG images unchanged and added the original train/test split, the patient ID and the diagnosis from the original filenames and folders, and an integer label. The dataset is designed for retinal disease classification. It contains the same source images as OCTMNIST, without the downsampling.

πŸ“¦ Dataset Structure

The dataset has a single train split on the Hub; the original train/test split is kept in the split column. Each row corresponds to a single OCT B-scan:

Field Description
image_id <split>_<original filename without extension> (e.g., train_CNV-1016042-1)
split Original split: train or test
image Retinal OCT B-scan (variable size, JPEG)
patient_id Randomized patient ID from the original filename
diagnosis CNV, DME, DRUSEN or NORMAL
label Integer diagnosis: 0–3 (see Feature Descriptions)

βš™οΈ Preprocessing

  • ZhangLabData.zip was downloaded from Mendeley Data (rscbjbr9sj, version 3), and only the OCT images were kept (the chest X-ray images were not used)
  • Images were kept as the original JPEG files (no re-encoding, resizing, cropping or intensity normalization)
  • diagnosis and patient_id were parsed from the original filenames, which follow (disease)-(randomized patient ID)-(image number by this patient)
  • split was taken from the original train/test folder
  • label is the index of diagnosis in the list CNV, DME, DRUSEN, NORMAL
  • All OCT images were preserved

πŸš€ Usage

from datasets import load_dataset
import matplotlib.pyplot as plt

ds = load_dataset("chehablab/OCT2017", split="train")

# One example image per diagnosis
classes = ["CNV", "DME", "DRUSEN", "NORMAL"]
labels = ds["label"]
fig, axes = plt.subplots(1, len(classes), figsize=(12, 3))
for ax, label in zip(axes, range(len(classes))):
    sample = ds[labels.index(label)]
    ax.imshow(sample["image"], cmap="gray")
    ax.set_title(f"{classes[label]} | patient {sample['patient_id']}")
    ax.axis("off")
plt.tight_layout()
plt.show()

# Original train/test split
train = ds.filter(lambda x: x["split"] == "train")
test = ds.filter(lambda x: x["split"] == "test")
print(f"Train: {len(train)}, test: {len(test)}")

# Check that no patient appears in both splits
shared = set(train["patient_id"]) & set(test["patient_id"])
print(f"Patients in both splits: {len(shared)}")

🏷️ Feature Descriptions

Diagnoses

Four classes:

  • CNV (label=0) β€” Choroidal neovascularization
  • DME (label=1) β€” Diabetic macular edema
  • DRUSEN (label=2) β€” Drusen, deposits under the retina seen in early age-related macular degeneration
  • NORMAL (label=3) β€” Normal retina

Image Specifications

  • Modality: Retinal optical coherence tomography (OCT), cross-sectional B-scans
  • Image size: Variable, JPEG
  • Content: One B-scan per image; several images per patient

πŸ§ͺ Use Cases

  • Multi-class classification of retinal diseases from OCT
  • Referral triage (urgent CNV/DME vs. drusen vs. normal)
  • Transfer learning and benchmarking on retinal imaging
  • Representation learning, feature extraction and self-supervised pretraining for OCT

⚠️ Important Notes

  • Split column: The Hub split is named train, but it contains both original splits. Use the split column to recover the original train and test sets.
  • Several images per patient: If you make your own split, split by patient_id, not by image, to avoid leakage.
  • Class imbalance: Class sizes vary widely. Use weighted sampling or class balancing as needed.
  • Same source as OCTMNIST: Results on this dataset and on OCTMNIST are not independent, since both use the same images.
  • Research use: The original Mendeley description states that the images are made available for use in research only.

πŸ“š Citation

This dataset is derived from data originally published on Mendeley Data under a CC BY 4.0 license. If you use this dataset, please acknowledge Chehab Lab and cite the original dataset:

@misc{Kermany2018OCTData,
  author    = {Kermany, Daniel and Zhang, Kang and Goldbaum, Michael},
  title     = {Large Dataset of Labeled Optical Coherence Tomography (OCT) and Chest X-Ray Images [dataset]},
  year      = {2018},
  publisher = {Mendeley Data},
  version   = {3},
  doi       = {10.17632/rscbjbr9sj.3}
}

Additionally, cite the research paper that introduced this dataset:

@article{Kermany2018OCT,
  author  = {Kermany, Daniel S. and Goldbaum, Michael and Cai, Wenjia and Valentim, Carolina C. S. and Liang, Huiying and Baxter, Sally L. and McKeown, Alex and Yang, Ge and Wu, Xiaokang and Yan, Fangbing and Dong, Justin and Prasadha, Made K. and Pei, Jacqueline and Ting, Magdalene Y. L. and Zhu, Jie and Li, Christina and Hewett, Sierra and Dong, Jason and Ziyar, Ian and Shi, Alexander and Zhang, Runze and Zheng, Lianghong and Hou, Rui and Shi, William and Fu, Xin and Duan, Yaou and Huu, Viet A. N. and Wen, Cindy and Zhang, Edward D. and Zhang, Charlotte L. and Li, Oulan and Wang, Xiaobo and Singer, Michael A. and Sun, Xiaodong and Xu, Jie and Tafreshi, Ali and Lewis, M. Anthony and Xia, Huimin and Zhang, Kang},
  title   = {Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning},
  journal = {Cell},
  volume  = {172},
  number  = {5},
  pages   = {1122--1131.e9},
  year    = {2018},
  doi     = {10.1016/j.cell.2018.02.010}
}

βœ‰οΈ Original Authors

Daniel Kermany, Kang Zhang, Michael Goldbaum
University of California San Diego, USA, and Guangzhou Women and Children's Medical Center, China

Mendeley Data: https://data.mendeley.com/datasets/rscbjbr9sj/3 (original files)

πŸ“œ License

This dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, consistent with the license of the original Mendeley Data record. Note that the original description also states that the images are made available for use in research only.

You may copy, modify, distribute, and use the data, provided that appropriate credit is given to Kermany et al., Mendeley Data, and the original paper.

CC BY 4.0

Chehab Lab @ 2026

Downloads last month
-

Collection including chehablab/OCT2017