Sketchpose: Learning to Segment Cells with Partial Annotations

Clément Cazorla, Nathanaël Munier, Renaud Morin, Pierre WeissarXiv 2025 · DOI · arXiv

TL;DR

This paper introduces Sketchpose, a novel method for cell segmentation that significantly reduces the annotation effort required by traditional deep learning approaches. By leveraging partially annotated images and a distance-map-based approach, Sketchpose achieves comparable segmentation quality to fully supervised methods with a fraction of the annotation time, making it a valuable tool for biological image analysis.

What Problem Does This Paper Address?

Accurate cell segmentation is crucial for quantitative analysis in biological research. State-of-the-art methods, like Cellpose and StarDist, often rely on distance maps for high accuracy but demand fully annotated datasets. Creating these datasets is extremely time-consuming and labor-intensive, posing a significant bottleneck for researchers. This paper addresses the challenge of achieving high-quality cell segmentation with significantly reduced annotation effort, specifically by enabling the use of partial annotations within a distance-map-based framework.

Methods

The core of Sketchpose is an adaptation of the Omnipose architecture, which uses a convolutional neural network (CNN) to predict a boundary probability map, a distance map to object boundaries, and a "flow field" representing the gradient of the distance map. Sketchpose modifies this by:

  • Partial Annotations: Instead of requiring complete segmentation masks, Sketchpose utilizes user-drawn "sketches" or strokes to delineate background, foreground, and boundaries.
  • Valid Distance Set: A key theoretical contribution is the definition of a "valid distance set" (D). This set comprises pixels that are closer to the user-drawn boundaries (B) than to the boundaries of the annotated foreground strokes (S). This allows the distance map prediction to be meaningful even with incomplete annotations.
  • Modified Loss Functions: The training losses are adapted to operate on this valid distance set, effectively ignoring regions where annotations are absent or ambiguous. This includes a modified distance loss and an asymmetric loss to handle inequalities derived from the valid distance set theorem.
  • Simplified Architecture: The boundary prediction channel is removed from the network, as it's not strictly necessary for generating masks when using the distance map and flow field.
  • User-Friendly Plugin: The method is implemented as a user-friendly Napari plugin, allowing for interactive annotation and real-time visualization of training progress. This "human-in-the-loop" approach facilitates efficient, iterative refinement of annotations.

Datasets

The paper evaluates Sketchpose on several datasets:

  • MicrobeSeg dataset: Contains fluorescent microscopy images of bacteria with approximately 30,000 manually annotated objects. It's a mix of datasets from Omnipose and the Cell Tracking Challenge.
  • PanNuke dataset: Consists of 7,904 histopathology image tiles with nuclear instance segmentations and five-class nuclear type annotations.
  • Various biological images: Used for qualitative demonstrations, including dendritic cells, osteoclasts, bacteria, insect eggs, adipose tissue, and artistic cell images.

Key Insights and Ideas

  • Partial Annotations are Sufficient: The most significant insight is that high-quality cell segmentation can be achieved with surprisingly few partial annotations, challenging the long-held belief that exhaustive annotation is a prerequisite for distance-map-based methods.
  • Theoretical Foundation for Partial Annotations: The development of the "valid distance set" provides a rigorous mathematical framework for how partial boundary information can be leveraged to compute meaningful distance maps.
  • Interactive Learning is Powerful: The integration with Napari and the ability to annotate while training (active learning) significantly speeds up the annotation process and allows users to focus on challenging regions.
  • Dataset Characteristics Matter: The effectiveness of sparse annotations varies. Simpler, convex objects (like in PanNuke) benefit more from sparse annotations than complex, elongated, or touching objects (like in MicrobeSeg).

Key Results

  • Significant Annotation Time Savings: Sketchpose can achieve comparable or even superior segmentation quality to fully supervised methods with a fraction of the annotation time. For example, annotating eggs on a leaf took less than a minute, and training was completed in approximately 2 minutes.
  • Competitive Performance: On the MicrobeSeg dataset, Sketchpose with 100% annotations performed comparably to Cellpose, and with 50% and 25% annotations, it still achieved strong results, outperforming Cellpose at lower annotation densities in some metrics. On the PanNuke dataset, Sketchpose maintained stable performance even with reduced annotations.
  • Improved Transfer Learning: When fine-tuning pre-trained Omnipose models, Sketchpose with sparse annotations led to significantly improved segmentation quality, particularly for challenging cases like touching bacteria and adipocytes.
  • Robustness to Sparsity: Even with as little as 10% of pixels annotated, Sketchpose showed a performance drop that was often acceptable, especially for datasets with simpler object shapes.

Limitations and Future Work

  • Training Time: While annotation time is reduced, training time can still be substantial, especially for large datasets. The authors plan to improve training speed for a more interactive experience.
  • 3D Extension: The current formalism is primarily for 2D segmentation. Extending the methodology to 3D is a significant future direction, though it presents challenges due to the nature of distance functions in higher dimensions.
  • Multi-Class Segmentation: While the framework is conceptually extendable to multiple classes, practical implementation and validation for multi-class scenarios are future work.
  • Expert Annotation: The paper suggests that targeted annotations by experts could yield even better results than random sampling, hinting at future work in guided annotation strategies.

Summary updated

BibTeX
@misc{cazorla2025sketchpose,
  author = {Clément Cazorla and Nathanaël Munier and Renaud Morin and Pierre Weiss},
  title = {{Sketchpose: Learning to Segment Cells with Partial Annotations}},
  year = {2025},
  eprint = {2508.17798},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.17798},
}
Figure