8
1 Scalable Recognition with a Scalable Recognition with a Vocabulary Tree Vocabulary Tree by: David Nistér Henrik Stewénius presented by: William Malpica CS 395T Some slides from Nister and Stewenius’s CVPR 2006 presentation Outline Outline Abstract Abstract Strengths Strengths System Overview System Overview Animated explanation of the vocabulary tree Animated explanation of the vocabulary tree Explanation of the scoring scheme Explanation of the scoring scheme Testing Results Testing Results Conclusion Conclusion Scalable Recognition with a Scalable Recognition with a Vocabulary Tree Vocabulary Tree The paper describes a system which can The paper describes a system which can recognize objects from a very large recognize objects from a very large database with great speed and recognition database with great speed and recognition quality. quality. The system uses local region descriptors The system uses local region descriptors which are hierarchically quantized in a which are hierarchically quantized in a vocabulary tree. vocabulary tree. Strengths! Strengths! The vocabulary tree directly defines the The vocabulary tree directly defines the quantization. quantization. Each high Each high-dimension feature vector is dimension feature vector is quantized into an integer which corresponds quantized into an integer which corresponds to a path in the vocabulary tree. to a path in the vocabulary tree. Results in speed Results in speed Feature extraction on a 640x480 video frame in Feature extraction on a 640x480 video frame in 0.2 sec. and database query in 25ms on a 50000 0.2 sec. and database query in 25ms on a 50000 image database. image database. Results in compactness Results in compactness Strengths! Strengths! Potential for on Potential for on- the the- fly insertion fly insertion An offline unsupervised training stage is An offline unsupervised training stage is necessary to create the vocabulary, but new necessary to create the vocabulary, but new images can be added to the database on images can be added to the database on-the the- fly. fly. Images can be added an the same rate as Images can be added an the same rate as feature extraction. feature extraction. Excellent benefit for large scalable image Excellent benefit for large scalable image databases. databases. Adding, Querying and Removing Adding, Querying and Removing Images at full speed Images at full speed Add Remove Query

Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

1

Scalable Recognition with a Scalable Recognition with a Vocabulary TreeVocabulary Tree

by:David NistérHenrik Stewénius

presented by:William Malpica

CS 395TSome slides from Nisterand Stewenius’s CVPR 2006 presentation

OutlineOutline

AbstractAbstractStrengthsStrengthsSystem OverviewSystem OverviewAnimated explanation of the vocabulary treeAnimated explanation of the vocabulary treeExplanation of the scoring schemeExplanation of the scoring schemeTesting ResultsTesting ResultsConclusionConclusion

Scalable Recognition with a Scalable Recognition with a Vocabulary TreeVocabulary Tree

The paper describes a system which can The paper describes a system which can recognize objects from a very large recognize objects from a very large database with great speed and recognition database with great speed and recognition quality.quality.

The system uses local region descriptors The system uses local region descriptors which are hierarchically quantized in a which are hierarchically quantized in a vocabulary tree. vocabulary tree.

Strengths!Strengths!The vocabulary tree directly defines the The vocabulary tree directly defines the quantization. quantization.

Each highEach high--dimension feature vector is dimension feature vector is quantized into an integer which corresponds quantized into an integer which corresponds to a path in the vocabulary tree.to a path in the vocabulary tree.Results in speedResults in speed

Feature extraction on a 640x480 video frame in Feature extraction on a 640x480 video frame in 0.2 sec. and database query in 25ms on a 50000 0.2 sec. and database query in 25ms on a 50000 image database.image database.

Results in compactnessResults in compactness

Strengths!Strengths!

Potential for onPotential for on--thethe--fly insertionfly insertionAn offline unsupervised training stage is An offline unsupervised training stage is necessary to create the vocabulary, but new necessary to create the vocabulary, but new images can be added to the database onimages can be added to the database on--thethe--fly.fly.Images can be added an the same rate as Images can be added an the same rate as feature extraction.feature extraction.Excellent benefit for large scalable image Excellent benefit for large scalable image databases. databases.

Adding, Querying and Removing Adding, Querying and Removing Images at full speedImages at full speed

Add Remove

Query

Page 2: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

2

Training and Addition are SeparateTraining and Addition are Separate

Common Approach Our approach

System OverviewSystem Overview

Maximally Stable Maximally Stable ExtremalExtremal Regions Regions ((MSERsMSERs) feature extractor.) feature extractor.SIFT feature descriptorSIFT feature descriptorFeature space is quantized through kFeature space is quantized through k--means clustering and build into a means clustering and build into a vocabulary tree.vocabulary tree.To retrieve images, a hierarchical scoring To retrieve images, a hierarchical scoring scheme is used based on Term Frequency scheme is used based on Term Frequency Inverse Document Frequency (TFInverse Document Frequency (TF--IDF).IDF).

Page 3: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

3

Page 4: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

4

Page 5: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

5

Page 6: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

6

Definition of ScoringDefinition of Scoring

WeightsWeights are assigned to each node (with are assigned to each node (with certain exceptions)certain exceptions)

Query and database vectors are defined Query and database vectors are defined according to their assigned weightsaccording to their assigned weights

Each database image is given a Each database image is given a relevance score based on the normalized relevance score based on the normalized differences between the query and differences between the query and database vectorsdatabase vectors

ii N

Nw ln=

iii

iii

wmdwnq

==

dd

qqdqs −=),(

(1)

(2)

(3)

(4)

Implementation of ScoringImplementation of Scoring

Every node is associated with an inverted file, Every node is associated with an inverted file, although only leaf nodes are explicitly although only leaf nodes are explicitly represented. Inner nodes are a concatenation of represented. Inner nodes are a concatenation of the leaf nodes.the leaf nodes.Inverted files store the idInverted files store the id--numbers of the numbers of the images in which a particular node occurs, and images in which a particular node occurs, and the term frequency for that image.the term frequency for that image.The vectors representing the database images The vectors representing the database images as well as the query images are normalized to as well as the query images are normalized to unit magnitude.unit magnitude.

NormalizationNormalization

To compute the normalized difference in To compute the normalized difference in LpLp--norm:norm:

≠≠

−−−+=−

−=−

0,0

)(2ii dqi

pi

pi

pii

p

p

i

pii

p

p

dqdq

dq

dq

dq

For the case of the L2For the case of the L2--norm:norm:

∑≠≠

−=−0,0

2

222

ii dqiiidqdq

(5)

(6)

(7)

TestingTesting

Ground truth Ground truth database consisted of database consisted of 6376 images in 6376 images in groups of four. groups of four. The database was The database was queried with every queried with every image and was image and was evaluated on how evaluated on how frequently the other frequently the other three images are three images are found perfectly.found perfectly.

Results for only 1400 imagesResults for only 1400 images

Page 7: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

7

Results for only 1400 imagesResults for only 1400 images Results for only 1400 imagesResults for only 1400 images

Results with full 6376 image Results with full 6376 image databasedatabase Other Tests Other Tests –– 40000 CD covers40000 CD covers

Method was Method was tested on a tested on a database of database of 40000 CD 40000 CD covers covers running realrunning real--time.time.

Other Tests Other Tests –– 1 million images1 million images

Method was also tested on a database of 1 Method was also tested on a database of 1 million images. The ground truth images were million images. The ground truth images were embedded into a database containing all the embedded into a database containing all the frames from several movies: The Bourne frames from several movies: The Bourne Identity, The Matrix, Identity, The Matrix, BraveheartBraveheart, Collateral, , Collateral, Resident Evil, Almost Famous and Monsters Inc. Resident Evil, Almost Famous and Monsters Inc.

Queries on a 8GB machine would take about 1 Queries on a 8GB machine would take about 1 second. Database creation took 2.5 days.second. Database creation took 2.5 days.

Other Tests Other Tests –– 1 million images1 million images

Page 8: Scalable Recognition with a Vocabulary Treegrauman/courses/spring2007/395T/slides/nister_william.pdfvocabulary tree. Strengths! The vocabulary tree directly defines the quantization

8

Other Tests Other Tests –– Non movie images Non movie images queried on 300K frames queried on 300K frames ConclusionConclusion

This methodology provides the This methodology provides the abililtyabililty to to make fast searches on extremely large make fast searches on extremely large databases. databases. Paves the way to someday create an Paves the way to someday create an internetinternet--scale content based image search scale content based image search engine. engine.

QuestionsQuestions