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
[ 0 ]
13
17
61
M
[ 0 ]
13
18
60
M
[ 3, 4, 8 ]
13
19
62
M
[ 0 ]
13
20
62
M
[ 8 ]
13
21
62
M
[ 3 ]
13
22
56
M
[ 4, 5 ]
13
23
57
M
[ 4, 5, 8 ]
13
24
57
M
[ 5 ]
13
25
56
M
[ 2, 4, 5, 6 ]
13
26
57
M
[ 2, 11 ]
13
27
57
M
[ 2, 3, 11, 5 ]
13
28
57
M
[ 2, 3, 11, 5 ]
13
29
57
M
[ 2, 3, 11, 5 ]
13
30
57
M
[ 1, 2, 11, 5, 8 ]
13
31
57
M
[ 11, 5 ]
13
32
57
M
[ 11, 5, 8 ]
13
33
56
M
[ 8 ]
13
34
56
M
[ 11, 8 ]
13
35
56
M
[ 1, 8 ]
13
36
56
M
[ 8 ]
13
37
56
M
[ 2, 11, 8 ]
13
38
56
M
[ 0 ]
13
39
56
M
[ 8 ]
13
40
56
M
[ 2, 11, 8 ]
13
41
56
M
[ 11 ]
13
42
56
M
[ 11 ]
13
43
56
M
[ 5, 13 ]
13
44
56
M
[ 2, 5, 13 ]
13
45
56
M
[ 2 ]
13
46
56
M
[ 4 ]
14
0
61
F
[ 0 ]
15
0
70
M
[ 0 ]
16
0
71
M
[ 0 ]
17
0
77
M
[ 3, 4, 6 ]
17
1
77
M
[ 0 ]
17
2
78
M
[ 0 ]
18
0
75
M
[ 0 ]
19
0
66
M
[ 1, 3, 13 ]
20
0
53
M
[ 13 ]
20
1
47
M
[ 12, 4 ]
20
2
48
M
[ 12, 4, 13 ]
21
0
78
M
[ 6 ]
21
1
80
M
[ 4 ]
22
0
48
M
[ 0 ]
22
1
49
M
[ 12 ]
End of preview. Expand in Data Studio

This dataset is derived from the NIH Chest X-ray Dataset (ChestX-ray14), one of the largest publicly available collections of chest radiographs, released by the NIH Clinical Center. The original collection comprises 112,120 frontal-view chest X-ray images from 30,805 unique patients, collected as part of routine clinical care. Each image was assigned one or more of 14 common thoracic disease labels, text-mined from the associated radiology reports using natural language processing (estimated label accuracy >90%). Here, we provide a Hugging Face ready version of the dataset with patient and scan-level metadata alongside each image.

πŸ“¦ Dataset Structure

Each entry corresponds to a single chest X-ray image:

  • patient_id β†’ Unique identifier for the patient
  • scan_id β†’ Unique identifier for the individual scan/study
  • age β†’ Patient age at time of scan
  • sex β†’ Patient sex
  • labels β†’ One or more of the 14 thoracic disease labels (or "No Finding")
  • image β†’ Frontal-view chest X-ray image

🏷️ Labels / Classes

The labels field contains one or more of the following 14 disease classes, or No Finding if none are present:

Index Class
0 No Finding
1 Atelectasis
2 Cardiomegaly
3 Effusion
4 Infiltration
5 Mass
6 Nodule
7 Pneumonia
8 Pneumothorax
9 Consolidation
10 Edema
11 Emphysema
12 Fibrosis
13 Pleural Thickening
14 Hernia

βš™οΈ Preprocessing

  • Original DICOM/PNG frontal-view X-rays were retained as provided by NIH
  • Patient, scan, and demographic fields were parsed into a flat tabular schema
  • Disease labels were kept as multi-label string fields matching the original NLP-derived annotations
  • Images were resized to 244Γ—244

πŸš€ Usage

from datasets import load_dataset
import matplotlib.pyplot as plt

ds = load_dataset("chehablab/NIHChestXR", split="train")
sample = ds[314]
img = sample["image"]

plt.imshow(img, cmap="gray")
plt.title(f"Patient {sample['patient_id']} | Scan {sample['scan_id']} | Age {sample['age']} | Sex {sample['sex']} | Labels {sample['labels']}")
plt.axis("off")
plt.show()

πŸ“š Citation

If you use this dataset, please acknowledge Chehab Lab and cite the original CVPR 2017 paper:

@inproceedings{Wang_2017,
  doi = {10.1109/cvpr.2017.369},
  url = {https://doi.org/10.1109/cvpr.2017.369},
  year = 2017,
  month = {jul},
  publisher = {IEEE},
  author = {Xiaosong Wang and Yifan Peng and Le Lu and Zhiyong Lu and Mohammadhadi Bagheri and Ronald M. Summers},
  title = {{ChestX}-Ray8: Hospital-Scale Chest X-Ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases},
  booktitle = {2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}
}

Original data download site: https://nihcc.app.box.com/v/ChestXray-NIHCC


πŸ“œ License

This dataset is released under the Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. You may copy, modify, distribute, and use the data, even for commercial purposes, without asking permission.

CC0 1.0

Chehab Lab @ 2026

Downloads last month
54

Collection including chehablab/NIHChestXR