Recognition using Nearest Neighbor (or kNN)

Slides:



Advertisements
Similar presentations
Applications of one-class classification
Advertisements

The blue and green colors are actually the same.
Image classification Given the bag-of-features representations of images from different classes, how do we learn a model for distinguishing them?
Object recognition and scene “understanding”
Presented by Xinyu Chang
Detecting Faces in Images: A Survey
Appearance-based recognition & detection II Kristen Grauman UT-Austin Tuesday, Nov 11.
Carolina Galleguillos, Brian McFee, Serge Belongie, Gert Lanckriet Computer Science and Engineering Department Electrical and Computer Engineering Department.
AGE ESTIMATION: A CLASSIFICATION PROBLEM HANDE ALEMDAR, BERNA ALTINEL, NEŞE ALYÜZ, SERHAN DANİŞ.
Recognition by finding patterns
The Viola/Jones Face Detector (2001)
Lecture 5 Template matching
Robust and large-scale alignment Image from
Agenda Introduction Bag-of-words models Visual words with spatial location Part-based models Discriminative methods Segmentation and recognition Recognition-based.
Chapter 2: Pattern Recognition
Pattern Recognition Topic 1: Principle Component Analysis Shapiro chap
Classifiers for Recognition Reading: Chapter 22 (skip 22.3) Slide credits for this chapter: Frank Dellaert, Forsyth & Ponce, Paul Viola, Christopher Rasmussen.
A Study of the Relationship between SVM and Gabriel Graph ZHANG Wan and Irwin King, Multimedia Information Processing Laboratory, Department of Computer.
Object Recognition by Discriminative Methods Sinisa Todorovic 1st Sino-USA Summer School in VLPR July, 2009.
Face Recognition Using Neural Networks Presented By: Hadis Mohseni Leila Taghavi Atefeh Mirsafian.
Face Detection using the Viola-Jones Method
This week: overview on pattern recognition (related to machine learning)
Machine Learning Overview Tamara Berg Language and Vision.
Machine Learning Overview Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart.
Classification Tamara Berg CSE 595 Words & Pictures.
Kumar Srijan ( ) Syed Ahsan( ). Problem Statement To create a Neural Networks based multiclass object classifier which can do rotation,
Part 3: discriminative methods Antonio Torralba. Overview of section Object detection with classifiers Boosting –Gentle boosting –Weak detectors –Object.
Recognition using Boosting Modified from various sources including
Jeff Howbert Introduction to Machine Learning Winter Regression Linear Regression.
80 million tiny images: a large dataset for non-parametric object and scene recognition CS 4763 Multimedia Systems Spring 2008.
Beyond Sliding Windows: Object Localization by Efficient Subwindow Search The best paper prize at CVPR 2008.
Pattern Recognition April 19, 2007 Suggested Reading: Horn Chapter 14.
Handwritten digit recognition
Visual Categorization With Bags of Keypoints Original Authors: G. Csurka, C.R. Dance, L. Fan, J. Willamowski, C. Bray ECCV Workshop on Statistical Learning.
Gang WangDerek HoiemDavid Forsyth. INTRODUCTION APROACH (implement detail) EXPERIMENTS CONCLUSION.
Methods for classification and image representation
An Introduction to Support Vector Machine (SVM)
Machine Learning Overview Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30am – 11:50am Lecture #23.
Locally Linear Support Vector Machines Ľubor Ladický Philip H.S. Torr.
776 Computer Vision Jan-Michael Frahm Spring 2012.
Visual Object Recognition
AdaBoost Algorithm and its Application on Object Detection Fayin Li.
776 Computer Vision Jan-Michael Frahm Spring 2012.
Non-separable SVM's, and non-linear classification using kernels Jakob Verbeek December 16, 2011 Course website:
Combining Models Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya.
Unsupervised Learning of Video Representations using LSTMs
Cascade for Fast Detection
Machine Learning – Linear Classifiers and Boosting
MIRA, SVM, k-NN Lirong Xia. MIRA, SVM, k-NN Lirong Xia.
Instance Based Learning
CSSE463: Image Recognition Day 11
Part 3: discriminative methods
Lit part of blue dress and shadowed part of white dress are the same color
Li Fei-Fei, UIUC Rob Fergus, MIT Antonio Torralba, MIT
R-CNN region By Ilia Iofedov 11/11/2018 BGU, DNN course 2016.
Non-linear classifiers Neural networks
Fast and Robust Object Tracking with Adaptive Detection
In summary C1={skin} C2={~skin} Given x=[R,G,B], is it skin or ~skin?
Outline Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no.
CSSE463: Image Recognition Day 11
Nearest-Neighbor Classifiers
Categorization by Learning and Combing Object Parts
Brief Review of Recognition + Context
Announcements Project 2 artifacts Project 3 due Thursday night
Other Classification Models: Support Vector Machine (SVM)
CSSE463: Image Recognition Day 11
CSSE463: Image Recognition Day 11
MIRA, SVM, k-NN Lirong Xia. MIRA, SVM, k-NN Lirong Xia.
The “Margaret Thatcher Illusion”, by Peter Thompson
Presentation transcript:

Recognition using Nearest Neighbor (or kNN) Modified from various sources including http://people.csail.mit.edu/torralba/courses/6.869/6.869.computervision.htm

Recall ---Object Recognition Object detection and recognition is formulated as a classification problem. The image is partitioned into a set of overlapping windows … and a decision is taken at each window about if it contains a target object or not. Decision boundary Computer screen Background In some feature space Where are the screens? Bag of image patches Object detection and recognition is formulated as a classification problem. The image is partitioned into a set of overlapping windows, and a decision is taken at each window about if it contains a target object or not. Each window is represented by extracting a large number of features that encode information such as boundaries, textures, color, spatial structure. The classification function, that maps an image window into a binary decision, is learnt using methods such as SVMs, boosting or neural networks.

Recognition Techniques…a few Nearest neighbor Neural networks 106 examples LeCun, Bottou, Bengio, Haffner 1998 Rowley, Baluja, Kanade 1998 … Shakhnarovich, Viola, Darrell 2003 Berg, Berg, Malik 2005 … Support Vector Machines and Kernels Conditional Random Fields Many more references missing here. These are big fields on its own. Big emphasis on the past on face detection and character recognition. It provided a clear problem with a well defined visual category and many applications. It allowed making progress on efficient techniques. Guyon, Vapnik Heisele, Serre, Poggio, 2001 … McCallum, Freitag, Pereira 2000 Kumar, Hebert 2003 …

Formulation Formulation: binary classification Classification function … x1 x2 x3 … xN xN+1 xN+2 … xN+M Features x = y = -1 +1 -1 -1 Labels ? ? ? Training data: each image patch is labeled as containing the object or background Test data In many cases, F(x) will give a real value and the classification is perform with a Threshold. If F(x)>0 then y =+1 Where belongs to some family of functions Classification function Minimize misclassification error (Not that simple: we need some guarantees that there will be generalization)

Two ways to thing of “modeling an object” in its feature space Parametric model Here we fit one or more parametric equations to the feature space to model our “object” Non-parametric model We do not use an explicit parametric model, more sample oriented or statistical. z

Parametric models Subspace of monkeys Subspace of natural images Nearest Neighbor IS NOT a Parametric model Subspace of monkeys Subspace of natural images Space of all images Parametric model of monkeys

Non-parametric Approach !!! HIGH DIMENSIONAL !!! !!! HIGH DIMENSIONAL !!! Subspace of monkeys Subspace of natural images z Query image Space of all images

Non-parametric Approach !!! HIGH DIMENSIONAL !!! !!! HIGH DIMENSIONAL !!! Subspace of monkeys Subspace of natural images Query image Space of all images

Non-parametric Classifier Nearest-neighbors For each query, obtain sibling set (neighbors) 3 different types of distance metric Hand-designed, use whole image

Metric 1 - Dssd _ 2 Sum of squared differences (SSD) To give invariance to illumination: Each image normalized to be zero mean, unit variance 2 Image 1 Image 2 _

Nearest Neighbors in 80 million images 105 Size of dataset 106 108

Differing density of images

Metric 2 - Dwarp _ 2 SSD but allow small transformations Find min using gradient descent Image 2 Translation: Scalings: Horizontal flip: _ Image 1 SSD Transformations

Metric 3 - Dshift _ 2 As per Warping but also allow sub-window shifts Start with warped version of image 2, as per Dwarp 2 _ Image 1 Image 2 Transformed

Metric 3 - Dshift _ 2 As per Warping but also allow sub-window shifts Start with warped version of image 2, as per Dwarp 2 _ Transformed

Metric 3 - Dshift _ 2 As per Warping but also allow sub-window shifts Start with warped version of image 2, as per Dwarp 2 _

Metric 3 - Dshift _ 2 As per Warping but also allow sub-window shifts Local sub-window

Metric 3 - Dshift _ 2 As per Warping but also allow sub-window shifts Quick since images are so small 2 _ Local sub-window

Metric 3 - Dshift As per Warping but also allow sub-window shifts Tried various sizes of sub-window  1x1 (i.e. single pixel) worked best 2 _ Local sub-window

Comparison of metrics SSD

Neighbors with Different Metrics

Examples Solving vision by brute force Normalized correlation scores

How Many Images Are There? Note: D1=DSSD

How Does Dssd Relate to Semantic Distance? Subject 1 Subject 2 Subject 3

How Does Dssd Relate to Semantic Distance? Subject 1 Subject 2 Subject 3