liamchalcroft commited on
Commit
c35d314
·
verified ·
1 Parent(s): b08521b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +123 -71
README.md CHANGED
@@ -1,73 +1,125 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: dataset_name
7
- dtype: string
8
- - name: subject_id
9
- dtype: string
10
- - name: modality
11
- dtype: string
12
- - name: orientation
13
- dtype: string
14
- - name: diagnosis
15
- dtype: string
16
- - name: pathology_subtype
17
- dtype: string
18
- - name: lesion_type
19
- dtype: string
20
- - name: lesion_grade
21
- dtype: float32
22
- - name: lesion_count
23
- dtype: int32
24
- - name: has_pathology
25
- dtype: bool
26
- - name: patient_age
27
- dtype: float32
28
- - name: patient_sex
29
- dtype: string
30
- - name: field_strength
31
- dtype: string
32
- - name: manufacturer
33
- dtype: string
34
- - name: scanner_model
35
- dtype: string
36
- - name: repetition_time
37
- dtype: float32
38
- - name: echo_time
39
- dtype: float32
40
- - name: flip_angle
41
- dtype: float32
42
- - name: primary_lesion_hemisphere
43
- dtype: string
44
- - name: primary_lesion_location
45
- dtype: string
46
- - name: secondary_lesion_hemisphere
47
- dtype: string
48
- - name: secondary_lesion_location
49
- dtype: string
50
- - name: bounding_boxes
51
- dtype: string
52
- - name: total_lesion_voxels
53
- dtype: int32
54
- - name: has_enhancing_tumor
55
- dtype: bool
56
- - name: has_flair_hyperintensity
57
- dtype: bool
58
- - name: has_necrotic_core
59
- dtype: bool
60
- - name: has_resection_cavity
61
- dtype: bool
62
- splits:
63
- - name: train
64
- num_bytes: 1681105729.399
65
- num_examples: 134201
66
- download_size: 1625827790
67
- dataset_size: 1681105729.399
68
- configs:
69
- - config_name: default
70
- data_files:
71
- - split: train
72
- path: data/train-*
73
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - medical
6
+ - brain
7
+ - mri
8
+ - neuroimaging
9
+ - pathology
10
+ - object-detection
11
+ - bounding-boxes
12
+ - vision-language
13
+ - multimodal
14
+ - fine-tuning
15
+ task_categories:
16
+ - object-detection
17
+ - image-to-text
18
+ - visual-question-answering
19
+ modality:
20
+ - image
21
+ - text
22
+ size_categories:
23
+ - 100K<n<1M
24
+ pretty_name: BrainBox
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  ---
26
+
27
+ # BrainBox
28
+
29
+ A unified medical imaging dataset containing 134,201 brain MRI slices with bounding box annotations, designed for fine-tuning vision-language models (VLMs) on medical image localization tasks.
30
+
31
+ ## Dataset Summary
32
+
33
+ BrainBox consolidates multiple 2D and 3D medical imaging datasets into a standardized 2D format optimized for VLM training. Each image is paired with structured metadata and precise bounding box annotations for pathological findings.
34
+
35
+ - **Total Images**: 134,201 2D MRI slices
36
+ - **Source Datasets**: 8 publicly available medical imaging datasets
37
+ - **Modalities**: T1w, T1c, T2w, FLAIR, DWI, ADC, TRACE
38
+ - **Orientations**: Axial, Coronal, Sagittal
39
+ - **Pathologies**: Stroke (68,136), Glioma (57,964), Meningioma (4,168), Pituitary Adenoma (3,933)
40
+
41
+ ## Dataset Purpose
42
+
43
+ This dataset serves as a fine-tuning corpus for vision-language models to perform:
44
+ - Medical image interpretation and localization
45
+ - Pathology detection with spatial grounding
46
+ - Multimodal medical question answering
47
+ - Cross-modal medical image understanding
48
+
49
+ ## Data Processing
50
+
51
+ - **3D to 2D Conversion**: 3D volumes converted to optimal 2D slices using intelligent slice selection
52
+ - **Standardization**: Unified schema across heterogeneous source datasets
53
+ - **Quality Control**: Verified image paths and validated bounding box annotations
54
+ - **Format**: JPG images (256×256) with JSON bounding box metadata
55
+
56
+ ## Usage
57
+
58
+ ```python
59
+ from datasets import load_dataset
60
+ import json
61
+
62
+ dataset = load_dataset("liamchalcroft/brainbox")
63
+
64
+ # Example: Load an image with its annotations
65
+ sample = dataset["train"][0]
66
+ image = sample["image"]
67
+ diagnosis = sample["diagnosis"]
68
+ bboxes = json.loads(sample["bounding_boxes"]) # Parse JSON string
69
+ ```
70
+
71
+ ## Schema
72
+
73
+ | Field | Type | Description |
74
+ |-------|------|-------------|
75
+ | `image` | Image | 2D MRI slice (JPG format) |
76
+ | `diagnosis` | string | Primary medical diagnosis |
77
+ | `pathology_subtype` | string | Specific pathology classification |
78
+ | `lesion_type` | string | General lesion category (neoplasm/vascular_lesion) |
79
+ | `bounding_boxes` | string | JSON array of lesion bounding boxes |
80
+ | `modality` | string | MRI sequence type |
81
+ | `orientation` | string | Slice orientation |
82
+ | `has_pathology` | bool | Presence of pathological findings |
83
+ | `subject_id` | string | Anonymized subject identifier |
84
+ | Additional fields | - | Demographics, imaging parameters, anatomical locations |
85
+
86
+ ## Bounding Box Format
87
+
88
+ ```json
89
+ [
90
+ {
91
+ "x_min": 128, "y_min": 62,
92
+ "x_max": 139, "y_max": 66,
93
+ "width": 11, "height": 4, "area": 44
94
+ }
95
+ ]
96
+ ```
97
+
98
+ ## Applications
99
+
100
+ - **VLM Fine-tuning**: Train vision-language models for medical image understanding
101
+ - **Object Detection**: Develop pathology localization models
102
+ - **Medical AI**: Build diagnostic assistance systems
103
+ - **Research**: Cross-modal medical image analysis studies
104
+
105
+ ## Data Distribution
106
+
107
+ - **Vascular Lesions**: 68,136 images (acute, chronic, subacute stroke)
108
+ - **Neoplasms**: 66,065 images (glioma, meningioma, pituitary adenoma)
109
+ - **Balanced Orientations**: ~33% each (axial, coronal, sagittal)
110
+ - **Multi-modal**: 7 MRI sequence types
111
+
112
+ ## Limitations
113
+
114
+ - Converted to 2D format (original 3D context reduced)
115
+ - Heterogeneous source data quality
116
+ - Limited demographic metadata coverage
117
+ - Bounding boxes simplified from original segmentation masks
118
+
119
+ ## Citation
120
+
121
+ If you use this dataset, please cite the original source datasets. This is a processed compilation for VLM research purposes.
122
+
123
+ ## License
124
+
125
+ Individual source datasets retain their original licenses. Verify licensing terms for your specific use case.