Classification and Detection in Images. D.A. Forsyth

Similar documents
Classifiers and Detection. D.A. Forsyth

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

Category vs. instance recognition

Object Detection Design challenges


Edge and corner detection

Analysis: TextonBoost and Semantic Texton Forests. Daniel Munoz Februrary 9, 2009

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

Mobile Human Detection Systems based on Sliding Windows Approach-A Review

CS395T paper review. Indoor Segmentation and Support Inference from RGBD Images. Chao Jia Sep

Supervised Sementation: Pixel Classification

Local Features and Bag of Words Models

Object detection using Region Proposals (RCNN) Ernest Cheung COMP Presentation

Bayes Risk. Classifiers for Recognition Reading: Chapter 22 (skip 22.3) Discriminative vs Generative Models. Loss functions in classifiers

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

convolution shift invariant linear system Fourier Transform Aliasing and sampling scale representation edge detection corner detection

Classifiers for Recognition Reading: Chapter 22 (skip 22.3)

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

Segmentation by Clustering. Segmentation by Clustering Reading: Chapter 14 (skip 14.5) General ideas

Segmentation by Clustering Reading: Chapter 14 (skip 14.5)

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

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

Classification of objects from Video Data (Group 30)

Robotics Programming Laboratory

HOG-based Pedestriant Detector Training

Edge and Texture. CS 554 Computer Vision Pinar Duygulu Bilkent University

Histograms of Oriented Gradients

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

Texture. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors

Contents I IMAGE FORMATION 1

CS334: Digital Imaging and Multimedia Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Edge Detection. CSC320: Introduction to Visual Computing Michael Guerzhoy. René Magritte, Decalcomania. Many slides from Derek Hoiem, Robert Collins

Computer Vision. Exercise Session 10 Image Categorization

Final Exam Study Guide

More on Learning. Neural Nets Support Vectors Machines Unsupervised Learning (Clustering) K-Means Expectation-Maximization

Object Category Detection: Sliding Windows

Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation

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

2D Image Processing Feature Descriptors

Depth. Common Classification Tasks. Example: AlexNet. Another Example: Inception. Another Example: Inception. Depth

CS534: Introduction to Computer Vision Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

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

Bus Detection and recognition for visually impaired people

Beyond Bags of features Spatial information & Shape models

Modern Object Detection. Most slides from Ali Farhadi

Outline 7/2/201011/6/

Review of Filtering. Filtering in frequency domain

Image Processing

CS 4495 Computer Vision. Linear Filtering 2: Templates, Edges. Aaron Bobick. School of Interactive Computing. Templates/Edges

Discriminative classifiers for image recognition

C. Premsai 1, Prof. A. Kavya 2 School of Computer Science, School of Computer Science Engineering, Engineering VIT Chennai, VIT Chennai

Edge detection. Goal: Identify sudden. an image. Ideal: artist s line drawing. object-level knowledge)

Computer Vision I - Basics of Image Processing Part 1

Local Feature Detectors

Local Image Features

Histograms of Oriented Gradients for Human Detection p. 1/1

Object Category Detection: Sliding Windows

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

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

Category-level localization

Object Recognition. Lecture 11, April 21 st, Lexing Xie. EE4830 Digital Image Processing

Problem Set 4. Danfei Xu CS 231A March 9th, (Courtesy of last year s slides)

CS 2770: Computer Vision. Edges and Segments. Prof. Adriana Kovashka University of Pittsburgh February 21, 2017

Training-Free, Generic Object Detection Using Locally Adaptive Regression Kernels

Anno accademico 2006/2007. Davide Migliore

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

Motion Analysis. Motion analysis. Now we will talk about. Differential Motion Analysis. Motion analysis. Difference Pictures

Skin and Face Detection

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

Feature descriptors and matching

Digital Image Processing COSC 6380/4393

CS 664 Segmentation. Daniel Huttenlocher

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Lecture 6: Edge Detection

CPSC 340: Machine Learning and Data Mining. Logistic Regression Fall 2016

Multiple-Choice Questionnaire Group C

CPSC 340: Machine Learning and Data Mining. More Linear Classifiers Fall 2017

3D Object Recognition using Multiclass SVM-KNN

CPSC 340: Machine Learning and Data Mining. Principal Component Analysis Fall 2016

Deformable Part Models

Segmentation and Grouping April 19 th, 2018

Part III: Affinity Functions for Image Segmentation

Types of Edges. Why Edge Detection? Types of Edges. Edge Detection. Gradient. Edge Detection

DA Progress report 2 Multi-view facial expression. classification Nikolas Hesse

EN1610 Image Understanding Lab # 3: Edges

Automatic Image Alignment

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

Generative and discriminative classification techniques

Human detection solution for a retail store environment

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

Image Analysis. Edge Detection

CPSC 340: Machine Learning and Data Mining. Principal Component Analysis Fall 2017

Edge Detection (with a sidelight introduction to linear, associative operators). Images

Sampling, Aliasing, & Mipmaps

Automatic Image Alignment (feature-based)

Lecture 16: Computer Vision

Lecture 16: Computer Vision

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

CS 534: Computer Vision Segmentation and Perceptual Grouping

Templates, Image Pyramids, and Filter Banks

Transcription:

Classification and Detection in Images D.A. Forsyth

Classifying Images Motivating problems detecting explicit images classifying materials classifying scenes Strategy build appropriate image features train classifier test, evaluate

GIST Features Layout is important where stuff is are there walls? is there a floor? is it an open space? Texture measures should capture this Strategy obtain filter responses, obtain average magnitudes compute linear discriminants for reference dataset to find magnitudes that are most helpful There is now a standard set of GIST features no need to re-implement

Multiclass classification Many strategies Easy with k-nearest neighbors 1-vs-all for each class, construct a two class classifier comparing it to all other classes take the class with best output if output is greater than some value Multiclass logistic regression log(p(i features))-log(p(k features))=(linear expression) many more parameters harder to train with maximum likelihood still convex

Useful tricks Jittering data you can make many useful positives, negatives out of some Hard negative mining negatives are often common - find ones that you get wrong by a search

Visual words Issue: category will not produce a single, simple pattern but it might have components that are distinctive, but move around Idea: look for distinctive local patches found using methods from domain slides described with HOG/SIFT style features vector quantize, to form Visual Words build a histogram

Important trick: K-Means Choose a fixed number of clusters Choose cluster centers and point-cluster allocations to minimize error can t do this by search there are too many possible allocations. Algorithm i clusters j elements of i'th cluster x j µ i 2 fix cluster centers; allocate points to closest cluster fix allocation; compute best cluster centers x could be any set of features for which we can compute a distance (careful about scaling)

K-means

Building visual words - I Learn a dictionary cluster patch representations with k-means k will be big (1000 s-100,000 s)

Building visual words - II Encode an image find all interest points for each patch around each interest point map patch to closest cluster center build histogram of interest points

Visual words

Visual words

Visual words

Features from visual words Histogram good summary of what is in image; quick and efficient insensitive to spatial reorganization Spatial pyramid build histograms of local blocks at various scales less insensitive to spatial reorganization

Spatial pyramids

Evaluation Precision percentage of items in retrieved set that are relevant Recall percentage of relevant items that are retrieved Precision vs recall use classifier to label a collection of images now plot precision against recall for different classifier thresholds

Evaluation AP average precision average of precision as a function of recall

Precision vs recall

Can be hard

Detection with a classifier Search all windows at relevant scales Prepare features Classify Issues how to get only one response speed accuracy

Detection with a classifier

Non-maximum suppression Compute strength of response SVM value LR value Threshold small values are not faces Find largest value (over location, scale) suppress nearby values repeat

Core applications Face detection now very successful for frontal faces less so for 3/4, profile views Pedestrian detection eg make cars safer Generic object detection explain pictures image search robotics applications surveillance applications

In-plane rotation

Fast Features for Faces

Pedestrians: Scissors and Lollipops

Convolution Each pixel in output image is weighted average of window of pixels in input image weights stay the same window centered on pixel Important operation Example: smoothing by averaging Example: smoothing by weighted average Example: taking a derivative

Convolution - Example II Averaging neighbors yields poor smoothing look at picture - ringing effects distant neighbors have the same effect as nearby neighbors Idea: distant neighbors have small weights, nearby have large weights from Gaussian H uv = 1 2 2 exp u 2 + v 2! 2 2

Smoothing with a Gaussian Inset: smoothing weights Input image Output image, average Output image, gaussian weights Figure 4.1

Recall: Edges Idea: points where image value change very sharply are important changes in surface reflectance shadow boundaries outlines Finding Edges: Estimate gradient magnitude using appropriate smoothing Mark points where gradient magnitude is Locally biggest and big

Recall: Smoothed gradients Fact: These two are the same Smooth, then differentiate Filter with derivative of Gaussian Exploit: Filter image with derivative of Gaussian filters to get smoothed gradient

Edge Maps Depend on Shading If the image is brighter (resp. darker) because the camera gain is higher (resp. lower) because there is more (resp. less) light because the pixel values got multiplied by a constant Then the gradient magnitude is bigger (resp. smaller) So scaling image brightness changes the edge map because some magnitudes will go above (resp. below) the test threshold Edge maps differ for brighter/darker copies of a picture

Orientations - I Gradient magnitude is affected by illumination changes but gradient direction isn t

Orientations - II Notice larger gradients are better we know the orientation better; associated image points more interesting

Orientations at different scales Rose plot

Orientation Histograms Vary

Building Orientation Representations We would like to represent a pattern in an image patch to detect things in images to match points in one image to corresponding points in another image Necessary properties we have to know which patch to describe think of this as knowing the center and size of an image window Desirable features representation doesn t change much if the center is slightly wrong representation doesn t change much if the size is slightly wrong representation is distinctive representation doesn t change much if the patch gets brighter/darker large gradients are more important than small gradients

Histograms of Oriented Gradients Necessary properties we have to know which patch to describe think of this as knowing the center and size of an image window For the moment, assume window is known Use histograms Use orientations Desirable features representation doesn t change much if the center is slightly wrong representation doesn t change much if the size is slightly wrong representation is distinctive representation doesn t change much if the patch gets brighter/darker large gradients are more important than small gradients Weight orientation histogram entries Break window into boxes, describe each separately

Histograms of Oriented Gradients Strategy: break patch up into blocks construct histogram representing gradient orientations in that block which won t change much if the patch moves slightly entries weighted by magnitude Variants histogram of angles histogram of gradient vectors, length normalized by block averages

HOG features

HOG features

HOG - Crucial Points Gradient orientations are not affected by intensity Orientations with larger magnitude are more important Describe an image window of known location, size Histograms reduce the effect of poor estimate of location, size Break window into subwindows for each, compute an orientation histogram, weighting orientations by magnitude Numerous variants available

Visualizing Distinctive Features