Model card for LEMON

LEMON (Learning Embeddings from Morphology Of Nuclei) is an open-source foundation model for single-cell histology images, presented in the paper LEMON: a foundation model for nuclear morphology in Computational Pathology.

Two model sizes are released, both trained using self-supervised learning on a dataset of 10 million histology cell images sampled from 10,000 slides from TCGA:

Architecture Checkpoint Embedding dimension
ViT-S/8 lemon_vits8.pth.tar 384
ViT-B/8 lemon_vitb8.pth.tar 768

LEMON can be used to extract robust features from single-cell histology images for various downstream applications, such as gene expression prediction or cell type classification.

How to use it to extract features

The code below can be used to run inference. LEMON expects images of size 40x40 that were extracted at 0.25 microns per pixel (40X). Note that the code requires the model.py script provided in the repository.

import torch
from pathlib import Path
from torchvision.transforms import ToPILImage
from model import load_lemon_moco_model

device = "cpu"
arch = "vitb8"  # or "vits8"
target_cell_size = 40

# Model
model, dtype, transform = load_lemon_moco_model(arch)
model.to(device)

# Data
input = torch.rand(3, target_cell_size, target_cell_size)
input = ToPILImage()(input)

# Inference
with torch.autocast(device_type=device, dtype=dtype):
    with torch.inference_mode():
        features = model(transform(input).unsqueeze(0).to(device))

assert features.shape == (1, 768)  # (1, 384) if arch == "vits8"

Citation

If you found our work useful in your research, please consider citing our work:

@misc{chadoutaud2026lemonfoundationmodelnuclear,
      title={LEMON: a foundation model for nuclear morphology in Computational Pathology}, 
      author={Loïc Chadoutaud and Alice Blondel and Hana Feki and Jacqueline Fontugne and Emmanuel Barillot and Thomas Walter},
      year={2026},
      eprint={2603.25802},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2603.25802}, 
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for aliceblondel/LEMON