Image-Text-to-Text
Transformers
English
ophthalmology
retina
fundus
medical
vision-language
llava
llava-med
Run this model with HF Jobs
Run ASU-GSL/RetinalGPT on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/ASU-GSL/RetinalGPT. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ASU-GSL/RetinalGPT on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/ASU-GSL/RetinalGPT. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/ASU-GSL/RetinalGPT. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use ASU-GSL/RetinalGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ASU-GSL/RetinalGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ASU-GSL/RetinalGPT")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ASU-GSL/RetinalGPT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ASU-GSL/RetinalGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ASU-GSL/RetinalGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ASU-GSL/RetinalGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ASU-GSL/RetinalGPT
- SGLang
How to use ASU-GSL/RetinalGPT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ASU-GSL/RetinalGPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ASU-GSL/RetinalGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ASU-GSL/RetinalGPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ASU-GSL/RetinalGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ASU-GSL/RetinalGPT with Docker Model Runner:
docker model run hf.co/ASU-GSL/RetinalGPT
Add model card and figures
Browse filesFiles changed (6)
- .gitattributes+4
- README.mdAdded+84
- figures/figure1.pngAdded
- figures/figure2.pngAdded
- figures/figure3.pngAdded
- figures/figure4.pngAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353637383932 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textfigures/figure1.png filter=lfs diff=lfs merge=lfs -textfigures/figure2.png filter=lfs diff=lfs merge=lfs -textfigures/figure3.png filter=lfs diff=lfs merge=lfs -textfigures/figure4.png filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384---license: mitlanguage: - enpipeline_tag: image-text-to-texttags: - ophthalmology - retina - fundus - medical - vision-language - llava---
<div align="center">
# 👁️ RetinalGPT
### Advancing Clinical Ophthalmology Through Instruction-Tuned Vision–Language Intelligence
[](https://github.com/Retinal-Research/RetinalGPT)[](https://arxiv.org/abs/2503.03987)[](#)
*Talk to a fundus image — diagnose, localize lesions, and quantify the retinal vasculature in one conversation.*
<img src="figures/figure1.png" alt="Multi-turn conversation with RetinalGPT" width="360">
</div>
## ✨ Highlights
- 🩺 **Disease assessment** — diabetic retinopathy, myopic maculopathy, and multi-disease abnormality detection- 📍 **Lesion localization** — bounding-box coordinates for lesions- 🌿 **Quantitative vascular analysis** — fractal dimension, vessel density, and vessel width for overall / arterial / venous vessels and by zone- 💬 **Multi-turn dialogue** — built on LLaVA (CLIP ViT-L/14 + LLaMA), trained on 38K curated color fundus photographs
## 🔬 Method
<div align="center"><img src="figures/figure2.png" alt="Data construction pipeline" width="720"><br><sub>Clinical features (disease labels, AutoMorph/RBAD vascular metrics, quality, lesion boxes) are converted into instruction data with GPT-4.</sub><br><br><img src="figures/figure3.png" alt="Two-stage training" width="720"><br><sub>Two-stage training: retinal–medical feature alignment, then clinical instruction tuning.</sub></div>
## 🖼️ Examples
<div align="center"><img src="figures/figure4.png" alt="Lesion localization and vascular analysis" width="720"></div>
## 🚀 Quick Start
```bashgit clone https://github.com/Retinal-Research/RetinalGPT.git && cd RetinalGPTpip install -r requirements.txt
python3 run_retinalGPT_simple.py \ --model-name ASU-GSL/RetinalGPT \ --image-file /path/to/fundus.png \ --question "Please describe this retinal image in detail."```
> ⚠️ For research use only. Not a medical device; not for clinical decision-making.
## 📖 Citation
```bibtex@article{zhu2025retinalgpt, title={RetinalGPT: A Retinal Clinical Preference Conversational Assistant Powered by Large Vision-Language Models}, author={Zhu, Wenhui and Li, Xin and Chen, Xiwen and Qiu, Peijie and Vasa, Vamsi Krishna and Dong, Xuanzhao and Chen, Yanxi and Lepore, Natasha and Dumitrascu, Oana and Su, Yi and Wang, Yalin}, journal={arXiv preprint arXiv:2503.03987}, year={2025}}```
---
<div align="center"><sub>🔒 Model weights are pending institutional and regulatory review and will be released soon.</sub></div>.gitattributes+4
README.mdAdded+84
figures/figure1.pngAdded

Large File Pointer Details
- SHA256: 830d471be8210d99cc50e83b2b56112c3cbae9d672e4b904ecf1d76e7ca3f6b0
- Pointer size: 131 Bytes
- Size of remote file: 512 kB
figures/figure2.pngAdded

Large File Pointer Details
- SHA256: e7d86f86cc9d36fe12ee175216ca53123408461868c8f7259c5d16db02785085
- Pointer size: 131 Bytes
- Size of remote file: 649 kB
figures/figure3.pngAdded

Large File Pointer Details
- SHA256: c3c397b07529a25ab867b8df64f5ea0fcee2314674774fa54796403cfbba63b9
- Pointer size: 131 Bytes
- Size of remote file: 499 kB
figures/figure4.pngAdded

Large File Pointer Details
- SHA256: 721cb32e493539132844b9d55c19e8cecaa66d8098657133c13062c4cb329c0a
- Pointer size: 131 Bytes
- Size of remote file: 981 kB