OpenTalks.AI - Дмитрий Пагин, Fast cars detection and traffic estimation​

Ad8ae7af280edaecb09bd73a551b5e5f?s=47 OpenTalks.AI
February 21, 2020

OpenTalks.AI - Дмитрий Пагин, Fast cars detection and traffic estimation​

Ad8ae7af280edaecb09bd73a551b5e5f?s=128

OpenTalks.AI

February 21, 2020
Tweet

Transcript

  1. Fast cars detection and traffic estimation Dmitriy Pagin, ML and

    CV developer
  2. Task Road traffic analysis in Russia is manual. It takes

    more than 8 hours for 15 minutes video today
  3. Task • detect cars

  4. Task • detect cars • track cars

  5. Baseline - people tracking

  6. Problems Cars: - faster (2 metres per frame!) - smaller

    (10 px in minimal dimension) + more predictable movement
  7. YOLOv2 - blinking - problems on small cars - problems

    on edges
  8. YOLOv2 1 fps

  9. YOLOv3 - bigger + accurate on small + fullHD frame

    + robust
  10. YOLOv3 7 fps

  11. > 70k cars on 4k images Dataset

  12. better than 1024x1024x1 Learning and Fine-tuning - 608x608 px -

    batchSize = 3 - custom augmenters
  13. None
  14. Learning and Fine-tuning - 608x608 px - batchSize = 3

    - custom augmenters - Radam optimizer (instead warmup + reduce LR) - Hard negative mining for trucks
  15. Learning and Fine-tuning - 608x608 px - batchSize = 3

    - custom augmenters - Radam optimizer (instead warmup + reduce LR) - Hard negative mining for trucks mAP75 = 0.96
  16. Baseline Inference Speed 7 fps

  17. Weights Pruning

  18. Weights Pruning -25% convs = size: 240 mb mAp: 0.9656

    inf: 150 ms size: 155 mb mAp: 0.9622 inf: 100 ms 10 fps
  19. OpticalFlow step or classical cv is alive ! - find

    good features to track - calculate sparse optical flow
  20. OpticalFlow step 19 fps Calculation doesnt work for 3 consistent

    frames
  21. Speed extrapolation step - estimate speed as pixels/frame - extrapolate

    next position 28 fps
  22. Final pipeline 1 2 3 4 5 6 Update trajectories

    4 5 6 step 1 step 2 Speed Extrapolation OpticalFlow YOLOv3 Detection Engine
  23. 1 fps -> 28 fps on FULLHD

  24. Tracking - IoU - Color descriptor (it’s enough!)

  25. Bridges! - Allowed zone by motion vector - Size overlap

    - Color descriptor
  26. Bridges! - Allowed zone by motion vector - Size overlap

    - Color descriptor
  27. Thanks! Questions? dm.pagin@gmail.com +7 952 335 65 70

  28. Appendix. Examples

  29. Appendix. Examples

  30. Appendix. Examples

  31. Appendix. Yolov3

  32. 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+ сверток
  33. Appendix. Radam

  34. Pruning convs

  35. Pruning convs. Good choice 2000

  36. Pruning convs. Bad choice 25

  37. Pruning flat