Computer Vision. Exercise Session 10 Image Categorization

Similar documents
Descriptors for CV. Introduc)on:

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

Lecture 12 Recognition

Lecture 12 Recognition. Davide Scaramuzza

Generative and discriminative classification techniques

CS6670: Computer Vision

Part-based and local feature models for generic object recognition

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

Figure (5) Kohonen Self-Organized Map

Image classification Computer Vision Spring 2018, Lecture 18

Object of interest discovery in video sequences

CS4495/6495 Introduction to Computer Vision. 8C-L1 Classification: Discriminative models

ECE 5424: Introduction to Machine Learning

Part based models for recognition. Kristen Grauman

Lecture 11: Classification

Fuzzy based Multiple Dictionary Bag of Words for Image Classification

Classification Algorithms in Data Mining

Content-Based Image Classification: A Non-Parametric Approach

What do we mean by recognition?

Classifying Images with Visual/Textual Cues. By Steven Kappes and Yan Cao

EE795: Computer Vision and Intelligent Systems

Advanced Techniques for Mobile Robotics Bag-of-Words Models & Appearance-Based Mapping

Preliminary Local Feature Selection by Support Vector Machine for Bag of Features

Empirical risk minimization (ERM) A first model of learning. The excess risk. Getting a uniform guarantee

Verification: is that a lamp? What do we mean by recognition? Recognition. Recognition

Ensemble of Bayesian Filters for Loop Closure Detection

Robust PDF Table Locator

Classification and Detection in Images. D.A. Forsyth

CSE 158. Web Mining and Recommender Systems. Midterm recap

CS 231A Computer Vision (Winter 2018) Problem Set 3

EVENT DETECTION AND HUMAN BEHAVIOR RECOGNITION. Ing. Lorenzo Seidenari

Linear combinations of simple classifiers for the PASCAL challenge

Mixtures of Gaussians and Advanced Feature Encoding

Probabilistic Learning Classification using Naïve Bayes

Computer Vision with MATLAB MATLAB Expo 2012 Steve Kuznicki

Recognition of Animal Skin Texture Attributes in the Wild. Amey Dharwadker (aap2174) Kai Zhang (kz2213)

Fisher vector image representation

Last week. Multi-Frame Structure from Motion: Multi-View Stereo. Unknown camera viewpoints

Non-Parametric Modeling

Pattern Recognition. Kjell Elenius. Speech, Music and Hearing KTH. March 29, 2007 Speech recognition

10-701/15-781, Fall 2006, Final

on learned visual embedding patrick pérez Allegro Workshop Inria Rhônes-Alpes 22 July 2015

Unsupervised Learning

Det De e t cting abnormal event n s Jaechul Kim

Bertin Technologies / CNRS LEAR Group INRIA - France

String distance for automatic image classification

9.1. K-means Clustering

Toward Retail Product Recognition on Grocery Shelves

Introduction to Machine Learning

Mixture Models and the EM Algorithm

Homework. Gaussian, Bishop 2.3 Non-parametric, Bishop 2.5 Linear regression Pod-cast lecture on-line. Next lectures:

Nearest Neighbor Classification

HOG-based Pedestriant Detector Training

CSCI567 Machine Learning (Fall 2014)

Clustering. Mihaela van der Schaar. January 27, Department of Engineering Science University of Oxford

Robotics Programming Laboratory

Image analysis. Computer Vision and Classification Image Segmentation. 7 Image analysis

Improving Recognition through Object Sub-categorization

Object Recognition Using Pictorial Structures. Daniel Huttenlocher Computer Science Department. In This Talk. Object recognition in computer vision

Model Selection Introduction to Machine Learning. Matt Gormley Lecture 4 January 29, 2018

DATA MINING LECTURE 10B. Classification k-nearest neighbor classifier Naïve Bayes Logistic Regression Support Vector Machines

Local Features and Bag of Words Models

We use non-bold capital letters for all random variables in these notes, whether they are scalar-, vector-, matrix-, or whatever-valued.

Undirected Graphical Models. Raul Queiroz Feitosa

Patch-based Object Recognition. Basic Idea

Density estimation. In density estimation problems, we are given a random from an unknown density. Our objective is to estimate

Chapter 4: Algorithms CS 795

Object Recognition in Images and Video: Advanced Bag-of-Words 27 April / 61

Contents. Preface to the Second Edition

BUAA AUDR at ImageCLEF 2012 Photo Annotation Task

Lec 08 Feature Aggregation II: Fisher Vector, Super Vector and AKULA

COMS 4771 Clustering. Nakul Verma

Introduction to Mobile Robotics

Introduction to Pattern Recognition Part II. Selim Aksoy Bilkent University Department of Computer Engineering

Beyond bags of Features

Lecture 24: Image Retrieval: Part II. Visual Computing Systems CMU , Fall 2013

Artistic ideation based on computer vision methods

Density estimation. In density estimation problems, we are given a random from an unknown density. Our objective is to estimate

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

Pattern recognition systems Lab 8 Bayesian Classifier: Simple Digit Recognition Application

Computational Statistics The basics of maximum likelihood estimation, Bayesian estimation, object recognitions

Beyond Bags of features Spatial information & Shape models

K Nearest Neighbor Wrap Up K- Means Clustering. Slides adapted from Prof. Carpuat

Machine Learning Classifiers and Boosting

Machine Learning A WS15/16 1sst KU Version: January 11, b) [1 P] For the probability distribution P (A, B, C, D) with the factorization

CS229: Action Recognition in Tennis

A study of classification algorithms using Rapidminer

OBJECT CATEGORIZATION

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

CS 231A CA Session: Problem Set 4 Review. Kevin Chen May 13, 2016

Machine Learning A W 1sst KU. b) [1 P] Give an example for a probability distributions P (A, B, C) that disproves

Performance Evaluation of Various Classification Algorithms

Detecting Thoracic Diseases from Chest X-Ray Images Binit Topiwala, Mariam Alawadi, Hari Prasad { topbinit, malawadi, hprasad

Real-time Object Detection CS 229 Course Project

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

Naïve Bayes for text classification

Announcements. Recognition. Recognition. Recognition. Recognition. Homework 3 is due May 18, 11:59 PM Reading: Computer Vision I CSE 152 Lecture 14

Data Preprocessing. Supervised Learning

Exploring Bag of Words Architectures in the Facial Expression Domain

Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models

Transcription:

Computer Vision Exercise Session 10 Image Categorization

Object Categorization Task Description Given a small number of training images of a category, recognize a-priori unknown instances of that category and assign the correct category label. How to recognize ANY car

Object Categorization Two main tasks: Classification Detection Classification Is there a car in the image? Binary answer is enough Detection Where is the car? Need localization e.g. a bounding box

Bag of Visual Words Object Bag of words

Bag of Visual Words

BoW for Image Classification {face, flowers, building} Works pretty well for whole-image classification

BoW for Image Classification 1. Codebook construction 2. Training 3. Testing Images positive negative Codebook construction Codebook (visual words) Feature detection and description Bag of words image representation Image classification Binary classification Train image classifier Classifier

Dataset Training set 50 images CAR - back view 50 images NO CAR Testing set 49 images CAR - back view 50 images NO CAR

Feature Extraction Feature detection For object classification, dense sampling offers better coverage. Extract interest points on a grid Feature description Histogram of oriented gradients (HOG) descriptor

Codebook Construction Map high-dimensional descriptors to words by quantizing the feature space Quantize via clustering K-means Let cluster centers be the prototype visual words

Codebook Construction Example: each group of patches belongs to the same visual word Ideally: an object part = a visual word

Codebook Construction K-means 1. Initialize K clusters centers randomly 2. Repeat for a number of iterations: a. Assign each point to the closest cluster center b. Update the position of each cluster center to the mean of its assigned points

BoW Image Representation Histogram of visual words image BoW image representation visual words

BoW Image Classification Nearest Neighbor Classification Bayesian Classification

Nearest Neighbor Classifier Training: Training images i -> BoW image representation y i with binary label c i Testing: Test image -> BoW image representation x Find training image j with y j closest to x Classifier test image with binary label c j

Bayesian Classifier Probabilistic classification scheme based on Bayes theorem Classify a test image based on the posterior probabilities

Bayesian Classifier Test image -> BoW image representation Compute the posterior probabilities Classification rule

Bayesian Classifier In this assignment consider equal priors Notice that the posterior probabilities have the same denominator normalization factor Classification rule

Bayesian Classifier How to compute the likelihoods? Each BoW image representation is a K-dimensional vector hist = [2 3 0 0 0... 1 0] Number of counts for the 2 nd visual word in the codebook Number of counts for the K-th visual word in the codebook

Bayesian Classifier Consider the number of counts for each visual word a random variable with normal distribution Warning: this is a very non-principled approximation as counts(i) is discrete and non-negative! For positive training images estimate: For negative training images estimate:

Bayesian Classifier BoW test image representation= [U 1 U 2 U K ] Probability of observing U i counts for the ith visual word in a car image In a!car image

Bayesian Classifier Using independence assumption: Numerical stability use logarithm Now we have the likelihoods

Hand-in Report should include: Your classification performance Nearest neighbor classifier Bayesian classifier Variation of classification performance with K Your description of the method and discussion of your results Source code Try on your own dataset (for bonus marks!)

Hand-in By 1pm on Thursday 10 th January 2013 mansfield@vision.ee.ethz.ch