I Instance-level recognition t l l iti Cordelia Schmid INRIA - - PowerPoint PPT Presentation

i instance level recognition t l l iti
SMART_READER_LITE
LIVE PREVIEW

I Instance-level recognition t l l iti Cordelia Schmid INRIA - - PowerPoint PPT Presentation

I Instance-level recognition t l l iti Cordelia Schmid INRIA Instance-level recognition Instance level recognition Particular objects and scenes large databases Particular objects and scenes, large databases Application pp Search


slide-1
SLIDE 1

I t l l iti Instance-level recognition

Cordelia Schmid INRIA

slide-2
SLIDE 2

Instance-level recognition Instance level recognition

Particular objects and scenes large databases Particular objects and scenes, large databases

slide-3
SLIDE 3

Application

Search photos on the web for particular places

pp

p p p

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

slide-4
SLIDE 4

Applications Applications

Take a picture of a product or advertisement

  • Take a picture of a product or advertisement

 find relevant information on the web [Google Goggles, Milpix Pixee]

slide-5
SLIDE 5

Applications Applications

  • Copy detection for images and videos

Search in 200h of video Query video

slide-6
SLIDE 6

Difficulties

Find the object despite

– large changes in scale, viewpoint, lighting – crop and occlusion not much texture/structure – not much texture/structure

  • requires local invariant descriptors

Viewpoint Scale Lighting Occlusion

slide-7
SLIDE 7

Difficulties Difficulties

Very large images collection  need for efficient indexing

  • Very large images collection  need for efficient indexing

Flickr has 2 billions photographs more than 1 million added daily – Flickr has 2 billions photographs, more than 1 million added daily – Facebook has 15 billions images (~27 million added daily) – Facebook has 15 billions images ( 27 million added daily) – Large personal collections Large personal collections – Video collections with a large number of videos, i.e., YouTube g

slide-8
SLIDE 8

Approach: matching local invariant descriptors

I i f d i l l f h

Approach: matching local invariant descriptors

Image content is transformed into local features that are invariant to geometric and photometric transformations

Local Features

8

  • K. Grauman, B. Leibe

Local Features, e.g. SIFT

S lide credit: David Lowe

[Lowe04]

slide-9
SLIDE 9

Overview Overview

  • Local invariant features
  • Matching and recognition with local features
  • Efficient visual search
  • Very large scale search
slide-10
SLIDE 10

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-11
SLIDE 11

Local features: interest points Local features: interest points

slide-12
SLIDE 12

Local features: Contours/segments Local features: Contours/segments

slide-13
SLIDE 13

Local features: segmentation Local features: segmentation

slide-14
SLIDE 14

Local features Local features

1) Extraction of local features 1) Extraction of local features

– Contours/segments – Interest points & regions Interest points & regions – Regions by segmentation – Dense features, points on a regular grid

2) Description of local features

– Dependant on the feature type – Contours/segments  angles, length ratios I t t i t  l l di t hi t – Interest points  greylevels, gradient histograms – Regions (segmentation)  texture + color distributions

slide-15
SLIDE 15

Line matching Line matching

Extraction de contours

  • Extraction de contours

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

  • Chain contour points (hysteresis)

p ( y )

  • Extraction of line segments

g

  • Description of segments

Description of segments

– Mi-point, length, orientation, angle between pairs etc.

slide-16
SLIDE 16

Experimental results – line segments Experimental results line segments

images 600 x 600

slide-17
SLIDE 17

Experimental results – line segments Experimental results line segments

248 / 212 line segments extracted

slide-18
SLIDE 18

Experimental results – line segments Experimental results line segments

89 matched line segments - 100% correct

slide-19
SLIDE 19

Experimental results – line segments Experimental results line segments

3D reconstruction

slide-20
SLIDE 20

Problems of line segments Problems of line segments

Often only partial extraction

  • Often only partial extraction

– Line segments broken into parts – Missing parts Missing parts

  • Information not very discriminative

Information not very discriminative

– 1D information – Similar for many segments

  • Potential solutions

– Pairs and triplets of segments – Interest points

slide-21
SLIDE 21

Example results - interest points Example results interest points

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-22
SLIDE 22

Matching interest points Matching interest points

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

slide-23
SLIDE 23

Matching Matching interest points Matching Matching interest points

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

slide-24
SLIDE 24

constrai Matching interest points constrai

Global constraint Robust estimation of the fundamental matrix

Matching interest points

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

slide-25
SLIDE 25

Application: Panorama stitching pp g

Images courtesy of A. Zisserman.

slide-26
SLIDE 26

Overview Overview

  • Harris interest points + SSD, ZNCC, SIFT
  • Scale & affine invariant interest point detectors
  • Evaluation and comparison of different detectors
  • Region descriptors and their performance
slide-27
SLIDE 27

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-28
SLIDE 28

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-29
SLIDE 29

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-30
SLIDE 30

Harris detector Harris detector

slide-31
SLIDE 31

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-32
SLIDE 32

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-33
SLIDE 33

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-34
SLIDE 34

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-35
SLIDE 35

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-36
SLIDE 36

Harris detector Harris detector

C f ti

2 2 1 2 1 2

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

  • Cornerness function

2 1 2 1

) ( )) ( ( ) ( f

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-37
SLIDE 37

Harris Detector: Steps Harris Detector: Steps

slide-38
SLIDE 38

Harris Detector: Steps Harris Detector: Steps

Compute corner response R

slide-39
SLIDE 39

Harris Detector: Steps Harris Detector: Steps

Find points with large corner response: R>threshold

slide-40
SLIDE 40

Harris Detector: Steps Harris Detector: Steps

Take only the points of local maxima of R

slide-41
SLIDE 41

Harris Detector: Steps Harris Detector: Steps

slide-42
SLIDE 42

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-43
SLIDE 43

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 (valide for local planar objects) ( p j )

  • Photometric transformations

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

slide-44
SLIDE 44

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-45
SLIDE 45

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-46
SLIDE 46

Harris Detector: Invariance Properties Harris Detector: Invariance Properties

  • Scaling

Scaling

Corner All points will be classified as edges

Not invariant to scaling

slide-47
SLIDE 47

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-48
SLIDE 48

Comparison of patches Comparison of patches

2 1

)) ( ) ( ( j y i x I j y i x I

N N

    

 

SSD

2 2 2 1 1 1 ) 1 2 (

)) , ( ) , ( (

2

j y i x I j y i x I

N i N j N

   

 

    

SSD : Invariance to photometric transformations? Invariance to photometric transformations? Intensity changes (I  I + b) > N li i ith th f h t h

2 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 i N N j N

      

 

=> Normalizing with the mean of each patch Intensity changes (I  aI + b)

N i N j    

2

) ( ) (

 

         

N N

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

=> Normalizing with the mean and standard deviation of each patch

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

) , ( ) , (

2  

    

              

N i N j N

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

slide-49
SLIDE 49

Cross-correlation ZNCC Cross correlation ZNCC

li d SSD

2 2 2 2 2 1 1 1 1 1

) , ( ) , (

 

           

N N

m j y i x I m j y i x I zero normalized SSD

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

2  

    

      

N i N j N

  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

slide-50
SLIDE 50

Introduction to local descriptors Introduction to local descriptors

Greyvalue derivatives

  • Greyvalue derivatives

Diff ti l i i t

[K d i k’87]

  • Differential invariants [Koenderink’87]

SIFT d i t

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

Greyvalue derivatives: Image gradient Greyvalue derivatives: Image gradient

  • The gradient of an image:
  • The gradient points in the direction of most rapid increase in

intensity

  • The gradient direction is given by

– how does this relate to the direction of the edge?

  • The edge strength is given by the gradient magnitude
slide-52
SLIDE 52

Differentiation and convolution Differentiation and convolution

f f x   y

 

f x y

 

 

  • Recall, for 2D function, f(x,y):

f x  lim

0

f x  , y

 

  f x,y

 

      

  • We could approximate this as

f   f xn1,y

  f xn, y  

 pp x x

  • 1

1

  • Convolution with the filter
slide-53
SLIDE 53

Finite difference filters Finite difference filters

Oth i ti f d i ti filt i t

  • Other approximations of derivative filters exist:
slide-54
SLIDE 54

Effects of noise Effects of noise

  • Consider a single row or column of the image

g g

– Plotting intensity as a function of position gives a signal

  • Where is the edge?
slide-55
SLIDE 55

Solution: smooth first Solution: smooth first

f g f * g f g

d ) ( g f dx d 

  • To find edges, look for peaks in

) ( g f dx d 

slide-56
SLIDE 56

Derivative theorem of convolution

  • Differentiation is convolution, and convolution is

Derivative theorem of convolution

, associative:

g dx d f g f dx d    ) (

  • This saves us one operation:

f

g dx d

g d f  g dx f 

slide-57
SLIDE 57

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-58
SLIDE 58

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-59
SLIDE 59

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-60
SLIDE 60

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

) ( ) (  

yy xx

G G LOG  

slide-61
SLIDE 61

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-62
SLIDE 62

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-63
SLIDE 63

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

slide-64
SLIDE 64

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 N li ti f d i ti ith di t it d

  • Normalization of derivatives with gradient magnitude

L L L L L L   ) (

y y x x yy xx

L L L L L L   ) (

slide-65
SLIDE 65

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 N li ti f d i ti ith di t it d

  • Normalization of derivatives with gradient magnitude

L L L L L L   ) (

y y x x yy xx

L L L L L L   ) (

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

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

 