Top Banner
1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and Andrew Zisserman University of Oxford ICCV 2007 ICCV 2007
46

1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

Jan 01, 2016

Download

Documents

Shannon Hensley
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

1

Total Recall: Automatic Query Expansionwith a Generative Feature Model for Object Retrieval

Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and Andrew Zisserman

University of Oxford

ICCV 2007ICCV 2007

Page 2: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

2

outlineoutline

Image description Scaling up visual vocabularies Query expansion to improve recall Conclusion

Page 3: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

3

When do (images of) objects match?

Two requirements: “patches” (parts) correspond Configuration (spatial layout) corresponds

Can we use retrieval mechanisms from text retrieval? Need a visual analogy of a textual word.

Success of text retrieval efficient scalable high precision

Page 4: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

4

Feature matching algorithm

Detector Moravec detector Harris coner detector SIFT detector

Descriptor SIFT descriptor

Page 5: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

5

Image description

SIFT (Scale Invariant Feature Transform) SIFT detector

Scale-space extrema detection Keypoint localization

SIFT descriptor Orientation assignment Keypoint descriptor

Page 6: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

6

SIFT detector

1.Detection of scale-space extrema Improve Harris corner detector

scale invariance DoG(Difference-of-Gaussian) filter for scale space

Page 7: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

7

SIFT detector

doubles for

the next octave

K=2(1/

s)

Page 8: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

8

SIFT detector

Keypoint localization (local extrema)

X is selected if it is larger or smaller than all 26 neighbors

Page 9: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

9

SIFT detector

2.Accurate keypoint localization Reject points with low contrast (flat)

Fit a 3D quadratic function for sub-pixel maxima

Page 10: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

10

SIFT detector

Throw out low contrast (<0.03)

xx

xx

xx

xxxx

x

xxxxxx

x

xxxxxx

x

xx

xxx

x

ˆ2

1

)ˆ(2

2

2

2

ˆˆ2

1ˆ)ˆ(

1

2

2

1

2

2

2

2

2

2

1

2

2

2

21

2

2

2

2

T

TT

TT

TTT

TT

TT

DD

DDD

DDDDD

DDDDDDD

DDDDDDD

DDDD

Page 11: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

11

SIFT detector

Reject points poorly localized along an edge Harris Detector

Change of intensity for the shift [u,v]:

2

,

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

E u v w x y I x u y v I x y

Intensity

Shifted intensit

y

Window function

orWindow function w(x,y) =

Gaussian1 in window, 0 outside

Page 12: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

12

Harris Detector: Mathematics

For small shifts [u,v] we have a bilinear approximation:

Where M is a 22 matrix computed from image derivatives:

( , ) ,u

E u v u v Mv

yx yyx

yxx

III

IIIyxw

,2

2

),(M

Page 13: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

13

Harris Detector

λ1, λ2 – eigenvalues of M

Compute the response of the detector at each pixel

2tracedet MkMR

Page 14: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

14

Hessian detector

r=10

Let

Keep the points with

Page 15: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

15

SIFT descriptor

3. Orientation assignment To make the feature invariant to rotation For a keypoint, L is the Gaussian-smoothed

image with the closest scale

orientation histogram (36 bins)

(Lx, Ly)

Page 16: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

16

SIFT descriptor

Page 17: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

17

SIFT descriptor

Page 18: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

18

SIFT descriptor

4. Local image descriptor Thresholded image gradients are sampled over

16x16 array of locations in scale space Create array of orientation histograms 8 orientations x 4x4 histogram array (128D)

Page 19: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

19

Bag of visual word

Quantize the visual descriptor to index the image

Representation is a sparse histogram for each image Similarity measure is L2 distance between tf-idf

weighted histograms

Page 20: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

20

Datasets

Page 21: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

21

Train the dictionary

K-mean is far too slow for our needs D~128, N~20M+, K~1M

Approximate k-mean (AKM) Reduce the number of candidates of nearest

cluster heads Approximate nearest neighbor

Use multiple, randomized k-d trees for search Points nearby in the space can be found by

backtracking around the tree some small number of steps

Page 22: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

22

AKM

Point List = [(2,3), (5,4), (9,6), (4,7), (8,1), (7,2)] Sorted List = [(2,3), (4,7), (5,4), (7,2), (8,1),(9,6)]

Page 23: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

23

AKM

Multiple randomized trees increase the chances of finding nearby points

Original K-means complexity = O(N K) Approximate K-means complexity = O(N log K) This means we can scale to very large K

Page 24: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

24

Matching a query region

Stage 1: generate a short list of possible frames using bag of visual word representation Accumulate all visual words within the query region Use “book index” to find other frames Compute similarity for frames

tf-idf ranked list of all the frames in dataset

Page 25: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

25

Matching a query region

Stage 2: re-rank short list on spatial consistency

Discard mismatches Compute matching score Accumulate the score from all matches

Page 26: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

26

Beyond Bag of Words We can measure spatial consistency between the

query and each result to improve retrieval quality

Many spatially consistentmatches – correct result

Few spatially consistentmatches – incorrect result

Page 27: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

27

Spatial Verification

It is vital for query-expansion that we do not expand using false positives, or use features which occur in the result image, but not in the object of interest

Use hypothesize and verify procedure to estimate homography between query and target

> 20 inliers = spatially verified result

Page 28: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

Spatial Verification Usage

Re-ranking the top ranked results Procedure

1. Estimate a transformation for each target image2. Refine the estimations

– Reduce the errors due to outliers RANSAC

RANdom SAmple Consensus

3. Re-rank target images– Scoring target images to the sum of the idf value for the

inlier words– Verified images above unverified images

28

Page 29: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

29

Estimating spatial correspondences

1. Test each correspondence

Page 30: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

30

Estimating spatial correspondences

2. Compute a (restricted) affine transformation

Page 31: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

31

Estimating spatial correspondences

3. Score by number of consistent matches

Use RANSAC on full affine transformation

Page 32: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

32

Methods for Computing Latent Object Models

Query expansion baseline Transitive closure expansion Average query expansion Recursive average query expansion Multiple image resolution expansion

Page 33: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

33

Query expansion baseline

1. Find top 5 (unverified) results from original query

2. Average the term-frequency vectors

3. Requery once

4. Append these results

Page 34: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

34

Transitive closure expansion

1. Create a priority queue based on number of inliers

2. Get top image in the queue

3. Find region corresponding to original query

4. Use this region to issue a new query

5. Add new verified results to queue

6. Repeat until queue is empty

Page 35: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

35

Average query expansion

1. Obtain top (m < 50) verified results of original query

2. Construct new query using average of these results

3. Requery once

4. Append these results

Page 36: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

36

Recursive average query expansion

1. Improvement of average query expansion method

2. Recursively generate queries from all verified results returned so far

3. Stop once 30 verified images are found or once no new images can be positively verified

Page 37: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

37

Multiple image resolution expansion

1. For each verified result of original query calculate relative change in resolution required to project verified region onto query region

2. Place results in 3 bands:

3. Construct average query for each band4. Execute independent queries5. Merge results

1. Verified images from first query first, then…2. Expanded queries in order of number of inliers

(0, 4/5) (2/3, 3/2) (5/4, infinity)

Page 38: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

38

Query Expansion

Page 39: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

39

Experiment

Datasets Oxford buildings dataset

~5,000 high resolution (1024x768) images Crawled from Flickr using 11 landmarks as queries

Page 40: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

40

Datasets Ground truth labels

• Good – a nice, clear picture of landmark• OK – more than 25% of object visible• Bad – object not present• Junk – less than 25% of object visible

Flickr1 dataset ~100k high resolution images Crawled from Flickr using 145 most popular tags

Flickr2 dataset ~1M medium resolution (500 x 333) images Crawled from Flickr using 450 most popular tags

Page 41: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

41

Evaluation Procedure

Compute Average Precision (AP) score for each of the 5 queries for a landmark Area under the precision-recall curve

Precision = RPI / TNIR Recall = RPI / TNPC

RPI = retrieved positive imagesTNIR = total number of images retrievedTNPC = total number of positives in the corpus

Average these to obtain a Mean Average Precision (MAP) for the landmark

Use two databases• D1: Oxford + Flickr1 datasets (~100k)• D2: D1 + Flickr1 datasets (~1M)

Recall

Precision

Page 42: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

42

Method and Dataset Comparison

ori = original queryqeb = query expansion baselinetrc = transitive closure expansionavg = average query expansionrec = recursive average query expansionsca = multiple image resolution expansion

Page 43: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

43

Page 44: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

44

Page 45: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

45

Page 46: 1 Total Recall: Automatic Query Expansion with a Generative Feature Model for Object Retrieval Ondrej Chum, James Philbin, Josef Sivic, Michael Isard and.

46

Conclusion

Have successfully ported methods from text retrieval to the visual domain: Visual words enable posting lists for efficient

retrieval of specific objects Spatial re-ranking improves precision Query expansion improves recall, without drift

Outstanding problems: Include spatial information into index Universal vocabularies