Skip to main content

CollisionDetection

Detects collisions and near-miss scenarios between vehicles.

This module provides an pipeline element to return two boolean flags per detection for the same, along with an aggregated collision and near miss count.

Notes:

  • This algorithm takes in detections of the following object classes - 'person', 'car' and 'bicycle'
  • The algorithm only detects the occurrence of collision between vehicles, it does not perform any prediction.
  • This algorithm uses change in acceleration of vehicles as a primary threshold for collision, hence it will not work in scenarios where collisions occur without acceleration.
  • A near-miss indicates that the vehicle's change in acceleration is above a certain threshold. This condition is checked for all vehicles, independent of other vehicles.

Examples:

REST API:

WIP

Configuration File:

short-from : collision-detection

source:
- address: videos/collision_demo.mp4
- type: file
pipeline:
- person-vehicle-bike-detection-crossroad-0078:a:0.6:0.4
- collision-detection

CollisionDetection Objects

class CollisionDetection(Element)

Detects collisions and near-miss scenarios between vehicles.

Attributes:

  • name str - The name of the element.

Examples:

ele = CollisionDetection()

process

 | def process(meta)

Process the bounding boxes.

This is the main function for this element. It returns two boolean flags per detection for the same, along with an aggregated collision and near miss count.

Arguments:

  • meta dict - The metadata to process.

Returns:

  • meta dict - The processed metadata.

Examples:

ele = CollisionDetection()
meta = ele.process(meta)