1 of 28

Traffic Danger Recognition�with Surveillance Cameras �Without Training Data

Lijun Yu

lijun@cmu.edu

11/13/2019

2 of 28

Content

Introduction

Architecture

Experiments

Extensions

3 of 28

Background

  • Traffic danger
  • Surveillance camera
  • No training data

4 of 28

Goal

  • Crash detection & proactive safety check
    • Send first aid ASAP and potentially save lives

  • Predictive danger recognition
    • Other traffic analysis
      • Pedestrians, bicycles, vehicles
    • Provide insights about high-risk areas

5 of 28

Architecture

  • Detect and track vehicles

Object Detection �& Tracking

Camera Calibration �& 3D Projection

Trajectory Prediction

Danger Recognition

  • Collision detection based on �kinematics of rigid body
  • No need for training data of crashes
  • Estimate and predict location and speed
  • Detect collision beforehand
  • Get 3D bounding boxes
  • Project vehicles from image to ground

6 of 28

Object Detection and Tracking

  • Object detection
    • Output: Vehicle type, score, �bounding box, mask
    • Model: Mask-RCNN trained on COCO
    • Object types: car, bus, truck
  • Object filters
    • Road area and vehicle size
    • Complete visibility
  • Tracking
    • Output: Vehicle ID
    • Algorithm: Deep-SORT

Detection result

Filter result

7 of 28

Camera Calibration

  • Camera model*
    • Vanishing points: directions of X Y Z on image
  • Calibrated at installation
  • Manual labeling on image
    • 2 groups of parallel lines
    • Intersection of each group: vanishing points
  • Automatically on video
    • Track the traffic flow for a while
    • Vehicle moving direction as VP1
    • Vehicle contours for VP2

*Sochor, Jakub, et al. "Comprehensive data set for automatic single camera visual speed measurement." IEEE Transactions on Intelligent Transportation Systems 20.5 (2018): 1633-1643.

8 of 28

3D Projection

  • Contour from object mask
  • Tangent lines from vanishing points

  • Derive intersections and lines
  • Handles different viewing angles

9 of 28

Trajectory Prediction

  • Project bottoms of 3D bounding boxes to road plane
    • Center location
    • Speed (smoothed by moving average)
  • Scale factor: to real world values of distance
  • Assumptions
    • Vehicle shapes do not change
    • Vehicle location follows a normal distribution
  • Linear prediction (currently):
    • fixed acceleration and location deviation
    • Calculate speed and coordinates according to kinematics

10 of 28

Danger Recognition

  • Distance between vehicles
  • Predicted location of a vehicle
    • Calculated from shape and distribution of center
  • Danger heatmap
    • Aggregate predicted locations of all vehicles
    • Probability of coexistence in the same location

11 of 28

Experiments

12 of 28

BrnoCompSpeed Dataset

  •  

*https://medusa.fit.vutbr.cz/traffic/research-topics/traffic-camera-calibration/brnocompspeed/

13 of 28

Evaluations on BrnoCompSpeed

  • Detection & tracking recall: 94.0%
    • Match with Lidar ground truth at temporal IoU > 0.5
  • Distance error in projection
    • Compare with distance ground truth in 2 directions
    • 1.80% along the road, 2.06% vertical to the road
  • Speed estimation error: 2.77km/h, 3.68%
    • Compare with average speed from Lidar, ~75km/h
  • Prediction error at 0.12s
    • Location: 0.24m
    • Speed: 2.53km/h

14 of 28

Proactive�Safety�Check�Demo

15 of 28

CADP Dataset

  • A Novel Dataset for CCTV Traffic �Camera based Accident Analysis
    • Collected by our group
  • Accident video clips collected from Youtube
    • Surveillance cameras / dash cameras / phone cameras
    • Various resolution and quality
    • Total length: 5.2 hours
    • Average length of video: 366 frames
  • Spatial-temporal annotation of accidents
  • No calibration metadata, �not long enough for automatic calibration

16 of 28

17 of 28

MEVA Dataset

  •  

18 of 28

Vehicle-person�Interaction�Demo

Spacing between vehicles �and pedestrians

False alarm of crash �at interactions

19 of 28

Summary

  • Reliable detection and tracking of vehicles
  • Precise measuring of location, distance, �and speed
  • Robust on arbitrary calibrated surveillance�camera

  • Crash detection without training data
  • Proactive safety checks on normal traffic �flow

20 of 28

Real World Demands 🡪 Extensions

Complicated scene

    • Lots of vehicles and pedestrians moving in all directions and turning

Detailed events

    • Starting, turning, entering, exiting, etc.

Realtime processing

    • 1080p 30fps video with limited hardware

Unknown cameras

    • Uncalibrated cameras, moving cameras

21 of 28

Activity Detection

Object Detection �& Tracking

3D Projection

Trajectory Prediction

Danger Recognition

Activity Proposal

Detect activities based on kinematics

Upgraded

22 of 28

Upgraded 3D Projection

  • Accurate calibration at installation
  • Dynamic coordinate system (Not limited to straight road)
    • Object moving direction estimated by 2D trajectory
  • Reliable ground trajectory�of every vehicle and person

23 of 28

Activity Proposal

  • Trigger-driven proposal
  • Output: Vehicle activity
    • Currently supported event types: �left/right/U-turn, start/stop
  • Observed state parameters
    • Ground speed
      • 2D speed from Kalman filter
      • 3D projection
      • Polar coordinates: value + angle
    • Slope of speed value/angle (acceleration)
      • Local linear regression
      • Trigger and border of activities

Start of a

turning activity

End of a

stop activity

24 of 28

Realtime Pipeline

  • Stream Execution
  • Frame-level parallelism
  • Out-of-order detection
    • Bottleneck: Mask-RCNN detector
    • Reorder results from multiple detectors
  • Throughput: 18fps @ 1920 * 1080
    • With 4 2080Ti GPUs
    • Usually works at 15fps
  • Latency: 0.2s

Loader

 

Reorder buffer

Tracker

3D Projector

Activity�Proposer

1 frame

Activities

1 video

Buffered frames

25 of 28

Performance

Activity

p_miss @ 0.15rfa �(lower is better)

p_miss @ 0.15tfa

(lower is better)

Ours

Previous System

Ours

Previous System

Vehicle_Starting

0.640

1.000

0.600

0.800

Vehicle_Stopping

0.675

1.000

0.675

1.000

Vehicle_Turning_Left

0.867

0.960

0.560

0.640

Vehicle_Turning_Right

0.830

0.981

0.547

0.774

Vehicle_U-Turn

0.679

1.000

0.679

1.000

Mean

0.738

0.988

0.612

0.843

Probability of missing detection at 15% of false alarm

Probability of missing detection at 15% of time-based false alarm

26 of 28

27 of 28

Automatic Calibration & Trajectory Prediction

Object Detection �& Tracking

Camera Calibration �& 3D Projection

Trajectory Prediction

Danger Recognition

One-shot Automatic Calibration

Learning based prediction

Predict horizon line and vanishing point�on single image, �trained with synthetic data

Arbitrary, moving camera

28 of 28

Thank you!