Image Analysis & Retrieval Lec 12 - Mid-Term Review

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

Image Analysis & Retrieval. CS/EE 5590 Special Topics (Class Ids: 44873, 44874) Fall 2016, M/W Lec 13

Image Analysis & Retrieval Lec 10 - Classification II

Outline 7/2/201011/6/

ECE 484 Digital Image Processing Lec 12 - Mid Term Review

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

Scale Invariant Feature Transform

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

Scale Invariant Feature Transform

Adaptive Learning of an Accurate Skin-Color Model

Motion illusion, rotating snakes

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

Motion Estimation and Optical Flow Tracking

EE795: Computer Vision and Intelligent Systems

EE795: Computer Vision and Intelligent Systems

Mixtures of Gaussians and Advanced Feature Encoding

Prof. Feng Liu. Spring /26/2017

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

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

ECE 484 Digital Image Processing Lec 17 - Part II Review & Final Projects Topics

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

Local Image Features

COSC160: Detection and Classification. Jeremy Bolton, PhD Assistant Teaching Professor

Local Features: Detection, Description & Matching

Local Image Features

2D Image Processing Feature Descriptors

Computer vision: models, learning and inference. Chapter 13 Image preprocessing and feature extraction

Feature descriptors and matching

Features Points. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

Feature Based Registration - Image Alignment

Image Analysis & Retrieval. CS/EE 5590 Special Topics (Class Ids: 44873, 44874) Fall 2016, M/W Lec 16

Computer Vision I - Appearance-based Matching and Projective Geometry

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

Edge and corner detection

Large-Scale Traffic Sign Recognition based on Local Features and Color Segmentation

Anno accademico 2006/2007. Davide Migliore

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

Image Analysis & Retrieval. CS/EE 5590 Special Topics (Class Ids: 44873, 44874) Fall 2016, M/W Lec 18.

Scale Invariant Feature Transform by David Lowe

SURF. Lecture6: SURF and HOG. Integral Image. Feature Evaluation with Integral Image

EECS150 - Digital Design Lecture 14 FIFO 2 and SIFT. Recap and Outline

Computer Vision for HCI. Topics of This Lecture

Coarse-to-fine image registration

CAP 5415 Computer Vision Fall 2012

CS4670: Computer Vision

Ulas Bagci

Announcements. Recognition I. Gradient Space (p,q) What is the reflectance map?

Local invariant features

Image Features. Work on project 1. All is Vanity, by C. Allan Gilbert,

CS5670: Computer Vision

Human detection using histogram of oriented gradients. Srikumar Ramalingam School of Computing University of Utah

SIFT - scale-invariant feature transform Konrad Schindler

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

The SIFT (Scale Invariant Feature

Automatic Image Alignment (feature-based)

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

Multiple-Choice Questionnaire Group C

Local Features Tutorial: Nov. 8, 04

Computer Vision I - Appearance-based Matching and Projective Geometry

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

Image Processing. Image Features

ImageCLEF 2011

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects

Computer Vision I. Announcement. Corners. Edges. Numerical Derivatives f(x) Edge and Corner Detection. CSE252A Lecture 11

CHAPTER 1 Introduction 1. CHAPTER 2 Images, Sampling and Frequency Domain Processing 37

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

CSE 527: Introduction to Computer Vision

Comparison of Feature Detection and Matching Approaches: SIFT and SURF

Object Recognition with Invariant Features

Fundamentals of Digital Image Processing

Local features: detection and description May 12 th, 2015

CS 223B Computer Vision Problem Set 3

Image Analysis & Retrieval

Computer Vision. Recap: Smoothing with a Gaussian. Recap: Effect of σ on derivatives. Computer Science Tripos Part II. Dr Christopher Town

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

AK Computer Vision Feature Point Detectors and Descriptors

Image Analysis & Retrieval Lec 05 - Interesting Points Detection

Learning and Inferring Depth from Monocular Images. Jiyan Pan April 1, 2009

ME/CS 132: Introduction to Vision-based Robot Navigation! Low-level Image Processing" Larry Matthies"

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

Chapter 3 Image Registration. Chapter 3 Image Registration

Local features: detection and description. Local invariant features

Selective Search for Object Recognition

Pop Quiz 1 [10 mins]

Category vs. instance recognition

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

CS231A Section 6: Problem Set 3

Large scale object/scene recognition

Local Feature Detectors

Automatic Image Alignment

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

Image Matching. AKA: Image registration, the correspondence problem, Tracking,

CS 229 Midterm Review

Evaluation and comparison of interest points/regions

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

Image Analysis & Retrieval Lec-01: Introduction

Image processing and features

Click to edit title style

Final Exam Study Guide

Transcription:

CS/EE 5590 / ENG 401 Special Topics, Spring 2018 Image Analysis & Retrieval Lec 12 - Mid-Term Review Zhu Li Dept of CSEE, UMKC http://l.web.umkc.edu/lizhu Office Hour: Tue/Thr 2:30-4pm@FH560E, Contact: Email: lizhu@umkc.edu, Ph: x 2346. Created using WPS office and EqualX latex equation editor p.1

q HW-2 q Quiz-1 Outline q Review part I: Image Features & Classifiers Image Formation: Homography Color Space & Color Features Filtering and Edge Features Harris Detector SIFT Aggregation: BoW, VLAD, Fisher, and Supervector Image Retrieval System Metrics: TPR/Precision, FPR, Recall, map Classification: knn, GMM Bayesian, SVM p.2

qdata Set: CDVS data set Homework-2: Aggregation q Global Codebook for VLAD, FisherVector Compute SIFT and DenseSIFT from each image, sort them into two arrays: hw2_sift: hw2_dsift Random sample a subset of them: use randperm() Compute PCA: o indx = randperm(n_sift); indx = indx(1:20*2^10); % sample 20k o [A0, s, eigv]=princomp(hw2_sift(indx,: )); Project SIFT o Dimension reduction: x = sift*a0(:,1:kd) Compute Kmeans and GMM models for VLAD and FV aggregation: o vl_feat: vl_kmeans(), vl_gmm(); p.3

Fisher Vector Aggregation q FV encoding Gradient on the mean, for GMM component k, j=1..d In the end, we have 2K x D aggregation on the derivation w.r.t. the means and variances Normalize by Fisher Kernel p.4

Quiz-1 q Covers what we reviewed today q Format: True or False Multiple Choices Problem Solving Extra Credit (25%) q Close Book, 1-page A4 cheating sheet allowed. cheating sheet need to be turned in with name and id number cheating sheet will also be graded for up to 10 pts q Relax J Quiz is actually on me. p.5

Best Cheating Sheet Award from 2017 J q Cheating sheet is also graded. Up to 10 pts extra A nice way to summarize and organize/indexing your knowledge base. Cheating sheet + HW = what you really get from the class. p.6

q HW-2 q Quiz-1 Outline q Review part I: Image Features & Classifiers Image Formation: Homography Color Space & Color Features Filtering and Edge Features Harris Detector SIFT Aggregation: BoW, VLAD, Fisher, and Supervector Image Retrieval System Metrics: TPR/Precision, FPR, Recall, map Classification: knn, GMM Bayesian, SVM p.7

Classification in Image Retrieval q An image retrieval pipeline (hand crafted features) Image Formatio n Feature Computing Feature Aggregation Classificatio n Homography, Color space Color histogram Filtering, Edge Detection HoG, Harris Detector, SIFT Bow VLAD Fisher Vector Supervector Knowledge /Data Base p.8

Image Formation - Geometry p.9 [ ] X 0 x = K I ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 0 1 0 0 0 0 0 0 0 0 1 z y x f f v u w K Slide Credit: GaTech Computer Vision class, 2015. Intrinsic Assumptions Unit aspect ratio Optical center at (0,0) No skew of pixels Extrinsic Assumptions No rotation Camera at (0,0,0) X x

Image Formation: Homography q In general, homography H maps 2d points according to, x =Hx Up to a scale, as [x, y, w]=[sx, sy, sw], so H has 8 DoF qaffine Transform: 6 DoF: Contains a translation [t 1, t 2 ], and invertable affine matrix A [2x2] qsimilarity Transform, 4 DoF: a rigid transform that preserves distance if s=1: p.10

VL_FEAT Implementation q VL_FEAT has an implementation: p.11

Image Formation Color Space q RGB Color Space: 8 bit Red, Green, Blue Channels Mixed together q YUV/YCbCr Color Space q HSV Color Space Hue: color in polar coord Saturation Value p.12

Color Histogram Fixed Codebook q Color Histogram: Fixed code book to generate histogram Example: MPEG 7 Scalable Color Descriptor HSV Color Space, 16x4x4 partition for bins Scalability thru quantization and Haar Transform p.13

Color Histogram Adaptive Codebook qadaptive Color Histogram No fixed code book Example: MPEG 7 Dominant Color Descriptor Distance Metric Not index-able p.14

q Basic Filter Operations Image Filters 1/9 1/9 1 1/9 1 1/9 1 1/9 1 1/9 1 * 1/9 1 1/9 1 1/9 1 qregion of Support p.15

Filter Properties qlinear Filters are: Shift-Invariant: f(m-k, n-j)*h = g(m-k, n-j), if f*h=g Associative: f*h 1 *h 2 = f*(h 1 *h 2 ) this can save a lot of complexity Distributive: f*h1 + f*h2 = f*(h1+h2) useful in SIFT s DoG filtering. p.16

Edge Detection q The need of smoothing Gaussian smoothing Combine differentiation and Gaussian derivative of Gaussian (x) f p.17

Image Gradient from DoG Filtering qimage Gradient (at a scale): The gradient points in the direction of most rapid increase in intensity The edge strength is given by the gradient magnitude: The gradient direction is given by: p.18

HOG Histogram of Oriented Gradients q Generate local histogram per block Size of HoG: n*m*4*9=36nm, for n x m cells. f = 1 1 2 2 3 3 4 4 ( h,..., h, h,..., h, h,..., h, h h ) 1 9 1 9 1 9 1,..., 9 Angle Magnitude 0 15 25 25 5 20 20 10 10 15 25 30 5 10 10 5 HOG Cell size 5 Binary voting 45 47 95 97 160 10 1 10 1 11 0 12 0 20 50 30 70 30 70 Magnitude voting 40 80 4 140 120 3 100 80 2 60 1 40 20 0 0-19 20-39 40-59 60-79 80-99 100-119 120-139 140-159 160-179 0 0-19 20-39 40-59 60-79 80-99 100-119 120-139 140-159 160-179 p.19

Harris Detector qsmoothed 2 nd moment: 1. Image derivatives (optionally blur first) 2 é I x ( s D ) m s I, s D ) = g( s I ) * ê êë I xi y ( s D ) ( 2 I ù xi y ( s D ) ú I y ( s D ) úû I x I y det M trace M = l l 1 2 = l + l 1 2 2. Square of derivatives I x 2 I y 2 I x I y 3. Gaussian filter g(s I ) g(i x 2) g(i y 2) g(i x I y ) 4. Harris Function detect corners, no need to compute the eigen values Rharris 2 = det[ m( s, s )]-a[trace( m( s, s )) ] = I D g + 2 2 2 2 2 ( I x ) g( I y ) -[ g( I xi y )] -a[ g( I x ) g( I y I D )] 2 har p.20

Harris Detector Steps q Response function -> Threshold -> Local Maxima Harris Detector NOT scale invariant R(x,y) p.21

Scale Space Theory - Lindeberg Ñ 2 g = 2 g 2 x + 2 g 2 y r image characteristic scale p.22

SIFT Detector via Difference of Gaussian q However, LoG computing is expensive nonseperatable filter q SIFT: uses Difference of Gaussian filters to approximate LoG Separate-able, much faster Box Filter Approximation you will see later. LoG Scale space construction By Gaussian Filtering, and Image Difference p.23

Peak Strength & Edge Removal q Peak Strength: Interpolate true DoG response and pixel location by Taylor expansion q Edge Removal: Re-do Harris type detection to remove edge on much reduced pixel set p.24

Scale Invariance thru Dominant Orientation Coding q Voting for the dominant orientation Weighted by a Gaussian window to give more emphasis to the gradients closer to the center p.25

SIFT Description q Rotate to dominant direction, divide Image Patch (16x16 pixels) around SIFT point into 4x4 Cells q For each cell, compute an 8-bin edge histogram 0 2p angle histogram Spatial-scale space extrema qoverall, we have 4x4x8=128 dimension p.26

SIFT Matching and Repeatability Prediction q SIFT Distance True Love Test qnot all SIFT are created equal Peak strength (DoG response at interpolated position) Combined scale/peak strength pmf p.27

q HW-2 q Quiz-1 Outline q Review part I: Image Features & Classifiers Image Formation: Homography Color Space & Color Features Filtering and Edge Features Harris Detector SIFT Aggregation: BoW, VLAD, Fisher, and Supervector Image Retrieval System Metrics: TPR/Precision, FPR, Recall, map Classification: knn, GMM Bayesian, SVM p.28

q Curse of Dimensionality Why Aggregation? + qdecision Boundary / Indexing + +.. + p.29

Histogram Aggregation: Bag-of-Words k n p.30

Histogram Aggregation: Kernel Code Book Soft Encoding p.31

VLAD- Vector of Locally Aggregated Descriptors 1 assign descriptors m 1 m 2 m 4 m 3 x m 5 2 compute x- m i 3 v i =sum x- m i for cell i v 1 v 2 v 3 v 4 v 5 p.32

Fisher Vector Aggregation q FV encoding Gradient on the mean, for GMM component k, j=1..d In the end, we have 2K x D aggregation on the derivation w.r.t. the means and variances Normalize by Fisher Kernel p.33

Supervector Aggregation p.34

AKULA Adaptive KLUster Aggregation qakula Descriptor: No fixed codebook! Outer loop: subspace optimization Inner loop: cluster centroids + SIFT count A 1 ={yc 1 1, yc 1 2,, yc 1 k ; pc 1 1, pc 1 2,, pc 1 k } A 2 ={yc 2 1, yc 2 2,, yc 2 k ; pc 2 1, pc 2 2,, pc 2 k } qdistance metric: Min centroids distance, weighted by SIFT count (kind of manifolds tangent distance) p.35

Image Retrieval Performance Metrics q True Positive Rate q False Positive Rate qprecision qrecall qf-measure TPR = TP/(TP+FP) FPR = FP/(TP+FP) Precision =TP/(TP + FP), Recall = TP/(TP + FN) F-measure = 2*(precision*recall)/(precision + recall) p.36

Retrieval Performance: Mean Average Precision qmap measures the retrieval performance across all queries p.37

map example q MAP is computed across all query results as the average precision over the recall p.38

Compute TPR-FPR q ROC Curve (Receiver Operating Characteristics) Confusion/distance matrix: d(j,k) Ground Truth: m(j,k) p.39

Classification in Image Retrieval q A typical image retrieval pipeline Image Formatio n Feature Computing Feature Aggregation Classificatio n Knowledge /Data Base p.40

q knn is Nonlinear Classifier Operations: majority vote knn Classifier qperformance bounds on k: not worse off by 2 times the error rate of Bayesian error rate As k increases, it improves, but not much qaccelerate NN retrieval operation Kd-tree: o a space partition scheme, to limit the number of data points comparison operation Kd-tree supported knn search: o Approx KNN search o Kd-Forest supported Approx Search p.41

Gaussian Generative Model Classifier q Shaped by the relative shape of Covariance Matrix q Matlab: [rec_label, err]=classify(q, x, y, method); Method = quadratic p.42

q Why called SVM? The Support Vector Solution K(x i, x) p.43

Support Vector Machine qmatlab: % train svm svm = svmtrain(x, y, 'showplot', true); % svm classification for k=1:5 figure(41); hold on; grid on; axis([0 1 0 1]); [u,v]=ginput(1); q=[u,v]; plot(u, v, '*b'); rec = svmclassify(svm, q); fprintf('\n recognized as %c', rec); end p.44

Summary q Image Analysis & Retrieval Part I Image Formation Color and Texture Features Interest Points Detection Harris Detector Invariant Interest Point Detection SIFT Aggregation Classification tools: knn, gmm, svm Performance metrics: o tp, fp, tn, fn, tpr/precision, fpr, recall, map q Part II: Holistic approach Just throw the pixels to the algorithm to figure out what are the good features. Subspace approach: Eigenface, Fisherface, Laplacian Embedding Deep Learning: CNN Hashing p.45