Graph Based Image Segmentation Jianbo Shi University of - - PowerPoint PPT Presentation

graph based image segmentation
SMART_READER_LITE
LIVE PREVIEW

Graph Based Image Segmentation Jianbo Shi University of - - PowerPoint PPT Presentation

Graph Based Image Segmentation Jianbo Shi University of Pennsylvania A top-down process? Or a bottom up process? young woman, old woman Both segmentation and recognition are context sensitive: Need the whole to see its parts segmentation


slide-1
SLIDE 1

Graph Based Image Segmentation

Jianbo Shi University of Pennsylvania

slide-2
SLIDE 2

A top-down process?

slide-3
SLIDE 3

Or a bottom up process?

slide-4
SLIDE 4

young woman, old woman

Both segmentation and recognition are context sensitive: Need the whole to see its parts

slide-5
SLIDE 5
slide-6
SLIDE 6

segmentation ill defined?

slide-7
SLIDE 7
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

7

Berkeley Human Segmentation Dataset

slide-8
SLIDE 8
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

8

Dataset Summary

  • 30 subjects, age 19-23

– 17 men, 13 women – 9 with artistic training

  • 8 months
  • 1,458 person hours
  • 1,020 Corel images
  • 11,595 Segmentations

– 5,555 color, 5,554 gray, 486 inverted/negated

slide-9
SLIDE 9
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

9

Do you even have one consistent segmentation?

slide-10
SLIDE 10
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

10 Basket Water Rail Trees Sky Shirt Skirt Arm Legs Head Arm Walk Curb Box Road Shirt Pack Bag Skirt Head Arms Leg Leg Left Woman Bridge Right Woman

Percept Tree

slide-11
SLIDE 11
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

11

A B D C

slide-12
SLIDE 12
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

12

A

Scene Background Trees Shore Water Small Top L R Mermai d Foreground Rocks Base Land Sky

B

Scene Background Trees Shore Water Small Top L R Mermai d Foreground Rocks Base Land Sky

slide-13
SLIDE 13
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

13

Scen e Backgroun d Sky Tree s Shor e Wate r Smal l Top L R Mermai d Foregroun d Rock s Bas e Lan d

A +B A B

Scen e Backgroun d Tree s Shor e Wate r Smal l Top L R Mermai d Foregroun d Rock s Bas e Lan d Scen e Backgroun d Tree s Shor e Wate r Smal l Top L R Mermai d Foregroun d Rock s Bas e Lan d Sky Sky

slide-14
SLIDE 14
  • D. Martin, CVPR 2004 Graph-Based Image Segmentation Tutorial

14

A B D C

slide-15
SLIDE 15

Insight 1: Segmentation/Clustering is always hierarchical

The difficult part is getting the top of the tree correct

Scen e Backgroun d Sky Tree s Shor e Wate r Smal l Top L R Mermai d Foregroun d Rock s Bas e Lan d

A +B

slide-16
SLIDE 16

CVPR 2004 Graph-Based Image Segmentation Tutorial 16

Is Segmentation Solvable?

Human Superman

  • C. Fowlkes
slide-17
SLIDE 17

Graph Based Image Segmentation

Wij

Wij

i j

V: graph nodes E: edges connection nodes Image = { pixels } Pixel similarity Segmentation = Graph partition

slide-18
SLIDE 18

Right partition cost function? Efficient optimization algorithm?

slide-19
SLIDE 19

For simple cases, can try this:

slide-20
SLIDE 20

Minimal/Maximal Spanning Tree

Maximal Minimal Tree is a graph G without cycle Graph

slide-21
SLIDE 21

building a MST

Let X be any subset of the vertices of G, and let edge e be the smallest edge connecting X to G-X. Then e is part of the minimum spanning tree

slide-22
SLIDE 22

Prim’s algorithm

let T be a single vertex x while (T has fewer than n vertices) { find the smallest edge connecting T to G-T add it to T }

slide-23
SLIDE 23

Kruskal’s algorithm

  • sort the edges of G in increasing order by length
  • for each edge e in sorted order

if the endpoints of e are disconnected in S add e to S

Randomized version can compute Typical cuts

slide-24
SLIDE 24

Leakage problem in MST

Leakage

slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27

Image I Graph Affjnities W=W(I,Θ)

Intensity Color Edges Texture

Graph Segmentation: image cues

slide-28
SLIDE 28

Colo r

a* b*

Brightnes s

L*

Texture

Original Image

Wij

Proximity E D χ2 Boundary Processing Textons A B C A B C χ2 Region Processing

  • C. Fowlkes
slide-29
SLIDE 29

29

What is so hard about segmentation?

slide-30
SLIDE 30

30

slide-31
SLIDE 31

31

slide-32
SLIDE 32

32

Non-Boundaries Boundaries I T B C

  • C. Fowlkes
slide-33
SLIDE 33

33

Pb Images I

Canny 2MM Us Human Image

  • C. Fowlkes
slide-34
SLIDE 34

34

Image I Graph Affinities W=W(I,Θ)

Intensity Color Edges Texture

Edge extraction A B A B High affinity Low affinity

slide-35
SLIDE 35

35

Intervening Contour

…turning a boundary map into Wij

1 - maximum Pb along the line connecting i and j

slide-36
SLIDE 36

36

Image I Graph Affinities W=W(I,Θ)

Intensity Color Edges Texture

Graph Segmentation

slide-37
SLIDE 37

37

Image I Graph Affinities W=W(I,Θ)

Intensity Color Edges Texture

Graph Segmentation: How to break the graph

Graph to encode Gestalt: Getting the big picture

  • f scene
slide-38
SLIDE 38

38

Image I Graph Affinities W=W(I,Θ) Eigenvector X(W)

Spectral Graph Segmentation

Discretisation

slide-39
SLIDE 39

Image I Graph Affjnities W=W(I,Θ)

Intensity Color Edges Texture

Graph to encode Gestalt: Getting the big picture of scene

Graph Segmentation: How to break the graph

slide-40
SLIDE 40

Graph Terminology

adjacency matrix, degree, volume, graph cuts

slide-41
SLIDE 41

Graph Terminology

Similarity matrix S = [ Sij ] is generalized adjacency matrix

Sij

i j

slide-42
SLIDE 42

Graph Terminology

i

Degree of node:

slide-43
SLIDE 43

Graph Terminology

A

Volume of set:

slide-44
SLIDE 44

Cuts in a graph

slide-45
SLIDE 45

Graph Terminology

Similarity matrix S = [ Sij ]

Sij

i j i A

Volume of set: Degree of node: Graph Cuts

slide-46
SLIDE 46

Useful Graph Algorithms

  • Minimal Spanning Tree
  • Shortest path
  • s-t Max. graph flow, Min. cut
slide-47
SLIDE 47

Graph Cut and Flow

Sink Source

1) Given a source (s) and a sink node (t) 2) Define Capacity on each edge, C_ij = W_ij 3) Find the maximum flow from s->t, satisfying the capacity constraints

  • Min. Cut = Max. Flow
slide-48
SLIDE 48

(Boykov)

n-links s t a cut

hard constraint hard constraint

Minimum cost cut can be computed in polynomial time

(max-flow/min-cut algorithms)

slide-49
SLIDE 49

Problem with min cuts

  • Min. cuts favors isolated clusters
slide-50
SLIDE 50

Normalize cuts in a graph

  • (edge) Ncut = balanced cut
slide-51
SLIDE 51

Normalized Cut and Normalized Association

  • Minimizing similarity between the groups, and maximizing

similarity within the groups can be achieved simultaneously.

B) A, ( 2 B) A, ( Nassoc Ncut − =

) ( B) A, ( B) A, ( B) A, ( B Vol cut Vol(A) cut Ncut + = ) ( B) B, ( B) A, ( B Vol assoc Vol(A) assoc(A,A) Nassoc + =

slide-52
SLIDE 52

Image I Graph Affjnities W=W(I,Θ) Eigenvector X(W)

Spectral Graph Segmentation

slide-53
SLIDE 53

Image I Graph Affjnities W=W(I,Θ) Eigenvector X(W)

Spectral Graph Segmentation

Discretisation

slide-54
SLIDE 54

Representation

Partition matrix:

segments pixels

slide-55
SLIDE 55

Representation

Partition matrix: Pair-wise similarity matrix W Degree matrix D:

segments pixels

slide-56
SLIDE 56

Representation

Partition matrix: Laplacian matrix D-W Pair-wise similarity matrix W Degree matrix D:

segments pixels

slide-57
SLIDE 57

Graph weight matrix W

slide-58
SLIDE 58

Laplacian matrix D-W

asso(A, A) = Let x = X(1,:) be the indicator of group 1

slide-59
SLIDE 59

asso(A,A)

Laplacian matrix D-W

vol(A) Cut(A, V-A) =

slide-60
SLIDE 60
slide-61
SLIDE 61

Minimize Ncut is NP-hard

slide-62
SLIDE 62

Step I: Find Continuous Global Optima

Scaled partition matrix.

slide-63
SLIDE 63

Step I: Find Continuous Global Optima

becomes Ncut

slide-64
SLIDE 64

becomes

We use the generalization of the Rayleigh-Ritz theorem to solve it.

Rayleigh and… Ritz

slide-65
SLIDE 65

becomes Eigensolutions

Rayleigh and Ritz Says:

slide-66
SLIDE 66

becomes Eigensolutions

y2

i

i

A

y2

i

i

A Rayleigh and Ritz Says:

slide-67
SLIDE 67

Interpretation as a Dynamical System

slide-68
SLIDE 68

Step II: Discretize Continuous Optima

If Z* is an optimal, so is

Partition Scaled Partition Eigenvector solution

slide-69
SLIDE 69

Step II: Discretize Continuous Optima

Z1 Z2 Target partition Eigenvector solution Rotation R Rotation R can be found exactly in 2-way partition

slide-70
SLIDE 70

Image I Graph Affinities W=W(I,Θ) Eigenvector X(W)

Spectral Graph Segmentation

Discretisation

slide-71
SLIDE 71

[Cour,Benezit,Shi, CVPR05]

Multiscale NCut Segmentation

slide-72
SLIDE 72
slide-73
SLIDE 73
slide-74
SLIDE 74
slide-75
SLIDE 75

75

slide-76
SLIDE 76

V i s u a l P o p o u t [Yu, Shi 2001]:

slide-77
SLIDE 77

V i s u a l P o p o u t : G r a p h w i t h n e g a t i v e w e i g h t s

positive links only

slide-78
SLIDE 78

78

Graph Partitioning Normalized Cuts Random Walk Linear System Eigenvectors of Graph Weight Matrix

Graph Embedding

slide-79
SLIDE 79

The random walks view

  • Construct the matrix

P = D-1S D = S =

  • P is stochastic matrix Σj Pij = 1
  • P is transition matrix of Markov chain with state space I

π = [ d1 d2 . . . dn ]T is stationary distribution

d1 d2 . . . dn S11 S12 S1n S21 S22 S2n . . . Sn1 Sn2 Snn 1 . vol I

slide-80
SLIDE 80

Reinterpreting the NCut criterion NCut( A, A ) = PAA + PAA PAB = Pr[ A --> B | A ] under P, π

  • NCut looks for sets that “trap” the random walk
  • Related to Cheeger constant, conductivity in

Markov chains

slide-81
SLIDE 81

Reinterpreting the NCut algorithm

(D-W)y = µDy

µ1=0 µ2 . . . µn

y1 y2 . . . Yn

µk = 1 - λk

yk = xk Px = λx

λ1=1 λ2 . . . λn

x1 x2 . . . xn

The NCut algorithm segments based on the second largest eigenvector of P

slide-82
SLIDE 82

Relationship to Graph embedding

Z1 Z2 Target partition Eigenvector solution Rotation R Rotation R can be found exactly in 2-way partition

slide-83
SLIDE 83

Seeing Through Water…

Efros, Shi, Visontai, Esler, NIPS 04

slide-84
SLIDE 84

84

Patches observed at one fixed location from the previous slide:

slide-85
SLIDE 85

Patches observed at one fixed location: Hypothesized embedding of these patches (we assume they form a manifold)

slide-86
SLIDE 86

86

Edges cues ? Color cues ? Texture cues ? Do you use

Where is Waldo ?

  • That’s not enough, you need

Shape cues High-level object priors

slide-87
SLIDE 87

87

slide-88
SLIDE 88

Con-current recognition-segmentation

Appearance parts detection Part - Part grouping Filter-edge detection Pixel-pixel grouping

Parts-pixel consistency

[Yu, Shi, CVPR’03]

slide-89
SLIDE 89

[Yu, Shi, CVPR’03]

Con-current recognition-segmentation

slide-90
SLIDE 90

This could be the back

A A’

slide-91
SLIDE 91

A’

B’

A B

A → B

slide-92
SLIDE 92

A’

B’

C’ A B C

A → B → C

Context enhances contour perception

slide-93
SLIDE 93

A’

B’ C ’ D’

C’

Not good!

A B C D

Nothing?

A → B → C → D

X

slide-94
SLIDE 94

Accidental alignment happens. Context is very useful, but need to find the ‘Right’ context first.

x

slide-95
SLIDE 95

[Srinivasan&Shi, 07]

slide-96
SLIDE 96

[Toshev, Shi, Daniidis, 07]

slide-97
SLIDE 97
slide-98
SLIDE 98

Contour Packing for Object Recognition

?

Jianbo Shi

Joint work with Qihui Zhu, Praveen Srinivasan, Liming Wang, Yang Wu

slide-99
SLIDE 99

Object Recognition via Region Packing

slide-100
SLIDE 100

Results on ETHZ

Zhu & Shi, ECCV 08

Detection results of our method. Model selection is shown on the top-left corner. false positives pruned by joint contour selection failure cases

Used only one hand-drawn model per class

slide-101
SLIDE 101

Model Shape Learning

Positive training images with bounding boxes

Input Output

Learned model shapes composed by contours

  • Learn shapes without initial models
  • Contour packing for finding common shapes

– Choose all contours in each bounding box as model – Do contour packing across all other training images – Contours selected on the model compose common shapes

Contour Packing

“Model contours“

slide-102
SLIDE 102

Preliminary Results

Top 5 learned model from bounding boxes