Views
No views yet
PyTorchModelHubMixin from the huggingface_hub package and the code from the mirage_hf.py script that can be downloaded from here.1from huggingface_hub import PyTorchModelHubMixin
2from mirage_hf import MIRAGEWrapper
3
4
5class MIRAGEhf(MIRAGEWrapper, PyTorchModelHubMixin):
6 def __init__(
7 self,
8 input_size=512,
9 patch_size=32,
10 modalities='bscan-slo',
11 size='base',
12 ):
13 super().__init__(
14 input_size=input_size,
15 patch_size=patch_size,
16 modalities=modalities,
17 size=size,
18 )
19
20# For the MIRAGE model based on ViT-Base
21model = MIRAGEhf.from_pretrained("j-morano/MIRAGE-Base")
22# For the MIRAGE model based on ViT-Large
23model = MIRAGEhf.from_pretrained("j-morano/MIRAGE-Large")@misc{morano2025mirage,
title={{MIRAGE}: Multimodal foundation model and benchmark for comprehensive retinal {OCT} image analysis},
author={José Morano and Botond Fazekas and Emese Sükei and Ronald Fecso and Taha Emre and Markus Gumpinger and Georg Faustmann and Marzieh Oghbaie and Ursula Schmidt-Erfurth and Hrvoje Bogunović},
year={2025},
eprint={2506.08900},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2506.08900},
}