20q-REGE-2D Cellpose Models

This repository contains custom-trained Cellpose models for the REGE-Nusa project (LIVR-VUB). These models are fine-tuned for segmenting cells and nuclei in 2D microscopy images from 20q-REGE experiments.

Available Models

  • cpsam_20q_cells: Fine-tuned model for whole-cell segmentation (cytoplasm).
  • cpsam_20qP_nuclei: Fine-tuned model for nuclei segmentation.

How to Download

You can download the models directly from the Hugging Face hub using the huggingface_hub Python library or by cloning the repository.

Option 1: Using Python (Recommended)

from huggingface_hub import hf_hub_download

# Download Cell Model
cell_model_path = hf_hub_download(repo_id="LIVR-VUB/20q-REGE-2D", filename="cpsam_20q_cells")
print(f"Cell model downloaded to: {cell_model_path}")

# Download Nuclei Model
nuclei_model_path = hf_hub_download(repo_id="LIVR-VUB/20q-REGE-2D", filename="cpsam_20qP_nuclei")
print(f"Nuclei model downloaded to: {nuclei_model_path}")

Option 2: Git Clone

git lfs install
git clone https://huggingface.co/LIVR-VUB/20q-REGE-2D

How to Use with Cellpose

Once downloaded, you can load these custom models in Cellpose using the CLI or Python API.

Python API

from cellpose import models, io

# Load the model
# For the cell model (cytoplasm)
model = models.CellposeModel(gpu=True, pretrained_model='/path/to/downloaded/cpsam_20q_cells')

# Run segmentation
# channels = [cytoplasm, nucleus] (usually [1, 2] or similar depending on your data)
masks, flows, styles = model.eval(images, diameter=None, channels=[1, 2])

CLI

python -m cellpose --pretrained_model /path/to/downloaded/cpsam_20q_cells --dir /path/to/images --chan 1 --chan2 2
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

Model tree for LIVR-VUB/20q-REGE-2D

Finetuned
(5)
this model