v2.5.0
Datasets ⭐
EXAMPLE CODE
Chest X-Ray Image Dataset
Load the Chest X-Ray Image dataset in Python with one line of code in seconds and plug it in TensorFlow and PyTorch with Activeloop Hub.
Visualization of the Chest X-ray Image Dataset on the Activeloop Platform.

Chest X-Ray Image Dataset

What is Chest X-Ray Image Dataset?

The Chest X-Ray Image dataset consists of a total of approximately 5856 images. All chest X-ray imagings were chosen from retrospective cohorts of children aged one to five years, and was done as part of the patients' usual clinical treatment. Before being approved to train the AI system, all chest x - rays were first examined for quality control, and diagnoses for the radiographs were assessed by two expert physicians.

Download Chest X-Ray Image Dataset in Python

Instead of downloading the Chest X-Ray Image dataset in Python, you can effortlessly load it in Python via our open-source package Hub with just one line of code.

Load Chest X-Ray Image Dataset Training Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/chest-xray-train')
Copied!

Load Chest X-Ray Image Dataset Testing Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/chest-xray-test')
Copied!

Load Chest X-Ray Image Dataset Validation Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/chest-xray-val')
Copied!

Chest X-Ray Image Dataset Structure

Chest X-Ray Image Data Fields

  • images: tensor containing images of the dataset
  • labels: tensor containing labels that represents the 3 categories, normal, bacterial and viral.
  • person_num: tensor containing the patient number. Note that this data field is available only for images belonging to bacterial and viral categories and is not available for normal category.

Chest X-Ray Image Data Splits

How to use Chest X-Ray Image Dataset with PyTorch and TensorFlow in Python

Train a model on Chest X-Ray Image dataset with PyTorch in Python

Let's use Hub's built-in PyTorch one-line dataloader to connect the data to the compute:
1
dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
Copied!

Train a model on Chest X-Ray Image dataset with TensorFlow in Python

1
dataloader = ds.tensorflow()
Copied!

Additional Information about Chest X-Ray Image Dataset

Chest X-Ray Image Dataset Description

Chest X-Ray Image Dataset Curators

Daniel S. Kermany, Michael Goldbaum, Wenjia Cai, Carolina C.S. Valentim, Huiying Liang, Sally L. Baxter, Alex McKeown, Ge Yang, Xiaokang Wu, Fangbing Yan, Justin Dong, Made K. Prasadha, Jacqueline Pei, Magdalene Y.L. Ting, Jie Zhu, Christina Li, Sierra Hewett, Jason Dong, Ian Ziyar, Alexander Shi, Runze Zhang, Lianghong Zheng, Rui Hou, William Shi, Xin Fu Yaou Duan, Viet A.N. Huu, Cindy Wen, Edward D. Zhang, Charlotte L. Zhang, Oulan Li, Xiaobo Wang, Michael A. Singer, Xiaodong Sun, Jie Xu, Ali Tafreshi, M. Anthony Lewis, Huimin Xia Kang Zhang

Chest X-Ray Image Dataset Licensing Information

CC BY 4.0

Chest X-Ray Image Dataset Citation Information

1
@article{kermany2018identifying,
2
title={Identifying medical diagnoses and treatable diseases by image-based deep learning},
3
author={Kermany, Daniel S and Goldbaum, Michael and Cai, Wenjia and Valentim, Carolina CS and Liang, Huiying and Baxter, Sally L and McKeown, Alex and Yang, Ge and Wu, Xiaokang and Yan, Fangbing and others},
4
journal={Cell},
5
volume={172},
6
number={5},
7
pages={1122--1131},
8
year={2018},
9
publisher={Elsevier}
10
}
Copied!