20120428-the Saturday Seminar-AdaBoost-Multiple HOG

advertisement
FAST HUMAN DETECTING USING A CASCADE OF
HISTOGRAM OF ORIENTED GRADIENTS
Qiang Zhu, Shai Avidan, Mei-Chen Yeh, and Kwang- Ting Cheng
In: Computer vision and Pattern Recognition-CVPR’2006
Presenter: Hoang, Van Dung
dungvanhoang@islab.ulsan.ac.kr
April 28, 2012
Intelligent Systems Lab.
Outline
 Histogram of Oriented Gradients (HOG)
 Method
 Variable size block
 “Integral image” method
 Training classification
 Experiments
 Conclusions.
2
Intelligent Systems Lab.
Introduction
 Paper (*) showed that the system is powerful enough to
classify humans by use HOG feature. However, it has high
computational cost.
 This paper try to speed up above method by using
AdaBoost, and HOG feature. However, if using original
HOG (fix size blocks) is not informative enough to classify
at high accuracy.
=> This paper proposed HOG computing with variable
size block.
*Dalal, N and Triggs, B.. Histograms of Oriented Gradients for Human Detection. In Proceedings of the IEEE Conference on
Computer Vision and Pattern Recognition, Vol. II, pp. 886-893 (2005).
3
Intelligent Systems Lab.
Histogram of Oriented Gradients
Gradient
computation
Orientation
binning
Descriptor
blocks
Block
normalization
 Gradient computation
 Gx=I[-1 0 1]
 Gy=I[-1 0 1]T
Gy
61
117
107
176
193
193
 Magnitude
G 
Gx  Gy
2
2
  ac tan(
Gy
Gx
64
111
133
254
254
234
146
211
214
168
255
255
74
140
254
254
231
195
69
111
148
254
187
126
)
3
-6
26
78
61
41
85
94
107
-8
62
62
10
29
121
0
-23
-39
4
-77
-100
-66
86
-68
-129
-2
-48
-96
-64
-30
9
72
92
158
190
201
204

Gx
Gy
Gx
 Angle
G
3
-19
10
-64
14
78
56
46
59
86
17
0
47
69
143
121
-20
-20
65
68
-43
41
87
0
66
180
114
-23
-59
-36
42
79
143
39
-128
-61
20
86
98
43
14
3
Intelligent Systems Lab.
Computing HOG within a Region
 Computing histogram of gradient based on orientation
(Using unsigned of orientation (0-1800) and 9 bins)
Magnitude
56
46
64
116
63
41
97
117
179
121
65
65
66
74
128
41
90
39
Angle
101
206
132
89
90
134
42
92
172
75
131
62
20
88
99
77
20
78
87
97
66
48
16
1
5
29
36
53
94
18
18
81
67
20
90
105
180
139
119
120
15
139
164
93
121
124
149
103
82
81
102
84
146
45
2
Intelligent Systems Lab.
Computed HOG
 Calculation histogram of orientation gradient within cells, blocks.
 Accumulation features to construct HOG feature vector.
i

i
F 
f
1
f  h1,1 , ..., h1,9 , ....., ..., h 4 ,1 , ..., h 4 ,9
i
2
, f , ...., f
i
n
i


F is the vector feature of image, f i is the vector feature of ith-block
and normalizing.
6
Intelligent Systems Lab.
Variable-size Blocks
 Different with original HOG feature, this paper don’t fix
size of block. The block size rangers from 12x12 to
128x64 with restrictive ratio between block width and
height is (1:1), (1:2), and (2:1).
 Original HOG: 105 block (3,780 features).
 This paper: 5,031 block (181,116 features).
Intelligent Systems Lab.
Discretize Gradients into Bins
Discretization each pixel’s gradient
magnitude into 9 bins based on their
orientation.
Computing
gradient
8
Intelligent Systems Lab.
“Integral Image” Method
 Using “Integral image” method for rapid compute HOG
There are two steps to calculate sum of gradients with in a region .
 Creation the SAT table.
SA T ( x , y ) 
x
y
i 1
j 1
  g (i , j )
 SA T ( x  1, y )  SA T ( x , y  1)  SA T ( x  1, y  1)  g ( x , y )
SAT(x,y)
 Calculation a histogram bin of gradient within a region (x,y,w,h) based on SAT
S(x,y,w,h)= SAT(x+w-1,y+h-1)-SAT(x-1,y+h-1)
SAT(x+w-1,y-1)
SAT(x-1,y-1)
SAT(x+w-1,y-1)+SAT(x-1,y-1)
SAT(x-1,y+h-1)
SAT(x+w-1,y+h-1)
=> HOG within cell(x,y,w,h), we compute S(x,y,w,y) of 9 bin layers, respectively.
Intelligent Systems Lab.
Training the Cascade
Chose one block that is best
classification
10
Intelligent Systems Lab.
Training the Cascade
Each a cascade consists several weak classifiers
Each weak classifier used one block.
The number weak classifiers of each cascade depend on the
training process
After “loop fi>fmax”, if Fi> Ftarget is not satisfied, resampling by
put false positive sample (from evaluate test) into negative
samples for next iteration.
11
Intelligent Systems Lab.
Experiments
12
Intelligent Systems Lab.
Experiments
13
Intelligent Systems Lab.
Experiments
14
Intelligent Systems Lab.
Experiments
15
Intelligent Systems Lab.
Experiments
Figure 6. Comparing the Dalal & Triggs algorithm, a Rectangular filter
detector and our cascade of the HoG method. Our method (using
either L1 or L2 norms) is comparable to the Dalal & Triggs method,
especially when the FPPW goes down.
16
Intelligent Systems Lab.
Experiments
17
Intelligent Systems Lab.
Conclusions
This system used AdaBoost that is up to 70X faster than
previous method (Dalal&Triggs).
Using multiple sizes block in order to accumulate more
features that rich for training and classification.
Using “integral image” method that rapid compute features.
18
Intelligent Systems Lab.
THANK YOU FOR LISTENING!
Intelligent Systems Lab.






x1= (x11
x2= (x21
x3= (x31
x4= (x41
…………..
xn= (xn1
x12
x22
x32
x42
x13
x23
x33
x43
….
….
….
….
x1m)
x2m)
x3m)
x4m)
xn2
xn3
….
xnm)
m3
……
mm)
mean
 m= (m1
m2
20
Intelligent Systems Lab.
450
400
350
300
Using all features that
accumulated from sample image.
250
200
150
100
50
0
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
500
450
400
Using only the best features that
were selected by training.
350
300
250
200
150
100
50
0
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
21
1
Intelligent Systems Lab.
Download