Model reference · open weights
vit_base_patch16_224.owkin_pancancer is an open-weight embedding model from 1aurent. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | 1aurent |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 86M |
| Runs with | timm |
| Released | 2023-10-22 |
| Popularity | 851 downloads / month |
| Licence | Commercial licence needed |
About
A Vision Transformer (ViT) image classification model.
Trained by Owkin on 40 million pan-cancer histology tiles from TCGA-COAD.
A version using the transformers library is also available here: https://huggingface.co/owkin/phikon
from urllib.request import urlopen
from PIL import Image
import timm
# get example histology image
img = Image.open(
urlopen(
"https://github.com/owkin/HistoSSLscaling/raw/main/assets/example.tif"
)
)
# load model from the hub
model = timm.create_model(
model_name="hf-hub:1aurent/vit_base_patch16_224.owkin_pancancer",
pretrained=True,
).eval()
# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)
data = transforms(img).unsqueeze(0) # input is a (batch_size, num_channels, img_size, img_size) shaped tensor
output = model(data) # output is a (batch_size, num_features) shaped tensor
@article{Filiot2023.07.21.23292757,
author = {Alexandre Filiot and Ridouane Ghermi and Antoine Olivier and Paul Jacob and Lucas Fidon and Alice Mac Kain and Charlie Saillard and Jean-Baptiste Schiratti},
title = {Scaling Self-Supervised Learning for Histopathology with Masked Image Modeling},
elocation-id = {2023.07.21.23292757},
year = {2023},
doi = {10.1101/2023.07.21.23292757},
publisher = {Cold Spring Harbor Laboratory Press},
url = {https://www.medrxiv.org/content/early/2023/09/14/2023.07.21.23292757},
eprint = {https://www.medrxiv.org/content/early/2023/09/14/2023.07.21.23292757.full.pdf},
journal = {medRxiv}
}
From the published model card. Full card on the HuggingFace links in the sidebar.
How it works
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Image Classification | Camelyon16[Meta] | ROC AUC | |
| Image Classification | TCGA-BRCA[Hist] | ROC AUC | |
| Image Classification | TCGA-BRCA[HRD] | ROC AUC | |
| Image Classification | TCGA-BRCA[Mol] | ROC AUC | |
| Image Classification | TCGA-BRCA[OS] | ROC AUC | |
| Image Classification | TCGA-CRC[MSI] | ROC AUC | |
| Image Classification | TCGA-COAD[OS] | ROC AUC | |
| Image Classification | TCGA-NSCLC[CType] | ROC AUC | |
| Image Classification | TCGA-LUAD[OS] | ROC AUC | |
| Image Classification | TCGA-LUSC[OS] | ROC AUC | |
| Image Classification | TCGA-OV[HRD] | ROC AUC | |
| Image Classification | TCGA-RCC[CType] | ROC AUC | |
| Image Classification | TCGA-STAD[MSI] | ROC AUC | |
| Image Classification | TCGA-PAAD[OS] | ROC AUC |
Using it via the API
Once AxForge deploys vit-base-patch16-224-owkin-pancancer for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (vit-base-patch16-224-owkin-pancancer below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"vit-base-patch16-224-owkin-pancancer","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.