View
216
Download
0
Tags:
Embed Size (px)
Citation preview
Crowd Size Estimation
Luis Huang12-3-08
ECE 172A - UCSD
Background and Motivation
September 27, 2007, 9:19 pm Obama Rallies Huge Crowd in New YorkBy Jeff Zeleny Senator Barack Obama rallied New Yorkers in Washington Square Park in Manhattan Thursday night. (Photo: Richard Perry/The New York Times) When Senator Barack Obama ran through the arch and strode onto stage tonight in Washington Square Park, he paused and sized up the crowd standing before him, many of whom were waving… In February, Mr. Obama drew 20,000 people to the Town Lake in Austin, Texas. In March, 10,000 people crowded into a plaza outside City Hall in Oakland, Calif. In April, he attracted 20,000 at an outdoor rally at Yellow Jacket Park in Atlanta.
Crowd Estimation Significance
• Common Convention– Literally counting out individuals in sequenced
snapshots (extrapolated)• Aerial photographs often employed
– Ticket sales/count with turnstiles• Controversy
– Political rallies/protests crowd estimates carries political significance
– Highly inaccurate and highly subjective– Personal bias is a big problem (candidates,’
political protests, etc.)
Ways to Approach this Problem• Two Schools of Thought (Gray, UCSC)• Detection Based Estimation
– Run a detector, count, or cluster the output• Pros: Relatively good accuracy for small values• Cons: Requires really good algorithm
• Mapping Based Estimation– Extract features and map them to a value
• Pros: Easier to scale for large crowds• Cons: Hard to make scene invariant
• Mapping Based Technique Extremely Difficult (see next)
• Hybrid of both
Mapping Based MethodMapping Based Method– SIFT (Scale-Invariant Feature
Transform)• Algorithm in Computer Vision used to
detect and describe features in images (Lowe, 2004)
• Four Steps: Scale-space extrema detection, keypoint localization, orientation assignment, and keypoint descriptor
• Difference of Gaussian• Wha?
Initial Failure With Mapping Based• Used sample SIFT code from
Dr. Vedaldi (UCLA) with scene of people walking in Venice (small number)
• +1000 interest points detected
• Next step? Found paper only for Crowd Density using complex algorithm (MFD). Useless for counting
• No paper has found a way to differentiate crowd interest points from scene interest points as of yet
• Conclusion: Waste of almost two weeks
Project Procedure
• Used Skin-tone Thresholding for Binary Image
• Morphological Image Processing (Opening and Closing)
• Face Detection using Convolution Mask
• Blob Count using BWLABEL Command
Binary Image Of Face Detect
BWLABEL
• Used as a blob counter• Takes only binary
images– Produces a label matrix L– Groups and numbers
connecting pixels
• Then blobs are numbers and numbers are outputted onto image
Results
MATLAB Examples
Discussion Of Results• My scientific highly
accurate guesstimate: ≈120 clear faces– Program: 260 (186)
• Estimate: ≈90– Program: 120
• Estimate: ≈ ∞– Program: really poor
270
1
2
3
45
67
89
1011
1213
1415
16
171819
20
2122
23
24
25
26
27
2829
30
3132
3334
3536
37
38
39
40
41
42
43
44
45
46
4748
49
50
51
52
53
54
55
5657
58
59
6061
6263
64
65
66
67
68
69
70
7172
73
74
75
76
77
78
79
80
81
82
83
84
85
8687
88
89
90
91
92
93
94
95
96
97
9899
100
101
102
103104
105
106
107
108
109
110
111
112113
114
115
116
117118
119
120
121
122123
124125
126
127
128
129
130
131
132
133134
135136137
138
139
140141142
143
144
145
146
147
148
149
150
151152153154
155156
157158
159160
161
162
163
164
165
166
167
168169
170
171
172
173174
175176
177
178
179
180
181182
183184
185
186
187
188
189
190
191
192
193
194
195196197
198
199
200
201
202
203
204
205206
207
208
209
210
211
212213
214
215
216
217
218
219
220
221222
223224
225
226227
228229
230231
232233
234235
236237
238
239240
241
242
243
244
245
246
247248
249
250
251
252
253
254
255
256
257258259
260
261262
263
264
265
266
267
268
269
270
1
2
3
4
5
6
7
89
1011
12
13
14 1516
17
18
19
20
21
22
23
2425
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
4243
44
45
46
47
4849
50
51
5253
54
55
56
57
58
59
60
61
62
63
6465
66
67
68
69
707172
73
74
75
76
77
7879
80
81
82
83
84
85
86
87
88
89
90
9192
9394
95
96
97
98
99
100101
102
103
104105
106107
108
109
110
111
112
113
114115
116
117
118
119
120
1
2
3
45
6
7
8
9
10
11
1213
14
15
16
17
18
19
20
2122
23
24
25
26
27
28
29
30
3132
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
4950
51
52
53
54
55
56
57
58
59
60
6162
6364
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
8182
83
84
85
86
87
88
8990919293
94
9596
97
98
99100
101
102
103
104
105
106
107
108109
110111
112
113
114
115
116
117
118119
120
121122123
124
125
126
127
128129
130
131
132
133134
135136
137138
139
140
141
142
143
144
145
146
147
148
149150
151
152
153
154
155
156
157
158
159
160
161162
163
164
165
166
167
168
169
170
171
172
173
174175176
177178
179
180181
182
183
184
185
186
What About McCain Crowds?
For Fairness…
McCain Crowd Estimation
Unexpected MATLAB expression.
1 2
3
4
Difficulties
• Mapping Based Method– SIFT (Scale-Invariant Feature Transform)
• Unworkable (as discussed earlier)
• Thresholding Is Key– Faces need to be shown in photographs clearly, with
correct lighting, enough detail, etc.• Blob Count Provides Rough Estimate
– Accuracy very hard to attain• Any obstruction reduces accuracy
– Signs, other people, other body parts, etc.
Limitations
• Program needs to be manually adjusted for individual photographs, depending on thresholding, opening/closing operation, size of crowd, size of human features, etc.
• Detail– Accuracy limited due to obstructions, facial details
• Photographs not accurate enough to capture entire crowds• Does not solve bias problem. Program can be edited to either
produce larger or smaller crowds.
Future Works and Improvements
• Automated Adjustments– Thresholds that can adjust to lighting conditions
(too bright, too dark, etc.)– Automated Morphological Operations
• Sequential Snapshots (Panoramic views or aerial photographs)– Piecing together dynamic images
• Video (Most likely will involve SIFT descriptions and frames)– Continuous counter taken at given intervals
Questions?