Instance-level recognition: Local invariant features Cordelia - - PowerPoint PPT Presentation

instance level recognition local invariant features
SMART_READER_LITE
LIVE PREVIEW

Instance-level recognition: Local invariant features Cordelia - - PowerPoint PPT Presentation

Instance-level recognition: Local invariant features Cordelia Schmid INRIA, Grenoble Overview Overview Introduction to local features Harris interest points + SSD, ZNCC, SIFT H i i t t i t SSD ZNCC SIFT Scale & affine


slide-1
SLIDE 1

Instance-level recognition: Local invariant features

Cordelia Schmid INRIA, Grenoble

slide-2
SLIDE 2

Overview Overview

  • Introduction to local features

H i i t t i t SSD ZNCC SIFT

  • Harris interest points + SSD, ZNCC, SIFT
  • Scale & affine invariant interest point detectors
slide-3
SLIDE 3

Local features Local features

( ) ( )

local descriptor

Several / many local descriptors per image Robust to occlusion/clutter + no object segmentation required Robust to occlusion/clutter + no object segmentation required Photometric : distinctive Invariant : to image transformations + illumination changes

slide-4
SLIDE 4

Local features Local features

Interest Points Contours/lines Region segments

slide-5
SLIDE 5

Local features Local features

Interest Points Contours/lines Region segments Patch descriptors, i.e. SIFT Mi-points, angles Color/texture histogram

slide-6
SLIDE 6

Interest points / invariant regions Interest points / invariant regions

Harris detector Scale/affine inv. detector

t d i thi l t presented in this lecture

slide-7
SLIDE 7

Contours / lines Contours / lines

Extraction de contours

  • Extraction de contours

– Zero crossing of Laplacian – Local maxima of gradients Local maxima of gradients

  • Chain contour points (hysteresis) , Canny detector

p ( y ) , y

  • Recent detectors

– Global probability of boundary (gPb) detector [Malik et al., UC Berkeley] S f f f (S ) – Structured forests for fast edge detection (SED) [Dollar and Zitnick] – student presentation

slide-8
SLIDE 8

Regions segments / superpixels Regions segments / superpixels

Simple linear iterative clustering (SLIC) Simple linear iterative clustering (SLIC)

Normalized cut [Shi & Malik], Mean Shift [Comaniciu & Meer], ….

slide-9
SLIDE 9

Application: matching Application: matching

Find corresponding locations in the image Find corresponding locations in the image

slide-10
SLIDE 10

Illustration – Matching Illustration Matching

I t t i t t t d ith H i d t t ( 500 i t ) Interest points extracted with Harris detector (~ 500 points)

slide-11
SLIDE 11

Matching Illustration – Matching Matching Illustration Matching

I t t i t t h d b d l ti (188 i ) Interest points matched based on cross-correlation (188 pairs)

slide-12
SLIDE 12

Global constraints Illustration – Matching Global constraints

Global constraint Robust estimation of the fundamental matrix

Illustration Matching

Global constraint - Robust estimation of the fundamental matrix 99 inliers 89 outliers 99 inliers 89 outliers

slide-13
SLIDE 13

Application: Panorama stitching pp g

Images courtesy of A. Zisserman.

slide-14
SLIDE 14

Application: Instance-level recognition Application: Instance level recognition

Search for particular objects and scenes in large databases Search for particular objects and scenes in large databases

slide-15
SLIDE 15

Difficulties

Finding the object despite possibly large changes in l i i t li hti d ti l l i scale, viewpoint, lighting and partial occlusion  requires invariant description S l Viewpoint Scale Lighting Occlusion

slide-16
SLIDE 16

Difficulties Difficulties

V l i ll ti  d f ffi i t i d i

  • Very large images collection  need for efficient indexing

Fli k h 2 billi h t h th 1 illi dd d d il – Flickr has 2 billion photographs, more than 1 million added daily Facebook has 15 billion images ( 27 million added daily) – Facebook has 15 billion images (~27 million added daily) – Large personal collections – Large personal collections – Video collections, i.e., YouTube Video collections, i.e., YouTube

slide-17
SLIDE 17

Applications

Search photos on the web for particular places

pp

p p p

Find these landmarks ...in these images and 1M more

slide-18
SLIDE 18

Applications Applications

Take a picture of a product or advertisement

  • Take a picture of a product or advertisement

 find relevant information on the web

slide-19
SLIDE 19

Applications Applications

  • Copy detection for images and videos

Search in 200h of video Query video

slide-20
SLIDE 20

Overview Overview

  • Introduction to local features

H i i t t i t SSD ZNCC SIFT

  • Harris interest points + SSD, ZNCC, SIFT
  • Scale & affine invariant interest point detectors
slide-21
SLIDE 21

Harris detector [Harris & Stephens’88] Harris detector [Harris & Stephens 88]

B d th id f t l ti Based on the idea of auto-correlation I t t diff i ll di ti i t t i t Important difference in all directions => interest point

slide-22
SLIDE 22

Harris detector Harris detector

2

)) ( ) ( ( ) ( I I A  

Auto-correlation function for a point and a shift

) , ( y x ) , ( y x  

2 ) , ( ) , (

)) , ( ) , ( ( ) , ( y y x x I y x I y x A

k k k y x W y x k

k k

     

) ( y x  

W

) , ( y x  

slide-23
SLIDE 23

Harris detector Harris detector

2

)) ( ) ( ( ) ( I I A  

Auto-correlation function for a point and a shift

) , ( y x ) , ( y x  

2 ) , ( ) , (

)) , ( ) , ( ( ) , ( y y x x I y x I y x A

k k k y x W y x k

k k

     

) ( y x  

W

) , ( y x  

small in all directions large in one directions

) , ( y x A {

→ uniform region → contour g large in all directions

) , ( y{

→ interest point

slide-24
SLIDE 24

Harris detector Harris detector

Discret shifts are avoided based on the auto-correlation matrix

           x y x I y x I y x I y y x x I )) ( ) ( ( ) ( ) (

with first order approximation

            y y x I y x I y x I y y x x I

k k y k k x k k k k

)) , ( ) , ( ( ) , ( ) , (

2 ) , ( ) , (

)) , ( ) , ( ( ) , ( y y x x I y x I y x A

k k k y x W y x k

k k

     

 

2 ) (

) , ( ) , (

                  

W y x k k y k k x

k k

y x y x I y x I

) , ( 

   

W y x

k k

y

slide-25
SLIDE 25

Harris detector Harris detector

 

       

 

x y x I y x I y x I

W k k y k k x W k k x ) ( ) ( 2

) , ( ) , ( )) , ( (

 

                    

 

   

y x y x I y x I y x I y x

W y x k k y W y x k k y k k x W y x W y x

k k k k k k k k

) , ( 2 ) , ( ) , ( ) , (

)) , ( ( ) , ( ) , (

Auto-correlation matrix the sum can be smoothed with a Gaussian the sum can be smoothed with a Gaussian

 

           x I I I G

y x x 2

 

                   y I I I G y x

y y x y x x 2

slide-26
SLIDE 26

Harris detector Harris detector

Auto correlation matrix

  • Auto-correlation matrix

   

2

) (

y x x

I I I        

2

) , (

y y x y x x

I I I G y x A

– captures the structure of the local neighborhood measure based on eigenvalues of this matrix – measure based on eigenvalues of this matrix

  • 2 strong eigenvalues
  • 1 strong eigenvalue

=> interest point => contour

  • 0 eigenvalue => uniform region
slide-27
SLIDE 27

Interpreting the eigenvalues Interpreting the eigenvalues

Classification of image points using eigenvalues of autocorrelation matrix:

2 “Edge” 2 >> 1 “Corner” 1 and 2 are large,   2 >> 1 1 ~ 2; \ 1 and 2 are small; “Edge” 1 >> 2 “Flat” region 1

slide-28
SLIDE 28

Corner response function Corner response function

2 2 1 2 1 2

) ( ) ( trace ) det(            A A R

“Corner” “Edge” R < 0

2 1 2 1

) ( ) ( ) (

α: constant (0.04 to 0.06)

“Corner” R > 0 R < 0 |R| small “Edge” R < 0 “Flat” region

slide-29
SLIDE 29

Harris detector Harris detector

C f ti

2 2 1 2 1 2

) ( )) ( ( ) det(          k A trace k A R

  • Cornerness function

2 1 2 1

) ( )) ( ( ) (

R d th ff t f t t Reduces the effect of a strong contour

  • Interest point detection
  • Interest point detection

– Treshold (absolut, relatif, number of corners) – Local maxima

) , ( ) , ( 8 , y x f y x f

  • od

neighbourh y x thresh f        

slide-30
SLIDE 30

Harris Detector: Steps Harris Detector: Steps

slide-31
SLIDE 31

Harris Detector: Steps Harris Detector: Steps

Compute corner response R

slide-32
SLIDE 32

Harris Detector: Steps Harris Detector: Steps

Find points with large corner response: R>threshold

slide-33
SLIDE 33

Harris Detector: Steps Harris Detector: Steps

Take only the points of local maxima of R

slide-34
SLIDE 34

Harris Detector: Steps Harris Detector: Steps

slide-35
SLIDE 35

Harris detector: Summary of steps Harris detector: Summary of steps

1. Compute Gaussian derivatives at each pixel 2. Compute second moment matrix A in a Gaussian i d d h i l window around each pixel 3. Compute corner response function R 4. Threshold R 5. Find local maxima of response function (non-maximum i ) suppression)

slide-36
SLIDE 36

Harris - invariance to transformations Harris invariance to transformations

Geometric transformations

  • Geometric transformations

– translation – rotation i ilit d ( t ti l h ) – similitude (rotation + scale change) – affine (valid for local planar objects) ( p j )

  • Photometric transformations

– Affine intensity changes (I  a I + b)

slide-37
SLIDE 37

Harris Detector: Invariance Properties Harris Detector: Invariance Properties

  • Rotation

Ellipse rotates but its shape (i.e. eigenvalues) remains the same remains the same Corner response R is invariant to image rotation Corner response R is invariant to image rotation

slide-38
SLIDE 38

Harris Detector: Invariance Properties Harris Detector: Invariance Properties

  • Scaling

Scaling

Corner All points will be classified as edges

Not invariant to scaling

slide-39
SLIDE 39

Harris Detector: Invariance Properties Harris Detector: Invariance Properties

  • Affine intensity change
  • Affine intensity change

 Only derivatives are used => invariance to intensity shift I  I + b to intensity shift I  I + b  Intensity scale: I  a I R R

threshold

x (image coordinate) x (image coordinate) ll ffi i i h Partially invariant to affine intensity change, dependent on type of threshold

slide-40
SLIDE 40

Comparison of patches - SSD Comparison of patches SSD

Comparison of the intensities in the neighborhood of two interest points Comparison of the intensities in the neighborhood of two interest points

) , (

1 1 y

x

) , (

2 2 y

x

image 1 image 2 g g

SSD : sum of square difference

2 2 2 2 1 1 1 ) 1 2 ( 1

)) , ( ) , ( (

2

j y i x I j y i x I

N N i N N j N

    

 

    

Small difference values  similar patches

slide-41
SLIDE 41

Cross-correlation ZNCC Cross correlation ZNCC

ZNCC: zero normalized cross correlation                       

 

 2 2 2 2 1 1 1 1 ) 1 2 ( 1

) , ( ) , (

2

m j y i x I m j y i x I

N N N

       

 

     2 1 ) 1 2 (

 

N i N j N

ZNCC values between 1 and 1 1 when identical patches ZNCC values between -1 and 1, 1 when identical patches in practice threshold around 0.5 Robust to illumination change I-> aI+b

slide-42
SLIDE 42

Local descriptors Local descriptors

Pixel values

  • Pixel values

G l d i ti

  • Greyvalue derivatives

Diff ti l i i t

  • Differential invariants [Koenderink’87]

SIFT d i

  • SIFT descriptor [Lowe’99]
slide-43
SLIDE 43

Local descriptors Local descriptors

  • Greyvalue derivatives

G ey a ue de at es

– Convolution with Gaussian derivatives           ) ( ) , ( ) ( ) , (  

x

G y x I G y x I            ) ( * ) ( ) ( * ) , ( ) ( * ) , ( ) , (   

xx y

G y x I G y x I G y x I y x v          ) ( * ) , ( ) ( * ) , (  

yy xy

G y x I G y x I

 

 

          y d x d y y x x I y x G G y x I ) , ( ) , , ( ) ( ) , (  

 

) 2 exp( 2 1 ) , , (

2 2 2 2

   y x y x G   

 

   

y y y y y ) ( ) ( ) ( ) (

slide-44
SLIDE 44

Local descriptors Local descriptors

Notation for greyvalue derivatives [Koenderink’87]

         ) , ( ) ( ) , ( y x L G y x I 

Notation for greyvalue derivatives [Koenderink’87]

                     ) , ( ) , ( ) , ( ) ( * ) , ( ) ( ) , ( ) ( ) , ( y x L y x L y G y x I G y x I y

y x y x

                    ) , ( ) , ( ) , ( ) ( * ) , ( ) ( * ) , ( ) ( ) , ( ) , ( y x L y x L y G y x I G y x I y y x

xy xx y xy xx y

  v                   ) , ( ) , ( ) ( * ) , ( ) ( ) , ( y x L y G y x I y

yy xy yy xy

    

I i ? Invariance?

slide-45
SLIDE 45

Local descriptors – rotation invariance Local descriptors rotation invariance

I i t i t ti diff ti l i i t Invariance to image rotation : differential invariants [Koen87]

  L           

y y x x

L L L L L L L L L L L L L 2

gradient magnitude

            

yy xx yy yy y x xy x x xx

L L L L L L L L L L L L L L L L 2 2

Laplacian

          

yy yy xy xy xx xx

L L L L L L 2               

slide-46
SLIDE 46

Laplacian of Gaussian (LOG) Laplacian of Gaussian (LOG)

) ( ) (  

yy xx

G G LOG  

slide-47
SLIDE 47

SIFT descriptor [Lowe’99] SIFT descriptor [Lowe 99]

  • Approach
  • Approach

– 8 orientations of the gradient – 4x4 spatial grid – Dimension 128 – soft-assignment to spatial bins – normalization of the descriptor to norm one normalization of the descriptor to norm one – comparison with Euclidean distance gradient 3D histogram image patch

x

 

y

slide-48
SLIDE 48

Local descriptors - rotation invariance Local descriptors rotation invariance

E ti ti f th d i t i t ti

  • Estimation of the dominant orientation

– extract gradient orientation histogram over gradient orientation – histogram over gradient orientation – peak in this histogram

2

  • Rotate patch in dominant direction
slide-49
SLIDE 49

Local descriptors – illumination change Local descriptors illumination change

in case of an affine transformation

b aI I   ) ( ) (

2 1

x x

  • Robustness to illumination changes

in case of an affine transformation

b aI I  ) ( ) (

2 1

x x

  • Normalization of the image patch with mean and variance
slide-50
SLIDE 50

Invariance to scale changes Invariance to scale changes

  • Scale change between two images
  • Scale change between two images
  • Scale factor s can be eliminated
  • Support region for calculation!!

– In case of a convolution with Gaussian derivatives defined by – In case of a convolution with Gaussian derivatives defined by

 

 

          y d x d y y x x I y x G G y x I ) , ( ) , , ( ) ( ) , (  

) 2 exp( 2 1 ) , , (

2 2 2 2

 y x y x G   

 

   

y d x d y y x x I y x G G y x I ) , ( ) , , ( ) ( ) , (  

2 2

2 2

 

slide-51
SLIDE 51

Overview Overview

  • Introduction to local features

H i i t t i t SSD ZNCC SIFT

  • Harris interest points + SSD, ZNCC, SIFT
  • Scale & affine invariant interest point detectors
slide-52
SLIDE 52

Scale invariance - motivation Scale invariance motivation

  • Description regions have to be adapted to scale changes

I t t i t h t b t bl f l h

  • Interest points have to be repeatable for scale changes
slide-53
SLIDE 53

Harris detector + scale changes Harris detector + scale changes

| } ) ) ( ( | ) {( | H dist b a b a  

Repeatability rate

|) | |, max(| | } ) ), ( ( | ) , {( | ) (

i i i i i i

H dist R b a b a b a    

slide-54
SLIDE 54

Scale adaptation Scale adaptation

Scale change bet een t o images       Scale change between two images                          

1 1 2 2 2 2 1 1 1

sy sx I y x I y x I Scale adapted derivative calculation

slide-55
SLIDE 55

Scale adaptation Scale adaptation

Scale change bet een t o images       Scale change between two images                          

1 1 2 2 2 2 1 1 1

sy sx I y x I y x I

   

Scale adapted derivative calculation

) ( ) (

1 1

2 2 2 1 1 1

  s G y x I s G y x I

n n

i i n i i  

                  

 s

n

s

   

slide-56
SLIDE 56

Harris detector – adaptation to scale Harris detector adaptation to scale

} ) ), ( ( | ) , {( ) (    

i i i i

H dist R b a b a

slide-57
SLIDE 57

Scale selection Scale selection

For a point compute a value (gradient Laplacian etc ) at

  • For a point compute a value (gradient, Laplacian etc.) at

several scales Normali ation of the al es ith the scale factor

  • Normalization of the values with the scale factor

e.g. Laplacian

| ) ( |

2 yy xx

L L s 

  • Select scale at the maximum → characteristic scale

s

| ) ( |

2 yy xx

L L s 

E lt h th t th L l i i b t lt

scale

  • Exp. results show that the Laplacian gives best results
slide-58
SLIDE 58

Scale selection Scale selection

Scale invariance of the characteristic scale

  • Scale invariance of the characteristic scale

s

p.

  • norm. La

scale

slide-59
SLIDE 59

Scale selection Scale selection

Scale invariance of the characteristic scale

  • Scale invariance of the characteristic scale

s

p. p.

  • norm. La
  • norm. La

 

scale scale

  

2 1

s s s

  • Relation between characteristic scales
slide-60
SLIDE 60

Scale-invariant detectors Scale invariant detectors

Harris Laplace (Mikolajczyk & Schmid’01)

  • Harris-Laplace (Mikolajczyk & Schmid’01)
  • Laplacian detector (Lindeberg’98)
  • Difference of Gaussian (Lowe’99)

Harris-Laplace Laplacian

slide-61
SLIDE 61

Harris-Laplace Harris Laplace

multi-scale Harris points selection of points at maximum of Laplacian invariant points + associated regions [Mikolajczyk & Schmid’01]

slide-62
SLIDE 62

Matching results Matching results

213 / 190 detected interest points 213 / 190 detected interest points

slide-63
SLIDE 63

Matching results Matching results

58 points are initially matched 58 points are initially matched

slide-64
SLIDE 64

Matching results Matching results

32 points are matched after verification – all correct 32 points are matched after verification all correct

slide-65
SLIDE 65

LOG detector LOG detector

Convolve image with scale Convolve image with scale- normalized Laplacian at several scales several scales

)) ( ) ( (

2

 

yy xx

G G s LOG  

Detection of maxima and minima

  • f Laplacian in scale space
slide-66
SLIDE 66

Efficient implementation Efficient implementation

  • Difference of Gaussian (DOG) approximates the

Difference of Gaussian (DOG) approximates the Laplacian

) ( ) (   G k G DOG  

  • Error due to the approximation
slide-67
SLIDE 67

DOG detector DOG detector

  • Fast computation scale space processed one octave at a
  • Fast computation, scale space processed one octave at a

time

David G. Lowe. "Distinctive image features from scale-invariant keypoints.”IJCV 60 (2) student presentation

slide-68
SLIDE 68

Affine invariant regions - Motivation Affine invariant regions Motivation

Scale invariance is not sufficient for large baseline changes

  • Scale invariance is not sufficient for large baseline changes

detected scale invariant region g

A

j t d i i i t h l ll projected regions, viewpoint changes can locally be approximated by an affine transformation A

slide-69
SLIDE 69

Affine invariant regions - Motivation Affine invariant regions Motivation

slide-70
SLIDE 70

Affine invariant regions - Example Affine invariant regions Example

slide-71
SLIDE 71

Harris/Hessian/Laplacian-Affine Harris/Hessian/Laplacian Affine

  • Initialize with scale invariant Harris/Hessian/Laplacian
  • Initialize with scale-invariant Harris/Hessian/Laplacian

points

  • Estimation of the affine neighbourhood with the second

moment matrix [Lindeberg’94]

  • Apply affine neighbourhood estimation to the scale-

invariant interest points [Mikolajczyk & Schmid’02 invariant interest points [Mikolajczyk & Schmid 02, Schaffalitzky & Zisserman’02]

  • Excellent results in a comparison [Mikolajczyk et al.’05]
slide-72
SLIDE 72

Affine invariant regions Affine invariant regions

Based on the second moment matrix (Lindeberg’94)

  • Based on the second moment matrix (Lindeberg’94)

     ) , ( ) , ( ) ( ) (

2 2 D y x D x

L L L G M   x x          ) , ( ) , ( ) , ( ) , ( ) ( ) , , (

2 2 D y D y x D y x D x I D D I

L L L G M        x x x

  • Normalization with eigenvalues/eigenvectors

1

x x

2

M  

slide-73
SLIDE 73

Affine invariant regions Affine invariant regions

x x A 

L R

x x A 

L 2 1 L

x x

L

M  

R 2 1 R

x x

R

M  

  

L R

Rx x

Isotropic neighborhoods related by image rotation

slide-74
SLIDE 74

Affine invariant regions - Estimation

  • Iterative estimation

initial points

Affine invariant regions Estimation

  • Iterative estimation – initial points
slide-75
SLIDE 75

Affine invariant regions - Estimation

  • Iterative estimation

iteration #1

Affine invariant regions Estimation

  • Iterative estimation – iteration #1
slide-76
SLIDE 76

Affine invariant regions - Estimation

  • Iterative estimation

iteration #2

Affine invariant regions Estimation

  • Iterative estimation – iteration #2
slide-77
SLIDE 77

Harris-Affine versus Harris-Laplace Harris Affine versus Harris Laplace

H i L l Harris-Laplace Harris-Affine

slide-78
SLIDE 78

Harris/Hessian-Affine Harris/Hessian Affine

H i Affi Harris-Affine Hessian-Affine

slide-79
SLIDE 79

Harris-Affine Harris Affine

slide-80
SLIDE 80

Hessian-Affine Hessian Affine

slide-81
SLIDE 81

Matches Matches

22 correct matches

slide-82
SLIDE 82

Matches Matches

33 correct matches

slide-83
SLIDE 83

Maximally stable extremal regions (MSER) [Matas’02] Maximally stable extremal regions (MSER) [Matas 02]

Extremal regions: connected components in a thresholded

  • Extremal regions: connected components in a thresholded

image (all pixels above/below a threshold)

  • Maximally stable: minimal change of the component

(area) for a change of the threshold i e region remains (area) for a change of the threshold, i.e. region remains stable for a change of threshold

  • Excellent results in a recent comparison
slide-84
SLIDE 84

Maximally stable extremal regions (MSER) Maximally stable extremal regions (MSER) E l f th h ld d i Examples of thresholded images

high threshold low threshold

slide-85
SLIDE 85

MSER MSER