Robust Shape Regularity Criteria for Superpixel Evaluation
Abstract
Regular decompositions are essential for superpixel-based computer vision applications. Traditionally, shape regularity is measured by circularity (compactness). However, circularity is biased towards circular shapes and highly sensitive to noise. We propose the Shape Regularity Criteria (SRC), a robust metric combining convexity, balanced pixel distribution, and contour smoothness. Our evaluation demonstrates that SRC is scale-invariant, noise-resistant, and provides a more accurate comparison of superpixel algorithms.
Introduction
Superpixels serve as a mid-level image representation, grouping pixels into perceptually meaningful regions to reduce computational complexity. For tasks like object recognition and tracking, "regular" superpixels—those with uniform size and compact, predictable shapes—are preferred. Currently, the standard metric for regularity is circularity. This work argues that circularity is an inadequate proxy for regularity and introduces a more comprehensive metric: the Shape Regularity Criteria (SRC).
The Limitations of Circularity
Circularity measures the ratio of a shape's area to its perimeter. While intuitive, it suffers from two major flaws:
- Geometric Bias: Circularity favors circles. In a regular grid decomposition, a square is perfectly regular, yet it receives a lower circularity score than a hexagon.
- Noise Sensitivity: Circularity is extremely sensitive to boundary noise. Minor pixel-level irregularities can cause a significant drop in the score, even if the overall shape remains regular for practical use.
As shown in Figure 1, the SRC metric provides a much more consistent evaluation across different regular tilings (squares vs. hexagons) compared to standard circularity. While circularity (C) for the highlighted patches jumps from 0.850 to 0.951, SRC remains remarkably stable (0.974 vs 0.968).
The Shape Regularity Criteria (SRC)
To address these issues, we propose SRC, which evaluates a superpixel ($S$) based on three geometric properties:
- Solidity (SO): Measures global convexity by the ratio of the superpixel's area to the area of its convex hull ($CH(S)$). A perfectly convex shape scores 1.0.
- Balanced Repartition ($V_{xy}$): Ensures pixels are distributed evenly around the center, penalizing elongated or stretched shapes.
- Contour Smoothness (CO): Compares the perimeter of the convex hull to the actual perimeter, penalizing jagged boundaries without bias against the underlying geometric shape.
The final SRC score is the area-weighted average of the product of these three terms ($SO \times V_{xy} \times CO$) across all superpixels in an image.
Experimental Results
We validated SRC using synthetic shapes and the Berkeley Segmentation Dataset (BSD).
- Discrimination: On noisy synthetic shapes, SRC successfully distinguished between "Regular," "Standard," and "Irregular" groups, whereas circularity scores for these groups overlapped significantly, making it impossible to distinguish a noisy square from a smooth irregular shape.
- Scale Invariance: SRC remains consistent across different superpixel scales (e.g., 50 to 1000 superpixels per image). In tests on the BSD dataset using the SLIC algorithm, SRC's variance across scales was approximately 35% lower than that of circularity.
- Parameter Correlation: SRC aligns closely with the "compactness" parameters tuned by users in popular algorithms like SLIC and LSC, making it a more intuitive optimization tool for researchers.
Conclusion
The proposed Shape Regularity Criteria (SRC) offers a robust, scale-invariant alternative to circularity for superpixel evaluation. By decoupling regularity from circular appearance and accounting for boundary smoothness, SRC enables a more meaningful comparison of state-of-the-art superpixel methods. Future work will explore global regularity metrics to evaluate the uniformity of the entire decomposition grid.
Summary updated