KRMayD commited on
Commit
b05f957
·
verified ·
1 Parent(s): 28e802f

Update dataset README

Browse files
Files changed (1) hide show
  1. README.md +202 -3
README.md CHANGED
@@ -1,3 +1,202 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Brain MRI Dataset with Tumor Masks and Coarse Captions
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - image-segmentation
7
+ - image-to-text
8
+ tags:
9
+ - medical-imaging
10
+ - brain-mri
11
+ - tumor-segmentation
12
+ - segmentation-masks
13
+ - image-captioning
14
+ - radiology
15
+ size_categories:
16
+ - 10K<n<100K
17
+ configs:
18
+ - config_name: caption_pairs
19
+ data_files:
20
+ - split: train
21
+ path: brain_mri_positive_caption_pairs.csv
22
+ ---
23
+
24
+ # Brain MRI Dataset with Tumor Masks and Coarse Captions
25
+
26
+ ## Dataset Summary
27
+
28
+ This dataset is a curated collection of 2D brain MRI images paired with tumor segmentation masks and positive coarse captions. It was assembled for medical vision-language and segmentation experiments, especially tasks that require linking an MRI image, its lesion mask, and a text description of the visible tumor morphology.
29
+
30
+ Each row in the main CSV file contains:
31
+
32
+ - an image path,
33
+ - a corresponding tumor mask path,
34
+ - a positive caption derived from the `coarse_description` field in the MM-NeuroOnco metadata.
35
+
36
+ The positive captions describe coarse tumor-related attributes such as tumor type, modality, approximate location, size, shape, and spread pattern when available.
37
+
38
+ ## Main Annotation File
39
+
40
+ The main index file is:
41
+
42
+ ```text
43
+ brain_mri_positive_caption_pairs.csv
44
+ ```
45
+
46
+ It has the following columns:
47
+
48
+ | Column | Description |
49
+ |---|---|
50
+ | `image_path` | Relative path to the MRI image. Paths start with `Brain MRI DATASET/`. |
51
+ | `mask_path` | Relative path to the corresponding tumor segmentation mask. Paths start with `Brain MRI DATASET/`. |
52
+ | `caption` | Positive coarse caption for the image, extracted from MM-NeuroOnco `coarse_description`. |
53
+
54
+ The dataset contains 22,150 image-mask-caption rows. No missing caption mappings were found during CSV generation.
55
+
56
+ ## Data Composition
57
+
58
+ | Source folder | Number of image-mask-caption pairs |
59
+ |---|---:|
60
+ | `BRISC2025_segmentation` | 4,793 |
61
+ | `BraTS16_MMNeuroOnco` | 5,000 |
62
+ | `Brain_Tumor_Classification_2D_masked` | 3,166 |
63
+ | `Figshare_from_mat_all` | 3,064 |
64
+ | `MMNeuroOnco_tumor_14_t1ce_mask` | 3,064 |
65
+ | `MMNeuroOnco_tumor_19_mask` | 3,063 |
66
+ | **Total** | **22,150** |
67
+
68
+ ## Folder Structure
69
+
70
+ ```text
71
+ Brain MRI DATASET/
72
+ brain_mri_positive_caption_pairs.csv
73
+ brain_mri_positive_caption_pairs_report.txt
74
+ README.md
75
+
76
+ BRISC2025_segmentation/
77
+ train/
78
+ images/
79
+ masks/
80
+ test/
81
+ images/
82
+ masks/
83
+
84
+ BraTS16_MMNeuroOnco/
85
+ 16_t1_t2_t1ce_flair_mask/
86
+ BraTS2021_*/
87
+ *_flair.png
88
+ *_t1.png
89
+ *_t1ce.png
90
+ *_t2.png
91
+ *_seg.png
92
+
93
+ Brain_Tumor_Classification_2D_masked/
94
+ images/
95
+ Astrocytoma/
96
+ Glioblastoma/
97
+ Gliomas/
98
+ Meningioma/
99
+ Neurocytoma/
100
+ masks/
101
+ Astrocytoma/
102
+ Glioblastoma/
103
+ Gliomas/
104
+ Meningioma/
105
+ Neurocytoma/
106
+
107
+ Figshare_from_mat_all/
108
+ images/
109
+ masks/
110
+
111
+ MMNeuroOnco_tumor_14_t1ce_mask/
112
+ images/
113
+ masks/
114
+
115
+ MMNeuroOnco_tumor_19_mask/
116
+ images/
117
+ masks/
118
+ ```
119
+
120
+ ## Caption Construction
121
+
122
+ Captions were not newly generated from scratch for this dataset. Instead, they were mapped from the MM-NeuroOnco metadata file:
123
+
124
+ ```text
125
+ MM-NeuroOnco-Images/metadata/Dataset_For_LLM_Step1.json
126
+ ```
127
+
128
+ For each image, the corresponding metadata entry was located and its `coarse_description` field was used as the positive caption.
129
+
130
+ Example caption:
131
+
132
+ ```text
133
+ A T1 brain MRI scan showing signs of Glioma. The mass is large/extensive and located in the center of the image. It presents as a lobulated structure and appears as a solitary lesion.
134
+ ```
135
+
136
+ ## Mapping Rules
137
+
138
+ The CSV was generated by matching local image files to their corresponding MM-NeuroOnco metadata entries. The following mapping rules were used:
139
+
140
+ | Local subset | Metadata mapping rule |
141
+ |---|---|
142
+ | `BRISC2025_segmentation` | Matched to `tumor/05_t1_mask/<same_filename>` |
143
+ | `BraTS16_MMNeuroOnco` | Matched to `glioma/16_t1_t2_t1ce_flair_mask/<case>/<modality_image>` |
144
+ | `MMNeuroOnco_tumor_14_t1ce_mask` | Matched to `tumor/14_t1ce_mask/<index>.png` |
145
+ | `Figshare_from_mat_all` | Matched to the same numbered entries as `tumor/14_t1ce_mask/<index>.png` |
146
+ | `MMNeuroOnco_tumor_19_mask` | Matched to `tumor/19_mask/images/<same_filename>` |
147
+ | `Brain_Tumor_Classification_2D_masked` | Matched to source-10 MM-NeuroOnco metadata by tumor class and filename |
148
+
149
+ A generation report is included here:
150
+
151
+ ```text
152
+ brain_mri_positive_caption_pairs_report.txt
153
+ ```
154
+
155
+ It records the final row count and confirms that the number of missing caption mappings is zero.
156
+
157
+ ## Intended Uses
158
+
159
+ This dataset is intended for research experiments such as:
160
+
161
+ - tumor segmentation from brain MRI images,
162
+ - vision-language alignment using image-mask-caption triples,
163
+ - DPO or preference-learning experiments with medical image-text pairs,
164
+ - weakly supervised or prompt-guided segmentation,
165
+ - evaluation of whether visual encoders preserve lesion-relevant information.
166
+
167
+ ## Example Usage
168
+
169
+ ```python
170
+ import pandas as pd
171
+ from pathlib import Path
172
+
173
+ repo_root = Path('/path/to/project')
174
+ csv_path = repo_root / 'Brain MRI DATASET' / 'brain_mri_positive_caption_pairs.csv'
175
+
176
+ df = pd.read_csv(csv_path)
177
+
178
+ row = df.iloc[0]
179
+ image_path = repo_root / row['image_path']
180
+ mask_path = repo_root / row['mask_path']
181
+ caption = row['caption']
182
+
183
+ print(image_path)
184
+ print(mask_path)
185
+ print(caption)
186
+ ```
187
+
188
+ ## Notes and Limitations
189
+
190
+ - The captions are coarse descriptions and should not be interpreted as full radiology reports.
191
+ - The captions are positive tumor descriptions derived from metadata, not free-form clinical diagnoses.
192
+ - Some subsets may share the same underlying image content or metadata source, especially the Figshare-derived and MM-NeuroOnco `14_t1ce_mask` subsets.
193
+ - The masks come from the available source annotations or converted source files; mask conventions may differ across subsets.
194
+ - This dataset is intended for research use only and must not be used for clinical decision-making.
195
+
196
+ ## Ethical and Safety Considerations
197
+
198
+ This dataset contains medical imaging data. Models trained on it may produce incorrect, incomplete, or misleading outputs. Any model or analysis built using this dataset should be validated carefully and should not be deployed in clinical settings without appropriate regulatory review, expert validation, and institutional approval.
199
+
200
+ ## Provenance
201
+
202
+ This collection aggregates image-mask pairs prepared from several public or locally reconstructed brain MRI segmentation sources and aligns them with coarse captions from MM-NeuroOnco metadata. Users should review the licensing and usage terms of the original data sources before redistributing or using the dataset in downstream projects.