Download - A Brief Introduction on Face Detection
![Page 1: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/1.jpg)
A Brief Introduction on Face Detection
Mei-Chen Yeh04/06/2010
P. Viola and M. J. Jones, Robust Real-Time Face Detection, IJCV 2004.
![Page 2: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/2.jpg)
Object Detection
• Find the location of an object if it appear in an image– Does the object appear?– Where is it?
![Page 3: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/3.jpg)
Applications
![Page 4: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/4.jpg)
Applications
George colony
![Page 5: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/5.jpg)
Challenges 1: view point variation
Michelangelo 1475-1564 Slide (5-10) credit: Fei-Fei Li
![Page 6: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/6.jpg)
Challenges 2: illumination
slide credit: S. Ullman
![Page 7: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/7.jpg)
Challenges 3: occlusion
Magritte, 1957
![Page 8: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/8.jpg)
Challenges 4: scale
![Page 9: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/9.jpg)
Challenges 5: deformation
Xu, Beihong 1943
![Page 10: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/10.jpg)
Challenges 6: background clutter
Klimt, 1913
![Page 11: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/11.jpg)
Detection Framework
• Viola and Jones’ face-detection algorithm – The first object detection framework to provide
competitive object detection rates in real-time– Implemented in OpenCV
• Components– Features
• Haar-features • Integral image (speed up the feature calculation)
– Learning• AdaBoost algorithm
– Cascade method (speed up the detection process)
![Page 12: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/12.jpg)
Haar-features
• The difference between pixels’ sum of the white and black areas
• Based on the face symmetry
![Page 13: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/13.jpg)
Haar-features
• Too many features!– Different locations– Different scales
• Speed-up strategy– Fast calculation of haar-features– Selection of good features
24
24
![Page 14: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/14.jpg)
Integral image
Sum of pixel values in the blue area
Example:
2 1 2 3 4 33 2 1 2 2 34 2 1 1 1 2
Image
2 3 5 8 12 155 8 11 16 22 289 14 18 24 31 39
Integral image
![Page 15: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/15.jpg)
Integral image
1
3
2a b
c d
a = sum(1) b = sum(1+2) c = sum(1+3) d = sum(1+2+3+4)
Sum(4) = ?
4
d + a – b – cFour-point calculation!
A, B: 2 rectangles => C: 3 rectangles => D: 4 rectangles =>
6-point8-point9-point
![Page 16: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/16.jpg)
A 24x24 detection window
Four types of haar features
Type A
The feature pool
![Page 17: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/17.jpg)
Feature selection
• A very small number of features can be combined to from an effective classifier!
• Example: The 1st and 2nd features selected by AdaBoost
![Page 18: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/18.jpg)
Feature selection
• A week classifier h
f1 f2
f1 < θ (a threshold) => Face!
f2 > θ (a threshold) => Not a Face!
h = 1 if fi < θ0 otherwise
![Page 19: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/19.jpg)
Feature selection
• Idea: Combining several weak classifiers to generate a strong classifier
w1 w2
w3 wn
……
w1h1+w2h2+w3h3+…+wnhn>< T
a week classifierh1 = 1 or 0
~performance of the weak classifier on the training set
![Page 20: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/20.jpg)
Feature selection
• Training Dataset– 4916 face images– non-face images cropped from 9500 images
non-face images
positive samples negative samples
![Page 21: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/21.jpg)
AdaBoost
• Each training sample may have different importance!
• Focuses more on previously misclassified samples– Initially, all samples are assigned equal weights– Weights may change at each boosting round
• misclassified samples => increase their weights• correctly classified samples => decrease their weights
![Page 22: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/22.jpg)
BoostingRound 1 + + + -- - - - - -
0.0094 0.0094 0.4623B1
= 1.9459
AdaBoost
decreased decreased increased
fi
Initial weights for each data point
OriginalData + + + -- - - - + +
0.1 0.1 0.1
-∞ ∞
misclassified
![Page 23: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/23.jpg)
AdaBoost
……
![Page 24: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/24.jpg)
Learning the classifier
• Initialize equal weights to training samples• For T rounds
– normalize the weights – select the best weak classifier in terms of the
weighted error– update the weights (set increased weights to
misclassified samples)• Linearly combine these T week classifiers to
form a strong classifier
![Page 25: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/25.jpg)
Detection procedure• Scans the detector at multiple locations and scales
Sub-window
m
m
m
mn
n
n
n
Image
the detection window
![Page 26: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/26.jpg)
Cascade method
• Most are non-face images!• Rejects negative sub-windows in an early stage
Strong Classifier = (W1xL1 + W2xL2) + (…)+ (…+ WnxLn) 1 2 3
>< T
![Page 27: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/27.jpg)
Summary
Feature Extraction
Cascade Detection
Face Detection
BoostingRound 1 + + + -- - - - - -
0.0094 0.0094 0.4623B1
= 1.9459
![Page 28: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/28.jpg)
Resources
• OpenCV Library• C codes
– apps/haartraining– samples/c
• Detectors– data/haarcascades
![Page 29: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/29.jpg)
Assignment #3
• Due 04/20 11:59pm• Build a face detector using the OpenCV
resources• Send to TA
– A picture of yours with detected faces– Subject: Multimedia System Design-Assignment #3-your
student id-your name– File name: Assignment #3-your student id-your name
For Windows users, you might want to try an older version of OpenCV
![Page 30: A Brief Introduction on Face Detection](https://reader034.vdocuments.us/reader034/viewer/2022052603/568137e8550346895d9f98a6/html5/thumbnails/30.jpg)
Reminder
• Brainstorm report (a 2-page formal paper) is due on 4/20.