RudolfV-2-B / README.md
swtietz's picture
Update README.md
b2cb55c verified
|
Raw
History Blame Contribute Delete
5.09 kB
metadata
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 for computational pathology. It uses a ViT-B/8 backbone and was distilled from 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 for training details, full benchmark tables, and evaluation protocols.

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 ViT-g 1.1 B
RudolfV 2-B (this repo) ViT-B 86 M 2.5× faster
RudolfV 2-S ViT-S 22 M 6.5× faster

Usage

pip install torch transformers timm pillow

trust_remote_code=True is required (custom modeling code), and timm is a hard dependency.

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

@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},
}