Model card for H-optimus-1
H-optimus-1 foundation model for histology, developed by Bioptimus.
The model is a 1.1B parameter vision transformer trained with self-supervised learning on an extensive proprietary dataset of billions of histology images sampled from over 1 million slides of more than 800,000 patients.
H-optimus-1 can be used to extract powerful features from histology images for various downstream applications, such as mutation prediction, survival analysis, or tissue classification/segmentation.
How to use it to extract features.
The code below can be used to run inference. H-optimus-1 expects images of size 224x224 that were extracted at 0.5 microns per pixel.
from huggingface_hub import login
import torch
import timm
from torchvision import transforms
# Login to the Hugging Face hub, using your user access token that can be found here:
# https://huggingface.co/settings/tokens.
login()
model = timm.create_model(
"hf-hub:bioptimus/H-optimus-1", pretrained=True, init_values=1e-5, dynamic_img_size=False
)
model.to("cuda")
model.eval()
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize(
mean=(0.707223, 0.578729, 0.703617),
std=(0.211883, 0.230117, 0.177517)
),
])
input = torch.rand(3, 224, 224)
input = transforms.ToPILImage()(input)
# We recommend using mixed precision for faster inference.
with torch.autocast(device_type="cuda", dtype=torch.float16):
with torch.inference_mode():
features = model(transform(input).unsqueeze(0).to("cuda"))
assert features.shape == (1, 1536)
Acknowledgments.
This project was provided with computing HPC and storage resources by GENCI at IDRIS thanks to the grant 2024-GC011015442 on the supercomputer Jean Zay's H100 partition.
BibTeX entry and citation info.
If you find this repository useful, please consider citing our work:
@inproceedings{scalbert2026hoptimus1,
title={H-optimus-1: A foundation model for computational histopathology},
author={Scalbert, Marin and Saillard, Charlie and Peeters, Thomas and Gonzalez, Liam and Valter, Dasha and Llinares-López, Felipe and Mariet, Zelda E. and Jenatton, Rodolphe},
booktitle={Proceedings of the American Association for Cancer Research Annual Meeting 2026; Part 2 (Late-Breaking, Clinical Trial, and Invited Abstracts)},
volume={86},
number={8\_Suppl},
pages={LB174},
year={2026},
publisher={AACR},
journal={Cancer Research},
doi={10.1158/1538-7445.AM2026-LB174}
}