# ChestX-ray14 (2017)

> 112,120 chest X-rays from 30,805 patients, labeled with 14 findings mined from radiology reports.

Page: https://mralbu.github.io/ai-datasets/d/chestx-ray14

## Key facts

- Category: Vision, Medical
- Task: Multi-label classification of chest X-rays (14 findings)
- Creators: Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, Ronald M. Summers (NIH Clinical Center)
- 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](https://arxiv.org/abs/1705.02315)
- Homepage: https://nihcc.app.box.com/v/ChestXray-NIHCC
- Hugging Face: [timm/nih-chest-xray-14](https://huggingface.co/datasets/timm/nih-chest-xray-14)
- Sampled at Hub revision c1bf579641b3256b4d49924436984b82bee5834d (2026-11-08)

## 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.

## 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.

## Get the data

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.

```bash
# pip install -U huggingface_hub
hf download timm/nih-chest-xray-14 --repo-type dataset \
  --local-dir chestx-ray14
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("timm/nih-chest-xray-14")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/timm/nih-chest-xray-14@~parquet/default/train/*.parquet")
print(df.shape)
```

## Related datasets

- [OpenI (Indiana University)](https://openi.nlm.nih.gov/): 2015, 7,470 X-rays with full reports
- [CheXpert](https://stanfordmlgroup.github.io/competitions/chexpert/): 2019, 224,316 X-rays from Stanford, with uncertainty labels (registration)
- [MIMIC-CXR](https://physionet.org/content/mimic-cxr/): 2019, 377,110 X-rays with reports (credentialed access)
- [PadChest](https://bimcv.cipf.es/bimcv-projects/padchest/): 2019, 160,000 X-rays from Spain, labeled by physicians in part
- [VinDr-CXR](https://vindr.ai/datasets/cxr): 2020, 18,000 X-rays from Vietnam, each read by radiologists
- [ISIC 2018](https://huggingface.co/datasets/MedOtter/ISIC2018): 2018, dermoscopy photos with lesion masks and diagnoses (on this site: https://mralbu.github.io/ai-datasets/d/isic)

## Landmark papers

- [CheXNet: Radiologist-Level Pneumonia Detection on Chest X-Rays with Deep Learning](https://arxiv.org/abs/1711.05225) (2017)
- [Hidden Stratification Causes Clinically Meaningful Failures in Machine Learning for Medical Imaging](https://arxiv.org/abs/1909.12475) (2019)
- [Underdiagnosis bias of artificial intelligence algorithms applied to chest radiographs in under-served patient populations](https://www.nature.com/articles/s41591-021-01595-0) (2021)
