37
Contour Detection and Hierarchical Image Segmentation – Some Experiments CS395T – Visual Recognition Presented by Elad Liebman

Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Contour Detection and Hierarchical Image Segmentation

– Some Experiments

CS395T – Visual Recognition

Presented by Elad Liebman

Page 2: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Overview

β€’ Understanding the method better: – The importance of thresholding the ouput – Understanding the inputs better – Understanding the UCM

β€’ Pushing for boundaries: – Types of difficult inputs – Difficult input examples

Page 3: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Warm-up: choosing the right threshold

π‘˜ = 0.4

Page 4: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Warm-up: choosing the right threshold

π‘˜ = 0.1

Page 5: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Warm-up: choosing the right threshold

π‘˜ = 0.8

Page 6: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

So what goes into the OWT?

β€’ From Contours to Regions: An Empirical Evaluation. P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik. CVPR 2009.

β€’ Contour Detection and Hierarchical Image Segmentation. P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik. PAMI 2011

Page 7: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

The Features

β€’ Difference in feature channels on the two halves of a disc of radius 𝜎 and orientation πœƒ.

β€’ Feature channels in our case: – Color gradients – Brightness gradients – Texture gradients

β€’ Comparison between the two disc halves using πœ’2 distance.

Page 8: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

The basic signals

β€’ Color/brightness channels based on Lab color space.

β€’ Repeatedly generated at different scales (different 𝜎 radii values - 𝜎

2,𝜎, 2𝜎).

β€’ All in all we get 13 different inputs.

Page 9: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Illustration n. 1: Color gradient π‘Ž (red-green scale)

πœƒ =πœ‹2

πœƒ = βˆ’πœ‹4

πœƒ =

πœ‹2

maxπœƒ

{π‘π‘π‘Ž}

Page 10: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Illustration n. 2: Color gradient π‘Ž, different 𝜎 value

maxπœƒ

{π‘π‘π‘Ž}

πœƒ = 0

πœƒ =πœ‹4

πœƒ = βˆ’πœ‹4

Page 11: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Illustration 3: Brightness gradient (light-dark scale)

maxπœƒ

{π‘π‘π‘Ž}

πœƒ =πœ‹2

πœƒ = βˆ’πœ‹4

πœƒ =

πœ‹2

Page 12: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Illustration 4: Texton Map

Page 13: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Multiscale 𝑃𝑃 and Spectral/Global 𝑃𝑃 β€’ The features are linearly combined to create a

unified signal, the multiscale Pb input. β€’ They are then β€œglobalized” spectrally. β€’ An affinity matrix 𝑀 is constructed with π‘Šπ‘–π‘–

being the maximal value of π‘šπ‘ƒπ‘ƒ along the line connecting 𝑖 and 𝑗.

β€’ Generalized eigenvectors are then extracted and combined (after processing) with the local 𝑃𝑃 data to create the final input for the OWT.

Page 14: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

π‘šπ‘ƒπ‘ƒ vs. 𝑐𝑃𝑃

Page 15: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

(In practice we sample 8 orientations…)

𝑐𝑃𝑃 = maxπœƒ

{ }

πœƒ = [0,πœ‹8

,πœ‹4

,3πœ‹8

, … ,7πœ‹8

]

Page 16: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

(In practice we sample 8 orientations…)

𝑐𝑃𝑃 =

Page 17: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Playing with the orientations a bit…

Page 18: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Playing with the orientations a bit…

Page 19: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Using less than 8 orientations

2 orientations

Page 20: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Using less than 8 orientations

4 orientations (in this case it’s enough)

Page 21: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

The Ultrametric Contour Map

β€’ The basic idea is to organize and merge sub-regions hierarchically and iteratively.

β€’ At each point we merge two regions with the weakest boundary between them.

β€’ The result is a dendrogram of nested regions.

Page 22: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Example 1

Page 23: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Example 2

Page 24: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Potentially Difficult Input

β€’ We would like to test the OWT-UCM method against problematic input.

β€’ See where it might break.

Page 25: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

warming up - blurring

Page 26: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Potentially Difficult Input II

β€’ Blurring isn’t very interesting – doesn’t reflect the kind of challenges the algorithm is likely to face.

β€’ What realistic problems exist? – Difficult patches – Complex, contour-rich images – Not enough color/texture information

Page 27: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Difficult Input – abstract art

π‘˜ = 0.4

Page 28: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Difficult Input – abstract art

π‘˜ = 0.1

Page 29: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Difficult(er) Input – abstract(er?) art

π‘˜ = 0.4

Page 30: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Difficult(er) Input – abstract(er?) art

π‘˜ = 0.1

Page 31: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Another Difficult Example β€’ Occlusion β€’ Similarity of objects in image:

– Similar textures – Similar colors – Contour lines blend

Page 32: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Another Difficult Example

π‘˜ = 0.4

Page 33: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Another Difficult Example

π‘˜ = 0.1

Page 34: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Another Difficult Example

π‘˜ = 0.2

Page 35: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Sneaking a look under the hood

β€’ Possibly we need to weight elements differently in certain cases…

CGA1 CGB1

Textons

BG1

Page 36: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

Summary β€’ Studied some of the technical aspects of the

method: – Threshold selection – Understanding the input data – Illustration of UCM in action

β€’ Tested the method against difficult input: – Problematic contours – Complex images – Cases where features aren’t informative enough – Many similar items occluding one another

Page 37: Contour Detection and Hierarchical Image Segmentation ...cv-fall2012/slides/elad-expt.pdfAnother Difficult Example π‘˜= 0.2. Sneaking a look under the hood β€’ Possibly we need to

References β€’ From Contours to Regions: An Empirical Evaluation. P.

Arbelaez, M. Maire, C. Fowlkes, and J. Malik. CVPR 2009. β€’ Contour Detection and Hierarchical Image Segmentation.

P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik. PAMI 2011

β€’ Using Contours to Detect and Localize Junctions in Natural Images. M. Maire, P. Arbelaez, C. Fowlkes, and J. Malik. CVPR 2008.

β€’ What are Textons? S. Zhu, C. Guo, Y. Want Z. Xu, International Journal of Computer Vision 2005.

β€’ Class notes for 16-721: Learning-Based Methods in Vision, taught by Prof. Alexei Efros, CMU.

β€’ Class notes for CS 143: Introduction to Computer Vision, taught by Prof. James Hayes, Brown.