Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
OpenTalks.AI - Дмитрий Пагин, Fast cars detection and traffic estimation
OpenTalks.AI
February 21, 2020
Science
0
1.6k
OpenTalks.AI - Дмитрий Пагин, Fast cars detection and traffic estimation
OpenTalks.AI
February 21, 2020
Tweet
Share
More Decks by OpenTalks.AI
See All by OpenTalks.AI
opentalks
0
1.7k
opentalks
0
1.7k
opentalks
0
1.7k
opentalks
0
1.7k
opentalks
0
1.7k
opentalks
0
1.7k
opentalks
0
1.6k
opentalks
0
1.6k
opentalks
0
1.7k
Other Decks in Science
See All in Science
nkimoto
0
330
smjyc
0
130
shuntaros
0
470
shuntaros
0
250
daigo0927
1
490
pacmannai
1
150
housecat442
0
310
dwhgg
0
450
lcolladotor
1
610
sansandsoc
1
340
hachama
0
160
kamakiri1225
0
710
Featured
See All Featured
yeseniaperezcruz
302
31k
cromwellryan
101
5.9k
jnunemaker
PRO
40
4.6k
hannesfritz
27
930
kneath
219
15k
jrom
114
7.1k
sstephenson
144
12k
jonrohan
1021
380k
phodgson
87
3.9k
lara
172
9.5k
philnash
8
500
maltzj
500
36k
Transcript
Fast cars detection and traffic estimation Dmitriy Pagin, ML and
CV developer
Task Road traffic analysis in Russia is manual. It takes
more than 8 hours for 15 minutes video today
Task • detect cars
Task • detect cars • track cars
Baseline - people tracking
Problems Cars: - faster (2 metres per frame!) - smaller
(10 px in minimal dimension) + more predictable movement
YOLOv2 - blinking - problems on small cars - problems
on edges
YOLOv2 1 fps
YOLOv3 - bigger + accurate on small + fullHD frame
+ robust
YOLOv3 7 fps
> 70k cars on 4k images Dataset
better than 1024x1024x1 Learning and Fine-tuning - 608x608 px -
batchSize = 3 - custom augmenters
None
Learning and Fine-tuning - 608x608 px - batchSize = 3
- custom augmenters - Radam optimizer (instead warmup + reduce LR) - Hard negative mining for trucks
Learning and Fine-tuning - 608x608 px - batchSize = 3
- custom augmenters - Radam optimizer (instead warmup + reduce LR) - Hard negative mining for trucks mAP75 = 0.96
Baseline Inference Speed 7 fps
Weights Pruning
Weights Pruning -25% convs = size: 240 mb mAp: 0.9656
inf: 150 ms size: 155 mb mAp: 0.9622 inf: 100 ms 10 fps
OpticalFlow step or classical cv is alive ! - find
good features to track - calculate sparse optical flow
OpticalFlow step 19 fps Calculation doesnt work for 3 consistent
frames
Speed extrapolation step - estimate speed as pixels/frame - extrapolate
next position 28 fps
Final pipeline 1 2 3 4 5 6 Update trajectories
4 5 6 step 1 step 2 Speed Extrapolation OpticalFlow YOLOv3 Detection Engine
1 fps -> 28 fps on FULLHD
Tracking - IoU - Color descriptor (it’s enough!)
Bridges! - Allowed zone by motion vector - Size overlap
- Color descriptor
Bridges! - Allowed zone by motion vector - Size overlap
- Color descriptor
Thanks! Questions? dm.pagin@gmail.com +7 952 335 65 70
Appendix. Examples
Appendix. Examples
Appendix. Examples
Appendix. Yolov3
Weights Pruning Шаг mAP75 Число параметров, млн Размер сети, мб
От изначальной, % Время прогона, мс Условие обрезания 0 0.965 60 241 100 150 - 1 0.962 55 218 91 140 5% от всех 2 0.962 50 197 83 132 5% от всех 3 0.963 39 155 64 112 15% для слоев с 400+ сверток 4 0.955 31 124 51 100 10% для слоев с 100+ сверток
Appendix. Radam
Pruning convs
Pruning convs. Good choice 2000
Pruning convs. Bad choice 25
Pruning flat