Deep Convolutional Neural Networks Meet Variational Shape Compactness Priors for Image Segmentation

Kehui Zhang, Lingfeng Li, Hao Liu, Jing Yuan, Xue‐Cheng Tai · DOI

Abstract

Shape compactness is a key geometrical property to describe interesting regions in many image segmentation tasks. In this paper, we propose two novel algorithms to solve the introduced image segmentation problem that incorporates a shape-compactness prior. Existing algorithms for such a problem often suffer from computational inefficiency, difficulty in reaching a local minimum, and the need to fine-tune the hyperparameters. To address these issues, we propose a novel optimization model along with its equivalent primal-dual model and introduce a new optimization algorithm based on primal-dual threshold dynamics (PD-TD). Additionally, we relax the solution constraint and propose another novel primal-dual soft threshold-dynamics algorithm (PD-STD) to achieve superior performance. Based on the variational explanation of the sigmoid layer, the proposed PD-STD algorithm can be integrated into Deep Neural Networks (DNNs) to enforce compact regions as image segmentation results. Compared to existing deep learning methods, extensive experiments demonstrated that the proposed algorithms outperformed state-of-the-art algorithms in numerical efficiency and effectiveness, especially while applying to the popular networks of DeepLabV3 and IrisParseNet with higher IoU, dice, and compactness metrics on noisy Iris datasets. In particular, the proposed algorithms significantly improve IoU by 20% training on a highly noisy image dataset.

Introduction

Image segmentation—the process of partitioning an image into meaningful regions—is a fundamental task in computer vision. While Deep Neural Networks (DNNs) have set new benchmarks in this field, they often struggle with "noise." When images are blurry, corrupted by static, or partially occluded, standard DNNs frequently produce fragmented or jagged results that lack physical coherence. This is particularly problematic in medical imaging or biometric identification, where the objects of interest (such as irises or optic discs) are known to possess specific geometric properties like smoothness and circularity.

In classical mathematics, variational methods address these issues by introducing "priors"—mathematical constraints that guide the solution toward expected shapes. One such prior is shape compactness, which favors regions that minimize the ratio of squared perimeter to area. However, integrating these classical geometric constraints into modern, end-to-end deep learning architectures has historically been difficult due to computational inefficiency and the non-differentiable nature of many variational algorithms.

Methodology

This research bridges the gap between classical variational geometry and modern deep learning through two primary contributions: the development of efficient optimization algorithms and a novel interpretation of neural network activation layers.

1. Primal-Dual Threshold Dynamics

The authors propose two new algorithms to solve the compactness problem: Primal-Dual Threshold Dynamics (PD-TD) and its differentiable counterpart, Primal-Dual Soft Threshold Dynamics (PD-STD). These algorithms utilize a Gaussian kernel to approximate boundary length (perimeter), transforming a complex non-convex optimization problem into a manageable primal-dual framework. This approach avoids the common pitfalls of existing methods, such as extreme sensitivity to hyperparameters or slow convergence speeds.

2. The Variational Sigmoid Layer

A key insight of this paper is the reinterpretation of the standard sigmoid activation function. The authors demonstrate that the sigmoid layer, used in nearly all binary segmentation networks, can be viewed as the solution to a specific variational optimization problem. By replacing the standard sigmoid layer with the proposed PD-STD block, the researchers effectively "bake" geometric common sense into the network architecture. This PD-STD block is "unrolled" as a series of sub-layers, making the entire process differentiable and allowing the network to learn to enforce shape compactness during training.

Experimental Setup and Results

The proposed framework was evaluated on datasets where circularity is a natural prior, specifically the UBIRIS.v2 (Iris Dataset) and a Fundus Dataset for optic disc segmentation. To test the robustness of the model, varying levels of Gaussian and Salt-and-Pepper noise were added to the images.

Quantitative Performance

The integration of the PD-STD block yielded significant improvements in segmentation accuracy, particularly in high-noise environments:

  • IoU Gains: On highly noisy Iris datasets, the proposed method improved the Intersection over Union (IoU) by 20% compared to standard architectures like DeepLabV3.
  • Circularity Metrics: Using a compactness ratio (where a perfect circle is $4\pi \approx 12.56$), the PD-STD-enhanced models produced results much closer to ideal shapes. Standard models often produced scores exceeding 20 or 30 in noisy conditions, indicating highly irregular boundaries.
  • Computational Efficiency: The PD-STD approach proved significantly faster than previous state-of-the-art methods (such as those based on ADMM), reducing computation time from approximately 35 seconds to 4 seconds in benchmark tests.

Qualitative Impact

Visually, the difference is stark. While standard networks often produce fragmented "blobs" when faced with heavy noise, the PD-STD-enhanced networks maintain clear, smooth, and circular boundaries that closely match the ground truth. The research also found that Progressive Training—starting with low-noise images and gradually increasing noise levels—further improved the reliability of the geometric prior.

Conclusion and Future Work

By integrating variational shape compactness directly into the deep learning pipeline, this research provides a robust solution for segmenting objects with known geometric properties in challenging, noisy environments. While the current implementation is optimized for compact and circular objects—making it ideal for medical and biometric applications—it may not be suitable for complex, elongated shapes like roads or trees.

Future work will explore adapting this primal-dual framework for other geometric priors, such as convexity or star-shaped constraints, and applying the PD-STD block to a broader range of backbone architectures beyond DeepLabV3 and IrisParseNet.

Summary updated

BibTeX
@misc{zhang2024deep,
  author = {Kehui Zhang and Lingfeng Li and Hao Liu and Jing Yuan and Xue‐Cheng Tai},
  title = {{Deep Convolutional Neural Networks Meet Variational Shape Compactness Priors for Image Segmentation}},
  year = {2024},
  eprint = {2406.19400},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.19400},
}
Figure