Local features, distances and kernels. Plan for today

Similar documents
Visual Object Recognition

Today. Main questions 10/30/2008. Bag of words models. Last time: Local invariant features. Harris corner detector: rotation invariant detection

Previously. Part-based and local feature models for generic object recognition. Bag-of-words model 4/20/2011

Part-based and local feature models for generic object recognition

Local features: detection and description. Local invariant features

Part based models for recognition. Kristen Grauman

By Suren Manvelyan,

Patch Descriptors. CSE 455 Linda Shapiro

Patch Descriptors. EE/CSE 576 Linda Shapiro

Local features: detection and description May 12 th, 2015

Local invariant features

Indexing local features and instance recognition May 14 th, 2015

Local features and image matching. Prof. Xin Yang HUST

Midterm Wed. Local features: detection and description. Today. Last time. Local features: main components. Goal: interest operator repeatability

Indexing local features and instance recognition May 16 th, 2017

Local Image Features

CS 4495 Computer Vision Classification 3: Bag of Words. Aaron Bobick School of Interactive Computing

Keypoint-based Recognition and Object Search

Computer Vision for HCI. Topics of This Lecture

Object Recognition with Invariant Features

Local Image Features

Recognizing object instances

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Efficient Kernels for Identifying Unbounded-Order Spatial Features

CS6670: Computer Vision

Feature Based Registration - Image Alignment

Lecture 14: Indexing with local features. Thursday, Nov 1 Prof. Kristen Grauman. Outline

Building a Panorama. Matching features. Matching with Features. How do we build a panorama? Computational Photography, 6.882

Indexing local features and instance recognition May 15 th, 2018

Motion Estimation and Optical Flow Tracking

Local Features and Bag of Words Models

Bag of Words Models. CS4670 / 5670: Computer Vision Noah Snavely. Bag-of-words models 11/26/2013

Beyond bags of features: Adding spatial information. Many slides adapted from Fei-Fei Li, Rob Fergus, and Antonio Torralba

Instance-level recognition part 2

Motion illusion, rotating snakes

CS 4495 Computer Vision A. Bobick. CS 4495 Computer Vision. Features 2 SIFT descriptor. Aaron Bobick School of Interactive Computing

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

The SIFT (Scale Invariant Feature

Local Feature Detectors

Object Recognition and Augmented Reality

Beyond Bags of features Spatial information & Shape models

Lecture 12 Recognition

Prof. Feng Liu. Spring /26/2017

Local Image Features

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Instance-level recognition II.

Large-scale visual recognition The bag-of-words representation

Recognition with Bag-ofWords. (Borrowing heavily from Tutorial Slides by Li Fei-fei)

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Evaluation and comparison of interest points/regions

Sampling Strategies for Object Classifica6on. Gautam Muralidhar

Object Recognition. Computer Vision. Slides from Lana Lazebnik, Fei-Fei Li, Rob Fergus, Antonio Torralba, and Jean Ponce

Visual Object Recognition

CAP 5415 Computer Vision Fall 2012

Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

Fast Indexing and Search. Lida Huang, Ph.D. Senior Member of Consulting Staff Magma Design Automation

Image matching. Announcements. Harder case. Even harder case. Project 1 Out today Help session at the end of class. by Diva Sian.

Recognizing Object Instances. Prof. Xin Yang HUST

Fuzzy based Multiple Dictionary Bag of Words for Image Classification

Automatic Image Alignment (feature-based)

Local Features: Detection, Description & Matching

CS4670: Computer Vision

Supervised learning. y = f(x) function

Image Features: Local Descriptors. Sanja Fidler CSC420: Intro to Image Understanding 1/ 58

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1

Feature Detection. Raul Queiroz Feitosa. 3/30/2017 Feature Detection 1

Automatic Image Alignment

Video Google: A Text Retrieval Approach to Object Matching in Videos

Object Category Detection. Slides mostly from Derek Hoiem

Recognition. Topics that we will try to cover:

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Discriminative Object Class Models of Appearance and Shape by Correlatons

2D Image Processing Feature Descriptors

School of Computing University of Utah

Lecture 12 Recognition

Lecture 12 Recognition. Davide Scaramuzza

Distances and Kernels. Motivation

Feature Matching and Robust Fitting

Object Classification Problem

Bias-Variance Trade-off (cont d) + Image Representations

CS 558: Computer Vision 4 th Set of Notes

Loose Shape Model for Discriminative Learning of Object Categories

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Beyond Bags of Features

Integrated Feature Selection and Higher-order Spatial Feature Extraction for Object Categorization

Automatic Image Alignment

Local Features Tutorial: Nov. 8, 04

Discovering Visual Hierarchy through Unsupervised Learning Haider Razvi

Introduction to object recognition. Slides adapted from Fei-Fei Li, Rob Fergus, Antonio Torralba, and others

SCALE INVARIANT FEATURE TRANSFORM (SIFT)

VK Multimedia Information Systems

Patch-based Object Recognition. Basic Idea

Instance-level recognition

Deformable Part Models

Bag-of-features. Cordelia Schmid

Instance recognition

Scale Invariant Feature Transform

Feature Matching + Indexing and Retrieval

Bundling Features for Large Scale Partial-Duplicate Web Image Search

Multiple-Choice Questionnaire Group C

Transcription:

Local features, distances and kernels February 5, 2009 Kristen Grauman UT Austin Plan for today Lecture : local features and matchi Papers: Video Google [Sivic & Zisserman] Pyramid match [Grauman & Darrell] Learni local distance functions [Frome et al.] Demo: Feature sampli strategies for categorization 1

Local features: motivation Last week: appearance based features assumi window under consideration This week: local l Is fairly aligned across examples representations to offer Has similar total structure, robustness to occlusion, same components present clutter, viewpoint chaes, How to describe How to compare Problem 1: Local invariant features Detect the same point independently in both images no chance to match! We need a repeatable detector 2

Automatic Scale Selection f ( I ( x, σ )) = f ( I ( x, )) ( i σ 1Kim i1ki m Same operator responses if the patch contains the same image up to scale factor How to find correspondi patch sizes? Slide credit K. Grauman, B. Leibe AAAI08 Short Course Automatic Scale Selection Function responses for increasi scale (scale signature) gnition ory Augmented Tutorial Computi f ( I (, )) i K im 1 x i Ki σ m f ( I 1 ( x, σ )) Slide credit K. Grauman, B. Leibe AAAI08 Short Course 3

Automatic Scale Selection Function responses for increasi scale (scale signature) gnition ory Augmented Tutorial Computi f ( I (, )) i K im 1 x i Ki σ m f ( I 1 ( x, σ )) Slide credit K. Grauman, B. Leibe AAAI08 Short Course Automatic Scale Selection Function responses for increasi scale (scale signature) gnition ory Augmented Tutorial Computi f ( I (, )) i K im 1 x i Ki σ m f ( I 1 ( x, σ )) Slide credit K. Grauman, B. Leibe AAAI08 Short Course 4

Automatic Scale Selection Function responses for increasi scale (scale signature) gnition ory Augmented Tutorial Computi f ( I (, )) i K im 1 x i Ki σ m f ( I 1 ( x, σ )) Slide credit K. Grauman, B. Leibe AAAI08 Short Course Automatic Scale Selection Function responses for increasi scale (scale signature) gnition ory Augmented Tutorial Computi f ( I (, )) i K im 1 x i Ki σ m f ( I 1 ( x, σ )) Slide credit K. Grauman, B. Leibe AAAI08 Short Course 5

Automatic Scale Selection Function responses for increasi scale (scale signature) gnition ory Augmented Tutorial Computi f I (, )) i K im i Kim f ( I 1 ( x, σ )) ( 1 x σ Slide credit K. Grauman, B. Leibe AAAI08 Short Course What Is A Useful Signature Function? Laplacian of Gaussian = blob detector Slide credit K. Grauman, B. Leibe AAAI08 Short Course 6

Scale-space blob detector: Example Source: Lana Lazebnik Scale-space blob detector: Example Source: Lana Lazebnik 7

Scale-space blob detector: Example Source: Lana Lazebnik Laplacian-of-Gaussian (LoG) for scale invariant detection Local maxima in scale space of Laplacian-of- Gaussian σ 5 σ 4 σ 3 σ 2 σ List of (x, y, σ) Slide credit K. Grauman, B. Leibe AAAI08 Short Course 8

Laplacian of Gaussian: scale invariant detection Difference-of-Gaussian (DoG) Difference of Gaussians gives an efficient approximation of the Laplacian-of-Gaussian gnition ory Augmented Tutorial Computi - = Slide credit K. Grauman, B. Leibe AAAI08 Short Course 9

Problem 2: Local invariant features For each point correctly recognize the correspondi one? We need a reliable and distinctive descriptor Raw patches as local descriptors The simplest way to describe the neighborhood around an interest point is to write down the list of intensities to form a feature vector. But this is very sensitive to even small shifts, rotations. 10

Rotation invariant descriptors Find local orientation Dominant direction of gradient for the image patch Rotate patch accordi to this ale This puts the patches into a canonical orientation. What about illumination and translation? SIFT Descriptor [Lowe 2004] Use histograms to bin pixels within sub-patches accordi to their orientation. 4x4x8 = 128 dimensional feature vector Image from: Jonas Hurrelmann Slide credit: O. Pele, S. Thrun, J. Košecká, N. Kumar 11

SIFT Descriptor [Lowe 2004] Extraordinarily robust matchi technique Can handle chaes in viewpoint Up to about 60 degree out of plane rotation Can handle significant chaes in illumination Sometimes even day vs. night (below) Fast and efficient can run in real time Lots of code available http://people.csail.mit.edu/albert/ladypack/wiki/index.php/known_implementations_of_sift Slide credit: Steve Seitz Local invariant features: basic flow 1) Detect interest points y 1 2) Extract descriptors y 2 Descriptors map each region in image to a (typically highdimensional) feature vector. y d x 1 x 2 x d 12

Local representations Many options for detection & description SIFT [Lowe 99] Shape context [Beloie 02] Superpixels [Ren et al.] Maximally Stable Extremal Regions [Matas 02] Salient regions 25 [Kadir 01] Harris-Affine [Mikolajczyk 04] Spin images [Johnson 99] Geometric Blur [Berg 05] You Can Try It At Home gnition ory Augmented Tutorial Computi For most local feature detectors, executables are available online: http://robots.ox.ac.uk/~vgg/research/affineox http://www.cs.ubc.ca/~lowe/keypoints/ http://www.vision.ee.ethz.ch/~surf K. Grauman, B. Leibe 13

http://www.robots.ox.ac.uk/~vgg/research/affine/detectors.html#binaries Applications of local invariant features & matchi Wide baseline stereo Motion tracki Panoramas Mobile robot navigation 3D reconstruction Recognition Specific objects Textures Categories 14

Wide baseline stereo [Image from T. Tuytelaars ECCV 2006 tutorial] Panorama stitchi Brown, Szeliski, and Winder, 2005 15

Automatic mosaici http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html Recognition of specific objects, scenes Schmid and Mohr 1997 Sivic and Zisserman, 2003 Rothgaer et al. 2003 Lowe 2002 16

Recognition of categories Constellation model Bags of words Weber et al. (2000) Fergus et al. (2003) Csurka et al. (2004) Dorko & Schmid (2005) Sivic et al. (2005) Lazebnik et al. (2006), [Slide from Lana Lazebnik, Sicily 2006] Value of local features Critical to find distinctive and repeatable local regions for multi-view matchi Complexity reduction via selection of distinctive points Describe images, objects, parts without requiri segmentation; robustness to clutter & occlusion Robustness: similar descriptors in spite of moderate view chaes, noise, blur, etc. Once we have the features themselves, how to use for recognition, search? 17

Basic flow Detect or sample features List of positions, scales, orientations Describe features Associated list of d-dimensional descriptors Index each one into pool of descriptors from previously seen images Pose clusteri and verification with SIFT To detect instances of objects from a model base: 1) Index descriptors (distinctive features narrow possible matches) 18

Indexi local features Pose clusteri and verification with SIFT To detect instances of objects from a model base: 1) Index descriptors (distinctive features narrow possible matches) 2) Generalized Hough transform to vote for poses (keypoints have record of parameters relative to model coordinate system) [next week] 3) Affine fit to check for agreement between model and image features (approximates perspective projection for planar objects) 19

Planar objects Model images and their SIFT keypoints Input image Model keypoints that were used to recognize, get least squares solution. Recognition result [Lowe] Indexi local features With potentially thousands of features per image, and hundreds to millions of images to search, how to efficiently find those that are relevant to a new image? Low-dimensional descriptors : can use standard efficient data structures for nearest neighbor search High-dimensional descriptors: approximate nearest neighbor search methods more practical Inverted file indexi schemes K. Grauman, B. Leibe 20

Indexi local features: approximate nearest neighbor search Best-Bin First (BBF), a variant of k-d trees that t uses priority it queue to examine most promisi branches first [Beis & Lowe, CVPR 1997] Locality-Sensitive t Hashi (LSH), a randomized hashi technique usi hash functions that map similar points to the same bin, with high probability [Indyk & Motwani, 1998] 41 Indexi local features With potentially thousands of features per image, and hundreds to millions of images to search, how to efficiently find those that are relevant to a new image? Low-dimensional descriptors : can use standard efficient data structures for nearest neighbor search High-dimensional descriptors: approximate nearest neighbor search methods more practical Inverted file indexi schemes K. Grauman, B. Leibe 21

Indexi local features: inverted file index For text documents, an efficient way to find all pages on which a word occurs is to use an index We want to find all images in which a feature occurs. To use this idea, we ll need to map our features to visual words. K. Grauman, B. Leibe Visual words: main idea Extract some local features from a number of images gnition ory Augmented Tutorial Computi Slide credit: D. Nister e.g., SIFT descriptor space: each point is 128-dimensional 44 22

Visual words: main idea gnition ory Augmented Tutorial Computi Slide credit: D. Nister 45 gnition ory Augmented Tutorial Computi Slide credit: D. Nister 46 23

gnition ory Augmented Tutorial Computi Slide credit: D. Nister 47 Visual words: main idea Map high-dimensional descriptors to tokens/words by quantizi the feature space Quantize via clusteri, let cluster centers be the prototype words Descriptor space 48 24

Visual words: main idea Map high-dimensional descriptors to tokens/words by quantizi the feature space Determine which word to assign to each new image region by findi the closest cluster center. Descriptor space 49 Visual words Example: each group of patches belos to the same visual word Figure from Sivic & Zisserman, ICCV 2003 25

Inverted file index for images comprised of visual words gnition ory Augmented Tutorial Computi Word number List of image numbers Image credit: A. Zisserman Visual words First explored for texture and material representations Texton = cluster center of filter responses over collection of images Describe textures and materials based on distribution of prototypical texture elements. Leu & Malik 1999; Varma & Zisserman, 2002; Lazebnik, Schmid & Ponce, 2003; 26

Visual words More recently used for describi scenes and objects for the sake of indexi or classification. Sivic & Zisserman 2003; Csurka, Bray, Dance, & Fan 2004; many others. 53 Visual vocabulary formation Issues: Sampli strategy: where to extract features? Clusteri / quantization algorithm Unsupervised vs. supervised What corpus provides features (universal vocabulary?) Vocabulary size, number of words 27

Sampli strategies Sparse, at interest points Multiple interest operators Image credits: F-F. Li, E. Nowak, J. Sivic Dense, uniformly Randomly To find specific, textured objects, sparse sampli from interest points often more reliable. Multiple complementary interest operators offer more image coverage. For object categorization, dense sampli offers better coverage. See [Nowak, Jurie & Triggs, ECCV 2006], and Gautam s demo! Clusteri / quantization methods k-means (typical choice), agglomerative clusteri, mean-shift, Hierarchical clusteri: allows faster insertion / word assignment while still allowi large vocabularies Vocabulary tree [Nister & Stewenius, CVPR 2006] 28

Visual vocabulary formation Issues: Sampli strategy: where to extract features? Clusteri / quantization algorithm Unsupervised vs. supervised What corpus provides features (universal vocabulary?) Vocabulary size, number of words Supervised vocabulary formation Recent work considers how to leverage labeled images when constructi the vocabulary gnition ory Augmented Tutorial Computi Perronnin, Dance, Csurka, & Bressan, Adapted Vocabularies for Generic Visual Categorization, ECCV 2006. 58 29

Supervised vocabulary formation Merge words that don t aid in discriminability gnition ory Augmented Tutorial Computi Winn, Criminisi, & Minka, Object Categorization by Learned Universal Visual Dictionary, ICCV 2005 Supervised vocabulary formation Consider vocabulary and classifier construction jointly. gnition ory Augmented Tutorial Computi Ya, Jin, Sukthankar, & Jurie, Discriminative Visual Codebook Generation with Classifier Traini for Object Category Recognition, CVPR 2008. 60 30

Basic flow Detect or sample features List of positions, scales, orientations Describe features Associated list of d-dimensional descriptors or Index each one into pool of descriptors from previously seen images Quantize to form bag of words vector for the image Bags of visual words Summarize entire image based on its distribution (histogram) of word occurrences. Analogous to bag of words representation commonly used for documents. Set of patches -> vector Good empirical results for image classification. Image credit: Fei-Fei Li 31

Bags of visual words for image recognition Caltech 6 dataset bag of features bag of features Parts-and-shape model Source: Lana Lazebnik Bags of words: pros and cons + flexible to geometry / deformations / viewpoint + compact summary of image content + provides vector representation for sets + has yielded good recognition results in practice - basic model ignores geometry must verify afterwards, or encode via features - background and foreground mixed when bag covers whole image - interest points or sampli: no guarantee to capture object-level parts - optimal vocabulary formation remains unclear 32

Basic flow Detect or sample features List of positions, scales, orientations Describe features Associated list of d-dimensional descriptors or or Index each one into pool of descriptors from previously seen images Quantize to form bag of words vector for the image Compute match with another image Local feature correspondences The matchi between sets of local features helps to establish overall similarity between objects or shapes. Assigned matches also useful for localization Shape context [Beloie & Malik 2001] Low-distortion matchi [Berg & Malik 2005] Match kernel [Wallraven, Caputo & Graf 2003] 33

Local feature correspondences Least cost match: minimize total cost between matched points min π: X Y xi X x i π ( xi) Least cost partial match: match all of smaller set to some portion of larger set. Pyramid match kernel (PMK) Optimal matchi expensive relative to number of features per image (m). PMK is approximate partial match for efficient discriminative learni from sets of local features. Optimal match: O(m 3 ) Greedy match: O(m 2 log m) Pyramid match: O(m) [Grauman & Darrell, ICCV 2005] 34

Pyramid match kernel Forms a Mercer kernel -> allows classification with SVMs, use of other kernel methods Bounded error relative to optimal partial match Linear time -> efficient learni with large feature sets Accuracy Mean number of features Pyramid match Time (s) Match [Wallraven et al.] ETH-80 data set Mean number of features O(m 2 ) O(m) Pyramid match kernel Forms a Mercer kernel -> allows classification with SVMs, use of other kernel methods Bounded error relative to optimal partial match Linear time -> efficient learni with large feature sets Use data-dependent pyramid partitions for high-d feature spaces Uniform pyramid bins Vocabulary-guided pyramid bins Code for PMK: http://people.csail.mit.edu/jjl/libpmk/ 35

Matchi smoothness & local geometry Solvi for linear assignment means (non-overlappi) features can be matched independently, ignori relative geometry (as in bag of words model). One alternative: simply expand feature vectors to include spatial information before matchi. y a x a K. Grauman, B. Leibe [ f 1,,f 128, x a, y a ] 71 Spatial pyramid match kernel First quantize descriptors into words, then do one pyramid match per word in image coordinate space. gnition ory Augmented Tutorial Computi Lazebnik, Schmid & Ponce, CVPR 2006 K. Grauman, B. Leibe 36

Matchi smoothness & local geometry Use correspondence to estimate parameterized transformation, regularize to enforce smoothness gnition ory Augmented Tutorial Computi Shape context matchi [Beloie, Malik, & Puzicha 2001] Code: http://www.eecs.berkeley.edu/research/projects/cs/vision/shape/sc_digits.html K. Grauman, B. Leibe Matchi smoothness & local geometry Let matchi cost include term to penalize distortion between pairs of matched features. Template j i Rij i i' Query j' Approximate for efficient solutions: Berg & Malik, CVPR 2005; Leordeanu & Hebert, ICCV 2005 Figure credit: Alex Berg K. Grauman, B. Leibe Si'j' i' 37

Matchi smoothness & local geometry Compare semi-local features: consider configurations or neighborhoods and co-occurrence relationships Correlograms of visual words [Savarese, Winn, & Criminisi, CVPR 2006], ] ] Feature neighborhoods [Sivic & Zisserman, CVPR 2004] Proximity distribution kernel [Li & Soatto, ICCV 2007] K. Grauman, B. Leibe Hyperfeatures: Agarwal & Triggs, ECCV 2006] Tiled neighborhood [Quack, Ferrari, Leibe, van Gool ICCV 2007] Matchi smoothness & local geometry Learn or provide explicit object-specific shape model [Next week: part-based models] gnition ory Augmented Tutorial Computi x 6 x 5 x 1 x 4 x 2 x 3 38

Distance/metric/kernel learni Exploit partially labeled data and/or (dis)similarity constraints to construct more useful distance function Number of existi techniques Distance/metric/kernel learni Multiple kernel learni : Optimize weights on kernel matrices, where each matrix is from a different feature type or similarity measure. Align to the optimal kernel matrix. [e.g. Varma & Ray ICCV 2007, Bosch et al. CIVR 2007, Kumar & Sminchisescu ICCV 2007] Example-based distance learni: Optimize weights on each feature within a traini image [Frome et al. ICCV 2007] Learn metric based on similarity / in-class constraints Often Mahalanobis distances [e.g. Hertz et al. CVPR 2004, Kumar et al. ICCV 2007, Jain et al. CVPR 2008] 39

Example: impact of kernel combination Caltech 256 dataset Varma and Ray, ICCV 2007 Example Applications: Local Feature Matchi Sony Aibo (Evolution Robotics) SIFT usage Recognize docki station Communicate with visual cards Other uses Place recognition Loop closure in SLAM K. Grauman, B. Leibe Slide credit: David Lowe 80 40

Example Applications: Local Feature Matchi Mobile tourist guide Self-localization Object/buildi recognition Photo/video augmentation B. Leibe [Quack, Leibe, Van Gool, CIVR 08] 81 Example Applications: Local Feature Matchi 50 000 movie posters indexed Query-by-image from mobile phone available in Switzerland http://www.kooaba.com/en/products_eine.html# K. Grauman, B. Leibe 41

Summary Local features are a useful, flexible representation Invariance properties - typically built into the descriptor Distinctive, especially helpful for identifyi specific textured objects Breaki image into regions/parts gives tolerance to occlusions and clutter Mappi to visual words forms discrete tokens from image regions Efficient i methods available for Indexi patches or regions Compari distributions of visual words Matchi features K. Grauman, B. Leibe 83 42