| | --- |
| | license: mit |
| | tags: |
| | - medical-imaging |
| | - segmentation |
| | - retinal |
| | - pytorch |
| | library_name: pytorch |
| | inference: true |
| | --- |
| | |
| | # RetSAM |
| |
|
| | <p align="left"> |
| | <a href="https://arxiv.org/abs/2602.07012"><img src="https://img.shields.io/badge/arXiv-PDF-red" alt="arXiv"></a> |
| | <a href="https://wzhjerry.github.io/RetSAM/"><img src="https://img.shields.io/badge/Project-Page-blue" alt="Project Page"></a> |
| | <a href="https://huggingface.co/JerryWzh/RetSAM_public"><img src="https://img.shields.io/badge/Model-RetSAM-green" alt="Model"></a> |
| | </p> |
| |
|
| |
|
| | Overview |
| | -------- |
| | Official repository for "A General Model for Retinal Segmentation and Quantification". |
| |
|
| | > **Note**: Publicly released models are trained on public datasets only and may differ from the paper-reported results. |
| |
|
| | Checkpoint |
| | ---------- |
| | - `--out_channels`: `"(2,3,2,4,6)"`. |
| | - `--patch_size`: `4`. |
| | - `--window_size`: `10`. |
| | - `--depths`: `"(2, 2, 18, 2)"`. |
| | - `--num_heads`: `"(4, 8, 16, 32)"`. |
| | - `--feature_size`: `128`. |
| | - `--size`: `640`. |
| |
|
| | Download from Hugging Face |
| | -------------------------- |
| | Install `huggingface_hub`: |
| | ```bash |
| | pip install -U huggingface_hub |
| | ``` |
| |
|
| | Download the checkpoint with Python: |
| | ```python |
| | from huggingface_hub import hf_hub_download |
| | |
| | ckpt_path = hf_hub_download( |
| | repo_id="JerryWzh/RetSAM_public", |
| | filename="retsam_v1_for_public.ckpt", |
| | ) |
| | print(ckpt_path) |
| | ``` |
| |
|
| | Or download with CLI: |
| | ```bash |
| | hf download JerryWzh/RetSAM_public retsam_v1_for_public.ckpt |
| | ``` |
| |
|
| | Citation |
| | -------- |
| | ```bibtex |
| | @article{wang2026general, |
| | title={A General Model for Retinal Segmentation and Quantification}, |
| | author={Wang, Zhonghua and Ju, Lie and Li, Sijia and Feng, Wei and Zhou, Sijin and Hu, Ming and Xiong, Jianhao and Tang, Xiaoying and Peng, Yifan and Lin, Mingquan and others}, |
| | journal={arXiv preprint arXiv:2602.07012}, |
| | year={2026} |
| | } |
| | ``` |
| |
|
| | Contact |
| | ------- |
| | For questions or access to full RetSAM models, please contact me at: zhonghua.wang@monash.edu |
| |
|