ChestX-ray14 (2017)
112,120 chest X-rays from 30,805 patients, labeled with 14 findings mined from radiology reports.
Why it matters
The first medical imaging dataset on the scale of ImageNet that anyone could download. Instead of paying radiologists to label 100,000 images, the NIH team extracted labels from the existing radiology reports with text mining. Months later, CheXNet (Stanford, 2017) trained on it and claimed radiologist-level pneumonia detection, the start of the "AI will replace radiologists" debate. It also became the standard case study for what goes wrong in medical AI: noisy labels, shortcuts such as chest drains standing in for disease, and models that work less well for some patient groups.
Get the data
# pip install -U huggingface_hub
hf download timm/nih-chest-xray-14 --repo-type dataset \
--local-dir chestx-ray14from datasets import load_dataset # pip install datasets
ds = load_dataset("timm/nih-chest-xray-14")
print(ds)import polars as pl
df = pl.read_parquet("hf://datasets/timm/nih-chest-xray-14@~parquet/default/train/*.parquet")
print(df.shape)A Parquet copy with the official train/test split, labels as lists, patient metadata and the boxes. The original PNGs are on the NIH Box folder.
- Year
- 2017
- Creators
- Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, Ronald M. Summers (NIH Clinical Center)
- Task
- Multi-label classification of chest X-rays (14 findings)
- Size
- 112,120 frontal X-rays (1024×1024), 984 boxes around findings
- Splits
- train 86,524 · test 25,596
- Input
- Frontal chest X-ray, grayscale, 1024×1024 (downscaled here)
- Labels
- Any of 14 findings (atelectasis, cardiomegaly, effusion, pneumonia…) or "No Finding", plus age, sex and view
- License
- Unrestricted use with citation (NIH Clinical Center)
- Paper
- ChestX-ray8: Hospital-scale Chest X-ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases
Samples

No Finding
- Age
- 58
- Sex
- M
- View
- PA
- Patient
- 1803

No Finding
- Age
- 49
- Sex
- F
- View
- PA
- Patient
- 1818

No Finding
- Age
- 21
- Sex
- F
- View
- PA
- Patient
- 17044

EffusionInfiltration
- Age
- 58
- Sex
- M
- View
- PA
- Patient
- 17025

No Finding
- Age
- 7
- Sex
- F
- View
- PA
- Patient
- 1804

EdemaEffusionPneumothorax
- Age
- 15
- Sex
- F
- View
- AP
- Patient
- 28544

Infiltration
- Age
- 35
- Sex
- F
- View
- PA
- Patient
- 1814

Infiltration
- Age
- 59
- Sex
- M
- View
- PA
- Patient
- 28539

No Finding
- Age
- 23
- Sex
- M
- View
- AP
- Patient
- 28583

Infiltration
- Age
- 19
- Sex
- F
- View
- PA
- Patient
- 17044

Cardiomegaly
- Age
- 43
- Sex
- M
- View
- AP
- Patient
- 28537

Nodule
- Age
- 37
- Sex
- F
- View
- PA
- Patient
- 28567

No Finding
- Age
- 19
- Sex
- F
- View
- AP
- Patient
- 17044

Infiltration
- Age
- 63
- Sex
- F
- View
- PA
- Patient
- 1806

AtelectasisConsolidation
- Age
- 62
- Sex
- M
- View
- AP
- Patient
- 17027

EdemaEffusionInfiltration
- Age
- 67
- Sex
- F
- View
- PA
- Patient
- 28579

No Finding
- Age
- 20
- Sex
- F
- View
- PA
- Patient
- 17044

Mass
- Age
- 18
- Sex
- M
- View
- AP
- Patient
- 1808
What one record actually looks like (raw JSON, row 5432)
{
"bboxes": [],
"fold": 0,
"follow_up": 12,
"image": {
"height": 1024,
"src": "samples/chestx-ray14/5432-image.jpg",
"width": 1024
},
"image_id": "00001803_011",
"label_names": [],
"labels": [],
"original_height": 2991,
"original_width": 2992,
"patient_age": 58,
"patient_id": 1803,
"patient_sex": "M",
"pixel_spacing_x": 0.143,
"pixel_spacing_y": 0.143,
"view_position": "PA"
}Media fields point at a local copy; on Hugging Face they are bytes in a Parquet file.
Sampled 2026-11-08 from timm/nih-chest-xray-14 at revision c1bf579
Worth knowing
- Labels come from the reports, not from looking at the image. Checks by radiologists found many of them wrong, for some findings in a large share of cases.
- Pneumothorax is easy to "detect" for the wrong reason, because many positive images already show the chest drain used to treat it.
- The split is by patient, so the same person never appears in both train and test. Many patients have dozens of follow-up images.
- A "No Finding" label means the report mentioned none of the 14 findings, not that the X-ray is normal.
- The dataset was first released with 8 findings as ChestX-ray8, then extended to 14.
Related datasets
- OpenI (Indiana University): 2015, 7,470 X-rays with full reportsopeni.nlm.nih.gov ↗
- CheXpert: 2019, 224,316 X-rays from Stanford, with uncertainty labels (registration)stanfordmlgroup.github.io ↗
- MIMIC-CXR: 2019, 377,110 X-rays with reports (credentialed access)physionet.org ↗
- PadChest: 2019, 160,000 X-rays from Spain, labeled by physicians in partbimcv.cipf.es ↗
- VinDr-CXR: 2020, 18,000 X-rays from Vietnam, each read by radiologistsvindr.ai ↗
- ISIC 2018: 2018, dermoscopy photos with lesion masks and diagnosesHugging Face ↗ISIC 2018 (skin lesions) on this site →
Landmark papers
- CheXNet: Radiologist-Level Pneumonia Detection on Chest X-Rays with Deep Learning (2017)
- Hidden Stratification Causes Clinically Meaningful Failures in Machine Learning for Medical Imaging (2019)
- Underdiagnosis bias of artificial intelligence algorithms applied to chest radiographs in under-served patient populations (2021)