Introduction
Instance segmentation—the task of detecting and delineating every individual object in an image—is a cornerstone of biomedical research. However, microscopy data presents unique challenges that standard computer vision tools often struggle to solve. Biological structures frequently exhibit complex, non-convex geometries, random orientations, and require processing large 3D volumes that create computational bottlenecks. Existing tools like StarDist assume objects are "star-convex" (roughly round), while others like Mask R-CNN rely on axis-aligned bounding boxes that poorly fit diagonal or curved biological structures.
Methodology: Spatial Embeddings and the Medoid Advantage
EmbedSeg is a bottom-up instance segmentation method based on spatial embeddings. It utilizes a branched neural network (specifically a 3D-capable ERF-Net) to predict three values for every pixel:
- Spatial Embedding: An offset vector pointing toward the object's "center."
- Clustering Bandwidth ($\sigma$): A predicted margin of error, where larger objects receive larger margins.
- Seediness Score: A probability indicating the likelihood of a pixel being a true object center.
The Medoid Innovation
Most embedding methods target the centroid (geometric average). However, for "C" or "U" shaped objects, the centroid often lies outside the object itself. EmbedSeg instead targets the medoid—the pixel within the object that has the smallest average distance to all other pixels. This ensures the "home base" for every pixel is physically inside the object, significantly improving results for non-convex biological shapes.
Datasets and Benchmarks
The authors evaluated EmbedSeg on three established 2D datasets: BBBC010 (C. elegans worms), Usiigaci (NIH/3T3 cells), and DSB (nuclei). Additionally, the study introduces four new 3D microscopy datasets to the community, covering labeled membranes and nuclei in organoids, embryos, and whole-mount specimens.
Key Results
EmbedSeg consistently outperforms or matches top-tier baselines like Cellpose, StarDist, and Mask R-CNN across various metrics.
Quantitative Performance
On the BBBC010 dataset, EmbedSeg achieved a Mean Average Precision (AP) of 0.965 at a 0.5 IoU threshold. Notably, the performance gap often widens at higher IoU thresholds (e.g., AP$_{0.90}$), suggesting that EmbedSeg produces more accurate boundaries than its competitors. In 3D tasks, EmbedSeg significantly outperformed StarDist-3D and Cellpose on datasets with irregular morphologies, such as the Mouse-Skull and ISH-Nuclei datasets.
Efficiency and Accessibility
A major advantage of EmbedSeg is its efficiency. While many 3D segmentation methods require high-end server GPUs with 32GB+ of VRAM, EmbedSeg can train on 3D volumes using as little as 7GB. This makes high-quality instance segmentation accessible to researchers using standard consumer-grade hardware.
Conclusion
By combining spatial embeddings with a medoid-based clustering target, EmbedSeg provides a robust and efficient solution for segmenting the diverse shapes found in microscopy. While specialized tools like StarDist remain effective for simple round nuclei, EmbedSeg's flexibility and low memory footprint make it a powerful general-purpose tool for the bioimaging community.
Paper Link: Proceedings of Machine Learning Research 143:399–415, 2021
Code: https://github.com/juglab/EmbedSeg
Summary updated