+ All Categories
Home > Documents > Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV...

Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV...

Date post: 18-Mar-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
116
Segmentation Lecture 12 Many slides from: S. Lazebnik, K. Grauman and P. Kumar
Transcript
Page 1: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Segmentation

Lecture 12

Many slides from: S. Lazebnik, K. Grauman and P. Kumar

Page 2: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Image Segmentation

Page 3: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Image segmentation

Page 4: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

The goals of segmentation

• Group together similar-looking pixels for

efficiency of further processing• “Bottom-up” process

• Unsupervised

X. Ren and J. Malik. Learning a classification model for segmentation.

ICCV 2003.

“superpixels”

Slide credit: S. Lazebnik

Page 5: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

The goals of segmentation

• Separate image into coherent “objects”• “Bottom-up” or “top-down” process?

• Supervised or unsupervised?

Berkeley segmentation database:http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/

image human segmentation

Slide credit: S. Lazebnik

Page 6: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Emergence

http://en.wikipedia.org/wiki/Gestalt_psychology

Page 7: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Overview

• Bottom-up segmentation

– Clustering

– Mean shift

– Graph-based

• Combining object recognition & segmentation

– OBJCUT

– Other methods

Page 8: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Overview

• Bottom-up segmentation

– Clustering

– Mean shift

– Graph-based

• Combining object recognition & segmentation

– OBJCUT

– Other methods

Page 9: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Segmentation as clustering

Source: K. Grauman

Page 10: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Image Intensity-based clusters Color-based clusters

Segmentation as clustering

• K-means clustering based on intensity or

color is essentially vector quantization of the

image attributes• Clusters don‟t have to be spatially coherent

Slide credit: S. Lazebnik

Page 11: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Segmentation as clustering

Source: K. Grauman

Page 12: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Segmentation as clustering

• Clustering based on (r,g,b,x,y) values

enforces more spatial coherence

Slide credit: S. Lazebnik

Page 13: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

K-Means for segmentation

• Pros• Very simple method

• Converges to a local minimum of the error function

• Cons• Memory-intensive

• Need to pick K

• Sensitive to initialization

• Sensitive to outliers

• Only finds “spherical”

clusters

Slide credit: S. Lazebnik

Page 14: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Overview

Bottom-up segmentation• Clustering

• Mean shift

• Graph-based

Combining object recognition & segmentation• OBJCUT

• Other methods

Page 15: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html

Mean shift clustering and segmentation

• An advanced and versatile technique for

clustering-based segmentation

D. Comaniciu and P. Meer, Mean Shift: A Robust Approach toward Feature

Space Analysis, PAMI 2002.

Page 16: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

• The mean shift algorithm seeks modes or local

maxima of density in the feature space

Mean shift algorithm

imageFeature space

(L*u*v* color values)

Page 17: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Search

window

Center of

mass

Mean Shift

vector

Mean shift

Slide by Y. Ukrainitz & B. Sarel

Page 18: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Search

window

Center of

mass

Mean Shift

vector

Mean shift

Slide by Y. Ukrainitz & B. Sarel

Page 19: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Search

window

Center of

mass

Mean Shift

vector

Mean shift

Slide by Y. Ukrainitz & B. Sarel

Page 20: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Search

window

Center of

mass

Mean Shift

vector

Mean shift

Slide by Y. Ukrainitz & B. Sarel

Page 21: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Search

window

Center of

mass

Mean Shift

vector

Mean shift

Slide by Y. Ukrainitz & B. Sarel

Page 22: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Search

window

Center of

mass

Mean Shift

vector

Mean shift

Slide by Y. Ukrainitz & B. Sarel

Page 23: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Search

window

Center of

mass

Mean shift

Slide by Y. Ukrainitz & B. Sarel

Page 24: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

• Cluster: all data points in the attraction basin

of a mode

• Attraction basin: the region for which all

trajectories lead to the same mode

Mean shift clustering

Slide by Y. Ukrainitz & B. Sarel

Page 25: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

• Find features (color, gradients, texture, etc)

• Initialize windows at individual feature points

• Perform mean shift for each window until convergence

• Merge windows that end up near the same “peak” or mode

Mean shift clustering/segmentation

Page 26: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html

Mean shift segmentation results

Page 27: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

More results

Page 28: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

More results

Page 29: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Mean shift pros and cons

• Pros• Does not assume spherical clusters

• Just a single parameter (window size)

• Finds variable number of modes

• Robust to outliers

• Cons• Output depends on window size

• Computationally expensive

• Does not scale well with dimension of feature space

Slide credit: S. Lazebnik

Page 30: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Overview

Bottom-up segmentation• Clustering

• Mean shift

• Graph-based

Combining object recognition & segmentation• OBJCUT

• Other methods

Page 31: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Images as graphs

• Node for every pixel

• Edge between every pair of pixels (or every pair

of “sufficiently close” pixels)

• Each edge is weighted by the affinity or

similarity of the two nodes

wij

i

j

Source: S. Seitz

Page 32: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Segmentation by graph partitioning

• Break Graph into Segments• Delete links that cross between segments

• Easiest to break links that have low affinity

– similar pixels should be in the same segments

– dissimilar pixels should be in different segments

A B C

Source: S. Seitz

wij

i

j

Page 33: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Measuring affinity

• Suppose we represent each pixel by a

feature vector x, and define a distance

function appropriate for this feature

representation

• Then we can convert the distance between

two feature vectors into an affinity with the

help of a generalized Gaussian kernel:

2

2),(dist

2

1exp ji xx

Slide credit: S. Lazebnik

Page 34: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Scale affects affinity

• Small σ: group only nearby points

• Large σ: group far-away points

Slide credit: S. Lazebnik

Page 35: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Graph cut

• Set of edges whose removal makes a graph

disconnected

• Cost of a cut: sum of weights of cut edges

• A graph cut gives us a segmentation• What is a “good” graph cut and how do we find one?

AB

Source: S. Seitz

Page 36: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Minimum cut

• We can do segmentation by finding the

minimum cut in a graph• Efficient algorithms exist for doing this

Minimum cut example

Slide credit: S. Lazebnik

Page 37: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Minimum cut

• We can do segmentation by finding the

minimum cut in a graph• Efficient algorithms exist for doing this

Minimum cut example

Slide credit: S. Lazebnik

Page 38: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Normalized cut

• Drawback: minimum cut tends to cut off very

small, isolated components

Ideal Cut

Cuts with

lesser weight

than the

ideal cut

* Slide from Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Page 39: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Normalized cut

• Drawback: minimum cut tends to cut off very

small, isolated components

• This can be fixed by normalizing the cut by

the weight of all the edges incident to the

segment

• The normalized cut cost is:

w(A, B) = sum of weights of all edges between A and B

assoc(A,V) = sum of all weights in cluster A + w(A,B)

),(

),(

),(

),(

VBassoc

BAw

VAassoc

BAw

J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000

Page 40: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Normalized cut

• Finding the exact minimum of the normalized cut cost is

NP-complete, but we relax to let nodes take on arbitrary

values:

• Let W be the adjacency matrix of the graph

• Let D be the diagonal matrix with diagonal entries D(i, i) =

Σj W(i, j)

• Then the normalized cut cost can be written as

where y is an indicator vector whose value should be 1 in

the ith position if the ith feature point belongs to A and a

negative constant otherwise

J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000

Dyy

yWDyT

T )(

Page 41: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Normalized cut

• We can minimize the relaxed cost by solving the

generalized eigenvalue problem (D − W)y = λDy

• The solution y is given by the generalized

eigenvector corresponding to the second smallest

eigenvalue

• Intutitively, the ith entry of y can be viewed as a

“soft” indication of the component membership of

the ith feature• Can use 0 or median value of the entries as the splitting point

(threshold), or find threshold that minimizes the Ncut cost

Page 42: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Normalized cut algorithm

1. Represent the image as a weighted graph

G = (V,E), compute the weight of each edge,

and summarize the information in D and W

2. Solve (D − W)y = λDy for the eigenvector

with the second smallest eigenvalue

3. Use the entries of the eigenvector to

bipartition the graph

To find more than two clusters:

• Recursively bipartition the graph

• Run k-means clustering on values of

several eigenvectors

Page 43: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example result

Page 44: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Challenge

• How to segment images that are a “mosaic of

textures”?

Page 45: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Using texture features for segmentation

• Convolve image with a bank of filters

J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for

Image Segmentation". IJCV 43(1),7-27,2001.

Page 46: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Using texture features for segmentation

• Convolve image with a bank of filters

• Find textons by clustering vectors of filter bank

outputs

J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for

Image Segmentation". IJCV 43(1),7-27,2001.

Texton mapImage

Slide credit: S. Lazebnik

Page 47: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Using texture features for segmentation

• Convolve image with a bank of filters

• Find textons by clustering vectors of filter bank

outputs

• The final texture feature is a texton histogram

computed over image windows at some “local

scale”

J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for

Image Segmentation". IJCV 43(1),7-27,2001. Slide credit: S. Lazebnik

Page 48: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Pitfall of texture features

• Possible solution: check for “intervening

contours” when computing connection weights

J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for

Image Segmentation". IJCV 43(1),7-27,2001.

Page 49: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example results

Page 50: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Results: Berkeley Segmentation Engine

http://www.cs.berkeley.edu/~fowlkes/BSE/

Page 51: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

• Pros• Generic framework, can be used with many different

features and affinity formulations

• Cons• High storage requirement and time complexity

• Bias towards partitioning into equal segments

Normalized cuts: Pro and con

Slide credit: S. Lazebnik

Page 52: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Overview

Bottom-up segmentation• Clustering

• Mean shift

• Graph-based

• Texton

Combining object recognition & segmentation• OBJCUT

• Other methods

Page 53: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Aim• Given an image and object category, to segment the object

Segmentation should (ideally) be

• shaped like the object e.g. cow-like

• obtained efficiently in an unsupervised manner

• able to handle self-occlusion

Segmentation

Object

Category

Model

Cow Image Segmented Cow

Slide from Kumar „05

Page 54: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Feature-detector view

Page 55: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation
Page 56: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation
Page 57: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation
Page 58: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Examples of bottom-up segmentation

• Using Normalized Cuts, Shi & Malik, 1997

Borenstein and Ullman, ECCV 2002

Page 59: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Jigsaw approach: Borenstein and Ullman, 2002

Page 60: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Perc

eptu

al

and S

enso

ry A

ugm

ente

d C

om

puti

ng

Inte

rle

av

ed

Ob

jec

t C

ate

go

riza

tio

n a

nd

Seg

men

tati

on

Implicit Shape Model - Liebe and Schiele, 2003

Backprojected

Hypotheses

Interest Points Matched Codebook

Entries

Probabilistic

Voting

Voting Space

(continuous)

Backprojection

of Maxima

Segmentation

Refined Hypotheses

(uniform sampling)

Liebe and Schiele, 2003, 2005

Page 61: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Overview

• Bottom-up segmentation

– Clustering

– Mean shift

– Graph-based

• Combining object recognition & segmentation

– OBJCUT

– Other methods

Page 62: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

OBJ CUT

M. Pawan Kumar

Philip Torr

Andrew Zisserman

UNIVERSITY

OF

OXFORD

Page 63: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Aim

• Given an image, to segment the object

Segmentation should (ideally) be

• shaped like the object e.g. cow-like

• obtained efficiently in an unsupervised manner

• able to handle self-occlusion

Segmentation

Object

Category

Model

Cow Image Segmented Cow

Page 64: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Challenges

Self Occlusion

Intra-Class Shape Variability

Intra-Class Appearance Variability

Page 65: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

MotivationMagic Wand

Current methods require user intervention

• Object and background seed pixels (Boykov and Jolly, ICCV 01)

• Bounding Box of object (Rother et al. SIGGRAPH 04)

Cow Image

Object Seed Pixels

Slide credit: P. Kumar

Page 66: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

MotivationMagic Wand

Current methods require user intervention

• Object and background seed pixels (Boykov and Jolly, ICCV 01)

• Bounding Box of object (Rother et al. SIGGRAPH 04)

Cow Image

Object Seed Pixels

Background Seed Pixels

Slide credit: P. Kumar

Page 67: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

MotivationMagic Wand

Current methods require user intervention

• Object and background seed pixels (Boykov and Jolly, ICCV 01)

• Bounding Box of object (Rother et al. SIGGRAPH 04)

Segmented Image

Slide credit: P. Kumar

Page 68: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

MotivationMagic Wand

Current methods require user intervention

• Object and background seed pixels (Boykov and Jolly, ICCV 01)

• Bounding Box of object (Rother et al. SIGGRAPH 04)

Cow Image

Object Seed Pixels

Background Seed Pixels

Slide credit: P. Kumar

Page 69: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

MotivationMagic Wand

Current methods require user intervention

• Object and background seed pixels (Boykov and Jolly, ICCV 01)

• Bounding Box of object (Rother et al. SIGGRAPH 04)

Segmented Image

Slide credit: P. Kumar

Page 70: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Problem• Manually intensive

• Segmentation is not guaranteed to be ‘object-like’

Non Object-like Segmentation

Motivation

Slide credit: P. Kumar

Page 71: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Our Method

• Combine object detection with segmentation– Borenstein and Ullman, ECCV ‟02

– Leibe and Schiele, BMVC ‟03

• Incorporate global shape priors in MRF

• Detection provides– Object Localization

– Global shape priors

• Automatically segments the object– Note our method is completely generic

– Applicable to any object category model

Slide credit: P. Kumar

Page 72: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Outline

• Problem Formulation

• Form of Shape Prior

• Optimization

• Results

Slide credit: P. Kumar

Page 73: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Problem

• Labelling m over the set of pixels D

• Shape prior provided by parameter

• Energy E (m, ) = ∑ x(D|mx)+ x(mx| ) + ∑ xy(mx,my)+ (D|mx,my)

• Unary terms– Likelihood based on colour

– Unary potential based on distance from

• Pairwise terms– Prior

– Contrast term

• Find best labelling m* = arg min ∑ wi E (m, i)

– wi is the weight for sample i

Unary terms Pairwise terms

Slide credit: P. Kumar

Page 74: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Markov Random Field (MRF)

Probability for a labelling consists of

• Likelihood

• Unary potential based on colour of pixel

• Prior which favours same labels for neighbours (pairwise potentials)

D (pixels)

m (labels)

Image Plane

x

y

mx

my Unary Potential

x(D|mx)

Pairwise Potential

xy(mx, my)

Slide credit: P. Kumar

Page 75: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example

Cow Image Object Seed

PixelsBackground Seed

Pixels

Prior

x …

y …

x …

y …

x(D|obj)

x(D|bkg)xy(mx,my)

Likelihood Ratio (Colour)Slide credit: P. Kumar

Page 76: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example

Cow Image Object Seed

PixelsBackground Seed

Pixels

PriorLikelihood Ratio (Colour)Slide credit: P. Kumar

Page 77: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Contrast-Dependent MRF

Probability of labelling in addition has

• Contrast term which favours boundaries to lie on image edges

D (pixels)

m (labels)

Image Plane

Contrast Term

(D|mx,my)

x

y

mx

my

Slide credit: P. Kumar

Page 78: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example

Cow Image Object Seed

PixelsBackground Seed

Pixels

Prior + Contrast

x …

y …

x …

y …

Likelihood Ratio (Colour)

x(D|obj)

x(D|bkg)xy(mx,my)+

xy(D|mx,my)

Slide credit: P. Kumar

Page 79: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example

Cow Image Object Seed

PixelsBackground Seed

Pixels

Prior + ContrastLikelihood Ratio (Colour)Slide credit: P. Kumar

Page 80: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Our Model

Probability of labelling in addition has

• Unary potential which depend on distance from (shape parameter)

D (pixels)

m (labels)

(shape parameter)

Image Plane

Object Category

Specific MRFx

y

mx

my

Unary Potential

x(mx| )

Slide credit: P. Kumar

Page 81: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example

Cow Image Object Seed

PixelsBackground Seed

Pixels

Prior + ContrastDistance from

Shape Prior

Slide credit: P. Kumar

Page 82: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example

Cow Image Object Seed

PixelsBackground Seed

Pixels

Prior + ContrastLikelihood + Distance from

Shape Prior

Slide credit: P. Kumar

Page 83: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Example

Cow Image Object Seed

PixelsBackground Seed

Pixels

Prior + ContrastLikelihood + Distance from

Shape Prior

Slide credit: P. Kumar

Page 84: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Outline

• Problem Formulation– Energy E (m, ) = ∑ x(D|mx)+ x(mx| ) + ∑ xy(mx,my)+

(D|mx,my)

• Form of Shape Prior

• Optimization

• Results

Slide credit: P. Kumar

Page 85: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Layered Pictorial Structures (LPS)• Generative model

• Composition of parts + spatial layout

Layer 2

Layer 1

Parts in Layer 2 can occlude parts in Layer 1

Spatial Layout

(Pairwise Configuration)

Slide credit: P. Kumar

Page 86: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Layer 2

Layer 1

Transformations

1

P( 1) = 0.9

Cow Instance

Layered Pictorial Structures (LPS)

Slide credit: P. Kumar

Page 87: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Layer 2

Layer 1

Transformations

2

P( 2) = 0.8

Cow Instance

Layered Pictorial Structures (LPS)

Slide credit: P. Kumar

Page 88: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Layer 2

Layer 1

Transformations

3

P( 3) = 0.01

Unlikely Instance

Layered Pictorial Structures (LPS)

Slide credit: P. Kumar

Page 89: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Outline

• Problem Formulation

• Form of Shape Prior

• Optimization

• Results

Slide credit: P. Kumar

Page 90: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Optimization

• Given image D, find best labelling as

m* = arg max p(m|D)

• Treat LPS parameter as a latent (hidden) variable

• EM framework

– E : sample the distribution over

– M : obtain the labelling m

Slide credit: P. Kumar

Page 91: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Results of E-Step

• Different samples localize different parts well.

• We cannot use only the MAP estimate of the LPS.

Slide credit: P. Kumar

Page 92: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

M-Step

• Given samples from p( |m’,D), get new labelling mnew

• Sample i provides– Object localization to learn RGB distributions of object and background

– Shape prior for segmentation

• Problem

– Maximize expected log likelihood using all samples

– To efficiently obtain the new labelling

Slide credit: P. Kumar

Page 93: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

M-Step

Cow Image Shape 1

w1 = P( 1|m‟,D)

RGB Histogram for Object RGB Histogram for Background

Page 94: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Cow Image

M-Step

1

Image PlaneD (pixels)

m (labels)

• Best labelling found efficiently using a Single Graph Cut

Shape 1

w1 = P( 1|m‟,D)

Page 95: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Segmentation using Graph Cuts

x …

y … … …

z … …

Obj

Bkg

Cutx(D|bkg) + x(bkg| )

m

z(D|obj) + z(obj| )

xy(mx,my)+

xy(D|mx,my)

Slide credit: P. Kumar

Page 96: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Segmentation using Graph Cuts

x …

y … … …

z … …

Obj

Bkg

m

Slide credit: P. Kumar

Page 97: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

M-Step

Cow Image

RGB Histogram for BackgroundRGB Histogram for Object

Shape 2

w2 = P( 2|m‟,D)

Page 98: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

M-Step

Cow Image

2

Image PlaneD (pixels)

m (labels)

• Best labelling found efficiently using a Single Graph Cut

Shape 2

w2 = P( 2|m‟,D)

Page 99: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

M-Step

2

Image Plane

1

Image Plane

w1 + w2 + ….

• Best labelling found efficiently using a Single Graph Cut

m* = arg min ∑ wi E (m, i)

Page 100: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Outline

• Problem Formulation

• Form of Shape Prior

• Optimization

• Results

Page 101: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

SegmentationImage

ResultsUsing LPS Model for Cow

Slide credit: P. Kumar

Page 102: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

In the absence of a clear boundary between object and background

SegmentationImage

ResultsUsing LPS Model for Cow

Slide credit: P. Kumar

Page 103: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

SegmentationImage

ResultsUsing LPS Model for Cow

Slide credit: P. Kumar

Page 104: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

SegmentationImage

ResultsUsing LPS Model for Cow

Page 105: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

SegmentationImage

ResultsUsing LPS Model for Horse

Page 106: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

SegmentationImage

ResultsUsing LPS Model for Horse

Page 107: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Our Method Leibe and SchieleImage

Results

Page 108: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

AppearanceShape Shape+Appearance

Results

Without x(D|mx) Without x(mx| )

Page 109: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Overview

• Bottom-up segmentation

– Clustering

– Mean shift

– Graph-based

• Combining object recognition &

segmentation

– OBJCUT

– Other methods

Page 110: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

[Lepetit et al. CVPR 2005]

• Decision forest

classifier

• Features are

differences of

pixel intensities

Classifier

Winn and Shotton 2006

Layout Consistent Random Field

Page 111: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Layout consistency

(8,3) (9,3)(7,3)

(8,2) (9,2)(7,2)

(8,4) (9,4)(7,4)

Neighboring pixels

(p,q)

? (p,q+1)(p,q) (p+1,q+1)(p-1,q+1)

Layout

consistent

Winn and Shotton 2006

Page 112: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Layout Consistent Random Field

Layout consistencyPart detector

Winn and Shotton 2006

Page 113: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Stability of part labelling

Part color key

Page 114: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Image parsing: Tu, Zhu and Yuille 2003

Page 115: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

Image parsing: Tu, Zhu and Yuille 2003

Page 116: Segmentationfergus/teaching/vision_2012/12_segmentation.pdfImage Segmentation". IJCV 43(1),7-27,2001. Image Texton map Slide credit: S. Lazebnik. Using texture features for segmentation

LOCUS model

Deformation field D

Position & size T

Class shape π Class edge

sprite μo,σo

Edge image e

Image

Object

appearance λ1

Background

appearance λ0

Mask m

Shared

between

images

Different

for each

image

Kannan, Jojic and Frey 2004

Winn and Jojic, 2005


Recommended