|
|
--- |
|
|
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** |
|
|
|
|
|
[](https://huggingface.co/spaces/fokan/MedFusion-AI) |
|
|
[](https://huggingface.co/spaces/fokan/MedFusion-AI) |
|
|
[](https://colab.research.google.com/github/fokan/MedFusion-AI) |
|
|
[](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> |
|
|
|