Window based detectors

Similar documents
Previously. Window-based models for generic object detection 4/11/2011

Generic Object-Face detection

Object detection as supervised classification

Image Analysis. Window-based face detection: The Viola-Jones algorithm. iphoto decides that this is a face. It can be trained to recognize pets!

Discriminative classifiers for image recognition

Face Detection and Alignment. Prof. Xin Yang HUST

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

Object Category Detection: Sliding Windows

Object Category Detection: Sliding Windows

Templates and Background Subtraction. Prof. D. Stricker Doz. G. Bleser

Recap Image Classification with Bags of Local Features

Object detection. Asbjørn Berge. INF 5300 Advanced Topic: Video Content Analysis. Technology for a better society

Classifier Case Study: Viola-Jones Face Detector


Object Detection Design challenges

Object recognition (part 1)

Face detection and recognition. Many slides adapted from K. Grauman and D. Lowe

Object Detection. Computer Vision Yuliang Zou, Virginia Tech. Many slides from D. Hoiem, J. Hays, J. Johnson, R. Girshick

Face detection and recognition. Detection Recognition Sally

Skin and Face Detection

Overview of section. Lecture 10 Discriminative models. Discriminative methods. Discriminative vs. generative. Discriminative methods.

Detecting and Reading Text in Natural Scenes

Study of Viola-Jones Real Time Face Detector

Ensemble Methods, Decision Trees

Deformable Part Models

Category vs. instance recognition

Face/Flesh Detection and Face Recognition

High Level Computer Vision. Sliding Window Detection: Viola-Jones-Detector & Histogram of Oriented Gradients (HOG)

Face and Nose Detection in Digital Images using Local Binary Patterns

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

Face Detection using Hierarchical SVM

Face detection. Bill Freeman, MIT April 5, 2005

A robust method for automatic player detection in sport videos

Object Recognition and Detection

Object Category Detection. Slides mostly from Derek Hoiem

2D Image Processing Feature Descriptors

Object recognition. Methods for classification and image representation

Detection III: Analyzing and Debugging Detection Methods

Local features: detection and description. Local invariant features

Object and Class Recognition I:

Local Image Features

Recognition problems. Face Recognition and Detection. Readings. What is recognition?

Category-level localization

Supervised learning. y = f(x) function

Face Detection on OpenCV using Raspberry Pi

Beyond Bags of features Spatial information & Shape models

Local invariant features

Understanding Faces. Detection, Recognition, and. Transformation of Faces 12/5/17

Course Administration

Active learning for visual object recognition

Supervised learning. y = f(x) function

EECS 442 Computer vision. Object Recognition

Local features and image matching. Prof. Xin Yang HUST

Viola Jones Face Detection. Shahid Nabi Hiader Raiz Muhammad Murtaz

Learning a Rare Event Detection Cascade by Direct Feature Selection

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

Detecting Pedestrians Using Patterns of Motion and Appearance (Viola & Jones) - Aditya Pabbaraju

Lecture 12 Visual recognition

Categorization by Learning and Combining Object Parts

Context. CS 554 Computer Vision Pinar Duygulu Bilkent University. (Source:Antonio Torralba, James Hays)

Designing Applications that See Lecture 7: Object Recognition

Part based models for recognition. Kristen Grauman

Development in Object Detection. Junyuan Lin May 4th

Fast and Robust Classification using Asymmetric AdaBoost and a Detector Cascade

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

Selection of Scale-Invariant Parts for Object Class Recognition

Detection of a Single Hand Shape in the Foreground of Still Images

Subject-Oriented Image Classification based on Face Detection and Recognition

Automatic Initialization of the TLD Object Tracker: Milestone Update

Detecting Pedestrians Using Patterns of Motion and Appearance

Learning Object Detection from a Small Number of Examples: the Importance of Good Features.

Local Image Features

Local features: detection and description May 12 th, 2015

Machine Learning Crash Course

Human-Robot Interaction

Object Recognition. Computer Vision. Slides from Lana Lazebnik, Fei-Fei Li, Rob Fergus, Antonio Torralba, and Jean Ponce

EECS 442 Computer vision. Object Recognition

Wikipedia - Mysid

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

Rapid Face and Object Detection in ios

Learning to Detect Faces. A Large-Scale Application of Machine Learning

Parameter Sensitive Detectors

Face Detection. Raghuraman Gopalan AT&T Labs-Research, Middletown NJ USA

Filters (cont.) CS 554 Computer Vision Pinar Duygulu Bilkent University

Local Image Features

Hand Posture Recognition Using Adaboost with SIFT for Human Robot Interaction

Detecting Pedestrians Using Patterns of Motion and Appearance

Modern Object Detection. Most slides from Ali Farhadi

An Efficient Face Detection and Recognition System

Face Tracking in Video

Patch Descriptors. CSE 455 Linda Shapiro

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

FACE DETECTION BY HAAR CASCADE CLASSIFIER WITH SIMPLE AND COMPLEX BACKGROUNDS IMAGES USING OPENCV IMPLEMENTATION

Postprint.

Distance-Based Descriptors and Their Application in the Task of Object Detection

Classifiers for Recognition Reading: Chapter 22 (skip 22.3)

A Hybrid Face Detection System using combination of Appearance-based and Feature-based methods

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

Local Features and Bag of Words Models

CV as making bank. Intel buys Mobileye! $15 billion. Mobileye:

Transcription:

Window based detectors CS 554 Computer Vision Pinar Duygulu Bilkent University (Source: James Hays, Brown)

Today Window-based generic object detection basic pipeline boosting classifiers face detection as case study

Generic category recognition: basic framework Build/train object model Choose a representation Learn or fit parameters of model / classifier Generate candidates in new image Score the candidates

Generic category recognition: representation choice Window-based Part-based

Window-based models Building an object model Simple holistic descriptions of image content grayscale / color histogram vector of pixel intensities Kristen Grauman

Window-based models Building an object model Pixel-based representations sensitive to small shifts Color or grayscale-based appearance description can be sensitive to illumination and intra-class appearance variation Kristen Grauman

Window-based models Building an object model Consider edges, contours, and (oriented) intensity gradients Kristen Grauman

Window-based models Building an object model Consider edges, contours, and (oriented) intensity gradients Summarize local distribution of gradients with histogram Locally orderless: offers invariance to small shifts and rotations Contrast-normalization: try to correct for variable illumination Kristen Grauman

Window-based models Building an object model Given the representation, train a binary classifier Car/non-car Classifier No, Yes, not car. a car. Kristen Grauman

Discriminative classifier construction Nearest neighbor Neural networks 10 6 examples Shakhnarovich, Viola, Darrell 2003 Berg, Berg, Malik 2005... LeCun, Bottou, Bengio, Haffner 1998 Rowley, Baluja, Kanade 1998 Support Vector Machines Boosting Conditional Random Fields Guyon, Vapnik Heisele, Serre, Poggio, 2001, Viola, Jones 2001, Torralba McCallum, Freitag, Pereira et al. 2004, Opelt et al. 2000; Kumar, Hebert 2003 2006, Slide adapted from Antonio Torralba

Influential Works in Detection Sung-Poggio (1994, 1998) : ~1450 citations Basic idea of statistical template detection (I think), bootstrapping to get face-like negative examples, multiple whole-face prototypes (in 1994) Rowley-Baluja-Kanade (1996-1998) : ~2900 Parts at fixed position, non-maxima suppression, simple cascade, rotation, pretty good accuracy, fast Schneiderman-Kanade (1998-2000,2004) : ~1250 Careful feature engineering, excellent results, cascade Viola-Jones (2001, 2004) : ~6500 Haar-like features, Adaboost as feature selection, hyper-cascade, very fast, easy to implement Dalal-Triggs (2005) : ~2000 Careful feature engineering, excellent results, HOG feature, online code Felzenszwalb-Huttenlocher (2000): ~800 Efficient way to solve part-based detectors Felzenszwalb-McAllester-Ramanan (2008)? ~350 Excellent template/parts-based blend Slide: Derek Hoiem

Generic category recognition: basic framework Build/train object model Choose a representation Learn or fit parameters of model / classifier Generate candidates in new image Score the candidates

Window-based models Generating and scoring candidates Car/non-car Classifier Kristen Grauman

Window-based object detection: recap Training: 1. Obtain training data 2. Define features 3. Define classifier Given new image: 1. Slide window 2. Score by classifier Training examples Car/non-car Classifier Feature extraction Kristen Grauman

Discriminative classifier construction Nearest neighbor Neural networks 10 6 examples Shakhnarovich, Viola, Darrell 2003 Berg, Berg, Malik 2005... LeCun, Bottou, Bengio, Haffner 1998 Rowley, Baluja, Kanade 1998 Support Vector Machines Boosting Conditional Random Fields Guyon, Vapnik Heisele, Serre, Poggio, 2001, Viola, Jones 2001, Torralba McCallum, Freitag, Pereira et al. 2004, Opelt et al. 2000; Kumar, Hebert 2003 2006, Slide adapted from Antonio Torralba

Boosting intuition Weak Classifier 1 Slide credit: Paul Viola

Boosting illustration Weights Increased

Boosting illustration Weak Classifier 2

Boosting illustration Weights Increased

Boosting illustration Weak Classifier 3

Boosting illustration Final classifier is a combination of weak classifiers

Boosting: training Initially, weight each training example equally In each boosting round: Find the weak learner that achieves the lowest weighted training error Raise weights of training examples misclassified by current weak learner Compute final classifier as linear combination of all weak learners (weight of each learner is directly proportional to its accuracy) Exact formulas for re-weighting and combining weak learners depend on the particular boosting scheme (e.g., AdaBoost) Slide credit: Lana Lazebnik

Boosting: pros and cons Advantages of boosting Integrates classification with feature selection Complexity of training is linear in the number of training examples Flexibility in the choice of weak learners, boosting scheme Testing is fast Easy to implement Disadvantages Slide credit: Lana Lazebnik

Viola-Jones face detector

Main idea: Viola-Jones face detector Represent local texture with efficiently computable rectangular features within window of interest Select discriminative features to be weak classifiers Use boosted combination of them as final classifier Form a cascade of such classifiers, rejecting clear negatives quickly Kristen Grauman

Viola-Jones detector: features Rectangular filters Feature output is difference between adjacent regions Efficiently computable with integral image: any sum can be computed in constant time. Value at (x,y) is sum of pixels above and to the left of (x,y) Integral image Kristen Grauman

Computing sum within a rectangle Let A,B,C,D be the values of the integral image at the corners of D a rectangle Then the sum of original image values within the C rectangle can be computed as: sum = A B C + D Only 3 additions are required for any size of rectangle! B A Lana Lazebnik

Viola-Jones detector: features Rectangular filters Feature output is difference between adjacent regions Efficiently computable with integral image: any sum can be computed in constant time Avoid scaling images scale features directly for same cost Value at (x,y) is sum of pixels above and to the left of (x,y) Integral image Kristen Grauman

Viola-Jones detector: features Considering all possible filter parameters: position, scale, and type: 180,000+ possible features associated with each 24 x 24 window Which subset of these features should we use to determine if a window has a face? Use AdaBoost both to select the informative features and to form the classifier Kristen Grauman

Viola-Jones detector: AdaBoost Want to select the single rectangle feature and threshold that best separates positive (faces) and negative (nonfaces) training examples, in terms of weighted error. Resulting weak classifier: Outputs of a possible rectangle feature on faces and non-faces. For next round, reweight the examples according to errors, choose another filter/threshold combo. Kristen Grauman

AdaBoost Algorithm Start with uniform weights on training examples For T rounds Evaluate weighted error for each feature, pick best. {x 1, x n } Re-weight the examples: Incorrectly classified -> more weight Correctly classified -> less weight Final classifier is combination of the weak ones, weighted according to error they had. Freund & Schapire 1995

Viola-Jones Face Detector: Results First two features selected

Even if the filters are fast to compute, each new image has a lot of possible windows to search. How to make the detection more efficient?

Cascading classifiers for detection Form a cascade with low false negative rates early on Apply less accurate but faster classifiers first to immediately discard windows that clearly appear to be negative Kristen Grauman

Viola-Jones detector: summary Train cascade of classifiers with AdaBoost Faces New image Non-faces Selected features, thresholds, and weights Train with 5K positives, 350M negatives Real-time detector using 38 layer cascade 6061 features in all layers [Implementation available in OpenCV: http://www.intel.com/technology/computing/opencv/] Kristen Grauman

Viola-Jones detector: summary A seminal approach to real-time object detection Training is slow, but detection is very fast Key ideas Features which can be evaluated very quickly with Integral Images Cascade model which rejects unlikely faces quickly Mining hard negatives P. Viola and M. Jones. Rapid object detection using a boosted cascade of simple features. CVPR 2001. P. Viola and M. Jones. Robust real-time face detection. IJCV 57(2), 2004.

Viola-Jones Face Detector: Results

Viola-Jones Face Detector: Results

Viola-Jones Face Detector: Results

Detecting profile faces? Can we use the same detector?

Viola-Jones Face Detector: Results Paul Viola, ICCV tutorial

Viola Jones Results MIT + CMU face dataset Slide: Derek Hoiem

Schneiderman later results Schneiderman 2004 Viola-Jones 2001 Roth et al. 1999 Schneiderman-Kanade 2000 Slide: Derek Hoiem

Speed: frontal face detector Schneiderman-Kanade (2000): 5 seconds Viola-Jones (2001): 15 fps Slide: Derek Hoiem

Example using Viola-Jones detector Frontal faces detected and then tracked, character names inferred with alignment of script and subtitles. Everingham, M., Sivic, J. and Zisserman, A. "Hello! My name is... Buffy" - Automatic naming of characters in TV video, BMVC 2006. http://www.robots.ox.ac.uk/~vgg/research/nface/index.html

Consumer application: iphoto 2009 http://www.apple.com/ilife/iphoto/ Slide credit: Lana Lazebnik

Consumer application: iphoto 2009 Things iphoto thinks are faces Slide credit: Lana Lazebnik

Consumer application: iphoto 2009 Can be trained to recognize pets! http://www.maclife.com/article/news/iphotos_faces_recognizes_cats Slide credit: Lana Lazebnik