Kimokcheon commited on
Commit
9d2e16d
·
verified ·
1 Parent(s): c877a17

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +163 -0
README.md ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: transformers
5
+ pipeline_tag: image-text-to-text
6
+ tags:
7
+ - fundus
8
+ - ophthalmology
9
+ - retinal-imaging
10
+ - medical-vlm
11
+ - multimodal-large-language-model
12
+ - reasoning
13
+ - rag
14
+ - rlvr
15
+ - qwen2.5-vl
16
+ - safetensors
17
+ arxiv: "2604.08322"
18
+ ---
19
+
20
+ # Fundus-R1
21
+
22
+ Fundus-R1 is a fundus-reading multimodal large language model introduced in the paper:
23
+
24
+ **Fundus-R1: Training a Fundus-Reading MLLM with Knowledge-Aware Reasoning on Public Data**
25
+ Yuchuan Deng, Qijie Wei, Kaiheng Qian, Jiazhen Liu, Zijie Xin, Bangxiang Lan, Jingyu Liu, Jianfeng Dong, Xirong Li
26
+ Paper: https://arxiv.org/abs/2604.08322
27
+
28
+ Fundus-R1 is designed for fundus image understanding, including color fundus photography (CFP), optical coherence tomography (OCT), and ultra-widefield fundus imaging (UWF). The model is trained using publicly available data and aims to improve knowledge-aware reasoning for retinal image analysis.
29
+
30
+ ## Model Variants
31
+
32
+ | Model | Repository |
33
+ |---|---|
34
+ | Fundus-R1-3B | `Kimokcheon/Fundus-R1-3B` |
35
+ | Fundus-R1-7B | `Kimokcheon/Fundus-R1-7B` |
36
+
37
+ This model card is shared by the released Fundus-R1 checkpoints. Please select the checkpoint size according to your compute budget and deployment requirement.
38
+
39
+ ## Method Overview
40
+
41
+ Fundus-R1 addresses the difficulty of training fundus-reading MLLMs without private clinical-report data. According to the paper, the model is trained exclusively on public datasets, where most samples contain only image-level labels rather than detailed diagnostic reports.
42
+
43
+ The training pipeline contains two key components:
44
+
45
+ 1. **Knowledge-aware reasoning trace construction.** A retrieval-augmented generation (RAG) procedure is used to compose image-specific reasoning traces that connect visual findings to image labels through ophthalmic knowledge.
46
+ 2. **Reasoning-enhanced RLVR.** Reinforcement learning with verifiable rewards (RLVR) is enhanced with a process reward that encourages self-consistency in the generated reasoning trace.
47
+
48
+ The paper reports evaluation on three fundus-reading benchmarks: **FunBench**, **Omni-Fundus**, and **GMAI-Fundus**.
49
+
50
+ ## Intended Use
51
+
52
+ Fundus-R1 is intended for research on fundus-image understanding, medical multimodal reasoning, ophthalmic MLLMs, and public-data-based post-training of medical vision-language models.
53
+
54
+ Possible research uses include:
55
+
56
+ - fundus image question answering;
57
+ - retinal disease recognition experiments;
58
+ - reasoning-trace analysis for medical MLLMs;
59
+ - comparison with general-purpose MLLMs and ophthalmology-specific MLLMs;
60
+ - studies on RAG-generated medical reasoning traces and RLVR training.
61
+
62
+ ## Important Medical Disclaimer
63
+
64
+ This model is released for research use. It is **not** a certified medical device and should not be used as the sole basis for clinical diagnosis, treatment planning, triage, or patient management. Outputs should be reviewed by qualified medical professionals before any clinical interpretation or downstream use.
65
+
66
+ ## Example Usage
67
+
68
+ The exact loading code may depend on the checkpoint configuration and your installed `transformers` version. A typical Qwen2.5-VL-style loading pattern is:
69
+
70
+ ```python
71
+ import torch
72
+ from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
73
+ from qwen_vl_utils import process_vision_info
74
+
75
+ model_id = "Kimokcheon/Fundus-R1-3B" # or "Kimokcheon/Fundus-R1-7B"
76
+
77
+ model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
78
+ model_id,
79
+ torch_dtype=torch.bfloat16,
80
+ device_map="auto",
81
+ )
82
+ processor = AutoProcessor.from_pretrained(model_id)
83
+
84
+ messages = [
85
+ {
86
+ "role": "user",
87
+ "content": [
88
+ {"type": "image", "image": "path/to/fundus_image.jpg"},
89
+ {"type": "text", "text": "Describe the retinal findings in this fundus image."},
90
+ ],
91
+ }
92
+ ]
93
+
94
+ text = processor.apply_chat_template(
95
+ messages,
96
+ tokenize=False,
97
+ add_generation_prompt=True,
98
+ )
99
+ image_inputs, video_inputs = process_vision_info(messages)
100
+ inputs = processor(
101
+ text=[text],
102
+ images=image_inputs,
103
+ videos=video_inputs,
104
+ padding=True,
105
+ return_tensors="pt",
106
+ ).to(model.device)
107
+
108
+ with torch.no_grad():
109
+ generated_ids = model.generate(**inputs, max_new_tokens=512)
110
+
111
+ output_ids = generated_ids[:, inputs.input_ids.shape[1]:]
112
+ response = processor.batch_decode(
113
+ output_ids,
114
+ skip_special_tokens=True,
115
+ clean_up_tokenization_spaces=False,
116
+ )[0]
117
+ print(response)
118
+ ```
119
+
120
+ Install common dependencies:
121
+
122
+ ```bash
123
+ pip install -U transformers accelerate safetensors qwen-vl-utils
124
+ ```
125
+
126
+ ## Download Through HF Mirror
127
+
128
+ For users in regions where the official Hugging Face endpoint is slow, the checkpoints can be downloaded through the Hugging Face mirror endpoint:
129
+
130
+ ```bash
131
+ export HF_ENDPOINT=https://hf-mirror.com
132
+
133
+ huggingface-cli download Kimokcheon/Fundus-R1-3B --local-dir ./Fundus-R1-3B
134
+ huggingface-cli download Kimokcheon/Fundus-R1-7B --local-dir ./Fundus-R1-7B
135
+ ```
136
+
137
+ To verify mirror availability with a lightweight file:
138
+
139
+ ```bash
140
+ export HF_ENDPOINT=https://hf-mirror.com
141
+
142
+ huggingface-cli download Kimokcheon/Fundus-R1-3B config.json --local-dir /tmp/fundus-r1-3b-check
143
+ huggingface-cli download Kimokcheon/Fundus-R1-7B config.json --local-dir /tmp/fundus-r1-7b-check
144
+ ```
145
+
146
+ ## Citation
147
+
148
+ If you use Fundus-R1, please cite the paper:
149
+
150
+ ```bibtex
151
+ @article{deng2026fundusr1,
152
+ title={Fundus-R1: Training a Fundus-Reading MLLM with Knowledge-Aware Reasoning on Public Data},
153
+ author={Deng, Yuchuan and Wei, Qijie and Qian, Kaiheng and Liu, Jiazhen and Xin, Zijie and Lan, Bangxiang and Liu, Jingyu and Dong, Jianfeng and Li, Xirong},
154
+ journal={arXiv preprint arXiv:2604.08322},
155
+ year={2026}
156
+ }
157
+ ```
158
+
159
+ ## Links
160
+
161
+ - Paper: https://arxiv.org/abs/2604.08322
162
+ - Fundus-R1-3B: https://huggingface.co/Kimokcheon/Fundus-R1-3B
163
+ - Fundus-R1-7B: https://huggingface.co/Kimokcheon/Fundus-R1-7B