Skip to content
ModelListedExternal
Download

Condensatenet v1

Semantic segmentation model for detecting biomolecular condensates (puncta / stress granules) in fluorescence microscopy images.

KindOtherVersionRevision 058ce8c

Model source

Kind
Other
File size
84.9 MB
Version
vRevision 058ce8c
Updated
Sep 15, 2026
Downloads
12
Tasks
Image segmentation
Source
Hugging Face

Source description

CondensateNet v1

Semantic segmentation model for detecting biomolecular condensates (puncta / stress granules) in fluorescence microscopy images.

Model Description

  • Architecture: EfficientNetV2-S encoder with style-modulated Feature Pyramid Network (FPN) and dual output heads (binary mask + Cellpose-style flow fields)
  • Parameters: 22.2M
  • Input: Single-channel grayscale microscopy tile (320x320), percentile-normalized to [0, 1]
  • Output: Binary segmentation mask logits + 2-channel flow field

Training

  • Data: 245 validated image-mask pairs from 14 experiment types (fluorescence microscopy of various condensate-forming proteins)
  • Split: 158 train / 26 val (stratified by experiment, with caps on overrepresented experiments)
  • Loss: Focal + Tversky + flow MSE + differentiable calibration (soft-binned ECE)
  • Optimizer: AdamW with linear warmup (5 epochs) + cosine annealing (120 epochs total, early stopped at epoch 94)
  • Augmentation: Experiment-aware augmentation tiers (light/medium/heavy) with strong contrast scaling, CLAHE, intensity scaling (0.3x-2.0x), geometric transforms

Metrics (validation set)

MetricValue
Dice0.5164
F10.5164
IoU0.3505

Inference metrics (full validation set, per-tile with threshold search)

MetricMeanStd
Dice0.5340.155
Precision0.5170.151
Recall0.5880.203

Usage

from condensatenet import CondensateNetPipeline

# Load from HuggingFace
pipeline = CondensateNetPipeline.from_pretrained("rajlab/condensatenet-v1")

# Segment an image
instances = pipeline.segment(image)
print(f"Found {instances.max()} condensates")

# Or load from a local download
pipeline = CondensateNetPipeline.from_local("/path/to/model")

Intended Use

Research tool for detecting biomolecular condensates in fluorescence microscopy. Not intended for clinical or diagnostic use.

Training Runs

This model was iteratively improved over 5 training runs:

RunChangesVal Dice
1Baseline0.503
2+contrast augmentation0.480
3+calibration loss0.509
4+warmup/cosine/early stop (80 ep)0.495
4bSame, 120 epochs0.516

Full training logs are available in the GitHub repository.

Sources

1 source
Hugging FacePrimaryVersion 058ce8cebbd175ec7377be3c43d50b53d2bc6bc4
huggingface.co/rajlab/condensatenet-v1/tree/058ce8cebbd175ec7377be3c43d50b53d2bc6bc4

Verified Sep 15

Model artifacts

1 artifact

model.safetensors

safetensors · 84.9 MB · SHA-256 ced7be903da4…4b46 · Hugging Face

Download

Source excerpts

2 excerpts

--- language: en library_name: pytorch license: mit metrics: - type: dice value: 0.5164 - type: f1 value: 0.5164 - type: iou value: 0.3505 tags: - image-segmentation - microscopy - condensate-detection - cellpose-flows - efficientnetv2 --- # CondensateNet v1 Semantic segmentation model for detecting biomolecular condensates (puncta / stress granules) in fluorescence microscopy images. ## Model Description - **Architecture**: EfficientNetV2-S encoder with style-modulated Feature Pyramid Network (FPN) and dual output heads (binary mask + Cellpose-style flow fields) - **Parameters**: 22.2M - **Input**: Single-channel grayscale microscopy tile (320x320), percentile-normalized to [0, 1] - **Output**: Binary segmentation mask logits + 2-channel flow field ## Training - **Data**: 245 validated image-mask pairs from 14 experiment types (fluorescence microscopy of various condensate-forming proteins) - **Split**: 158 train / 26 val (stratified by experiment, with caps on overrepresented experiments) - **Loss**: Focal + Tversky + flow MSE + differentiable calibration (soft-binned ECE) - **Optimizer**: AdamW with linear warmup (5 epochs) + cosine annealing (120 epochs total, early stopped at epoch 94) - **Augmentation**: Experiment-aware augmentation tiers (light/medium/heavy) with strong contrast scaling, CLAHE, intensity scaling (0.3x-2.0x), geometric transforms ### Metrics (validation set) | Metric | Value | |--------|-------| | Dice | 0.5164 | | F1 | 0.5164 | | IoU | 0.3505 | ### Inference metrics (full validation set, per-tile with threshold search) | Metric | Mean | Std | |--------|------|-----| | Dice | 0.534 | 0.155 | | Precision | 0.517 | 0.151 | | Recall | 0.588 | 0.203 | ## Usage ```python from condensatenet import CondensateNetPipeline # Load from HuggingFace pipeline = CondensateNetPipeline.from_pretrained("rajlab/condensatenet-v1") # Segment an image instances = pipeline.segment(image) print(f"Found {instances.max()} condensates") # Or load from a local download pipeline = CondensateNetPipeline.from_local("/path/to/model") ``` ## Intended Use Research tool for detecting biomolecular condensates in fluorescence microscopy. Not intended for clinical or diagnostic use. ## Training Runs This model was iteratively improved over 5 training runs: | Run | Changes | Val Dice | |-----|---------|----------| | 1 | Baseline | 0.503 | | 2 | +c...

Source context: 12 downloads · 0 likes · Pipeline image-segmentation · Library pytorch · Repo rajlab/condensatenet-v1