Contour proposal networks for biomedical instance segmentation

Eric Upschulte, Stefan Harmeling, Katrin Amunts, Timo Dickscheid

TL;DR

The Contour Proposal Network (CPN) is a novel, single-stage instance segmentation framework that models object boundaries in the frequency domain using Fourier Descriptors. By framing segmentation as a sparse parameter regression problem rather than dense pixel classification, CPN accurately recovers overlapping and non-convex object shapes, outperforming standard U-Nets and Mask R-CNNs in biomedical imaging tasks while maintaining real-time inference speeds.

What Problem Does This Paper Address?

Accurately segmenting individual cells or nuclei in microscopic images is a foundational task in biomedical analysis. However, standard approaches hit a wall when dealing with "crowded" environments where cells touch or overlap.

Traditional pixel classifiers (like the classic U-Net) assign a single class label to each pixel. When two cells overlap, this pixel-level ambiguity causes the network to merge them or incorrectly truncate their shapes. On the other hand, proposal-based methods like Mask R-CNN rely on bounding boxes and multi-stage pixel masking, which can be computationally heavy and struggle with fine boundary precision. Recent star-convex methods (like StarDist) solve some of these issues but are mathematically limited to "star-shaped" domains, failing completely on complex, non-convex structures like curved neurons.

Methods

The Contour Proposal Network (CPN) bypasses pixel-level classification bottlenecks by representing object boundaries as closed contours encoded by a fixed-size vector of Fourier Descriptors.

The Contour Proposal Network (CPN) architecture overview.

The pipeline works as follows:

  1. Backbone CNN: A backbone network (such as a U-Net or ResNet) extracts low-resolution ($P_2$) and high-resolution ($P_1$) feature maps from the input image.
  2. Classification & Contour Regression: Using the low-resolution features ($P_2$), a classification head determines if an object center is present at a pixel, while a parallel regression head predicts the Fourier coefficients ($a_n, b_n, c_n, d_n$) that define the object's shape.
  3. Fourier Transformation: These coefficients are mapped back into 2D pixel space using a fully differentiable Fourier sine and cosine transformation.
  4. Local Refinement: To achieve pixel-perfect accuracy, a refinement regression head uses the high-resolution features ($P_1$) to generate a 2D residual vector field. This field iteratively shifts the predicted contour coordinates to snap tightly onto the actual object boundaries.
Example of the local refinement step shifting contour coordinates to maximize pixel precision.

Datasets

The authors evaluated CPN across four distinct datasets representing different modalities and challenges:

  • NCB (Neuronal Cell Bodies): A challenging dataset consisting of 82 grayscale microscopic scans of brain tissue containing ~29,000 highly irregular, overlapping, and occluded neuronal cell bodies.
  • BBBC039: A high-throughput chemical screen dataset from the Broad Institute containing ~23,000 annotated cell nuclei.
  • BBBC041 (Malaria-infected blood smears): Consisting of 1,364 images (~80,000 cells) annotated with bounding boxes, used exclusively to test cross-dataset generalization.
  • SYNTH (Synthetic Shapes): A large dataset of over 1.3 million annotated synthetic objects ranging from simple circles to complex, non-convex shapes.
Sample patches from the diverse datasets used in the study.

Key Insights and Ideas

  • The Power of the Frequency Domain: Representing shapes via Fourier Descriptors inherently guarantees that the proposed contours are closed and continuous. Furthermore, adjusting the order hyperparameter ($N$) allows users to naturally scale the geometric complexity the network can capture.
  • Holistic Object Understanding: Because the network condenses an entire object's description into a single pixel anchor, it is forced to learn the global spatial relationships of the object's parts. This allows it to hallucinate highly plausible boundaries even when a cell is partially occluded or its borders are virtually invisible.
  • Feature Space Synergy: Training a backbone network (like a U-Net) as part of a CPN actually improves the backbone's underlying feature representation. When the authors froze a CPN-trained U-Net backbone and reused it for a standard semantic segmentation task, it generalized to unseen datasets significantly better than a traditionally trained U-Net.
Varying the Fourier order $N$ allows the network to capture increasingly complex, non-convex shapes.

Key Results

CPN consistently outperformed baseline models across all evaluation metrics, particularly at high Intersection over Union (IoU) thresholds, which demand strict boundary precision.

Qualitative comparison showing CPN successfully separating touching cells where baseline methods fail or distort shapes.
  • Accuracy: On the challenging Neuronal Cell Bodies (NCB) dataset, the best CPN variant achieved an average F1-score ($F1_{avg}$) of 0.55, significantly outperforming the baseline U-Net (0.47) and Mask R-CNN (0.34).
  • Generalization: When trained on BBBC039 and tested directly on the unseen BBBC041 dataset without retraining, CPN achieved a bounding box F1-score of 0.54 at $\tau=0.5$, compared to U-Net's 0.45.
  • Inference Speed: CPN variants proved highly efficient. A ResNet-50-FPN backed CPN achieved 29.86 FPS in standard single-precision (float32), making it viable for real-time video processing. Utilizing automatic mixed precision (amp), a strided U-Net backbone variant reached an impressive 42.20 FPS.

Limitations and Future Work

The primary limitation of CPN stems from its core architectural assumption: objects must have closed contours. It cannot be directly applied to open structures like independent blood vessels or neural pathways without modification. Additionally, this study focused strictly on the binary case (object vs. background); extending the framework to handle multi-class instance segmentation remains an open direction for future engineering.

Summary updated

BibTeX
@article{upschulte2022contour,
  author = {Eric Upschulte and Stefan Harmeling and Katrin Amunts and Timo Dickscheid},
  title = {{Contour proposal networks for biomedical instance segmentation}},
  journal = {Medical Image Analysis},
  year = {2022},
  doi = {10.1016/j.media.2022.102371},
}
Figure