Image Feature Extraction
Transformers
Safetensors
rudolf
pathology
histopathology
computational-pathology
digital-pathology
vision-transformer
foundation-model
self-supervised
feature-extraction
biology
medical
custom_code
Instructions to use Aignostics/RudolfV-2-B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aignostics/RudolfV-2-B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="Aignostics/RudolfV-2-B", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Aignostics/RudolfV-2-B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| pretty_name: RudolfV 2-B | |
| license: other | |
| license_name: other | |
| library_name: transformers | |
| pipeline_tag: image-feature-extraction | |
| tags: | |
| - pathology | |
| - histopathology | |
| - computational-pathology | |
| - digital-pathology | |
| - vision-transformer | |
| - foundation-model | |
| - self-supervised | |
| - feature-extraction | |
| - biology | |
| - medical | |
| extra_gated_prompt: Please complete the fields below to request access to RudolfV 2-B. | |
| extra_gated_fields: | |
| I agree to the RudolfV 2-B terms of use: checkbox | |
| Can Aignostics contact you for feedback on RudolfV 2-B?: | |
| type: select | |
| options: | |
| - label: Yes, I consent to being contacted | |
| value: 'yes' | |
| - label: No, I do not wish to be contacted | |
| value: 'no' | |
| **RudolfV 2-B** | |
| RudolfV 2-B is a vision transformer based Foundation Model developed by [Aignostics](https://www.aignostics.com/) | |
| for computational pathology. It uses a ViT-B/8 backbone and was distilled from | |
| [RudolfV 2](https://huggingface.co/Aignostics/RudolfV-2), which was pretrained on 300k whole slide | |
| images (WSIs). | |
| RudolfV 2-B can serve as a general-purpose tile-level feature extractor for a broad range of downstream | |
| histopathology tasks, including tissue and tumor classification, grading, biomarker prediction, and | |
| slide-level modeling via multiple instance learning. | |
| 📄 **Paper:** *RudolfV 2: A Family of Robust and Efficient Open-Weights Pathology Foundation | |
| Models* (Milbich, Eulig, Carpen-Amarie, Dippel, Muttenthaler, Tietz et al.). | |
| Refer to the [paper](https://cdn.prod.website-files.com/67adb01f31489469b513304a/6a74e2f9f1d4aef06489a3f1_RudolfV_2_260806.pdf) for training details, full benchmark tables, and evaluation protocols. | |
| <!-- TODO(maintainers): add the arXiv/paper link once available. --> | |
| **Model family** — this repo hosts the mid-sized model RudolfV 2-B. The flagship model RudolfV 2 | |
| and the smaller RudolfV 2-S are available as well. | |
| | Model | Backbone | Params | Relative speed | | |
| |---|---|---|---| | |
| | [RudolfV 2](https://huggingface.co/Aignostics/RudolfV-2) | ViT-g | 1.1 B | 1× | | |
| | **RudolfV 2-B** (this repo) | ViT-B | 86 M | 2.5× faster | | |
| | [RudolfV 2-S](https://huggingface.co/Aignostics/RudolfV-2-S) | ViT-S | 22 M | 6.5× faster | | |
| --- | |
| ## Usage | |
| ```bash | |
| pip install torch transformers timm pillow | |
| ``` | |
| `trust_remote_code=True` is required (custom modeling code), and `timm` is a hard dependency. | |
| ```python | |
| import torch | |
| from PIL import Image | |
| from transformers import AutoImageProcessor, AutoModel | |
| REPO = "Aignostics/RudolfV-2-B" | |
| processor = AutoImageProcessor.from_pretrained(REPO) | |
| model = AutoModel.from_pretrained(REPO, trust_remote_code=True).eval() | |
| image = Image.effect_noise((224, 224), 64).convert("RGB") # replace with a real H&E tile | |
| inputs = processor(images=image, return_tensors="pt") | |
| with torch.inference_mode(): | |
| out = model(**inputs) | |
| out.pooler_output # [1, 768] CLS token | |
| out.last_hidden_state # [1, 793, 768] CLS + 8 register + 784 patch tokens | |
| ``` | |
| Always use `.eval()` for inference. Embeddings are deterministic — repeated passes over the | |
| same tile are bit-identical. | |
| ## Access | |
| This model is gated. To request access, you must be logged into a Hugging Face account. You will | |
| be asked to provide your name and must use an academic or non-profit email address (e.g., .edu, | |
| .org). All requests are reviewed and granted at Aignostics' discretion. | |
| ## License Terms | |
| **License:** CC BY-NC-ND 4.0, plus the following supplementary terms, which control in case of conflict: | |
| **Field of use.** Academic research use only. No diagnostic, preventive, therapeutic, clinical, | |
| or commercial use. | |
| **AI/ML training restriction.** RudolfV 2-B may not be used to train models designed to replicate | |
| or approximate the capabilities of RudolfV 2-B or to generate training labels, pseudo-labels, or | |
| any form of supervision signal for such models, direct or indirect. RudolfV 2-B may not be used to | |
| provide training signals for any foundation model or general-purpose pathology model, direct or | |
| indirect. | |
| **No warranty.** RudolfV 2-B is provided as-is, without warranty of any kind. Aignostics accepts no liability for results obtained through its use. | |
| **Attribution requirement.** Publications and presentations using RudolfV 2-B are encouraged, but must follow the Attribution Requirement below. | |
| ## Attribution Requirement | |
| <!-- TODO(maintainers): add volume/arXiv ID once available. --> | |
| ```bibtex | |
| @misc{rudolfv2, | |
| title = {RudolfV 2: A Family of Robust and Efficient Open-Weights | |
| Pathology Foundation Models}, | |
| author = {Milbich, Timo and Eulig, Elias and Carpen-Amarie, Alexandra and | |
| Dippel, Jonas and Muttenthaler, Lukas and Tietz, Stephan and | |
| Perez Cancer, Beatriz and L{\"u}scher, J{\'e}r{\^o}me and | |
| Benetti, Alessandro and Hashimi, Sayed Abid and Shah, Neelay and | |
| Kr{\"u}gener, Moritz and Jurmeister, Philipp and Horst, David and | |
| Norgan, Andrew and Schallenberg, Simon and Ruff, Lukas and | |
| M{\"u}ller, Klaus-Robert and Klauschen, Frederick and Alber, Maximilian}, | |
| year = {2026}, | |
| } | |
| ``` | |