Contour Field based Elliptical Shape Prior for the Segment Anything Model
Xinyu Zhao, Jun Liu, Faqiang Wang, Li Cui, Yuping Duan
TL;DR
This paper addresses the need for explicit shape priors in general-purpose segmentation with the Segment Anything Model (SAM). It introduces an Elliptical Shape Prior (ESP) by enforcing an elliptical contour-flow constraint through a dual optimization framework, unrolled into a neural module that integrates with SAM (SAM-ESP). The approach combines a convex, ellipse-constrained subspace with entropy regularization and a softmax-like u-update to produce ellipse-aligned segmentations, achieving superior Dice scores and boundary fidelity while remaining robust to noise and cross-dataset generalization. The findings demonstrate that embedding a principled geometric prior into SAM enhances segmentation accuracy for elliptical objects, with potential to extend to other priors and architectures. The ESP module provides a mathematically grounded pathway to incorporate shape priors into deep segmentation models, improving performance in medical and natural imaging tasks where elliptical structures are prevalent.
Abstract
The elliptical shape prior information plays a vital role in improving the accuracy of image segmentation for specific tasks in medical and natural images. Existing deep learning-based segmentation methods, including the Segment Anything Model (SAM), often struggle to produce segmentation results with elliptical shapes efficiently. This paper proposes a new approach to integrate the prior of elliptical shapes into the deep learning-based SAM image segmentation techniques using variational methods. The proposed method establishes a parameterized elliptical contour field, which constrains the segmentation results to align with predefined elliptical contours. Utilizing the dual algorithm, the model seamlessly integrates image features with elliptical priors and spatial regularization priors, thereby greatly enhancing segmentation accuracy. By decomposing SAM into four mathematical sub-problems, we integrate the variational ellipse prior to design a new SAM network structure, ensuring that the segmentation output of SAM consists of elliptical regions. Experimental results on some specific image datasets demonstrate an improvement over the original SAM.
