Datasets:
Upload README.md with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125---license: cc-by-sa-4.0task_categories:- image-segmentationtags:- medical- MRI- prostate- segmentation- Medical Segmentation Decathlonsize_categories:- n<1Kconfigs:- config_name: default data_files: - split: train path: train.jsonl---
# Medical Segmentation Decathlon: Prostate
## Dataset Description
This is the **Prostate** dataset from the Medical Segmentation Decathlon (MSD) challenge. The dataset contains MRI scans with segmentation annotations for prostate segmentation.
### Dataset Details
- **Modality**: MRI- **Task**: Task05_Prostate- **Target**: peripheral zone and transition zone- **Format**: NIfTI (.nii.gz)
### Dataset Structure
Each sample in the JSONL file contains:```json{ "image": "path/to/image.nii.gz", "mask": "path/to/mask.nii.gz", "label": ["label1", "label2", ...], "modality": "MRI", "dataset": "MSD_Prostate", "official_split": "train", "patient_id": "patient_id"}```
### Data Organization
```Task05_Prostate/├── imagesTr/ # Training images│ └── *.nii.gz└── labelsTr/ # Training labels └── *.nii.gz```
## Usage
### Load Metadata
```pythonfrom datasets import load_dataset
# Load the datasetds = load_dataset("Angelou0516/msd-prostate")
# Access a samplesample = ds['train'][0]print(f"Image: {sample['image']}")print(f"Mask: {sample['mask']}")print(f"Labels: {sample['label']}")print(f"Modality: {sample['modality']}")```
### Load Images
```pythonfrom huggingface_hub import snapshot_downloadimport nibabel as nibimport os
# Download the full datasetlocal_path = snapshot_download( repo_id="Angelou0516/msd-prostate", repo_type="dataset")
# Load a samplesample = ds['train'][0]image = nib.load(os.path.join(local_path, sample['image']))mask = nib.load(os.path.join(local_path, sample['mask']))
# Get numpy arraysimage_data = image.get_fdata()mask_data = mask.get_fdata()
print(f"Image shape: {image_data.shape}")print(f"Mask shape: {mask_data.shape}")```
## Citation
If you use this dataset, please cite the Medical Segmentation Decathlon paper:
```bibtex@article{antonelli2022medical, title={A large annotated medical image dataset for the development and evaluation of segmentation algorithms}, author={Antonelli, Michela and Reinke, Annika and Bakas, Spyridon and others}, journal={Nature Communications}, volume={13}, number={1}, pages={1--13}, year={2022}, publisher={Nature Publishing Group}}```
## License
CC-BY-SA-4.0
## Dataset Homepage
http://medicaldecathlon.com/README.mdAdded+125