Cos 429: Face Detection (Part 2) Viola-Jones and AdaBoost Guest Instructor: Andras Ferencz (Your Regular Instructor: Fei-Fei Li) Thanks to Fei-Fei.

Slides:



Advertisements
Similar presentations
EE462 MLCV Lecture 5-6 Object Detection – Boosting Tae-Kyun Kim.
Advertisements

Detecting Faces in Images: A Survey
EE462 MLCV Lecture 5-6 Object Detection – Boosting Tae-Kyun Kim.
Rapid Object Detection using a Boosted Cascade of Simple Features Paul Viola, Michael Jones Conference on Computer Vision and Pattern Recognition 2001.
Rapid Object Detection using a Boosted Cascade of Simple Features Paul Viola, Michael Jones Conference on Computer Vision and Pattern Recognition 2001.
Face detection Behold a state-of-the-art face detector! (Courtesy Boris Babenko)Boris Babenko.
AdaBoost & Its Applications
Face detection Many slides adapted from P. Viola.
Cos 429: Face Detection (Part 2) Viola-Jones and AdaBoost Guest Instructor: Andras Ferencz (Your Regular Instructor: Fei-Fei Li) Thanks to Fei-Fei Li,
EE462 MLCV Lecture 5-6 Object Detection – Boosting Tae-Kyun Kim.
The Viola/Jones Face Detector Prepared with figures taken from “Robust real-time object detection” CRL 2001/01, February 2001.
The Viola/Jones Face Detector (2001)
1 Learning to Detect Objects in Images via a Sparse, Part-Based Representation S. Agarwal, A. Awan and D. Roth IEEE Transactions on Pattern Analysis and.
A simple classifier Ridge regression A variation on standard linear regression Adds a “ridge” term that has the effect of “smoothing” the weights Equivalent.
Rapid Object Detection using a Boosted Cascade of Simple Features
Generic Object Detection using Feature Maps Oscar Danielsson Stefan Carlsson
Robust Real-time Object Detection by Paul Viola and Michael Jones ICCV 2001 Workshop on Statistical and Computation Theories of Vision Presentation by.
Face detection and recognition Many slides adapted from K. Grauman and D. Lowe.
A Robust Real Time Face Detection. Outline  AdaBoost – Learning Algorithm  Face Detection in real life  Using AdaBoost for Face Detection  Improvements.
Learning and Vision: Discriminative Models
A Robust Real Time Face Detection. Outline  AdaBoost – Learning Algorithm  Face Detection in real life  Using AdaBoost for Face Detection  Improvements.
Robust Real-Time Object Detection Paul Viola & Michael Jones.
Foundations of Computer Vision Rapid object / face detection using a Boosted Cascade of Simple features Presented by Christos Stoilas Rapid object / face.
Face Detection CSE 576. Face detection State-of-the-art face detection demo (Courtesy Boris Babenko)Boris Babenko.
FACE DETECTION AND RECOGNITION By: Paranjith Singh Lohiya Ravi Babu Lavu.
Face Detection using the Viola-Jones Method
CS 231A Section 1: Linear Algebra & Probability Review
Recognition using Boosting Modified from various sources including
Detecting Pedestrians Using Patterns of Motion and Appearance Paul Viola Microsoft Research Irfan Ullah Dept. of Info. and Comm. Engr. Myongji University.
Window-based models for generic object detection Mei-Chen Yeh 04/24/2012.
Sign Classification Boosted Cascade of Classifiers using University of Southern California Thang Dinh Eunyoung Kim
Benk Erika Kelemen Zsolt
Lecture 29: Face Detection Revisited CS4670 / 5670: Computer Vision Noah Snavely.
Face detection Slides adapted Grauman & Liebe’s tutorial
BOOSTING David Kauchak CS451 – Fall Admin Final project.
ECE738 Advanced Image Processing Face Detection IEEE Trans. PAMI, July 1997.
Tony Jebara, Columbia University Advanced Machine Learning & Perception Instructor: Tony Jebara.
Lecture notes for Stat 231: Pattern Recognition and Machine Learning 1. Stat 231. A.L. Yuille. Fall 2004 AdaBoost.. Binary Classification. Read 9.5 Duda,
Adaboost and Object Detection Xu and Arun. Principle of Adaboost Three cobblers with their wits combined equal Zhuge Liang the master mind. Failure is.
E NSEMBLE L EARNING : A DA B OOST Jianping Fan Dept of Computer Science UNC-Charlotte.
Lecture 09 03/01/2012 Shai Avidan הבהרה: החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
The Viola/Jones Face Detector A “paradigmatic” method for real-time object detection Training is slow, but detection is very fast Key ideas Integral images.
Bibek Jang Karki. Outline Integral Image Representation of image in summation format AdaBoost Ranking of features Combining best features to form strong.
Learning to Detect Faces A Large-Scale Application of Machine Learning (This material is not in the text: for further information see the paper by P.
FACE DETECTION : AMIT BHAMARE. WHAT IS FACE DETECTION ? Face detection is computer based technology which detect the face in digital image. Trivial task.
Face detection Behold a state-of-the-art face detector! (Courtesy Boris Babenko)Boris Babenko slides adapted from Svetlana Lazebnik.
Face detection Many slides adapted from P. Viola.
Face Detection and Recognition Reading: Chapter and, optionally, “Face Recognition using Eigenfaces” by M. Turk and A. Pentland.
AdaBoost Algorithm and its Application on Object Detection Fayin Li.
Recognition Part II: Face Detection via AdaBoost Linda Shapiro CSE
Machine Learning: Ensemble Methods
CS262: Computer Vision Lect 06: Face Detection
Reading: R. Schapire, A brief introduction to boosting
2. Skin - color filtering.
Cascade for Fast Detection
License Plate Detection
Machine Learning – Linear Classifiers and Boosting
Recognition Part II: Face Detection via AdaBoost
Session 7: Face Detection (cont.)
Part 3: discriminative methods
Lit part of blue dress and shadowed part of white dress are the same color
HCI/ComS 575X: Computational Perception
In summary C1={skin} C2={~skin} Given x=[R,G,B], is it skin or ~skin?
Learning to Detect Faces Rapidly and Robustly
The
Face Detection via AdaBoost
ADABOOST(Adaptative Boosting)
Lecture 18: Bagging and Boosting
Lecture 06: Bagging and Boosting
Lecture 29: Face Detection Revisited
Presentation transcript:

Cos 429: Face Detection (Part 2) Viola-Jones and AdaBoost Guest Instructor: Andras Ferencz (Your Regular Instructor: Fei-Fei Li) Thanks to Fei-Fei Li, Antonio Torralba, Paul Viola, David Lowe, Gabor Melli (by way of the Internet) for slides

Face Detection

Face Detection

Sliding Windows 1. hypothesize: 2. test: try all possible rectangle locations, sizes 2. test: classify if rectangle contains a face (and only the face) Note: 1000's more false windows then true ones.

Classification (Discriminative) Faces Background In some feature space

sum(WhiteArea) - sum(BlackArea) Image Features 4 Types of “Rectangle filters” (Similar to Haar wavelets Papageorgiou, et al. ) Based on 24x24 grid: 160,000 features to choose from For real problems results are only as good as the features used... This is the main piece of ad-hoc (or domain) knowledge Rather than the pixels, we have selected a very large set of simple functions Sensitive to edges and other critcal features of the image ** At multiple scales Since the final classifier is a perceptron it is important that the features be non-linear… otherwise the final classifier will be a simple perceptron. We introduce a threshold to yield binary features g(x) = sum(WhiteArea) - sum(BlackArea)

Image Features F(x) = α1 f1(x) + α2 f2(x) + ... 1 if gi(x) > θi For real problems results are only as good as the features used... This is the main piece of ad-hoc (or domain) knowledge Rather than the pixels, we have selected a very large set of simple functions Sensitive to edges and other critcal features of the image ** At multiple scales Since the final classifier is a perceptron it is important that the features be non-linear… otherwise the final classifier will be a simple perceptron. We introduce a threshold to yield binary features 1 if gi(x) > θi -1 otherwise fi(x) = Need to: (1) Select Features i=1..n, (2) Learn thresholds θi , (3) Learn weights αi

A Peak Ahead: the learned features

Why rectangle features? (1) The Integral Image The integral image computes a value at each pixel (x,y) that is the sum of the pixel values above and to the left of (x,y), inclusive. This can quickly be computed in one pass through the image (x,y)

Why rectangle features? (2) Computing Sum within a Rectangle Let A,B,C,D be the values of the integral image at the corners of a rectangle Then the sum of original image values within the rectangle can be computed: sum = A – B – C + D Only 3 additions are required for any size of rectangle! This is now used in many areas of computer vision D B C A

Boosting How to select the best features? How to learn the classification function? F(x) = α1 f1(x) + α2 f2(x) + ....

Boosting Defines a classifier using an additive model: Strong Weak classifier Weight Features vector

Boosting It is a sequential procedure: xt=1 Each data point has a class label: xt xt=2 +1 ( ) -1 ( ) yt = and a weight: It is a sequential procedure that builds a complex classifier out of simpler ones by combining them additively. wt =1

Toy example Weak learners from the family of lines Each data point has a class label: +1 ( ) -1 ( ) yt = and a weight: wt =1 h => p(error) = 0.5 it is at chance

Toy example Each data point has a class label: +1 ( ) yt = -1 ( ) +1 ( ) -1 ( ) yt = and a weight: wt =1 This one seems to be the best This is a ‘weak classifier’: It performs slightly better than chance.

Toy example Each data point has a class label: +1 ( ) yt = -1 ( ) +1 ( ) -1 ( ) yt = We update the weights: wt wt exp{-yt Ht} We set a new problem for which the previous weak classifier performs at chance again

Toy example Each data point has a class label: +1 ( ) yt = -1 ( ) +1 ( ) -1 ( ) yt = We update the weights: wt wt exp{-yt Ht} We set a new problem for which the previous weak classifier performs at chance again

Toy example Each data point has a class label: +1 ( ) yt = -1 ( ) +1 ( ) -1 ( ) yt = We update the weights: wt wt exp{-yt Ht} We set a new problem for which the previous weak classifier performs at chance again

Toy example Each data point has a class label: +1 ( ) yt = -1 ( ) +1 ( ) -1 ( ) yt = We update the weights: wt wt exp{-yt Ht} We set a new problem for which the previous weak classifier performs at chance again

Toy example f1 f2 f4 f3 The strong (non- linear) classifier is built as the combination of all the weak (linear) classifiers.

AdaBoost Algorithm Given: m examples (x1, y1), …, (xm, ym) where xiÎX, yiÎY={-1, +1} The goodness of ht is calculated over Dt and the bad guesses. Initialize D1(i) = 1/m For t = 1 to T 1. Train learner ht with min error 2. Compute the hypothesis weight The weight Adapts. The bigger et becomes the smaller at becomes. 3. For each example i = 1 to m Boost example if incorrectly predicted. Output Zt is a normalization factor. Linear combination of models.

Boosting with Rectangle Features For each round of boosting: Evaluate each rectangle filter on each example (compute g(x)) Sort examples by filter values Select best threshold (θ) for each filter (one with lowest error) Select best filter/threshold combination from all candidate features (= Feature f(x)) Compute weight (α) and incorporate feature into strong classifier F(x) F(x) + α f(x) Reweight examples

Boosting Boosting fits the additive model by minimizing the exponential loss Training samples The exponential loss is a differentiable upper bound to the misclassification error.

Exponential loss Squared error Loss Misclassification error 4 Misclassification error 3.5 Squared error 3 Exponential loss 2.5 2 Exponential loss 1.5 1 0.5 -1.5 -1 -0.5 0.5 1 1.5 yF(x) = margin 2

Boosting Sequential procedure. At each step we add to minimize the residual loss Parameters weak classifier Desired output input For more details: Friedman, Hastie, Tibshirani. “Additive Logistic Regression: a Statistical View of Boosting” (1998)

Example Classifier for Face Detection A classifier with 200 rectangle features was learned using AdaBoost 95% correct detection on test set with 1 in 14084 false positives. Not quite competitive... ROC curve for 200 feature classifier

Building Fast Classifiers Given a nested set of classifier hypothesis classes Computational Risk Minimization vs false neg determined by % False Pos % Detection 50 50 100 In general simple classifiers, while they are more efficient, they are also weaker. We could define a computational risk hierarchy (in analogy with structural risk minimization)… A nested set of classifier classes The training process is reminiscent of boosting… - previous classifiers reweight the examples used to train subsequent classifiers The goal of the training process is different - instead of minimizing errors minimize false positives FACE IMAGE SUB-WINDOW Classifier 1 F T NON-FACE Classifier 3 Classifier 2

Cascaded Classifier 50% 20% 2% IMAGE SUB-WINDOW 1 Feature 5 Features 20 Features FACE F F F NON-FACE NON-FACE NON-FACE A 1 feature classifier achieves 100% detection rate and about 50% false positive rate. A 5 feature classifier achieves 100% detection rate and 40% false positive rate (20% cumulative) using data from previous stage. A 20 feature classifier achieve 100% detection rate with 10% false positive rate (2% cumulative)

Output of Face Detector on Test Images

Solving other “Face” Tasks Profile Detection Facial Feature Localization Demographic Analysis