$25
Tasks:Tiny images representation + nearest neighbor classifier
(accuracy of about 18-25%)
Bag of SIFT representation + nearest neighbor classifier
(accuracy of about 50-60%)
Bag of SIFT representation + linear SVM classifier
(accuracy of about 60-70%)
Extra bonus: try to use deep learning! (you can choose any type of neural network model)
You need to evaluate the accuracy of your model.
You can use
http://www.vlfeat.org/download.html
http://www.vlfeat.org/matlab/matlab.html
Goal: builds a classifier to categorize images into one of 15 scene types!
Tiny images representation + nearest neighbor classifier
Tiny images representation
Simply resizes each image to a small, fixed resolution (16*16).
You can either resize the images to square while ignoring their aspect ratio or you can crop the center square portion out of each image.
The entire image is just a vector of 16*16 = 256 dimensions.
You can use functions (MATLAB): imread, imresize
Tiny images representation + nearest neighbor classifier
Nearest neighbor classifier
Instead of 1 nearest neighbor, you can vote based on k nearest neighbors which will increase performance (although you need to pick a reasonable value for k).
Training example Test examples Training
examples from class 2
from class 1
f(x) = label of the training example nearest to x
All we need is a distance function for our inputs
No training required!
Bag of SIFT representation + nearest neighbor classifier
Bag of SIFT representation
Resized images
SIFT
Vector Quantization Bag-of-words model
2 0 1 ……
Histogram
Bag of SIFT representation + nearest neighbor classifier
Bag of SIFT representation
Resized images
SIFT
Vector Quantization Bag-of-words model
SVM
Find!a!linear'func+on'to!separate!the!classes:!
!f(x)!=!sgn(w(⋅!x(+!b)!
You can use functions (MATLAB): fitcsvm, predict
Vector Quantization
Vector Quantization
SVM Model
Training Data
SIFT
Real label
Example: cat facial recognition Training Phase
SVM model
9
Example: cat facial recognition Detection Phase
Training Data
SIFT
Vector Quantization
SVM
Test image
SIFT
Vector Quantization
SVM Model
Cat
Not cat
10
Extra bonus: deep learning
Example: Convolutional Neural Network (CNN)