Angelou0516 commited on
Commit
7660893
·
verified ·
1 Parent(s): 1df5a09

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +107 -0
README.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - image-segmentation
5
+ tags:
6
+ - medical
7
+ - MRI
8
+ - brain
9
+ - segmentation
10
+ size_categories:
11
+ - n<1K
12
+ configs:
13
+ - config_name: default
14
+ data_files:
15
+ - split: train
16
+ path: train.jsonl
17
+ ---
18
+
19
+ # BraTS 2023 Sub-Saharan Africa Dataset
20
+
21
+ ## Dataset Description
22
+
23
+ The BraTS 2023 Sub-Saharan Africa dataset for brain tumor segmentation (Sub-Saharan Africa cohort). This dataset contains MRI scans with dense segmentation annotations.
24
+
25
+ ### Dataset Details
26
+
27
+ - **Modality**: MRI
28
+ - **Target**: glioma regions
29
+ - **Format**: NIfTI (.nii.gz)
30
+
31
+ ### Dataset Structure
32
+
33
+ Each sample in the JSONL file contains:
34
+ ```json
35
+ {{
36
+ "modalities": {{
37
+ "t1n": "path/to/t1n.nii.gz",
38
+ "t1c": "path/to/t1c.nii.gz",
39
+ "t2w": "path/to/t2w.nii.gz",
40
+ "t2f": "path/to/t2f.nii.gz"
41
+ }},
42
+ "mask": "path/to/seg.nii.gz",
43
+ "label": ["necrotic brain tumor core", "brain edema", "enhancing brain tumor", "brain tumor"],
44
+ "dataset": "{dataset_name}",
45
+ "official_split": "train",
46
+ "patient_id": "patient_id"
47
+ }}
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ ### Load Metadata
53
+
54
+ ```python
55
+ from datasets import load_dataset
56
+
57
+ # Load the dataset
58
+ ds = load_dataset("Angelou0516/brats2023-ssa")
59
+
60
+ # Access a sample
61
+ sample = ds['train'][0]
62
+ print(f"Patient ID: {sample['patient_id']}")
63
+ print(f"Labels: {sample['label']}")
64
+ ```
65
+
66
+ ### Load Images
67
+
68
+ ```python
69
+ from huggingface_hub import snapshot_download
70
+ import nibabel as nib
71
+ import os
72
+
73
+ # Download the full dataset
74
+ local_path = snapshot_download(
75
+ repo_id="Angelou0516/brats2023-ssa",
76
+ repo_type="dataset"
77
+ )
78
+
79
+ # Load a sample
80
+ sample = ds['train'][0]
81
+ image = nib.load(os.path.join(local_path, sample["modalities"]["t1n"]))
82
+ mask = nib.load(os.path.join(local_path, sample['mask']))
83
+
84
+ # Get numpy arrays
85
+ image_data = image.get_fdata()
86
+ mask_data = mask.get_fdata()
87
+
88
+ print(f"Image shape: {image_data.shape}")
89
+ print(f"Mask shape: {mask_data.shape}")
90
+ ```
91
+
92
+ ## Citation
93
+
94
+ ```bibtex
95
+ @article{brats2023_ssa,
96
+ title={The BraTS 2023 Challenge on Glioma Segmentation in Sub-Saharan Africa},
97
+ year={2023}
98
+ }
99
+ ```
100
+
101
+ ## License
102
+
103
+ CC-BY-4.0
104
+
105
+ ## Dataset Homepage
106
+
107
+ https://www.synapse.org/#!Synapse:syn51156910