Angelou0516 commited on
Commit
f01855c
·
verified ·
1 Parent(s): e471ad0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +125 -0
README.md ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ task_categories:
4
+ - image-segmentation
5
+ tags:
6
+ - medical
7
+ - MRI
8
+ - prostate
9
+ - segmentation
10
+ - Medical Segmentation Decathlon
11
+ size_categories:
12
+ - n<1K
13
+ configs:
14
+ - config_name: default
15
+ data_files:
16
+ - split: train
17
+ path: train.jsonl
18
+ ---
19
+
20
+ # Medical Segmentation Decathlon: Prostate
21
+
22
+ ## Dataset Description
23
+
24
+ This is the **Prostate** dataset from the Medical Segmentation Decathlon (MSD) challenge. The dataset contains MRI scans with segmentation annotations for prostate segmentation.
25
+
26
+ ### Dataset Details
27
+
28
+ - **Modality**: MRI
29
+ - **Task**: Task05_Prostate
30
+ - **Target**: peripheral zone and transition zone
31
+ - **Format**: NIfTI (.nii.gz)
32
+
33
+ ### Dataset Structure
34
+
35
+ Each sample in the JSONL file contains:
36
+ ```json
37
+ {
38
+ "image": "path/to/image.nii.gz",
39
+ "mask": "path/to/mask.nii.gz",
40
+ "label": ["label1", "label2", ...],
41
+ "modality": "MRI",
42
+ "dataset": "MSD_Prostate",
43
+ "official_split": "train",
44
+ "patient_id": "patient_id"
45
+ }
46
+ ```
47
+
48
+ ### Data Organization
49
+
50
+ ```
51
+ Task05_Prostate/
52
+ ├── imagesTr/ # Training images
53
+ │ └── *.nii.gz
54
+ └── labelsTr/ # Training labels
55
+ └── *.nii.gz
56
+ ```
57
+
58
+ ## Usage
59
+
60
+ ### Load Metadata
61
+
62
+ ```python
63
+ from datasets import load_dataset
64
+
65
+ # Load the dataset
66
+ ds = load_dataset("Angelou0516/msd-prostate")
67
+
68
+ # Access a sample
69
+ sample = ds['train'][0]
70
+ print(f"Image: {sample['image']}")
71
+ print(f"Mask: {sample['mask']}")
72
+ print(f"Labels: {sample['label']}")
73
+ print(f"Modality: {sample['modality']}")
74
+ ```
75
+
76
+ ### Load Images
77
+
78
+ ```python
79
+ from huggingface_hub import snapshot_download
80
+ import nibabel as nib
81
+ import os
82
+
83
+ # Download the full dataset
84
+ local_path = snapshot_download(
85
+ repo_id="Angelou0516/msd-prostate",
86
+ repo_type="dataset"
87
+ )
88
+
89
+ # Load a sample
90
+ sample = ds['train'][0]
91
+ image = nib.load(os.path.join(local_path, sample['image']))
92
+ mask = nib.load(os.path.join(local_path, sample['mask']))
93
+
94
+ # Get numpy arrays
95
+ image_data = image.get_fdata()
96
+ mask_data = mask.get_fdata()
97
+
98
+ print(f"Image shape: {image_data.shape}")
99
+ print(f"Mask shape: {mask_data.shape}")
100
+ ```
101
+
102
+ ## Citation
103
+
104
+ If you use this dataset, please cite the Medical Segmentation Decathlon paper:
105
+
106
+ ```bibtex
107
+ @article{antonelli2022medical,
108
+ title={A large annotated medical image dataset for the development and evaluation of segmentation algorithms},
109
+ author={Antonelli, Michela and Reinke, Annika and Bakas, Spyridon and others},
110
+ journal={Nature Communications},
111
+ volume={13},
112
+ number={1},
113
+ pages={1--13},
114
+ year={2022},
115
+ publisher={Nature Publishing Group}
116
+ }
117
+ ```
118
+
119
+ ## License
120
+
121
+ CC-BY-SA-4.0
122
+
123
+ ## Dataset Homepage
124
+
125
+ http://medicaldecathlon.com/