File size: 2,883 Bytes
55c3429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
pipeline_tag: image-to-text
license: mit
library_name: transformers
---

<div align="center">

<img src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" width="120"/>

# 🩺 MedFusion-AI (Unified Radiology Pipeline)

**Pro + Lite unified radiology model β€” powered by MedSigLIP & MedGemma**

[![Use this model](https://img.shields.io/badge/πŸ’»_Use-Model-2C3E50?style=for-the-badge&logo=huggingface&logoColor=yellow)](https://huggingface.co/spaces/fokan/MedFusion-AI)
[![Deploy](https://img.shields.io/badge/πŸš€_Deploy-HF_Space-2C3E50?style=for-the-badge)](https://huggingface.co/spaces/fokan/MedFusion-AI)
[![Train](https://img.shields.io/badge/🧠_Train-Colab-2C3E50?style=for-the-badge&logo=googlecolab)](https://colab.research.google.com/github/fokan/MedFusion-AI)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](LICENSE)

</div>

---

## 🧠 About the Model
**MedFusion-AI** is a unified multimodal medical-AI pipeline integrating vision encoders and text decoders to produce full radiology reports from X-ray or DICOM inputs.

| Mode | Encoder | Decoder | Precision |
|------|----------|----------|------------|
| **Pro** | `fokan/medsiglip-448-fp16-pruned20` | `fokan/medgemma-4b-it-fp16-pruned20` | FP16 + Pruned (High accuracy) |
| **Lite** | `fokan/medsiglip-448-int8` | `fokan/medgemma-4b-it-int8` | INT8 (Compact & fast) |

---

## 🩻 Usage (Python)

```python
from medfusion_pipeline import MedFusionPipeline

pipe = MedFusionPipeline.from_pretrained(".", mode="pro")  # or 'lite'
report = pipe.analyze("sample_xray.jpg")
print(report)
```

---

## βš™οΈ Modes
- **pro** β†’ FP16 + Pruned (High accuracy)
- **lite** β†’ INT8 (Compact speed-optimized)

---

## πŸ’‘ Features
- Handles **X-ray / DICOM inputs** automatically  
- Generates **structured radiology reports**  
- Plug-and-play **dual pipeline (Pro & Lite)**  
- Optimized for **medical education + research**  

---

## 🧩 Deployment Options
| Platform | Description |
|-----------|--------------|
| **πŸ€— Hugging Face Spaces** | One-click Gradio demo or inference API |
| **πŸš€ HF Inference Endpoint** | GPU-backed endpoint for production |
| **πŸ’» Local Deployment** | Python + Torch runtime (CPU/GPU friendly) |

---

## πŸ“Š Model Specs
- Architecture: MedSigLIP encoder + MedGemma decoder  
- Params: ~4 B (Teacher) β†’ ~0.4 B (Student Distilled)  
- Input Resolution: 224 / 448 px  
- Optimized for: Chest X-rays & general radiographs  

---

## πŸ“œ Citation
If you use **MedFusion-AI** in research, please cite:

```
@software{fokan_medfusion_ai_2025,
  title={MedFusion-AI: Unified Radiology Encoder-Decoder Pipeline},
  author={Karrar Alhdrawi},
  year={2025},
  url={https://huggingface.co/fokan/MedFusion-AI}
}
```

---

<div align="center">
Built with ❀️ by <a href="https://huggingface.co/fokan">fokan</a>
</div>