373 words
2 minutes
[CS5340] Graph-Cut & Alpha-Expension
  • Recover clean image pixels w={w1,w2,...,wN}w=\{w_1, w_2, ..., w_N\}, given noisy observed data x={x1,x2,...xN}x=\{x_1, x_2, ...x_N\}
  • we want to:
    1. p(xw)p(x|w): encourage pixels (ww) to stay the same label as observation (xx)
    2. p(wi,wj)p(w_i, w_j): take the same label as neighbor (w1,w2w1, w2)
  • cost function alt text

Max-flow = Min-cut#

  • a directed graph, a source, a sink
  • capacity u(eij)0u(e_{ij}) \geq 0 of an edge = max flow possible on the edge
  • cut: node partition (S,T)(S,T) on graph
  • capacity: sum of weights leaving SS
  • flow: assignment of weights to edges
    • 0f(wij)u(eij)0 \leq f(w_{ij}) \leq u(e_{ij}) (capacity)
    • flow leaving Vi=V_i = flow entering ViV_i
  • Goal: find the flow that maximizes net flow

Observations#

  • net flow = flow entering tt
  • value of flow \leq capacity of the cut
  • if capacity of the cut == value of the flow, ff is max flow, (S,T)(S,T) is min cut

Residual Graph#

alt text

  • undo flow sent
  • augmenting path = path in residual graph
  • if augmenting path exist: not a maz flow yet

Augmenting Path Algorithm#

alt text alt text

Case 1: Binary MRF#

alt text

  • Unary costs U(0),U(1)U(0), U(1) attached to links to source and to sink. Either one or the other is paid
  • Pairwise costs Pij(0,1),Pij(1,0)P_{ij}(0,1), P_{ij}(1,0) between nodes, either one or the other is paid when ii and jj takes opposite labels.
  • Reparameterization
    • adjust the edge capacities so every possible solution is 0\geq 0 alt text

Submodularity#

  • if θ10+θ01θ11θ000\theta_{10} + \theta_{01} - \theta_{11} - \theta_{00} \geq 0
  • solve in polynomial time

Case 2: Multiple Labels (Submodular)#

alt text

  • Convex may over-smooth the image

Case 3: Multiple Labels (Non-submodular)#

  • Alpha-Expansion Algorithm
    • breaks into binary sub-problems
    • each step, choose an α\alpha and expend, until no change
    • each vertix is connected to ss & tt
    • structure of graph is dynamix, changes depend on choice of α\alpha
  • 4 possible relationships
    1. i,ji, j have label α\alpha, pairwise cost=0, only Ui(α)+Uj(α)U_i(\alpha) + U_j(\alpha)
    2. i=α,j=βi=\alpha, j=\beta
      • solution may be αα\alpha - \alpha or αβP(α,β)\alpha - \beta \rightarrow P(\alpha, \beta) (add new edge)
    3. i=β,j=βi=\beta, j=\beta
      • solution may be αα\alpha - \alpha, ββ\beta - \beta (no pairwise cost), αβ\alpha - \beta (add P(α,β)P(\alpha, \beta)), βα\beta - \alpha (add P(β,α)P(\beta, \alpha)) alt text
    4. i=β,j=γi=\beta, j=\gamma
      • solution may be:
        • βγ\beta - \gamma (P(β,γ)P(\beta, \gamma), add new edge between kk and sink)
        • αγ\alpha - \gamma (P(α,γ)P(\alpha, \gamma), add new edge between kk and jj)
        • βα\beta - \alpha (P(β,α)P(\beta, \alpha), add new edge between ii and kk)
        • αα\alpha - \alpha (no paiwise cost added) alt text
  • triangle inequality must hold
    • P(β,γ)=0iffβ=γP(\beta, \gamma) = 0 iff \beta = \gamma
    • P(β,γ)=P(γ,β)P(\beta, \gamma) = P(\gamma, \beta)
    • P(β,γ)P(β,α)+P(α,γ)P(\beta, \gamma) \leq P(\beta, \alpha) + P(\alpha, \gamma)
[CS5340] Graph-Cut & Alpha-Expension
https://itsjeremyhsieh.github.io/posts/cs5340-12-graph-cut-and-alpha-expension/
Author
Jeremy H
Published at
2024-11-11