Академический Документы
Профессиональный Документы
Культура Документы
Augusto Morgan
Institute of Computing - University of Campinas
augusto.morgan@students.ic.unicamp.br
June 9, 2014
June 9, 2014
1 / 22
Overview
Object Detection
June 9, 2014
2 / 22
Object Detection
June 9, 2014
3 / 22
Object Detection
June 9, 2014
3 / 22
Sliding Window
June 9, 2014
4 / 22
June 9, 2014
5 / 22
Haar wavelet
function:
1 0 t < 21 ,
(t) = 1 12 < t 1,
0 otherwhise.
Figure: Haar wavelet
June 9, 2014
6 / 22
Haar-like Features
Rectangles representing a score based on positive areas and negative areas.
Three kind of features: 2, 3 and 4 rectangles.
Each feature is calculated by:
X
X
f (i) =
IWhite
IBlack
June 9, 2014
7 / 22
Haar-like Features
Rectangles representing a score based on positive areas and negative areas.
Three kind of features: 2, 3 and 4 rectangles.
Each feature is calculated by:
X
X
f (i) =
IWhite
IBlack
Problem: The number of
Haar-Like Features is too large!
For a 24x24 pixels window there
are more than 160,000 distinct
Haar-Like Features.
June 9, 2014
7 / 22
i(x 0 , y 0 )
x 0 <x
y 0 <y
June 9, 2014
8 / 22
Sum(R) = ii(A)ii(B)ii(D)+ii(C )
Figure: The sum of one
rectangle using the integral
image
June 9, 2014
9 / 22
June 9, 2014
10 / 22
June 9, 2014
10 / 22
Given the features and the set of positive and negative examples, any
classifier can be trained.
There are, however, a huge number of features.
A very small number of features can be combined to create an effective
classifier.
How to find these features?
June 9, 2014
11 / 22
A weak classifier
The weak classifier used in the paper takes as input a sub-window (x) and
consists of a feature (f ), a threshold () and a polarity (p) indicating the
direction of the following inequality:
1 pf (x) < p,
h(x, f , , p) =
0 otherwhise.
The weak classifier used can be viewed as a single node decision tree, a
stump.
For each feature, an optimal threshold is associated, which is used to
minimize the number of missclassifications.
June 9, 2014
12 / 22
AdaBoost
June 9, 2014
13 / 22
AdaBoost
June 9, 2014
13 / 22
AdaBoost
June 9, 2014
14 / 22
AdaBoost
June 9, 2014
14 / 22
Training
June 9, 2014
15 / 22
Training
June 9, 2014
15 / 22
Training
June 9, 2014
15 / 22
Training
June 9, 2014
15 / 22
Considerations
Huge set of possible features and related thresholds (NK , where N is the
number of examples and K the number of features).
For 20000 samples and 160000 features (the number for the 24x24 pixels
subwindow) contains 3.2 billion distincts classifiers!
If using M rounds, AdaBoost takes O(MKN).
June 9, 2014
16 / 22
Considerations
Huge set of possible features and related thresholds (NK , where N is the
number of examples and K the number of features).
For 20000 samples and 160000 features (the number for the 24x24 pixels
subwindow) contains 3.2 billion distincts classifiers!
If using M rounds, AdaBoost takes O(MKN).
For each subwindow, all the classifiers are used and combined to get the
final answer.
What if we could eliminate subwindows earlier?
June 9, 2014
16 / 22
June 9, 2014
17 / 22
June 9, 2014
17 / 22
June 9, 2014
18 / 22
June 9, 2014
18 / 22
June 9, 2014
19 / 22
June 9, 2014
20 / 22
June 9, 2014
21 / 22
References
Viola, P. and Jones. M., CVPR 2001, Rapid Object Detection using a
Boosted Cascade of Simple Features
Viola, P. and Jones. M., International Journal of Computer Vision
v. 57 2004, Robust Real-Time Face Detection.
Lienhart, R. and Maydt, J., IEEE ICIP 2002, An Extended Set of
Haar-like Features for Rapid Object Detection
Weisstein, Eric W. Haar Function. From MathWorldA Wolfram
Web Resource. http://mathworld.wolfram.com/HaarFunction.html
June 9, 2014
22 / 22