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

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 +contrast augmentation 0.480
3 +calibration loss 0.509
4 +warmup/cosine/early stop (80 ep) 0.495
4b Same, 120 epochs 0.516

Full training logs are available in the GitHub repository.

Downloads last month
23
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including rajlab/condensatenet-v1