Learning to Model Pixel-Embedded Affinity for Homogeneous Instance Segmentation

Wei Huang, Shiyu Deng, Chang Chen, Xueyang Fu, Zhiwei Xiong

Introduction

Homogeneous instance segmentation involves identifying and delineating individual objects that belong to the same category and possess nearly identical visual characteristics. This task is particularly prevalent in biological and agricultural imaging, such as segmenting cell nuclei in microscopy or individual leaves in plant phenotyping. Unlike general instance segmentation, homogeneous tasks are complicated by dense packing, overlapping boundaries, and a lack of distinct semantic features to differentiate adjacent instances.

Existing proposal-free methods typically rely on either Affinity Learning or Metric Learning. Affinity learning predicts the probability that two pixels belong to the same object, but often lacks global structural awareness. Metric learning maps pixels into an embedding space where distance represents instance identity; however, it frequently struggles with local spatial precision, leading to merged instances when objects touch. This paper proposes a hybrid approach: Pixel-Embedded Affinity Modeling.

The Pixel-Embedded Affinity Framework

The core innovation of this work is the explicit modeling of affinity as a mathematical function of learned pixel embeddings. Instead of predicting a single probability value, the network learns high-dimensional embeddings for every pixel. Affinity is then calculated as the cosine similarity between these embeddings.

The proposed framework architecture, illustrating the Siamese network and the interaction between the Embedding Pyramid, Self-Correlation, and Cross-Correlation modules.

As shown in the architecture above, the framework utilizes three primary modules to refine these embeddings:

  1. Self-Correlation Module (SCM): This module calculates the similarity between a pixel and its local neighbors. By supervising this with ground-truth labels, the model learns to create embeddings that are highly similar within an object but change abruptly at boundaries.
  2. Cross-Correlation Module (CCM): Utilizing a Siamese network structure, the CCM enforces semantic consistency. It compares embeddings from an original image with those from a transformed version (e.g., rotated or flipped). This forces the model to recognize the same instance regardless of its orientation or lighting conditions.
  3. Embedding Pyramid Module (EPM): To handle the multi-scale nature of objects, the EPM models affinity at various levels of the decoder. This ensures that small instances are not overlooked or merged into larger neighbors.

Experimental Results

The proposed method was evaluated on three major benchmarks: the CVPPP plant leaf dataset, the BBBC039V1 nuclei dataset, and the AC3/AC4 3D electron microscopy dataset for neuron reconstruction.

Qualitative comparison on the CVPPP dataset. The proposed method (d) produces cleaner affinity maps and more accurate instance separations compared to traditional affinity (b) or metric learning (c) approaches.

As illustrated in the visual comparisons, the pixel-embedded affinity approach excels at finding the "cracks" between touching objects. In the CVPPP dataset, the model achieved a Symmetric Best Dice (SBD) score of 92.3%, outperforming previous state-of-the-art methods like PFFNet. In biomedical applications, it reached an Aggregated Jaccard Index (AJI) of 0.8674 for cell nuclei, significantly surpassing general-purpose models like Mask R-CNN.

Ablation studies confirmed that the Cross-Correlation Module is critical for performance; removing it leads to a significant drop in accuracy, highlighting the importance of enforcing semantic consistency across different views for distinguishing identical-looking instances.

Conclusion

By combining the global grouping strengths of metric learning with the local precision of affinity learning, the Pixel-Embedded Affinity framework provides a robust solution for homogeneous instance segmentation. While the method currently relies on the Mutex Watershed algorithm for post-processing, its ability to generate highly discriminative embeddings sets a new standard for dense, identical-object segmentation tasks. Future work may focus on making the grouping step end-to-end trainable to further streamline the pipeline.

Summary updated

BibTeX
@inproceedings{huang2022learning,
  author = {Wei Huang and Shiyu Deng and Chang Chen and Xueyang Fu and Zhiwei Xiong},
  title = {{Learning to Model Pixel-Embedded Affinity for Homogeneous Instance Segmentation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i1.19984},
}
Figure