pneumonia_mnist
Stay organized with collections
Save and categorize content based on your preferences.
MedMNIST Pneumonia Dataset
The PneumoniaMNIST is based on a prior dataset of 5,856 pediatric chest X-Ray
images. The task is binary-class classification of pneumonia against normal. The
source training set is split with a ratio of 9:1 into training and validation
set, and use its source validation set as the test set. The source images are
gray-scale, and their sizes are (384–2,916) × (127–2,713). The images are
center-cropped with a window size of length of the short edge and resized into 1
× 28 × 28.
Split |
Examples |
'test' |
624 |
'train' |
4,708 |
'val' |
524 |
FeaturesDict({
'image': Image(shape=(28, 28, 1), dtype=uint8),
'label': ClassLabel(shape=(), dtype=int64, num_classes=2),
})
Feature |
Class |
Shape |
Dtype |
Description |
|
FeaturesDict |
|
|
|
image |
Image |
(28, 28, 1) |
uint8 |
|
label |
ClassLabel |
|
int64 |
|

@article{yang2023medmnist,
title={Medmnist v2-a large-scale lightweight benchmark for 2d and 3d biomedical image classification},
author={Yang, Jiancheng and Shi, Rui and Wei, Donglai and Liu, Zequan and Zhao, Lin and Ke, Bilian and Pfister, Hanspeter and Ni, Bingbing},
journal={Scientific Data},
volume={10},
number={1},
pages={41},
year={2023},
publisher={Nature Publishing Group UK London}
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-14 UTC."],[],[],null,["# pneumonia_mnist\n\n\u003cbr /\u003e\n\n- **Description**:\n\nMedMNIST Pneumonia Dataset\n==========================\n\nThe PneumoniaMNIST is based on a prior dataset of 5,856 pediatric chest X-Ray\nimages. The task is binary-class classification of pneumonia against normal. The\nsource training set is split with a ratio of 9:1 into training and validation\nset, and use its source validation set as the test set. The source images are\ngray-scale, and their sizes are (384--2,916) × (127--2,713). The images are\ncenter-cropped with a window size of length of the short edge and resized into 1\n× 28 × 28.\n\n- **Homepage** : \u003chttps://medmnist.com//\u003e\n\n- **Source code** :\n [`tfds.datasets.pneumonia_mnist.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/pneumonia_mnist/pneumonia_mnist_dataset_builder.py)\n\n- **Versions**:\n\n - **`1.0.0`** (default): Initial release.\n- **Download size** : `Unknown size`\n\n- **Dataset size** : `3.66 MiB`\n\n- **Auto-cached**\n ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):\n Yes\n\n- **Splits**:\n\n| Split | Examples |\n|-----------|----------|\n| `'test'` | 624 |\n| `'train'` | 4,708 |\n| `'val'` | 524 |\n\n- **Feature structure**:\n\n FeaturesDict({\n 'image': Image(shape=(28, 28, 1), dtype=uint8),\n 'label': ClassLabel(shape=(), dtype=int64, num_classes=2),\n })\n\n- **Feature documentation**:\n\n| Feature | Class | Shape | Dtype | Description |\n|---------|--------------|-------------|-------|-------------|\n| | FeaturesDict | | | |\n| image | Image | (28, 28, 1) | uint8 | |\n| label | ClassLabel | | int64 | |\n\n- **Supervised keys** (See\n [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):\n `('image', 'label')`\n\n- **Figure**\n ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):\n\n- **Examples** ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):\n\nDisplay examples... \n\n- **Citation**:\n\n @article{yang2023medmnist,\n title={Medmnist v2-a large-scale lightweight benchmark for 2d and 3d biomedical image classification},\n author={Yang, Jiancheng and Shi, Rui and Wei, Donglai and Liu, Zequan and Zhao, Lin and Ke, Bilian and Pfister, Hanspeter and Ni, Bingbing},\n journal={Scientific Data},\n volume={10},\n number={1},\n pages={41},\n year={2023},\n publisher={Nature Publishing Group UK London}\n }"]]