Abstract
Significant progress in image segmentation has been made by viewing the problem in the framework of graph partitioning. In particular, spectral clustering methods such as "normalized cuts" (ncuts) can efficiently calculate good segmentations using eigenvector calculations. However, spectral methods when applied to images with local connectivity often oversegment homogenous regions. More importantly, they lack a straightforward probabilistic interpretation which makes it difficult to automatically set parameters using training data. In this paper we revisit the typical cut criterion proposed by Blatt et al. (1997) and Gdalyahu et al (2001). We show that computing the typical cut is equivalent to performing inference in an undirected graphical model. This equivalence allows us to use the powerful machinery of graphical models for learning and inferring image segmentations. For inferring segmentations we show that the generalized belief propagation (GBP) algorithm can give excellent results with a runtime that is usually faster than the ncut eigensolver. For learning segmentations we derive a maximum likelihood learning algorithm to learn affinity matrices from labelled datasets. We illustrate both learning and inference on challenging real and synthetic images.
Introduction
Image segmentation is often treated as a graph partitioning problem: pixels are nodes, and edges represent similarity (affinity). The goal is to cut the graph into meaningful clusters. Two common approaches exist, but both have flaws. The Minimal Cut often fails by snipping off single noisy pixels rather than finding large objects. The Normalized Cut (Ncut), while popular, is computationally expensive and tends to "oversegment"—splitting large, uniform areas like a clear sky just to keep cluster sizes balanced. Furthermore, these methods lack a clear probabilistic framework, making it difficult to "teach" the algorithm what a good segmentation looks like using training data.
The Typical Cut as Graphical Model Inference
This research bridges the gap between graph partitioning and probabilistic graphical models by revisiting the Typical Cut criterion. Unlike Ncut, which looks for a single optimal partition, the typical cut considers the entire probability distribution of possible partitions.
The paper’s core technical contribution is proving that this distribution is mathematically equivalent to a pairwise undirected graphical model (a Markov Random Field). This allows the application of two powerful tools:
- Inference via GBP: The authors use Generalized Belief Propagation to estimate the probability that two pixels belong to the same segment. This is a deterministic, iterative message-passing algorithm that operates on a region graph.
- Learning via Maximum Likelihood: Because the model is in a standard probabilistic form, the authors derive a gradient-ascent algorithm to learn the "affinity" (the weights between pixels) from labeled human segmentations. This allows the system to learn specific visual styles, such as ignoring shadows based on user preference.
Experimental Evaluation
The algorithm was evaluated on several datasets to test its robustness and learning capabilities:
- Synthetic Grids: 32x32 noisy images were used to compare GBP results against "ground truth" probabilities generated by computationally expensive Markov Chain Monte Carlo (MCMC) sampling.
- Real-world Images: Images of an airplane, a palm tree, and a face (sourced from the Berkeley Segmentation Dataset) were used to test qualitative performance.
- Shadow-Invariant Synthetic Data: A custom dataset designed to test if the model can learn to ignore lighting artifacts when provided with appropriate training labels.
Key Insights and Results
- Avoiding the "Ncut Split": The authors provide an analytical proof showing that as an image grows, Ncut will eventually always prefer splitting a large background in half over separating a small foreground object. The Typical Cut does not suffer from this scaling issue, successfully keeping large homogeneous regions intact.
- Speed through Message Passing: While Ncut relies on global eigensolvers, GBP relies on local message passing. In practice, the authors found their C++ implementation of GBP was an order of magnitude faster than standard eigensolvers.
- Learning "Style": By using Maximum Likelihood, the algorithm can be tuned to specific tasks. If a human trainer ignores shadows in the training set, the algorithm learns to down-weight color edges that correspond to shadow boundaries, focusing instead on underlying object features.
Conclusion
By reframing the typical cut as an inference problem in a graphical model, this work provides a principled way to both perform and learn image segmentation. The use of GBP offers a high-performance, deterministic alternative to spectral methods, while the probabilistic framework allows for sophisticated parameter learning from labeled data. Future work includes exploring larger connectivity radii and integrating more complex features like texture and long-range contours.
Summary updated