Spot detection for single-molecule RNA FISH and fluorescence microscopy, trained on a differentiable F1 approximation, needing no threshold tuning.
No providers recorded yet. Browse all providers
Single-molecule RNA FISH turns individual transcripts into diffraction-limited puncta, and quantifying gene expression from those images reduces to a deceptively simple task: find the spots. In practice this is where the pipeline stalls. The standard tools apply a Laplacian-of-Gaussian or Difference-of-Gaussian bandpass filter and then require a human to pick an intensity threshold — a choice that has to be revisited between fields of view, and sometimes within one. Worse, in tissue sections with bright autofluorescence, filter-based detectors report dense clusters of spurious spots that distort per-cell transcript counts outright.
Piscis is a pretrained deep learning spot detector built to remove the tuning step. It came out of the Raj lab at the University of Pennsylvania with collaborators at Northwestern and MIT, first posted as a preprint in early 2024 and published in Cell Systems in 2025. Its central contribution is not the network but the objective: the SmoothF1 loss, a differentiable approximation of the F1 score.
That choice addresses the defining pathology of spot detection, class imbalance. Almost every pixel in a FISH image is background, so a pixel-wise cross-entropy loss is dominated by the negative class and yields models that miss real spots. Dice loss — used by the earlier deepBlink — mitigates this but still underdetects in noisy tissue images. F1 balances false positives against false negatives exactly, and is the metric the field already reports, but it is non-differentiable and so unusable for gradient descent. SmoothF1 makes it trainable, and the approach generalizes to any class-imbalanced detection problem.
The network is a Feature Pyramid Network with a modified EfficientNetV2 backbone. The bottom-up pathway extracts four feature maps at 32, 64, 128, and 256 channels, downsampling by max pooling rather than strided convolution; a 256-dimensional image style vector, computed by global average pooling of the deepest features, is broadcast into every level of the top-down pathway — a design borrowed from Cellpose. Three output maps carry the binary spot classification and the horizontal and vertical displacement components. A deformable sum pooling operation shifts each classification value by its displacement vector, producing a sharply peaked confidence map that local-maxima analysis converts into coordinates.
Training data comprised 358 manually annotated experimental RNA FISH and HCR RNA FISH images (23,222 spots) across human fibroblasts, melanoma, lung adenocarcinoma, and macrophages, plus 240 synthetic images (24,768 spots) reused from the deepBlink datasets, for 608 images split 418/89/91. On the held-out test set Piscis reached a mean F1 of 0.895, against 0.863 for deepBlink retrained on the same data, 0.756 for globally tuned TrackMate, and 0.665 for RS-FISH. Inference on a 256 × 256 image takes 0.042 s on a Colab T4 GPU and 3.34 s on CPU.
Piscis is used wherever transcripts or particles have to be counted from fluorescence images at scale: single-molecule RNA FISH and HCR FISH experiments, and the barcode-reading rounds of FISH-based spatial transcriptomics, where every imaging round is itself a spot detection problem. The project reports it also transfers to immunofluorescence images. It ships as a pip-installable Python package with a CLI, a scripting API, and a Docker-based GUI wired into the NimbusImage annotation platform, and the pretrained checkpoints are hosted on Hugging Face.
Piscis is a narrow model — one task, one image modality family — but a genuinely reusable pretrained one, in the same mold as CellSAM for segmentation: a checkpoint a wet-lab group can point at new images without retraining. Its broader contribution is the SmoothF1 loss, which is not specific to microscopy and applies to any detection or segmentation task where the positive class is rare and F1 is the metric that matters. The code is MIT licensed and actively released, and the work has been peer reviewed. The preprint itself carries a more restrictive CC BY-NC-ND license than the software. Generalization beyond RNA FISH is reported by the developers rather than benchmarked in the paper, and the model detects spots only — assigning them to cells still requires a separate segmentation step.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.