SAVRN
Search Contact SAVRN

Open-weight model · Image segmentation

cross-channel-nuclei-from-cellmask-cpsam

by Einar Olafsson einarolafsson/cross-channel-nuclei-from-cellmask-cpsam

Segments nuclei from the host cell mask channel alone — no nuclear stain required. A cross-channel model: it is given the cell image and predicts where the nuclei are, freeing the DAPI/Hoechst channel for another marker.

Parameters
Context
Weights14.6 GB
Licensemit
AccessOpen weights
Monthly Downloads

Model Card

By Einar Olafsson, published under mit, revision 1ca9e5137382.

Segments nuclei from the host cell mask channel alone — no nuclear stain required. A cross-channel model: it is given the cell image and predicts where the nuclei are, freeing the DAPI/Hoechst channel for another marker. This model is distributed through the spaCR Model Zoo. spaCR is an open-source package for spatial phenotype analysis of CRISPR screens and microscopy images. Launch the GUI and open the Model Zoo: Find Cross-channel nuclei-from-cellmask (Cellpose-SAM) in the model list and press Download. The Model Zoo verifies the checkpoint's SHA-256 after download, so a truncated or substituted file is rejected rather than silently used. Point spaCR's mask generation at the downloaded…

Read Einar Olafsson's full model card

Cross-channel nuclei-from-cellmask (Cellpose-SAM)

Segments nuclei from the host cell mask channel alone — no nuclear stain required. A cross-channel model: it is given the cell image and predicts where the nuclei are, freeing the DAPI/Hoechst channel for another marker.

  • Architecture: Cellpose-SAM (cpsam_v2)
  • Model Zoo key: nuclei_from_cellmask_v1
  • Checkpoint: nuclei_from_cellmask
  • Trained by: einarolafsson

Use it in spaCR

This model is distributed through the spaCR Model Zoo. spaCR is an open-source package for spatial phenotype analysis of CRISPR screens and microscopy images.

pip install spacr

Model Zoo (GUI)

Launch the GUI and open the Model Zoo:

spacr

Find Cross-channel nuclei-from-cellmask (Cellpose-SAM) in the model list and press Download. The Model Zoo verifies the checkpoint's SHA-256 after download, so a truncated or substituted file is rejected rather than silently used.

Model Zoo (Python)

from spacr import model_zoo

entry = next(e for e in model_zoo.catalogue() if e.key == "nuclei_from_cellmask_v1")
path  = model_zoo.install(entry, dest="~/spacr_models")
print(path)   # verified local checkpoint

Mask generation

Point spaCR's mask generation at the downloaded checkpoint:

from spacr.core import preprocess_generate_masks

settings = {
    "src": "/path/to/images",
    "nucleus": "cellpose",
    "nucleus_model": str(path),     # the checkpoint fetched above
    "nucleus_diameter": 20,
}
preprocess_generate_masks(settings)

In the GUI the same thing is under Make masks — choose the downloaded model in the Cellpose model field for the relevant object.

API: :func:spacr.core.preprocess_generate_masks, :func:spacr.spacr_cellpose.generate_masks_from_imgs

Performance

model train train obj. test test obj. CV F1 @ IoU 0.5 AJI Dice final train loss final val loss val - train best epoch
stock cpsam_v2 (no fine-tuning) 453 42487 0.2009 0.2856 0.4493
this model not recorded 453 42487 no (single well-grouped split) 0.8881 0.7916 0.8774 best / 100

Scored on a well-grouped held-out split — no well appears in both train and test.

Per host cell line:

host n F1 AJI
HFF 157 0.9323 0.7462
HeLa 147 0.8596 0.8799
THP1 149 0.8610 0.7524

Objects are reference (ground-truth) objects. Training-set object counts and the per-epoch history were not preserved for this run, so the loss columns and training curves are unavailable.

Training data

Well-grouped split shared with the other cross-channel models, so no well leaks across train and test. 100 epochs from stock cpsam_v2, AdamW, lr 1e-5, weight decay 0.1.

Files in this repository

path what
checkpoints/nuclei_from_cellmask data
checkpoints/nuclei_from_cellmask_epoch_0010 data
checkpoints/nuclei_from_cellmask_epoch_0020 data
checkpoints/nuclei_from_cellmask_epoch_0030 data
checkpoints/nuclei_from_cellmask_epoch_0040 data
checkpoints/nuclei_from_cellmask_epoch_0050 data
checkpoints/nuclei_from_cellmask_epoch_0060 data
checkpoints/nuclei_from_cellmask_epoch_0070 data
checkpoints/nuclei_from_cellmask_epoch_0080 data
checkpoints/nuclei_from_cellmask_epoch_0090 data
qc/best_matched_ious.csv data
qc/best_perimage.csv data
qc/best_perimage_periou.csv data
qc/best_periou.csv data
qc/best_summary.json data
qc/comparison_vs_stock.csv data
qc/final_matched_ious.csv data
qc/final_perimage.csv data
qc/final_perimage_periou.csv data
qc/final_periou.csv data
qc/final_summary.json data
qc/stock_cpsam_v2_matched_ious.csv data
qc/stock_cpsam_v2_perimage.csv data
qc/stock_cpsam_v2_perimage_periou.csv data
qc/stock_cpsam_v2_periou.csv data
qc/stock_cpsam_v2_summary.json data
training/best_perimage.csv training metrics
training/loss_per_epoch.csv training metrics
training/metrics.csv training metrics
training/nuclei_from_cellmask_training_curves.pdf training metrics
training/nuclei_from_cellmask_training_curves.png training metrics
training/report.json training metrics
training/scores/best_matched_ious.csv training metrics
training/scores/best_perimage.csv training metrics
training/scores/best_perimage_periou.csv training metrics
training/scores/best_periou.csv training metrics
training/scores/comparison_vs_stock.csv training metrics
training/scores/final_matched_ious.csv training metrics
training/scores/final_perimage.csv training metrics
training/scores/final_perimage_periou.csv training metrics
training/scores/final_periou.csv training metrics
training/scores/stock_cpsam_v2_matched_ious.csv training metrics
training/scores/stock_cpsam_v2_perimage.csv training metrics
training/scores/stock_cpsam_v2_perimage_periou.csv training metrics
training/scores/stock_cpsam_v2_periou.csv training metrics
weights/nuclei_from_cellmask data
weights/nuclei_from_cellmask_best data

Limitations

  • The held-out split is used for checkpoint selection, so it is validation data rather than a fully independent test set.
  • Targets are automatic reference labels rather than hand-drawn ground truth.
  • Predicts nuclei positions from cell morphology — expect degraded accuracy on unusual or highly confluent morphologies.

Links

  • spaCR on GitHub: https://github.com/EinarOlafsson/spacr
  • Model Zoo API: spacr.model_zoocatalogue(), install(), fetch(), verify()
  • Mask generation API: spacr.core.preprocess_generate_masks
  • Issues and questions: https://github.com/EinarOlafsson/spacr/issues

Identity and Version

Repository
einarolafsson/cross-channel-nuclei-from-cellmask-cpsam
Publisher
Einar Olafsson
Task
Image segmentation
Modality
Image
Library
spacr
Parameters
Not stated by the source
Languages
Not stated by the source
Revision
1ca9e51373822d57c3824ecfdb9a5a5620e4a371
First published
2026-09-17
Last updated
2026-09-18

Files and Weights

49 files, 14.6 GB in total.

Configuration4 files · 13.1 KB
Documentation1 file · 6.3 KB
Other43 files · 14.6 GB
Repository1 file · 2.4 KB
Every file
FileTypeSizeSHA-256
qc/best_summary.jsonConfiguration1.6 KB
qc/final_summary.jsonConfiguration1.6 KB
qc/stock_cpsam_v2_summary.jsonConfiguration1.5 KB
training/report.jsonConfiguration8.4 KB
README.mdDocumentation6.3 KB
checkpoints/nuclei_from_cellmaskOther1.2 GB 7cb170176235
checkpoints/nuclei_from_cellmask_epoch_0010Other1.2 GB 9cb518c471bd
checkpoints/nuclei_from_cellmask_epoch_0020Other1.2 GB a0f4c65ad51b
checkpoints/nuclei_from_cellmask_epoch_0030Other1.2 GB f1b222026d3e
checkpoints/nuclei_from_cellmask_epoch_0040Other1.2 GB 83ea1c079459
checkpoints/nuclei_from_cellmask_epoch_0050Other1.2 GB c9c04085cd69
checkpoints/nuclei_from_cellmask_epoch_0060Other1.2 GB 2675553a46e9
checkpoints/nuclei_from_cellmask_epoch_0070Other1.2 GB 4139134a5059
checkpoints/nuclei_from_cellmask_epoch_0080Other1.2 GB 3501a3ccfa48
checkpoints/nuclei_from_cellmask_epoch_0090Other1.2 GB 96f7a41287bf
qc/best_matched_ious.csvOther2.8 MB
qc/best_perimage.csvOther83.2 KB
qc/best_perimage_periou.csvOther450.2 KB
qc/best_periou.csvOther2.2 KB
qc/comparison_vs_stock.csvOther2.9 KB
qc/final_matched_ious.csvOther2.8 MB
qc/final_perimage.csvOther83.1 KB
qc/final_perimage_periou.csvOther449.8 KB
qc/final_periou.csvOther2.2 KB
qc/stock_cpsam_v2_matched_ious.csvOther2.8 MB
qc/stock_cpsam_v2_perimage.csvOther82.6 KB
qc/stock_cpsam_v2_perimage_periou.csvOther425.5 KB
qc/stock_cpsam_v2_periou.csvOther2.1 KB
training/best_perimage.csvOther40.2 KB
training/loss_per_epoch.csvOther1.5 KB
training/metrics.csvOther2.2 KB
training/nuclei_from_cellmask_training_curves.pdfOther17.8 KB
training/nuclei_from_cellmask_training_curves.pngOther83.6 KB
training/scores/best_matched_ious.csvOther2.8 MB
training/scores/best_perimage.csvOther83.2 KB
training/scores/best_perimage_periou.csvOther450.2 KB
training/scores/best_periou.csvOther2.2 KB
training/scores/comparison_vs_stock.csvOther2.9 KB
training/scores/final_matched_ious.csvOther2.8 MB
training/scores/final_perimage.csvOther83.1 KB
training/scores/final_perimage_periou.csvOther449.8 KB
training/scores/final_periou.csvOther2.2 KB
training/scores/stock_cpsam_v2_matched_ious.csvOther2.8 MB
training/scores/stock_cpsam_v2_perimage.csvOther82.6 KB
training/scores/stock_cpsam_v2_perimage_periou.csvOther425.5 KB
training/scores/stock_cpsam_v2_periou.csvOther2.1 KB
weights/nuclei_from_cellmaskOther1.2 GB 7cb170176235
weights/nuclei_from_cellmask_bestOther1.2 GB 2675553a46e9
.gitattributesRepository2.4 KB

License and Download

License
mit
Access
Open weights, no gate
Download from Einar Olafsson

Released by Einar Olafsson through its official repository on Hugging Face. Read the license.

Questions About cross-channel-nuclei-from-cellmask-cpsam

Can I use cross-channel-nuclei-from-cellmask-cpsam commercially?

Yes. cross-channel-nuclei-from-cellmask-cpsam is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

Model · Image segmentation

segformer-b2-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

segformer-b3-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

oneformer_ade20k_swin_large

SHI Labs

OneFormer model trained on the ADE20k dataset (large-sized version, Swin backbone). It was introduced in the paper OneFormer: One Transformer to Rule Universal Image Segmentation by Jain et al. and first released in this repository. OneFormer is the first multi-task universal image segmentation framework. It needs to be trained only once with a single universal architecture, a single model, and on a single dataset, to outperform existing specialized models across semantic, instance, and panoptic segmentation tasks. OneFormer uses a task token to condition the model on the task in focus, making the architecture task-guided for training, and task-dynamic for inference, all with a single…

Open weights mit transformers

Model · Image segmentation

segformer-b1-finetuned-ade-512-512

NVIDIA

SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers by Xie et al. and first released in this repository. Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a…

Open weights other transformers

Model · Image segmentation

segformer-b0-finetuned-ade-512-512

Joshua

https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512 with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Example: Image segmentation with Xenova/segformer-b0-finetuned-ade-512-512. You can visualize the outputs with: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Open weights transformers.js

Model · Image segmentation

DelineateAnything

Mykola Lavreniuk

Delineate Anything v2 extends Delineate Anything into a globally representative, resolution-agnostic foundation model that scales agricultural field boundary detection to a planetary level from any imagery source. Trained on FBIS-73M, a massive 73-million-instance dataset spanning 61 countries with diverse imagery sources ranging from 0.25m to 10m resolution, built through a resolution-specific curation pipeline that solves the parcel-versus-field mismatch, Delineate Anything v2 sets a new state-of-the-art in global zero-shot delineation. It delivers a +103.3% relative gain in [email protected] over Delineate Anything while maintaining extreme efficiency, mapping all of Ukraine (603,000 km²) in 5.4…

Open weights agpl-3.0 ultralytics