Waridh

YOLOv5 Traffic Intersection Analysis

September 2022

The goal of this project was to make a program that could count and analyse the objects passing through an intersection. We had gone through many ideas before settling with using yolov5 object detection and strongSORT object tracking to keep track of objects. Using this implementation, we were able to keep track of the labels and coordinates of each object on the screen.

To speed up the process of object detection and tracking, we ran yolov5 on the Compute Canada high performance computer array with reduced fps and detection model. This allowed us the cut the running time from five to seven hours to only around 40 minute for every 30 minutes of input data.

To analyse these intersections, we needed to process the outputs from the yolov5 program. Using multiprocessing, we were able to determine the cars Time to Collision, Post Encroachment Time, and Time Difference to the Point of Intersection using different dynamic programming and logical methods.