bluesky333
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,68 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
---
|
4 |
+
# SLaVA-CXR: Small Language and Vision Assistant for Chest X-ray Report Automation
|
5 |
+
|
6 |
+
**SLaVA-CXR: Small Language and Vision Assistant for Chest X-ray Report Automation** [[Paper](https://arxiv.org/abs/2409.13321)] <br>
|
7 |
+
|
8 |
+
## Contents
|
9 |
+
- [Install](#install)
|
10 |
+
- [LLaVA-Phi Weights](#llava-weights)
|
11 |
+
- [Train](#train)
|
12 |
+
- [Evaluation](#evaluation)
|
13 |
+
|
14 |
+
## Environment
|
15 |
+
|
16 |
+
```Shell
|
17 |
+
conda create -n slava_cxr python=3.10 -y
|
18 |
+
conda activate slava_cxr
|
19 |
+
pip install --upgrade pip # enable PEP 660 support
|
20 |
+
pip install -e .
|
21 |
+
```
|
22 |
+
|
23 |
+
## MODEL
|
24 |
+
The SLaVA-CXR model can be downloaded in [HuggingFace](https://drive.google.com/file/d/1c0BXEuDy8Cmm2jfN0YYGkQxFZd2ZIoLg/view).
|
25 |
+
|
26 |
+
## Train
|
27 |
+
The training codes is made available. The training datasets are currently not available.
|
28 |
+
|
29 |
+
## Evaluation
|
30 |
+
Evaluation dataset can be any chest X-ray frontal view image paired with a report.
|
31 |
+
We used MIMIC-CXR and IU-Xray datasets in our paper for the evaluation.
|
32 |
+
We have included IU-Xray questions for impression and findings section automation.
|
33 |
+
Please download IU-Xray dataset [LINK](https://drive.google.com/file/d/1c0BXEuDy8Cmm2jfN0YYGkQxFZd2ZIoLg/view).
|
34 |
+
|
35 |
+
### Findings Generation
|
36 |
+
```Shell
|
37 |
+
CUDA_VISIBLE_DEVICES=0 python -m llava_phi.eval.model_vqa_slava_cxr \
|
38 |
+
--model-path ./SLaVA-CXR \
|
39 |
+
--question-file iuxray_sample_findings.jsonl \
|
40 |
+
--image-folder path_to_iuxray_images \
|
41 |
+
--answers-file findings_result.jsonl \
|
42 |
+
--conv-mode default \
|
43 |
+
--max_new_tokens 512
|
44 |
+
```
|
45 |
+
### Impression Summarization
|
46 |
+
```Shell
|
47 |
+
CUDA_VISIBLE_DEVICES=0 python -m llava_phi.eval.model_vqa_slava_cxr \
|
48 |
+
--model-path ./SLaVA-CXR \
|
49 |
+
--question-file iuxray_sample_impression.jsonl \
|
50 |
+
--image-folder path_to_iuxray_images \
|
51 |
+
--answers-file impression_result.jsonl \
|
52 |
+
--conv-mode default \
|
53 |
+
--max_new_tokens 256
|
54 |
+
```
|
55 |
+
## Citation
|
56 |
+
```bibtex
|
57 |
+
|
58 |
+
@article{wu2024slava,
|
59 |
+
title={SLaVA-CXR: Small Language and Vision Assistant for Chest X-ray Report Automation},
|
60 |
+
author={Wu, Jinge and Kim, Yunsoo and Shi, Daqian and Cliffton, David and Liu, Fenglin and Wu, Honghan},
|
61 |
+
journal={arXiv preprint arXiv:2409.13321},
|
62 |
+
year={2024}
|
63 |
+
}
|
64 |
+
```
|
65 |
+
|
66 |
+
## Acknowledgement
|
67 |
+
We used the LLaVA-Phi codes to train our model
|
68 |
+
- [LLaVA-Phi](https://github.com/zhuyiche/llava-phi)
|