LEMON models
Collection
LEMON: a foundation model for nuclear morphology in Computational Pathology, https://huggingface.co/aliceblondel/LEMON • 3 items • Updated
Run 1aurent/vit_small_patch8_224.lemon on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/1aurent/vit_small_patch8_224.lemon. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/1aurent/vit_small_patch8_224.lemon on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use 1aurent/vit_small_patch8_224.lemon with timm:
import timm
model = timm.create_model("hf-hub:1aurent/vit_small_patch8_224.lemon", pretrained=True)A Vision Transformer (ViT) single-cell nuclear morphology model.
Trained with MoCo v3 on ~10M 40x40 px single-cell images from ~10k TCGA slides (LEMON).
from urllib.request import urlopen
from PIL import Image
import timm
# get example image
img = Image.open(
urlopen("https://github.com/owkin/HistoSSLscaling/raw/main/assets/example.tif")
).convert('RGB')
# load model from the hub
model = timm.create_model(
model_name="hf-hub:1aurent/vit_small_patch8_224.lemon",
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
@misc{chadoutaud2026lemon,
title = {LEMON: a foundation model for nuclear morphology in Computational Pathology},
author = {Chadoutaud, Loïc and Blondel, Alice and Feki, Hana and Fontugne, Jacqueline and Barillot, Emmanuel and Walter, Thomas},
year = {2026},
eprint = {2603.25802},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2603.25802}
}