21.08.2013 Views

What Energy Functions Can be Minimized via Graph Cuts

What Energy Functions Can be Minimized via Graph Cuts

What Energy Functions Can be Minimized via Graph Cuts

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>What</strong> <strong>Energy</strong> <strong>Functions</strong> <strong>Can</strong><br />

Be <strong>Minimized</strong> <strong>via</strong> <strong>Graph</strong> <strong>Cuts</strong><br />

Yu Miao<br />

2011.5.10


Background<br />

Outline of the Talk<br />

Pseudo-Boolean Function<br />

The st-Mincut Problem<br />

Move Making Algorithms<br />

<strong>Graph</strong>-Representable<br />

A General-Purpose <strong>Graph</strong> Construction for F 3<br />

Conclusions & Future Work


Image Denoising<br />

Pairwise MRF<br />

Noisy Image, I<br />

Higher order MRF<br />

A Simple Example<br />

I 4<br />

MAP-MRF<br />

I 5<br />

I 6<br />

I 7<br />

I 8<br />

I 9<br />

I 10<br />

I 11<br />

I 12<br />

How to minimize<br />

this energy<br />

function ?<br />

Likelihood(Data term) Prior(Smooth term)<br />

Complex prior<br />

structure may lead<br />

to <strong>be</strong>tter results<br />

Potts<br />

model


Image Denoising<br />

Noisy Image<br />

The Applications of <strong>Graph</strong> <strong>Cuts</strong><br />

Stereo Correspondence<br />

Pairwise MRF Higher order MRF<br />

L R Disparity map<br />

Stereo Pair


Image Synthesis<br />

The Applications of <strong>Graph</strong> <strong>Cuts</strong><br />

Image Segmentation<br />

…<br />

+<br />

Multi-View Reconstruction


• <strong>What</strong>?<br />

• Find what kind of energy functions can <strong>be</strong> minimized <strong>via</strong> graph<br />

cuts<br />

• How?<br />

Motivations<br />

• Give a general-purpose graph construction for minimizing this<br />

kind of energy functions


Background<br />

Outline of the Talk<br />

Pseudo-Boolean Function<br />

The st-Mincut Problem<br />

Move Making Algorithms<br />

<strong>Graph</strong>-Representable<br />

A General-Purpose <strong>Graph</strong> Construction for F 3<br />

Conclusions & Future Work


Pseudo-Boolean Function


Background<br />

Outline of the Talk<br />

Pseudo-Boolean Function<br />

The st-Mincut Problem<br />

Move Making Algorithms<br />

<strong>Graph</strong>-Representable<br />

A General-Purpose <strong>Graph</strong> Construction for F 3<br />

Conclusions & Future Work


v 1<br />

5<br />

2<br />

Source<br />

1<br />

2<br />

Sink<br />

The st-Mincut Problem<br />

9<br />

v 2<br />

4<br />

<strong>Graph</strong> (V, E, C)<br />

Vertices V = {v 1, v 2 ... v n}<br />

Edges E = {(v 1, v 2) ....}<br />

Costs C = {c (1, 2) ....}


v 1<br />

5<br />

2<br />

Source<br />

1<br />

2<br />

Sink<br />

The st-Mincut Problem<br />

9<br />

v 2<br />

4<br />

<strong>What</strong> is a st-cut?


v 1<br />

5<br />

2<br />

Source<br />

1<br />

2<br />

Sink<br />

The st-Mincut Problem<br />

9<br />

v 2<br />

4<br />

5 + 2 + 9 = 16<br />

<strong>What</strong> is a st-cut?<br />

An st-cut (S,T) divides the nodes<br />

<strong>be</strong>tween source and sink.<br />

<strong>What</strong> is the cost of a st-cut?<br />

Sum of cost of all edges<br />

going from S to T


v 1<br />

5<br />

2<br />

Source<br />

1<br />

2<br />

Sink<br />

The st-Mincut Problem<br />

9<br />

v 2<br />

4<br />

2 + 1 + 4 = 7<br />

<strong>What</strong> is a st-cut?<br />

An st-cut (S,T) divides the nodes<br />

<strong>be</strong>tween source and sink.<br />

<strong>What</strong> is the cost of a st-cut?<br />

Sum of cost of all edges<br />

going from S to T<br />

<strong>What</strong> is the st-mincut?<br />

st-cut with the<br />

minimum cost


The st-Mincut Problem<br />

一个S,T割所对应的能量函数可表示为Pseudo-Boolean<br />

function


St-mincut and <strong>Energy</strong> Minimization<br />

S st-mincut<br />

T<br />

E: {0,1} n → R<br />

Minimizing a Pseudo-<br />

Boolean function E(x)<br />

<strong>Functions</strong> of boolean variables Pseudo-Boolean?<br />

E(x) = ∑ c i x i + ∑ c ij (1-x i)x j<br />

i<br />

i,j<br />

c ij≥0<br />

Polynomial time st-mincut algorithms<br />

require non-negative edge weights


Background<br />

Outline of the Talk<br />

Pseudo-Boolean Function<br />

The st-Mincut Problem<br />

Move Making Algorithms<br />

<strong>Graph</strong>-Representable<br />

A General-Purpose <strong>Graph</strong> Construction for F 3<br />

Conclusions & Future Work


<strong>Energy</strong><br />

Move Making Algorithms<br />

Solution Space


<strong>Energy</strong><br />

Computing the Optimal Move<br />

Solution Space<br />

Current Solution<br />

Search<br />

Neighbourhood<br />

Optimal Move


<strong>Energy</strong><br />

Bigger move<br />

space<br />

Move Making Algorithms<br />

x c<br />

Current Solution<br />

Search<br />

Neighbourhood<br />

Optimal Move<br />

(t) Key Property<br />

Solution Space<br />

• Better solutions<br />

Move Space<br />

• Finding the optimal move hard


Expansion and Swap move algorithms<br />

[Boykov Veksler and Zabih, PAMI 2001]<br />

• Makes a series of changes to the solution (moves)<br />

• Each move results in a solution with smaller energy<br />

Move Space (t) : 2 N<br />

Space of Solutions (x) : L N<br />

Moves using <strong>Graph</strong> <strong>Cuts</strong><br />

Current Solution<br />

Search Neighbourhood<br />

N Num<strong>be</strong>r of<br />

Variables<br />

L Num<strong>be</strong>r of<br />

La<strong>be</strong>ls


Expansion and Swap move algorithms<br />

[Boykov Veksler and Zabih, PAMI 2001]<br />

• Makes a series of changes to the solution (moves)<br />

• Each move results in a solution with smaller energy<br />

Move to new<br />

solution<br />

Moves using <strong>Graph</strong> <strong>Cuts</strong><br />

Current Solution<br />

Construct a move<br />

function<br />

Minimize move function<br />

to get optimal move<br />

How to<br />

minimize move<br />

functions?


Expansion Move<br />

• Variables take la<strong>be</strong>l a or retain current la<strong>be</strong>l<br />

[Boykov, Veksler, Zabih]


Status: Initialize Expand Ground House Sky with Tree<br />

Expansion Move<br />

• Variables take la<strong>be</strong>l a or retain current la<strong>be</strong>l<br />

Tree<br />

Ground<br />

House<br />

Sky<br />

[Boykov, Veksler, Zabih]


Expansion Move<br />

• Variables take la<strong>be</strong>l a or retain current la<strong>be</strong>l<br />

这样就使问题转换为求解<br />

Pseudo-Boolean Optimization的问题<br />

这是我们选择<br />

Pseudo-Boolean能量<br />

函数的原因<br />

• It is important to note that this sub-problem is an<br />

energy minimization problem over binary variables.<br />

[Boykov, Veksler, Zabih]


Expansion Move<br />

这就是所谓的<strong>Graph</strong>-Representable问题


Background<br />

Outline of the Talk<br />

Pseudo-Boolean Function<br />

The st-Mincut Problem<br />

Move Making Algorithms<br />

<strong>Graph</strong>-Representable<br />

A General-Purpose <strong>Graph</strong> Construction for F 3<br />

Conclusions & Future Work


现在的问题是什么样<br />

的能量函数是graphrepresentable,以<br />

及如何构造graph.<br />

<strong>Graph</strong>-Representable<br />

Pseudo - Boolean<br />

<strong>Energy</strong> Function E<br />

E(X)<br />

=<br />

<strong>Cuts</strong><br />

const + minimum s-t cut(corresponds to<br />

the configuration X’)<br />

在一次α-expansion中(即<br />

在求E(X)时),const不变。<br />

在不同的α-expansion时,<br />

const不相同<br />

这样在用max-flow算法求st-Mincut时,所得到的X,就是使E(X)取最小值的X。且他们的值<br />

之间有上述关系。这就使得最小化Pseudo-Boolean Optimizing E(X)的问题转化成了求最小<br />

割的问题。从而可用高效的max-flow算法进行求解。


<strong>Graph</strong>-Representable<br />

先考虑第一个问题,什么样的函数可以graph-representable?<br />

Definition of regular<br />

?<br />

?


<strong>Graph</strong>-Representable<br />

Theorem 3.7 其充要条件如何证明?对于其必要性,kolmogorov给出了对任意<br />

Pseudo-Boolean <strong>Functions</strong>的证明。此处给出其结论(证明略)<br />

该定理指出,对于任意的Pseudo-Boolean <strong>Functions</strong>,只有当它是Regular时,才有<br />

可能是<strong>Graph</strong>-Representable<br />

Regular和<br />

<strong>Graph</strong>-Representable的Pseudo-Boolean <strong>Functions</strong>必定是Regular的<br />

Submodular等价


Background<br />

Outline of the Talk<br />

Pseudo-Boolean Function<br />

The st-Mincut Problem<br />

Move Making Algorithms<br />

<strong>Graph</strong>-Representable<br />

A General-Purpose <strong>Graph</strong> Construction for F 3<br />

Conclusions & Future Work


在构造之前,先给出一个非常重要的定理:Additivity<br />

?


Theorem 3.7 的充分性的证明采用的是构造性的证明方法。该方法也是一个<br />

general-purpose graph construction for minimizing any function in this class.<br />

是 的子集,所以只要给出 的构造方法就可。但是由于 的构造相对简单,<br />

所以还是先讨论 的构造方法。<br />

在构造之前,先给出一个非常重要的定理:Additivity<br />

证明略<br />

根据该定理,只要能证明函数的每一项都是graph-representable,则整个函数就<br />

是graph-representable.<br />

现在要证明的是,若 是regular,则其为graph-representable。<br />

下面即针对 和 分别构造其<strong>Graph</strong><br />

前面所提到的第<br />

二个问题:如何<br />

构造<strong>Graph</strong>?


The graph will contain n+2 vertices: Each nonterminal vertex<br />

will encode the binary variable<br />

验证该图是否<br />

满足graphrepresentable<br />

的定义


x i<br />

For E i,j (x i,x j)<br />

A = E ij (0,0) B = E ij (0,1) C = E ij (1,0) D = E ij (1,1)<br />

0<br />

1<br />

x j<br />

0 1<br />

A B<br />

C D<br />

= A +<br />

E ij (x i,x j) = E ij (0,0)<br />

0<br />

1<br />

0 1<br />

0 0<br />

C-A C-A<br />

if x i=1<br />

add C-A<br />

1<br />

0 1<br />

0 0 D-C 0<br />

+ +<br />

0 D-C<br />

if x j=1<br />

add D-C<br />

+ (E ij (1,0)-E ij (0,0)) x i + (E ij (1,1)-E ij (1,0)) x j<br />

1<br />

0 1<br />

0<br />

B+C<br />

-A-D<br />

0 0<br />

+ (E ij (0,1) + E ij (1,0) - E ij (0,0) - E ij (1,1)) (1-x i) x j<br />

B+C-A-D 0 is true from the regularity of E ij


For E i,j (x i,x j)<br />

x i<br />

A = E ij (0,0) B = E ij (0,1) C = E ij (1,0) D = E ij (1,1)<br />

0<br />

1<br />

x j<br />

0 1<br />

A B<br />

C D<br />

= A +<br />

E ij (x i,x j) = E ij (0,0)<br />

0<br />

1<br />

0 1<br />

0 0<br />

C-A C-A<br />

if x i=1<br />

add C-A<br />

1<br />

0 1<br />

0 0 D-C 0<br />

+ +<br />

0 D-C<br />

if x j=1<br />

add D-C<br />

+ (E ij (1,0)-E ij (0,0)) x i + (E ij (1,1)-E ij (1,0)) x j<br />

1<br />

0 1<br />

0<br />

B+C<br />

-A-D<br />

0 0<br />

+ (E ij (0,1) + E ij (1,0) - E ij (0,0) - E ij (1,1)) (1-x i) x j<br />

B+C-A-D 0 is true from the regularity of E ij


For E i,j (x i,x j)<br />

x i<br />

A = E ij (0,0) B = E ij (0,1) C = E ij (1,0) D = E ij (1,1)<br />

0<br />

1<br />

x j<br />

0 1<br />

A B<br />

C D<br />

= A +<br />

E ij (x i,x j) = E ij (0,0)<br />

0<br />

1<br />

0 1<br />

0 0<br />

C-A C-A<br />

if x i=1<br />

add C-A<br />

1<br />

0 1<br />

0 0 D-C 0<br />

+ +<br />

0 D-C<br />

if x j=1<br />

add D-C<br />

+ (E ij (1,0)-E ij (0,0)) x i + (E ij (1,1)-E ij (1,0)) x j<br />

1<br />

0 1<br />

0<br />

B+C<br />

-A-D<br />

0 0<br />

+ (E ij (0,1) + E ij (1,0) - E ij (0,0) - E ij (1,1)) (1-x i) x j<br />

B+C-A-D 0 is true from the regularity of E ij


For E i,j (x i,x j)<br />

x i<br />

A = E ij (0,0) B = E ij (0,1) C = E ij (1,0) D = E ij (1,1)<br />

0<br />

1<br />

x j<br />

0 1<br />

A B<br />

C D<br />

= A +<br />

E ij (x i,x j) = E ij (0,0)<br />

0<br />

1<br />

0 1<br />

0 0<br />

C-A C-A<br />

if x i=1<br />

add C-A<br />

1<br />

0 1<br />

0 0 D-C 0<br />

+ +<br />

0 D-C<br />

if x j=1<br />

add D-C<br />

+ (E ij (1,0)-E ij (0,0)) x i + (E ij (1,1)-E ij (1,0)) x j<br />

1<br />

0 1<br />

0<br />

B+C<br />

-A-D<br />

0 0<br />

+ (E ij (0,1) + E ij (1,0) - E ij (0,0) - E ij (1,1)) (1-x i) x j<br />

B+C-A-D 0 is true from the regularity of E ij


For E i,j (x i,x j)<br />

x i<br />

A = E ij (0,0) B = E ij (0,1) C = E ij (1,0) D = E ij (1,1)<br />

0<br />

1<br />

x j<br />

0 1<br />

A B<br />

C D<br />

= A +<br />

E ij (x i,x j) = E ij (0,0)<br />

0<br />

1<br />

0 1<br />

0 0<br />

C-A C-A<br />

if x i=1<br />

add C-A<br />

1<br />

0 1<br />

0 0 D-C 0<br />

+ +<br />

0 D-C<br />

if x j=1<br />

add D-C<br />

+ (E ij (1,0)-E ij (0,0)) x i + (E ij (1,1)-E ij (1,0)) x j<br />

1<br />

0 1<br />

0<br />

B+C<br />

-A-D<br />

0 0<br />

+ (E ij (0,1) + E ij (1,0) - E ij (0,0) - E ij (1,1)) (1-x i) x j<br />

B+C-A-D 0 is true from the regularity of E ij


对 而言,E是regular等价于E i,j 是regular<br />

而对 而言,E是regular并不意味着E中的每一项(each E i,j E i,j,k )是regular<br />

由Additivity theorem及前面 的结论,我们仅需对满足regular要求的E i,j,k 构造其<br />

<strong>Graph</strong>即可证明Theorem 3.7的充分性


Const x i =1 x j =1 x k =1 (x j=0,x k=1) (x i=1,x k=0) (x i=0,x j=1) (x i=1, x j=1, x k=1)<br />

Where P 1= F-B, P 2= G-E, P 3= D-C,<br />

P 23= B+C-A-D, P 31= B+E-A-F, P 12= C+E-A-G<br />

Only the last<br />

term will <strong>be</strong><br />

considered<br />

E i,j,k is regular, therefore by considering projections E i,j,k [x 1=0], E i,j,k [x 2=0], E i,j,k [x 3=0]<br />

we conclude that P 23, P 31, P 12 are non-negative.


(x i=1, x j=1, x k=1)<br />

If x i=x j=x k=1, the cost<br />

of the minimum cut is<br />

0;otherwise the<br />

minimum cut is P


Summary of graph constructions<br />

For a function E(x 1,…x n) we define<br />

1.<br />

2.


3.<br />

Summary of graph constructions


Background<br />

Outline of the Talk<br />

Pseudo-Boolean Function<br />

The st-Mincut Problem<br />

Move Making Algorithms<br />

<strong>Graph</strong>-Representable<br />

A General-Purpose <strong>Graph</strong> Construction for F 3<br />

Conclusions & Future Work


Conclusions


Future Work<br />

Non-submodular <strong>Energy</strong> <strong>Functions</strong><br />

Mixed(Real-Integer) Problems<br />

Higher Order <strong>Energy</strong> <strong>Functions</strong>


The “<strong>Graph</strong>” of <strong>Graph</strong> <strong>Cuts</strong><br />

Yuri Boykov,<br />

The University of<br />

Western Ontario<br />

Ramin Zabih,<br />

Cornell University<br />

Vladimir Kolmogorov,<br />

University College London<br />

Endre Boros,<br />

Rutgers University<br />

Nikos Komodakis,<br />

University of Crete,<br />

INRIA-Saclay;<br />

Ecole Centrale Paris<br />

Philip Torr,<br />

Oxford Brookes University<br />

Carsten Rother,<br />

Microsoft Research<br />

Cambridge<br />

Pushmeet Kohli,<br />

Microsoft Research<br />

Cambridge


Thanks. Questions?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!