adonlee commited on
Commit
fd768b2
·
verified ·
1 Parent(s): 1fc662a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +156 -157
README.md CHANGED
@@ -1,158 +1,157 @@
1
- # OpenMM-Medical
2
-
3
- ## Introduction
4
-
5
- OpenMM-Medical is a comprehensive large-scale medical evaluation dataset that spans multiple domains, including Magnetic Resonance Imaging (MRI), CT scans, X-rays, microscopy images, endoscopy, fundus imaging, and dermoscopy.
6
- OpenMM-Medical is an integration of existing datasets, comprising a total of 88,996 entries. It is designed to advance the development of multimodal medical large language models within the research community.
7
-
8
- Components | Content | Type | Number | Metrics
9
- | :----: | :----: |:----: | :----: |:----: |
10
- ACRIMA | Fundus Photography | Multiple Choice Question Answering | 159 | Acc
11
- Adam Challenge | Endoscopy | Multiple Choice Question Answering | 87 | Acc
12
- ALL Challenge | Microscopy Images | Multiple Choice Question Answering | 342 | Acc
13
- BioMediTech | Microscopy Images | Multiple Choice Question Answering | 511 | Acc
14
- Blood Cell | Microscopy Images | Multiple Choice Question Answering | 1175 | Acc
15
- BreakHis | Magnetic Resonance Imaging | Multiple Choice Question Answering | 735 | Acc
16
- Chest CT Scan | CT Imaging | Multiple Choice Question Answering | 871 | Acc
17
- Chest X-Ray PA | X-Ray | Multiple Choice Question Answering | 850 | Acc
18
- CoronaHack | X-Ray | Multiple Choice Question Answering | 684 | Acc
19
- Covid CT | CT Imaging | Multiple Choice Question Answering | 199 | Acc
20
- Covid-19 tianchi | X-Ray | Multiple Choice Question Answering | 96 | Acc
21
- Covid19 heywhale | X-Ray | Multiple Choice Question Answering | 690 | Acc
22
- COVIDx CXR-4 | X-Ray | Multiple Choice Question Answering | 485 | Acc
23
- CRC100k | Magnetic Resonance Imaging | Multiple Choice Question Answering | 1322 | Acc
24
- DeepDRiD | Fundus Photography | Multiple Choice Question Answering | 131 | Acc
25
- Diabetic Retinopathy | Fundus Photography | Multiple Choice Question Answering | 2051 | Acc
26
- DRIMDB | Fundus Photography | Multiple Choice Question Answering | 132 | Acc
27
- Fitzpatrick 17k | Dermoscopy | Multiple Choice Question Answering | 1552 | Acc
28
- HuSHeM | Microscopy Images | Multiple Choice Question Answering | 89 | Acc
29
- ISBI2016 | Dermoscopy | Multiple Choice Question Answering | 681 | Acc
30
- ISIC2018 | Dermoscopy | Multiple Choice Question Answering | 272 | Acc
31
- ISIC2019 | Dermoscopy | Multiple Choice Question Answering | 1952 | Acc
32
- ISIC2020 | Dermoscopy | Multiple Choice Question Answering | 1580 | Acc
33
- JSIEC | Fundus Photography | Multiple Choice Question Answering | 220 | Acc
34
- Knee Osteoarthritis | X-Ray | Multiple Choice Question Answering | 518 | Acc
35
- MAlig Lymph | Magnetic Resonance Imaging | Multiple Choice Question Answering | 149 | Acc
36
- MHSMA | Microscopy Images | Multiple Choice Question Answering | 1282 | Acc
37
- MIAS | X-Ray | Multiple Choice Question Answering | 142 | Acc
38
- Monkeypox Skin Image 2022 | Dermoscopy | Multiple Choice Question Answering | 163 | Acc
39
- Mura | X-Ray | Multiple Choice Question Answering | 1464 | Acc
40
- NLM- Malaria Data | Magnetic Resonance Imaging | Multiple Choice Question Answering | 75 | Acc
41
- OCT & X-Ray 2017 | X-Ray, Optical Coherence Tomography | Multiple Choice Question Answering | 1301 | Acc
42
- OLIVES | Fundus Photography | Multiple Choice Question Answering | 593 | Acc
43
- PAD-UFES-20 | Dermoscopy | Multiple Choice Question Answering | 479 | Acc
44
- PALM2019 | Fundus Photography | Multiple Choice Question Answering | 510 | Acc
45
- Pulmonary Chest MC | X-Ray | Multiple Choice Question Answering | 38 | Acc
46
- Pulmonary Chest Shenzhen | X-Ray | Multiple Choice Question Answering | 296 | Acc
47
- RadImageNet | CT; Magnetic Resonance Imaging; Ultrasound | Multiple Choice Question Answering | 56697 | Acc
48
- Retinal OCT-C8 | Optical Coherence Tomography | Multiple Choice Question Answering | 4016 | Acc
49
- RUS CHN | X-Ray | Multiple Choice Question Answering | 1982 | Acc
50
- SARS-CoV-2 CT-scan | CT | Multiple Choice Question Answering | 910 | Acc
51
- Yangxi | Fundus Photography | Multiple Choice Question Answering | 1515 | Acc
52
-
53
- ## Usage
54
-
55
- The following steps detail how to use [**Baichuan-Omni-1.5**](https://github.com/baichuan-inc/Baichuan-Omni-1.5) with OpenMM-Medical for evaluation using [**VLMEvalKit**](https://github.com/open-compass/VLMEvalKit):
56
-
57
- ---
58
-
59
- ### **1. Add `baichuan.py` in `VLMEvalKit/vlmeval/vlm`**
60
-
61
- Download `baichuan.py` (which defines the `Baichuan` model class) and add it in `VLMEvalKit/vlmeval/vlm`.
62
-
63
- ---
64
-
65
- ### **2. Modify `VLMEvalKit/vlmeval/vlm/__init__.py`**
66
- Add the following line:
67
- ```python
68
- from .baichuan import Baichuan
69
- ```
70
-
71
- ---
72
-
73
- ### **3. Modify `VLMEvalKit/vlmeval/config.py`**
74
- Import the `Baichuan` model:
75
- ```python
76
- from vlmeval.vlm import Baichuan
77
- ```
78
-
79
- Add the `Baichuan-omni` model configuration:
80
- ```python
81
- 'Baichuan-omni': partial(
82
- Baichuan,
83
- sft=True,
84
- model_path='/your/path/to/the/model/checkpoint'
85
- )
86
- ```
87
-
88
- ---
89
-
90
- ### **4. Modify `VLMEvalKit/vlmeval/dataset/image_mcq.py`**
91
- Download `image_mcq.py` and add the following code to define the `OpenMMMedical` class. Ensure the `image_folder` points to your OpenMM-Medical dataset location:
92
-
93
- ```python
94
- class OpenMMMedical(ImageMCQDataset):
95
-
96
- @classmethod
97
- def supported_datasets(cls):
98
- return ['OpenMMMedical']
99
-
100
- def load_data(self, dataset='OpenMMMedical'):
101
- image_folder = "/your/path/to/OpenMM_Medical"
102
- def generate_tsv(pth):
103
- import csv
104
- from pathlib import Path
105
- tsv_file_path = os.path.join(LMUDataRoot(), f'{dataset}.tsv')
106
- ...
107
- ```
108
-
109
- ---
110
-
111
- ### **5. Update `VLMEvalKit/vlmeval/dataset/__init__.py`**
112
- Import `OpenMMMedical`:
113
- ```python
114
- from .image_mcq import (
115
- ImageMCQDataset, MMMUDataset, CustomMCQDataset,
116
- MUIRDataset, GMAIMMBenchDataset, MMERealWorld, OpenMMMedical
117
- )
118
-
119
- IMAGE_DATASET = [
120
- ImageCaptionDataset, ImageYORNDataset, ImageMCQDataset, ImageVQADataset,
121
- MathVision, MMMUDataset, OCRBench, MathVista, LLaVABench, MMVet,
122
- MTVQADataset, TableVQABench, MMLongBench, VCRDataset, MMDUDataset,
123
- DUDE, SlideVQA, MUIRDataset, GMAIMMBenchDataset, MMERealWorld, OpenMMMedical
124
- ]
125
- ```
126
-
127
- ---
128
-
129
- ### **6. Update `VLMEvalKit/vlmeval/dataset/image_base.py`**
130
- Modify the `img_root_map` function:
131
- ```python
132
- def img_root_map(dataset):
133
- if 'OpenMMMedical' in dataset:
134
- return 'OpenMMMedical'
135
- if 'OCRVQA' in dataset:
136
- return 'OCRVQA'
137
- if 'COCO_VAL' == dataset:
138
- return 'COCO'
139
- if 'MMMU' in dataset:
140
- return 'MMMU'
141
- ```
142
-
143
- ---
144
-
145
- ### **7. Run the Evaluation**
146
- Execute the following command to start the evaluation:
147
- ```bash
148
- python run.py --data OpenMMMedical --model Baichuan-omni --verbose
149
- ```
150
-
151
- ---
152
-
153
- ### **Notes:**
154
- - Ensure that all paths (e.g., `/your/path/to/OpenMM_Medical`) are correctly specified.
155
- - Confirm that the Baichuan model checkpoint is accessible at the defined `model_path`.
156
- - Validate the dependencies and configurations of VLMEvalKit to avoid runtime issues.
157
-
158
  With this setup, you should be able to evaluate OpenMM-Medical using Baichuan-Omni successfully.
 
1
+ # OpenMM-Medical
2
+
3
+ ## Introduction
4
+
5
+ OpenMM-Medical is a comprehensive medical evaluation dataset, which is an integration of existing datasets. OpenMM-Medical spans multiple domains, including Magnetic Resonance Imaging (MRI), CT scans, X-rays, microscopy images, endoscopy, fundus imaging, and dermoscopy.
6
+
7
+ Components | Content | Type | Number | Metrics
8
+ | :----: | :----: |:----: | :----: |:----: |
9
+ ACRIMA | Fundus Photography | Multiple Choice Question Answering | 159 | Acc
10
+ Adam Challenge | Endoscopy | Multiple Choice Question Answering | 87 | Acc
11
+ ALL Challenge | Microscopy Images | Multiple Choice Question Answering | 342 | Acc
12
+ BioMediTech | Microscopy Images | Multiple Choice Question Answering | 511 | Acc
13
+ Blood Cell | Microscopy Images | Multiple Choice Question Answering | 1175 | Acc
14
+ BreakHis | Magnetic Resonance Imaging | Multiple Choice Question Answering | 735 | Acc
15
+ Chest CT Scan | CT Imaging | Multiple Choice Question Answering | 871 | Acc
16
+ Chest X-Ray PA | X-Ray | Multiple Choice Question Answering | 850 | Acc
17
+ CoronaHack | X-Ray | Multiple Choice Question Answering | 684 | Acc
18
+ Covid CT | CT Imaging | Multiple Choice Question Answering | 199 | Acc
19
+ Covid-19 tianchi | X-Ray | Multiple Choice Question Answering | 96 | Acc
20
+ Covid19 heywhale | X-Ray | Multiple Choice Question Answering | 690 | Acc
21
+ COVIDx CXR-4 | X-Ray | Multiple Choice Question Answering | 485 | Acc
22
+ CRC100k | Magnetic Resonance Imaging | Multiple Choice Question Answering | 1322 | Acc
23
+ DeepDRiD | Fundus Photography | Multiple Choice Question Answering | 131 | Acc
24
+ Diabetic Retinopathy | Fundus Photography | Multiple Choice Question Answering | 2051 | Acc
25
+ DRIMDB | Fundus Photography | Multiple Choice Question Answering | 132 | Acc
26
+ Fitzpatrick 17k | Dermoscopy | Multiple Choice Question Answering | 1552 | Acc
27
+ HuSHeM | Microscopy Images | Multiple Choice Question Answering | 89 | Acc
28
+ ISBI2016 | Dermoscopy | Multiple Choice Question Answering | 681 | Acc
29
+ ISIC2018 | Dermoscopy | Multiple Choice Question Answering | 272 | Acc
30
+ ISIC2019 | Dermoscopy | Multiple Choice Question Answering | 1952 | Acc
31
+ ISIC2020 | Dermoscopy | Multiple Choice Question Answering | 1580 | Acc
32
+ JSIEC | Fundus Photography | Multiple Choice Question Answering | 220 | Acc
33
+ Knee Osteoarthritis | X-Ray | Multiple Choice Question Answering | 518 | Acc
34
+ MAlig Lymph | Magnetic Resonance Imaging | Multiple Choice Question Answering | 149 | Acc
35
+ MHSMA | Microscopy Images | Multiple Choice Question Answering | 1282 | Acc
36
+ MIAS | X-Ray | Multiple Choice Question Answering | 142 | Acc
37
+ Monkeypox Skin Image 2022 | Dermoscopy | Multiple Choice Question Answering | 163 | Acc
38
+ Mura | X-Ray | Multiple Choice Question Answering | 1464 | Acc
39
+ NLM- Malaria Data | Magnetic Resonance Imaging | Multiple Choice Question Answering | 75 | Acc
40
+ OCT & X-Ray 2017 | X-Ray, Optical Coherence Tomography | Multiple Choice Question Answering | 1301 | Acc
41
+ OLIVES | Fundus Photography | Multiple Choice Question Answering | 593 | Acc
42
+ PAD-UFES-20 | Dermoscopy | Multiple Choice Question Answering | 479 | Acc
43
+ PALM2019 | Fundus Photography | Multiple Choice Question Answering | 510 | Acc
44
+ Pulmonary Chest MC | X-Ray | Multiple Choice Question Answering | 38 | Acc
45
+ Pulmonary Chest Shenzhen | X-Ray | Multiple Choice Question Answering | 296 | Acc
46
+ RadImageNet | CT; Magnetic Resonance Imaging; Ultrasound | Multiple Choice Question Answering | 56697 | Acc
47
+ Retinal OCT-C8 | Optical Coherence Tomography | Multiple Choice Question Answering | 4016 | Acc
48
+ RUS CHN | X-Ray | Multiple Choice Question Answering | 1982 | Acc
49
+ SARS-CoV-2 CT-scan | CT | Multiple Choice Question Answering | 910 | Acc
50
+ Yangxi | Fundus Photography | Multiple Choice Question Answering | 1515 | Acc
51
+
52
+ ## Usage
53
+
54
+ The following steps detail how to use [**Baichuan-Omni-1.5**](https://github.com/baichuan-inc/Baichuan-Omni-1.5) with OpenMM-Medical for evaluation using [**VLMEvalKit**](https://github.com/open-compass/VLMEvalKit):
55
+
56
+ ---
57
+
58
+ ### **1. Add `baichuan.py` in `VLMEvalKit/vlmeval/vlm`**
59
+
60
+ Download `baichuan.py` (which defines the `Baichuan` model class) and add it in `VLMEvalKit/vlmeval/vlm`.
61
+
62
+ ---
63
+
64
+ ### **2. Modify `VLMEvalKit/vlmeval/vlm/__init__.py`**
65
+ Add the following line:
66
+ ```python
67
+ from .baichuan import Baichuan
68
+ ```
69
+
70
+ ---
71
+
72
+ ### **3. Modify `VLMEvalKit/vlmeval/config.py`**
73
+ Import the `Baichuan` model:
74
+ ```python
75
+ from vlmeval.vlm import Baichuan
76
+ ```
77
+
78
+ Add the `Baichuan-omni` model configuration:
79
+ ```python
80
+ 'Baichuan-omni': partial(
81
+ Baichuan,
82
+ sft=True,
83
+ model_path='/your/path/to/the/model/checkpoint'
84
+ )
85
+ ```
86
+
87
+ ---
88
+
89
+ ### **4. Modify `VLMEvalKit/vlmeval/dataset/image_mcq.py`**
90
+ Download `image_mcq.py` and add the following code to define the `OpenMMMedical` class. Ensure the `image_folder` points to your OpenMM-Medical dataset location:
91
+
92
+ ```python
93
+ class OpenMMMedical(ImageMCQDataset):
94
+
95
+ @classmethod
96
+ def supported_datasets(cls):
97
+ return ['OpenMMMedical']
98
+
99
+ def load_data(self, dataset='OpenMMMedical'):
100
+ image_folder = "/your/path/to/OpenMM_Medical"
101
+ def generate_tsv(pth):
102
+ import csv
103
+ from pathlib import Path
104
+ tsv_file_path = os.path.join(LMUDataRoot(), f'{dataset}.tsv')
105
+ ...
106
+ ```
107
+
108
+ ---
109
+
110
+ ### **5. Update `VLMEvalKit/vlmeval/dataset/__init__.py`**
111
+ Import `OpenMMMedical`:
112
+ ```python
113
+ from .image_mcq import (
114
+ ImageMCQDataset, MMMUDataset, CustomMCQDataset,
115
+ MUIRDataset, GMAIMMBenchDataset, MMERealWorld, OpenMMMedical
116
+ )
117
+
118
+ IMAGE_DATASET = [
119
+ ImageCaptionDataset, ImageYORNDataset, ImageMCQDataset, ImageVQADataset,
120
+ MathVision, MMMUDataset, OCRBench, MathVista, LLaVABench, MMVet,
121
+ MTVQADataset, TableVQABench, MMLongBench, VCRDataset, MMDUDataset,
122
+ DUDE, SlideVQA, MUIRDataset, GMAIMMBenchDataset, MMERealWorld, OpenMMMedical
123
+ ]
124
+ ```
125
+
126
+ ---
127
+
128
+ ### **6. Update `VLMEvalKit/vlmeval/dataset/image_base.py`**
129
+ Modify the `img_root_map` function:
130
+ ```python
131
+ def img_root_map(dataset):
132
+ if 'OpenMMMedical' in dataset:
133
+ return 'OpenMMMedical'
134
+ if 'OCRVQA' in dataset:
135
+ return 'OCRVQA'
136
+ if 'COCO_VAL' == dataset:
137
+ return 'COCO'
138
+ if 'MMMU' in dataset:
139
+ return 'MMMU'
140
+ ```
141
+
142
+ ---
143
+
144
+ ### **7. Run the Evaluation**
145
+ Execute the following command to start the evaluation:
146
+ ```bash
147
+ python run.py --data OpenMMMedical --model Baichuan-omni --verbose
148
+ ```
149
+
150
+ ---
151
+
152
+ ### **Notes:**
153
+ - Ensure that all paths (e.g., `/your/path/to/OpenMM_Medical`) are correctly specified.
154
+ - Confirm that the Baichuan model checkpoint is accessible at the defined `model_path`.
155
+ - Validate the dependencies and configurations of VLMEvalKit to avoid runtime issues.
156
+
 
157
  With this setup, you should be able to evaluate OpenMM-Medical using Baichuan-Omni successfully.