Update README.md
Browse files
README.md
CHANGED
@@ -16,93 +16,16 @@ GEM is a multimodal LLM unifying ECG time series, 12-lead ECG images and text fo
|
|
16 |
|
17 |
## π₯ Updates
|
18 |
|
|
|
|
|
19 |
#### Paper: π [Arxiv](https://arxiv.org/pdf/2503.06073)
|
20 |
|
|
|
|
|
21 |
#### Model: π€ [GEM](https://huggingface.co/LANSG/GEM)
|
22 |
|
23 |
#### Data: π€ [ECG-Grounding](https://huggingface.co/datasets/LANSG/ECG-Grounding)
|
24 |
|
25 |
-
## Setup
|
26 |
-
|
27 |
-
```shell
|
28 |
-
git clone https://github.com/lanxiang1017/GEM.git
|
29 |
-
bash GEM/setup.sh
|
30 |
-
```
|
31 |
-
|
32 |
-
## Data Preparation
|
33 |
-
|
34 |
-
Please download required data:
|
35 |
-
|
36 |
-
ECG:
|
37 |
-
- [MIMIC-IV](https://physionet.org/content/mimic-iv-ecg/1.0/)
|
38 |
-
- [PTB-XL](https://physionet.org/content/ptb-xl/1.0.3/)
|
39 |
-
- [Code-15%](https://zenodo.org/records/4916206)
|
40 |
-
- [CPSC 2018](https://physionet.org/content/challenge-2020/1.0.2/training/cpsc_2018/)
|
41 |
-
- [CSN](https://physionet.org/content/ecg-arrhythmia/1.0.0/)
|
42 |
-
- [G12E](https://physionet.org/content/challenge-2020/1.0.2/training/georgia/)
|
43 |
-
|
44 |
-
Images:
|
45 |
-
- [ECG-Grounding-Images](https://huggingface.co/datasets/LANSG/ECG-Grounding) (mimic_gen)
|
46 |
-
- [ECG-Bench](https://huggingface.co/datasets/PULSE-ECG/ECGBench)
|
47 |
-
|
48 |
-
After downloading all of them, organize the data as follows in `./data`,
|
49 |
-
|
50 |
-
```
|
51 |
-
βββ ecg_timeseries
|
52 |
-
βββ champan-shaoxing
|
53 |
-
βββ code15
|
54 |
-
βββ cpsc2018
|
55 |
-
βββ ptbxl
|
56 |
-
βββ georgia
|
57 |
-
βββ mimic-iv
|
58 |
-
βββ ecg_images
|
59 |
-
βββ cod15_v4
|
60 |
-
βββ csn_aug_all_layout_papersize
|
61 |
-
βββ csn_ori_layout_papersize
|
62 |
-
βββ csn_part_noise_layout_papersize
|
63 |
-
βββ gen_images
|
64 |
-
βββ mimic_gen
|
65 |
-
βββ mimic
|
66 |
-
βββ mimic_v4
|
67 |
-
βββ ptb-xl
|
68 |
-
βββ ecg_bench
|
69 |
-
βββ images
|
70 |
-
βββ jsons
|
71 |
-
βββ ecg_jsons
|
72 |
-
βββ ECG_Grounding_30k.json
|
73 |
-
βββ ECG_Grounding_130k.json
|
74 |
-
βββ ecg_grounding_test_data
|
75 |
-
βββ ecg-grounding-test.json
|
76 |
-
|
77 |
-
```
|
78 |
-
|
79 |
-
## Pretrained Model Preparation
|
80 |
-
|
81 |
-
Pretrained ECG Encoder:
|
82 |
-
- [ECG-CoCa](https://github.com/YubaoZhao/ECG-Chat) : place it in ```GEM/ecg_coca/open_clip/checkpoint```
|
83 |
-
|
84 |
-
Pretrained MLLMs:
|
85 |
-
- [PULSE](https://huggingface.co/PULSE-ECG/PULSE-7B)
|
86 |
-
- [LLaVA](https://huggingface.co/liuhaotian/llava-v1.6-vicuna-7b)
|
87 |
-
|
88 |
-
## Train
|
89 |
-
|
90 |
-
```bash GEM/scripts/train_gem.sh```
|
91 |
-
|
92 |
-
## Evaluation
|
93 |
-
|
94 |
-
For ECG-Grounding:
|
95 |
-
- step 1. generate interpretations: ```GEM/evaluation/gem_bench/bench_ecggrounding.sh```
|
96 |
-
- step 2. process interpretations: ```GEM/gem_evaluation/process_gem_outputs.ipynb```
|
97 |
-
- step 3. generate GPT evaluation reports: ```GEM/gem_evaluation/generate_gpt_eval.py```
|
98 |
-
- step 4. process evaluation reports and get scores: ```GEM/gem_evaluation/process_grounding_scores.ipynb```
|
99 |
-
|
100 |
-
For ECG-Bench:
|
101 |
-
- step 1. generate results: ```GEM/evaluation/gem_bench/bench_ecggrounding.sh```
|
102 |
-
- step 2. evaluate results: ```GEM/evaluation/evaluate_ecgbench.py```
|
103 |
-
- step 3. evaluate reports: ```GEM/evaluation/eval_report.py```
|
104 |
-
|
105 |
-
*Note: You'll need to specify result paths first in all evaluation scripts*
|
106 |
|
107 |
## Citation
|
108 |
|
@@ -119,10 +42,3 @@ If you find GEM helpful for your research and applications, please cite our pape
|
|
119 |
url={https://arxiv.org/abs/2503.06073},
|
120 |
}
|
121 |
```
|
122 |
-
|
123 |
-
## Acknowledgement
|
124 |
-
We thank the authors of [PULSE](https://github.com/AIMedLab/PULSE/tree/dev) and [ECG-Chat](https://github.com/YubaoZhao/ECG-Chat) for their publicly released models, datasets, and training codes.
|
125 |
-
|
126 |
-
## Code
|
127 |
-
|
128 |
-
Code: https://github.com/lanxiang1017/GEM
|
|
|
16 |
|
17 |
## π₯ Updates
|
18 |
|
19 |
+
#### Project Page: π [Page](https://www.lanxplanet.com/GEM-ECG/)
|
20 |
+
|
21 |
#### Paper: π [Arxiv](https://arxiv.org/pdf/2503.06073)
|
22 |
|
23 |
+
#### Code: π» [GitHub](https://github.com/lanxiang1017/GEM)
|
24 |
+
|
25 |
#### Model: π€ [GEM](https://huggingface.co/LANSG/GEM)
|
26 |
|
27 |
#### Data: π€ [ECG-Grounding](https://huggingface.co/datasets/LANSG/ECG-Grounding)
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
## Citation
|
31 |
|
|
|
42 |
url={https://arxiv.org/abs/2503.06073},
|
43 |
}
|
44 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|