alpha_expansion — SEGMENTATION graph op

• Data kinds: image2d → table

• Call: import fullseye as fs; fs.ledger.alpha_expansion(image, means: 'Optional[Sequence[float]]' = None, *, lam: 'float' = 1.0, pairwise: 'str' = 'potts', truncation: 'float' = 2.0, connectivity: 'int' = 4, max_cycles: 'int' = 10, init=None) -> 'Dict[str, object]' (to call the implementation directly, import seggraph; seggraph.alpha_expansion(image, means: 'Optional[Sequence[float]]' = None, *, lam: 'float' = 1.0, pairwise: 'str' = 'potts', truncation: 'float' = 2.0, connectivity: 'int' = 4, max_cycles: 'int' = 10, init=None) -> 'Dict[str, object]'; from the registry, opssegmentation.get("alpha_expansion"))

Usage

Multi-label α-expansion (Boykov–Veksler–Zabih 2001): E(f) = Σ (I_p − μ_(f_p))² + λ Σ w_pq V(f_p, f_q), where V is a metric (alpha_expansion).

means = the mean of each label μ_1..μ_L (L ≥ 2; omitted, 3 labels at the 1/6, 1/2 and 5/6 quantiles of the pixel values). V is "potts" ([α ≠ β], c = 1) or "truncated_linear" (min(|α − β|, T); a metric if T ≥ 1, c = min(L − 1, T)). 1 cycle = expansions for α = 1..L in order. Each move is solved exactly as a 2-label graph cut, and accepted only when the energy strictly decreases. It stops when 1 cycle accepts nothing, not even 1 time (as in the paper).

Returns: labels (1..L), energy, energies (sequence of acceptances, monotonically decreasing), move_minima (minimum of each move's 2-label problem, ≤ the current value = gate), c, bound_factor = 2c (Theorem 6.1: E(f̂) ≤ 2c E(f*)).

Detailed usage guide

• halcon_segmentation family guide

Background guides (the physics and conventions behind this op)

• graph_hierarchy_and_thresholds — Segmentation from graph, hierarchy and threshold theorems — what is exact, and where the partition breaks down

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_graph_hierarchy_segmentation — py -3.11 examples/poc_graph_hierarchy_segmentation.py

Ops the type connects to (they accept table as input)

class_ndim_norm

Same category (graph)

graph_cut_binary · statistical_region_merging · max_tree · area_opening_attr · quasi_flat_zones · alpha_tree · hierarchical_watershed · ultrametric_contour_map


*Provenance: seggraph.py — SEGMENTATION operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.