CKJ26 commited on
Commit
1541f9d
Β·
verified Β·
1 Parent(s): 32e8a88

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +121 -3
README.md CHANGED
@@ -1,3 +1,121 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dual-View SLaVA-CXR
2
+
3
+ **Dual-View SLaVA-CXR** is a vision-language model for structured radiology report generation from frontal and lateral chest X-rays. Built on the ReΒ³ (Recognize–Reason–Report) paradigm and extending the original SLaVA-CXR model, this project integrates dual-view vision fusion and leverages CLIP, BiomedCLIP, and Phi-2 for enhanced anatomical reasoning.
4
+
5
+ ---
6
+
7
+ ## πŸ“ Directory Structure
8
+
9
+ ```bash
10
+ β”œβ”€β”€ Data Collection and Preprocessing/
11
+ β”‚ β”œβ”€β”€ Data_collection_Mimic.ipynb
12
+ β”‚ β”œβ”€β”€ Data_preprocess.ipynb
13
+ β”‚ β”œβ”€β”€ Radgraph Based Report Cleaning.ipynb
14
+ β”‚ └── train_data_json_gen.ipynb
15
+ β”‚
16
+ β”œβ”€β”€ Evaluate/
17
+ β”‚ β”œβ”€β”€ Evaluate.ipynb
18
+ β”‚ └── Results_IU_Xray/ # Contains evaluation results on IU X-ray dataset
19
+ β”‚
20
+ β”œβ”€β”€ llava_phi/
21
+ β”‚ β”œβ”€β”€ Dual Slava train.ipynb # Training pipeline
22
+ β”‚ └── generation.ipynb # Inference/report generation
23
+ β”‚
24
+ β”œβ”€β”€ requirements.txt
25
+ └── README.md
26
+ ```
27
+
28
+ ---
29
+
30
+ ## 🧠 Key Contributions
31
+
32
+ - **Dual-Encoder Fusion**: Combines CLIP and BiomedCLIP for each view with learnable weight Ξ±:
33
+
34
+ - **Cross-View Attention**: Enables anatomical reasoning across views:
35
+
36
+ - **Gated Feature Fusion**:
37
+
38
+ - **ReΒ³ Pipeline**:
39
+ 1. **Recognize**: Generate Findings from images
40
+ 2. **Reason**: Infer Impression from Findings
41
+ 3. **Report**: Output structured radiology reports
42
+
43
+ ---
44
+
45
+ ## πŸ“Š Evaluation Metrics
46
+
47
+ | Dataset | BLEU | ROUGE-L | METEOR | BERT | RadGraph F1 | CheXbert F1 |
48
+ | --------- | ---- | ------- | ------ | ---- | ----------- | ----------- |
49
+ | MIMIC-CXR | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… |
50
+ | IU X-Ray | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… |
51
+
52
+ _(Results in `/Evaluate/Results_IU_Xray`)_
53
+
54
+ ---
55
+
56
+ ## πŸ› οΈ Setup
57
+
58
+ ```bash
59
+ # Clone repo
60
+ git clone https://github.com/Clintonkjkj/Dual-View-Slava-CXR.git
61
+ cd Dual-View-Slava-CXR
62
+
63
+ # Set up virtual environment
64
+ python -m venv venv
65
+ source venv/bin/activate # or venv\Scripts\activate
66
+
67
+ # Install dependencies
68
+ pip install -r requirements.txt
69
+ ```
70
+
71
+ ---
72
+
73
+ ## πŸš€ Usage
74
+
75
+ ### Download the model
76
+
77
+ Huggingface - https://huggingface.co/CKJ26/Dual-View-Slava-Final
78
+
79
+ ### πŸ‹οΈ Train the Model
80
+
81
+ Use `llava_phi/Dual Slava train.ipynb` after preparing data using:
82
+
83
+ - `Data_collection_Mimic.ipynb`
84
+ - `Data_preprocess.ipynb`
85
+ - `Radgraph Based Report Cleaning.ipynb`
86
+ - `train_data_json_gen.ipynb`
87
+
88
+ ### πŸ“„ Generate Reports
89
+
90
+ Use `llava_phi/generation.ipynb` with both frontal and lateral views, plus a prompt (e.g., "Generate a radiology report").
91
+
92
+ ---
93
+
94
+ ## πŸ–ΌοΈ Model Architecture
95
+
96
+ ![Architecture](architecture/arch_new_Updated.jpg)
97
+
98
+ ---
99
+
100
+ ## πŸ“š Citation
101
+
102
+ ```bibtex
103
+ @misc{dualviewslava2025,
104
+ title={Dual View SLaVA-CXR: Structured Radiology Reporting via Multi-View Chest X-rays},
105
+ author={Clinton KJ et al.},
106
+ year={2025},
107
+ note={Capstone Project}
108
+ }
109
+ ```
110
+
111
+ ---
112
+
113
+ ## πŸ§‘β€πŸ’» Author
114
+
115
+ - **Clinton KJ** β€” [Hugging Face Profile](https://huggingface.co/CKJ26)
116
+
117
+ ---
118
+
119
+ ## πŸ“œ License
120
+
121
+ This repository is provided for academic research purposes only.