Efficient Inference in Fully Connected CRFs with Gaussian Edge - - PowerPoint PPT Presentation

efficient inference in fully connected crfs with gaussian
SMART_READER_LITE
LIVE PREVIEW

Efficient Inference in Fully Connected CRFs with Gaussian Edge - - PowerPoint PPT Presentation

Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials Philipp Kr ahenb uhl Vladlen Koltun philkr@stanford.edu vladlen@stanford.edu Department of Computer Science, Stanford University December 14, 2011 Multi-class


slide-1
SLIDE 1

Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials

Philipp Kr¨ ahenb¨ uhl Vladlen Koltun

philkr@stanford.edu vladlen@stanford.edu Department of Computer Science, Stanford University

December 14, 2011

slide-2
SLIDE 2

Multi-class image segmentation

Assign a class label to each pixel in the image table chair background

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 2 / 29

slide-3
SLIDE 3

CRF models in multi-class image segmentation

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

MAP inference in conditional random field Unary term

◮ From classifier ◮ TextonBoost [Shotton et al. 09]

Pairwise term

◮ Consistent labeling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 3 / 29

slide-4
SLIDE 4

CRF models in multi-class image segmentation

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

MAP inference in conditional random field Unary term

◮ From classifier ◮ TextonBoost [Shotton et al. 09]

Pairwise term

◮ Consistent labeling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 3 / 29

slide-5
SLIDE 5

CRF models in multi-class image segmentation

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

MAP inference in conditional random field Unary term

◮ From classifier ◮ TextonBoost [Shotton et al. 09]

Pairwise term

◮ Consistent labeling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 3 / 29

slide-6
SLIDE 6

Adjacency CRF models

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

Pairwise term

◮ Neighboring pixels ◮ Color-sensitive Potts model

ψp(xi, xj) = 1[xi =xj ]

  • w (1) exp
  • −|Ii − Ij|2

2θ2

β

  • + w (2)
  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 4 / 29

slide-7
SLIDE 7

Adjacency CRF models

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

sky tree grass

grid crf

Efficient inference

◮ 1 second for 50′000 variables

Limited expressive power Only local interactions Excessive smoothing of object boundaries

◮ Shrinking bias

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 5 / 29

slide-8
SLIDE 8

Adjacency CRF models

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

sky tree grass

grid crf

Efficient inference

◮ 1 second for 50′000 variables

Limited expressive power Only local interactions Excessive smoothing of object boundaries

◮ Shrinking bias

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 5 / 29

slide-9
SLIDE 9

Adjacency CRF models

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

Efficient inference

◮ 1 second for 50′000 variables

Limited expressive power Only local interactions Excessive smoothing of object boundaries

◮ Shrinking bias

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 5 / 29

slide-10
SLIDE 10

Adjacency CRF models

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j∈Ni

ψp(xi, xj)

  • pairwise term

sky tree grass

grid crf

Efficient inference

◮ 1 second for 50′000 variables

Limited expressive power Only local interactions Excessive smoothing of object boundaries

◮ Shrinking bias

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 5 / 29

slide-11
SLIDE 11

Fully connected CRF

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Every node is connected to every other node

◮ Connections weighted differently

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 6 / 29

slide-12
SLIDE 12

Fully connected CRF

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Every node is connected to every other node

◮ Connections weighted differently

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 6 / 29

slide-13
SLIDE 13

Fully connected CRF

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

sky tree grass

fully connected

Long-range interactions No more shrinking bias

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 7 / 29

slide-14
SLIDE 14

Fully connected CRF

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Long-range interactions No more shrinking bias

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 7 / 29

slide-15
SLIDE 15

Fully connected CRF

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

sky tree grass

fully connected

Long-range interactions No more shrinking bias

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 7 / 29

slide-16
SLIDE 16

Fully connected CRF

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

sky tree grass

fully connected

Region-based [Rabinovich et al. 07, Galleguillos et al. 08, Toyoda & Hasegawa 08, Payet & Todorovic 10]

◮ Tractable up to hundreds of variables

Pixel-based

◮ Tens of thousands of variables ⋆ Billions of edges ◮ Computationally expensive

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 8 / 29

slide-17
SLIDE 17

Fully connected CRF

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

sky tree grass

fully connected

Region-based [Rabinovich et al. 07, Galleguillos et al. 08, Toyoda & Hasegawa 08, Payet & Todorovic 10]

◮ Tractable up to hundreds of variables

Pixel-based

◮ Tens of thousands of variables ⋆ Billions of edges ◮ Computationally expensive

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 8 / 29

slide-18
SLIDE 18

Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials Inference in 0.2 seconds

◮ 50′000 variables ◮ MCMC inference: 36 hrs

Pairwise potentials: linear combinations of Gaussians

bench road grass tree

fully connected

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 9 / 29

slide-19
SLIDE 19

Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials Inference in 0.2 seconds

◮ 50′000 variables ◮ MCMC inference: 36 hrs

Pairwise potentials: linear combinations of Gaussians

bench road grass tree

fully connected

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 9 / 29

slide-20
SLIDE 20

Model definition

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Gaussian edge potentials ψp(xi, xj) = µ(xi, xj)

K

  • m=1

w(m)k(m)(fi, fj) Label compatibility function µ Linear combination of Gaussian kernels k(m)(fi, fj) = exp(−1 2(fi − fj)Σ(m)(fi − fj)) Arbitrary feature space fi

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 10 / 29

slide-21
SLIDE 21

Model definition

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Gaussian edge potentials ψp(xi, xj) = µ(xi, xj)

K

  • m=1

w(m)k(m)(fi, fj) Label compatibility function µ Linear combination of Gaussian kernels k(m)(fi, fj) = exp(−1 2(fi − fj)Σ(m)(fi − fj)) Arbitrary feature space fi

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 10 / 29

slide-22
SLIDE 22

Model definition

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Gaussian edge potentials ψp(xi, xj) = µ(xi, xj)

K

  • m=1

w(m)k(m)(fi, fj) Label compatibility function µ Linear combination of Gaussian kernels k(m)(fi, fj) = exp(−1 2(fi − fj)Σ(m)(fi − fj)) Arbitrary feature space fi

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 10 / 29

slide-23
SLIDE 23

Model definition

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Gaussian edge potentials ψp(xi, xj) = µ(xi, xj)

K

  • m=1

w(m)k(m)(fi, fj) Label compatibility function µ Linear combination of Gaussian kernels k(m)(fi, fj) = exp(−1 2(fi − fj)Σ(m)(fi − fj)) Arbitrary feature space fi

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 10 / 29

slide-24
SLIDE 24

Model definition

E(x) =

  • i

ψu(xi)

unary term

+

  • i
  • j>i

ψp(xi, xj)

  • pairwise term

Gaussian edge potentials ψp(xi, xj) = µ(xi, xj)

K

  • m=1

w(m)k(m)( fi , fj ) Label compatibility function µ Linear combination of Gaussian kernels k(m)(fi, fj) = exp(−1 2(fi − fj)Σ(m)(fi − fj)) Arbitrary feature space fi

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 10 / 29

slide-25
SLIDE 25

Detailed model definition

ψp(xi, xj) = µ(xi, xj)

  • w(1) exp(−|pi − pj|

2θ2

α

− |Ii − Ij| 2θ2

β

) + w(2) exp(−|pi − pj| 2θ2

γ

)

  • Label compatibility

◮ Potts model: µ(xi, xj) = 1[xi=xj] ◮ Semi-metric model: µ(xi, xj) learned from data

Appearance kernel

◮ Color-sensitive model

Local smoothness

◮ Discourages pixel level noise

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 11 / 29

slide-26
SLIDE 26

Detailed model definition

ψp(xi, xj) = µ(xi, xj)

  • w(1) exp(−|pi − pj|

2θ2

α

− |Ii − Ij| 2θ2

β

) + w(2) exp(−|pi − pj| 2θ2

γ

)

  • Label compatibility

◮ Potts model: µ(xi, xj) = 1[xi=xj] ◮ Semi-metric model: µ(xi, xj) learned from data

Appearance kernel

◮ Color-sensitive model

Local smoothness

◮ Discourages pixel level noise

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 11 / 29

slide-27
SLIDE 27

Detailed model definition

ψp(xi, xj) = µ(xi, xj)

  • w(1) exp(−|pi − pj|

2θ2

α

− |Ii − Ij| 2θ2

β

) + w(2) exp(−|pi − pj| 2θ2

γ

)

  • Label compatibility

◮ Potts model: µ(xi, xj) = 1[xi=xj] ◮ Semi-metric model: µ(xi, xj) learned from data

Appearance kernel

◮ Color-sensitive model

Local smoothness

◮ Discourages pixel level noise

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 11 / 29

slide-28
SLIDE 28

Detailed model definition

ψp(xi, xj) = µ(xi, xj)

  • w(1) exp(−|pi − pj|

2θ2

α

− |Ii − Ij| 2θ2

β

) + w(2) exp(−|pi − pj| 2θ2

γ

)

  • Label compatibility

◮ Potts model: µ(xi, xj) = 1[xi=xj] ◮ Semi-metric model: µ(xi, xj) learned from data

Appearance kernel

◮ Color-sensitive model

Local smoothness

◮ Discourages pixel level noise

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 11 / 29

slide-29
SLIDE 29

Detailed model definition

ψp(xi, xj) = µ(xi, xj)

  • w(1) exp(−|pi − pj|

2θ2

α

− |Ii − Ij| 2θ2

β

) + w(2) exp(−|pi − pj| 2θ2

γ

)

  • Label compatibility

◮ Potts model: µ(xi, xj) = 1[xi=xj] ◮ Semi-metric model: µ(xi, xj) learned from data

Appearance kernel

◮ Color-sensitive model

Local smoothness

◮ Discourages pixel level noise

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 11 / 29

slide-30
SLIDE 30

Inference

Find the most likely assignment (MAP) ˆ x = argmax

x

P(x) where P(x)=exp(−E(x)) Mean field approximation Find Q(x) =

i Q(xi) close to P(x) in terms of KL-divergence

D(QP) ˆ xi ≈ argmaxxi Q(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 12 / 29

slide-31
SLIDE 31

Inference

Find the most likely assignment (MAP) ˆ x = argmax

x

P(x) where P(x)=exp(−E(x)) Mean field approximation Find Q(x) =

i Q(xi) close to P(x) in terms of KL-divergence

D(QP) ˆ xi ≈ argmaxxi Q(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 12 / 29

slide-32
SLIDE 32

Inference

Find the most likely assignment (MAP) ˆ x = argmax

x

P(x) where P(x)=exp(−E(x)) Mean field approximation Find Q(x) =

i Q(xi) close to P(x) in terms of KL-divergence

D(QP) ˆ xi ≈ argmaxxi Q(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 12 / 29

slide-33
SLIDE 33

Inference

Find the most likely assignment (MAP) ˆ x = argmax

x

P(x) where P(x)=exp(−E(x)) Mean field approximation Find Q(x) =

i Q(xi) close to P(x) in terms of KL-divergence

D(QP) ˆ xi ≈ argmaxxi Q(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 12 / 29

slide-34
SLIDE 34

Mean field approximation

Qi(xi = l) = 1 Zi exp   −ψu(xi) −

  • l′∈L

µ(l, l′)

K

  • m=1

w(m)

j=i

k(m)(fi, fj)Qj(l′)    Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

while not converged

◮ Message passing: ˜

Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

◮ Compatibility transform: ˆ

Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l)

◮ Local update: Qi(xi) ← exp{−ψu(xi) − ˆ

Qi(xi)}

◮ Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 13 / 29

slide-35
SLIDE 35

Mean field approximation

Qi(xi = l) = 1 Zi exp   −ψu(xi) −

  • l′∈L

µ(l, l′)

K

  • m=1

w(m)

j=i

k(m)(fi, fj)Qj(l′)    Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

while not converged

◮ Message passing: ˜

Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

◮ Compatibility transform: ˆ

Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l)

◮ Local update: Qi(xi) ← exp{−ψu(xi) − ˆ

Qi(xi)}

◮ Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 13 / 29

slide-36
SLIDE 36

Mean field approximation

Qi(xi = l) = 1 Zi exp   −ψu(xi) −

  • l′∈L

µ(l, l′)

K

  • m=1

w(m)

j=i

k(m)(fi, fj)Qj(l′)    Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

while not converged

◮ Message passing: ˜

Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

◮ Compatibility transform: ˆ

Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l)

◮ Local update: Qi(xi) ← exp{−ψu(xi) − ˆ

Qi(xi)}

◮ Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 13 / 29

slide-37
SLIDE 37

Mean field approximation

Qi(xi = l) = 1 Zi exp   −ψu(xi) −

  • l′∈L

µ(l, l′)

K

  • m=1

w(m)

j=i

k(m)(fi, fj)Qj(l′)    Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

while not converged

◮ Message passing: ˜

Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

◮ Compatibility transform: ˆ

Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l)

◮ Local update: Qi(xi) ← exp{−ψu(xi) − ˆ

Qi(xi)}

◮ Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 13 / 29

slide-38
SLIDE 38

Mean field approximation

Qi(xi = l) = 1 Zi exp   −ψu(xi) −

  • l′∈L

µ(l, l′)

K

  • m=1

w(m)

j=i

k(m)(fi, fj)Qj(l′)    Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

while not converged

◮ Message passing: ˜

Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

◮ Compatibility transform: ˆ

Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l)

◮ Local update: Qi(xi) ← exp{−ψu(xi) − ˆ

Qi(xi)}

◮ Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 13 / 29

slide-39
SLIDE 39

Mean field approximation

Qi(xi = l) = 1 Zi exp   −ψu(xi) −

  • l′∈L

µ(l, l′)

K

  • m=1

w(m)

j=i

k(m)(fi, fj)Qj(l′)    Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

while not converged

◮ Message passing: ˜

Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

◮ Compatibility transform: ˆ

Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l)

◮ Local update: Qi(xi) ← exp{−ψu(xi) − ˆ

Qi(xi)}

◮ Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 13 / 29

slide-40
SLIDE 40

Mean field approximation

Qi(xi = l) = 1 Zi exp   −ψu(xi) −

  • l′∈L

µ(l, l′)

K

  • m=1

w(m)

j=i

k(m)(fi, fj)Qj(l′)    Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

while not converged

◮ Message passing: ˜

Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

◮ Compatibility transform: ˆ

Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l)

◮ Local update: Qi(xi) ← exp{−ψu(xi) − ˆ

Qi(xi)}

◮ Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 13 / 29

slide-41
SLIDE 41

Mean field approximation

Runtime analysis for N variables O(N) Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

∼10 while not converged

O(N2) Message passing: ˜ Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

O(N) Compatibility transform: ˆ Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l) O(N) Local update: Qi(xi) ← exp{−ψu(xi) − ˆ Qi(xi)} O(N) Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 14 / 29

slide-42
SLIDE 42

Mean field approximation

Runtime analysis for N variables O(N) Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

∼10 while not converged

O(N2) Message passing: ✞ ✝ ☎ ✆ ˜ Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

O(N) Compatibility transform: ˆ Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l) O(N) Local update: Qi(xi) ← exp{−ψu(xi) − ˆ Qi(xi)} O(N) Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 14 / 29

slide-43
SLIDE 43

Efficient message passing using high-dimensional filtering

Update all ˜ Q(m)

i

(l) simultaneously ˜ Q(m)

i

(l) =

  • j=i

k(m)(fi, fj)Qj(l) Efficiently computed using a cross-bilateral filter [Paris & Durand 09, Adams et al. 09, Adams et al. 10]

◮ Permutohedral lattice [Adams et al. 10]

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 15 / 29

slide-44
SLIDE 44

High-dimensional filtering [Paris & Durand 09]

Q

(m) i

(l) =

  • j∈V

exp 1 2(f(m)

i

− f(m)

j

)2

  • Qj(l)

High-dimensional input signal Qj(l) Gaussian convolution Q

(m) i

(l) = G ⊗ Qj(l)

◮ Band-limited, smooth function

Can be reconstructed from a number of samples

◮ Nyquist theorem

f Q(f)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 16 / 29

slide-45
SLIDE 45

High-dimensional filtering [Paris & Durand 09]

Q

(m) i

(l) =

  • j∈V

exp 1 2(f(m)

i

− f(m)

j

)2

  • Qj(l)

High-dimensional input signal Qj(l) Gaussian convolution Q

(m) i

(l) = G ⊗ Qj(l)

◮ Band-limited, smooth function

Can be reconstructed from a number of samples

◮ Nyquist theorem

f ¯ Q(f)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 16 / 29

slide-46
SLIDE 46

High-dimensional filtering [Paris & Durand 09]

Q

(m) i

(l) =

  • j∈V

exp 1 2(f(m)

i

− f(m)

j

)2

  • Qj(l)

High-dimensional input signal Qj(l) Gaussian convolution Q

(m) i

(l) = G ⊗ Qj(l)

◮ Band-limited, smooth function

Can be reconstructed from a number of samples

◮ Nyquist theorem

f ¯ Q(f)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 16 / 29

slide-47
SLIDE 47

High-dimensional filtering [Paris & Durand 09]

Downsample input signal Qj(l) Blur the sampled signal Upsample to reconstruct the filtered signal Qj(l) f Q(f)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 17 / 29

slide-48
SLIDE 48

High-dimensional filtering [Paris & Durand 09]

Downsample input signal Qj(l) Blur the sampled signal Upsample to reconstruct the filtered signal Qj(l) f Q(f)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 17 / 29

slide-49
SLIDE 49

High-dimensional filtering [Paris & Durand 09]

Downsample input signal Qj(l) Blur the sampled signal Upsample to reconstruct the filtered signal Qj(l) f ¯ Q(f)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 17 / 29

slide-50
SLIDE 50

High-dimensional filtering [Paris & Durand 09]

Downsample input signal Qj(l) Blur the sampled signal Upsample to reconstruct the filtered signal Qj(l) f ¯ Q(f)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 17 / 29

slide-51
SLIDE 51

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice High-dimensional signal Qj(l)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-52
SLIDE 52

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Sample high-dimensional space

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-53
SLIDE 53

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Downsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-54
SLIDE 54

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Downsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-55
SLIDE 55

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Downsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-56
SLIDE 56

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Downsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-57
SLIDE 57

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Blurring

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-58
SLIDE 58

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Blurring

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-59
SLIDE 59

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Blurring

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-60
SLIDE 60

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Upsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-61
SLIDE 61

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Upsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-62
SLIDE 62

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Upsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-63
SLIDE 63

High-dimensional Filtering [Adams et al. 10]

Permutohedral lattice Upsampling

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 18 / 29

slide-64
SLIDE 64

Mean field approximation

Runtime analysis for N variables O(N) Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

∼10 while not converged

O(N2) Message passing: ✞ ✝ ☎ ✆ ˜ Q(m)

i

(l) ←

j=i k(m)(fi, fj)Qj(l)

O(N) Compatibility transform: ˆ Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l) O(N) Local update: Qi(xi) ← exp{−ψu(xi) − ˆ Qi(xi)} O(N) Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 19 / 29

slide-65
SLIDE 65

Mean field approximation

Runtime analysis for N variables O(N) Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

∼10 while not converged

O(N) Message passing: ✞ ✝ ☎ ✆ High-dimensional filtering O(N) Compatibility transform: ˆ Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l) O(N) Local update: Qi(xi) ← exp{−ψu(xi) − ˆ Qi(xi)} O(N) Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 19 / 29

slide-66
SLIDE 66

Mean field approximation

Runtime analysis for N variables O(N) Initialize Qi(xi) ← 1

Zi exp{−φu(xi)}

∼10 while not converged

O(N) Message passing: High-dimensional filtering O(N) Compatibility transform: ˆ Qi(xi) ←

l∈L µ(m)(xi, l) m w (m) ˜

Q(m)

i

(l) O(N) Local update: Qi(xi) ← exp{−ψu(xi) − ˆ Qi(xi)} O(N) Normalize: Qi(xi)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 19 / 29

slide-67
SLIDE 67

Learning

ψp(xi, xj) = µ(xi, xj)

K

  • m=1

w(m) exp(−1 2(fi − fj)Σ(m)(fi − fj)) Efficient learning using high-dimensional filtering for µ and w(m) Grid search for Σ(m)

◮ Non-Gaussian convolution

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 20 / 29

slide-68
SLIDE 68

Learning

ψp(xi, xj) = µ(xi, xj)

K

  • m=1

w(m) exp(−1 2(fi − fj) Σ(m) (fi − fj)) Efficient learning using high-dimensional filtering for µ and w(m) Grid search for Σ(m)

◮ Non-Gaussian convolution

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 20 / 29

slide-69
SLIDE 69

Results: MSRC

MSRC dataset 591 images 21 classes

Time Global Avg Unary

  • 84.0

76.6 Grid CRF 1s 84.6 77.2 FC CRF 0.2s 86.0 78.3

cow grass cow grass cow grass car road tree building sky car road tree building sky car road tree building sky bird water grass tree bird water grass bird water grass

Unary Grid CRF FC CRF

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 21 / 29

slide-70
SLIDE 70

Results: MSRC

MSRC dataset 591 images 21 classes

Time Global Avg Unary

  • 84.0

76.6 Grid CRF 1s 84.6 77.2 FC CRF 0.2s 86.0 78.3

cow grass cow grass cow grass car road tree building sky car road tree building sky car road tree building sky bird water grass tree bird water grass bird water grass

Unary Grid CRF FC CRF

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 21 / 29

slide-71
SLIDE 71

Results: MSRC

MSRC dataset 591 images 21 classes

Time Global Avg Unary

  • 84.0

76.6 Grid CRF 1s 84.6 77.2 FC CRF 0.2s 86.0 78.3

cow grass cow grass cow grass car road tree building sky car road tree building sky car road tree building sky bird water grass tree bird water grass bird water grass

Unary Grid CRF FC CRF

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 21 / 29

slide-72
SLIDE 72

Results: MSRC

MSRC dataset 591 images 21 classes

Time Global Avg Unary

  • 84.0

76.6 Grid CRF 1s 84.6 77.2 FC CRF 0.2s 86.0 78.3

cow grass cow grass cow grass car road tree building sky car road tree building sky car road tree building sky bird water grass tree bird water grass bird water grass

Unary Grid CRF FC CRF

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 21 / 29

slide-73
SLIDE 73

Results: MSRC - Trimap

94 images hand annotated pixel accurately (30 min each) Trimap [Kohli et al. 2009]

◮ Percentage of misclassified pixel around object boundaries

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 22 / 29

slide-74
SLIDE 74

Results: MSRC - Trimap

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 23 / 29

slide-75
SLIDE 75

Results: MSRC - Trimap

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 23 / 29

slide-76
SLIDE 76

Results: MSRC - Trimap

4 pixel trimap

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 23 / 29

slide-77
SLIDE 77

Results: MSRC - Trimap

8 pixel trimap

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 23 / 29

slide-78
SLIDE 78

Results: MSRC - Trimap

20 30 40 50 4 8 12 16 20 Pixelwise Classifiaction Error [%] Trimap Width [Pixels] Unary classifiers Grid CRF Fully connected CRF

Trimap width = ∞ Unary 16.8 ± 1.5 Grid CRF 15.2 ± 1.5 FC CRF 11.8 ± 0.7

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 24 / 29

slide-79
SLIDE 79

Results: PASCAL VOC 2010

PASCAL VOC 2010 dataset 1928 images 20 classes + background

Time Acc Unary

  • 27.6

Grid CRF 2.5s 28.3 FC Potts 0.5s 29.1 FC label comp 0.5s 30.2

ground truth

boat background

ground truth

sheep background

fully connected

boat background

fully connected

sheep background

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 25 / 29

slide-80
SLIDE 80

Other domains

Fully connected CRFs in other domains (ongoing work) Point clouds (XYZ + normal + color) Meshes (XYZ + normal)

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 26 / 29

slide-81
SLIDE 81

Summary

Fully connected CRF model

◮ Pairwise terms: linear

combination of Gaussians

Efficient inference

◮ Linear in number of variables ◮ Independent of number of

pairwise terms fully connected

cat background

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 27 / 29

slide-82
SLIDE 82

Future work

Better inference than mean field

◮ Serial filtering

Continuous variables

◮ Depth reconstruction ◮ Optical flow

Non-Euclidean spaces

◮ Geodesic or diffusion distance ◮ Meshes ◮ General graphs

Beyond simple label compatibility

◮ Feature dependent label compatibility

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 28 / 29

slide-83
SLIDE 83

Future work

Better inference than mean field

◮ Serial filtering

Continuous variables

◮ Depth reconstruction ◮ Optical flow

Non-Euclidean spaces

◮ Geodesic or diffusion distance ◮ Meshes ◮ General graphs

Beyond simple label compatibility

◮ Feature dependent label compatibility

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 28 / 29

slide-84
SLIDE 84

Future work

Better inference than mean field

◮ Serial filtering

Continuous variables

◮ Depth reconstruction ◮ Optical flow

Non-Euclidean spaces

◮ Geodesic or diffusion distance ◮ Meshes ◮ General graphs

Beyond simple label compatibility

◮ Feature dependent label compatibility

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 28 / 29

slide-85
SLIDE 85

Future work

Better inference than mean field

◮ Serial filtering

Continuous variables

◮ Depth reconstruction ◮ Optical flow

Non-Euclidean spaces

◮ Geodesic or diffusion distance ◮ Meshes ◮ General graphs

Beyond simple label compatibility

◮ Feature dependent label compatibility

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 28 / 29

slide-86
SLIDE 86

Questions

Webpage and Code: http://graphics.stanford.edu/projects/densecrf/ Poster W14

  • P. Kr¨

ahenb¨ uhl (Stanford) Efficient Inference in Fully Connected CRFs December 2011 29 / 29