graph cut chien-chi chen 1. outline 2 introduction interactive segmentation related work graph...

27
GRAPH CUT Chien-chi Chen 1

Upload: landon-higgs

Post on 14-Dec-2015

229 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

1

GRAPH CUT

Chien-chi Chen

Page 2: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

2

Outline Introduction

Interactive segmentation Related work

Graph cut Concept of graph cut Hard and smooth constrains Min cut/Max flow

Extensive of Graph cut Grab cut Paint Selection

Unsupervise graph cut Conclusion Reference

Page 3: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

3

Outline Introduction

Demo Related work

Graph cut Concept of grap hcut Hard and smooth constrains Min cut/Max flow

Extensive of Graph cut Grab cut Paint Selection

Unsupervise graph cut Conclusion Reference

Page 4: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

4

Interactive Segmentation

Page 5: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

5

Related Work

Scribble-based selection Graph cut

Painting-based selection Paint Selection http://www.youtube.com/watch?v=qC5Y9W-

E-po Boundary-based selection

Intelligent Scissor http://www.youtube.com/watch?

v=3LDsh3vi5fg

Page 6: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

6

Outline Introduction

Demo Related work

Graph cut Concept of graph cut Hard and smooth constrains Min cut/Max flow

Extensive of Graph cut Grab cut Paint Selection

Unsupervise graph cut Conclusion Reference

Page 7: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

7

Concept of graph cut

Characteristic Interactive image segmentation using graph

cut Binary label: foreground vs. background

Interactive User labels some pixels

Algorithm setting Hard constrains Smoothness constrains

Min cut/Max flow Energe minimization

Page 8: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

8

Labeling as a graph problem Each pixel = node Add two nodes F & B Labeling: link each pixel to either F or B

F

B

Desired result

Page 9: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

9

Data term

Put one edge between each pixel and F & G

Weight of edge = minus data term Don’t forget huge weight for hard

constraints Careful with sign

B

F

Page 10: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

10

Smoothness term

Add an edge between each neighbor pair Weight = smoothness term

B

F

Page 11: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

11

Energy function Labeling: one value per pixel, F or B Energy(labeling) = hard + smoothness

Will be minimized

Hard: for each pixel Probability that this color belongs to F (resp. B)

Smoothness (aka regularization): per neighboring pixel pair Penalty for having different label Penalty is downweighted if the two

pixel colors are very different

One labeling(ok, not best)

Data

Smoothness

( ) ( ) ( )E A R A B A

( ) ( )p pp all

R A R A

{ , }{ , }

( ) ( , )p q p qp q N

B A B A A

Page 12: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

12

Min cut

Energy optimization equivalent to min cut

Cut: remove edges to disconnect F from B

Minimum: minimize sum of cut edge weight

http://www.cse.yorku.ca/~aaw/Wang/MaxFlowStart.htm

B

F

Page 13: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

13

Outline Introduction

Demo Related work

Graph cut Concept of graph cut Hard and smooth constrains Min cut/Max flow

Extensive of Graph cut Grab cut Paint Selection

Unsupervise graph cut Conclusion Reference

Page 14: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

14

Extensive of Graph cut

Grab cut E(φ,S,x, λ) = Ecol(φ,S,x) + Ecol(,S,x, λ) :Gaussian

mixture model

22, .

1( , , ) ( ) exp{ || || }

2coh i j i j

i jadjE S x S S x x

( , , ) ( , , )col n nn

E S x D S x

Image

Page 15: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

15

Extensive of Graph cut

Paint selection

B- user brush, F- existing selection F’- new selection, U- backgroundR-dilated box, L- local foreground, dF-frontal foreground

Page 16: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

16

Extensive of Graph cut

E(X)= Hard constrains

Using L(local foreground) to build GMM Background model is randomly sampling a

number (1200 points)from background to build GMM

( )fp

( )bp ( ) (1 )

( )

( ) (1 ) | ( )

d p p

Bd p p

f b Bd p p p p p

E x x K p S

E x x K p S

E x x L x L p U S S

,( ) ( ) ( , )d p c p q

p p qE X E x E x x

Page 17: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

17

Extensive of Graph cut

Smoothness constrains

Adding frontal forground

1

2 1

( , ) | | ( || || )

0.05, (|| || )

c p q p q p q

p q

E x x x x I I

I I

( ) (1 ) d p pE x x K p S F

Page 18: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

18

Outline Introduction

Interactive segmentation Related work

Graph cut Concept of graph cut Hard and smooth constrains Min cut/Max flow

Extensive of Graph cut Grab cut Paint Selection

Unsupervise graph cut Conclusion Reference

Page 19: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

19

Unsupervise graph cut

Automatic object segmentation with salient color model

Saliency Map: 1

( ) ( )K

k kk

F x f x

, ( )

, ( )

,

F F

B B

U

x if F x

x x if F x

x

Page 20: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

20

Unsupervise graph cut

Saliency map

Page 21: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

21

Unsupervise graph cut Segmentation Hard constrains

K-means is employed to model distribution

( , , ) ( , , )x

D X H x

( , , ) (1 ) Pr ( | ) Pr ( | )x F x BH x ob x ob x

Pr ( | ) 1/ min ( , )

Pr ( | ) 1/ min ( , )F F

B B

ob x dis x

ob x dis x

1 2 2min ( , ) min{| | ,...,| | }CF F Fdis x x t x t

Page 22: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

22

Unsupervise graph cut

Smoothness constrains

2'

' ( )( , ) ( , ) exp( | ' | )x x

x x N xB X x x

'( ) 1

0x xif then

else

arg min ( , , )E X

Page 23: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

23

Page 24: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

24

Outline Introduction

Interactive segmentation Related work

Graph cut Concept of graph cut Hard and smooth constrains Min cut/Max flow

Extensive of Graph cut Grab cut Paint Selection

Unsupervise graph cut Conclusion Reference

Page 25: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

25

Conclusion

Interactive segmentation Graph cut is fast, robust segmentation It consider not only difference between

source to node, but also link of node to node.

Page 26: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

26

Reference

1. Lecture slide from Dr. Y.Y. Chuang.2. Y. Boyjov, “An Experimental Comparison

of Min-Cut/Max-Flow Algorithms for Energy Minimization in Vision”, PAMI 2002.

3. J. Liu, J. Sun, H.Y. Shum, ”Paint Selection”, sigraph 2007.

4. C.C. Kao, J.H. Lai, S.Y. Chien,“Automatic Object Segmentation With Salient Color Model”, IEEE 2011.

Page 27: GRAPH CUT Chien-chi Chen 1. Outline 2  Introduction  Interactive segmentation  Related work  Graph cut  Concept of graph cut  Hard and smooth constrains

27

Q&A