Prevention, better than curing, thanks to technology

It’s better to prevent an accident than to cure it. Logical, right? Neverteless, there are dozens of traffic victims in our country every day . Whether slightly, severely or fatally injured, every accident is one too many. Accident prevention is key. This is one of the authorities of the Flemish Government’s Department of Mobility and Public Works (MOW). Recently, it introduced a new governing approach, called the Mobility’s Innovative Approach (MIA). The focus of this approach is on optimizing and streamlining communication channels between the different stakeholders and experimenting with proactive detection of unsafe traffic situations, aiming at preventing accidents. Vectr.Consulting particularly helps with the smart image recognition.

Technology is watching over humans

Since March 2021, the department MOW has launched multiple pilot projects in Flanders whereby fixed and drone cameras detect unsafe traffic situations. In West Flanders, there are projects set up in Kortrijk, Roeselare and Zonnebeke. Here, the MOW’s data lab investigates how unsafe traffic situations involving cyclists are detected before an accident would actually occur. Drones and cameras register traffic flows (mainly at busy intersections) and detect problems with lighting, inappropriate speeds, disregarded right-of-way rules, crossability or accessibility of public spaces. For example, they can detect how a cyclist on a roundabout in Roeselare just barely avoided being hit. This does not necessarily mean that expensive infrastructural interventions are required. Sometimes the distracted behavior of the traffic user is the simple cause, which can be easily enforced.

Over a period of 4 months, we received thousands of images for analysis, which we then used to scanned for pedestrians, cyclists, buses and cars and more specifically their respective movements. To make effective evaluations of a safer solution in traffic, we initially measured calibration points on the road, to transform the pixel coordinates to geographical coordinates. With this transformation, we project the trajectory of each road user on a map.

We then analyze the observed projected trajectories. The analyses is varied, ranging from measuring traffic violations to the frequency of violations over time. More importantly, however, is to research the proactive detection of dangerous traffic intersections. Detecting near misses identifies the possibility of a dangerous intersection. Although the definition of a near miss is difficult to define, we are able to identify many conflict situations this way.

Through a secure connection, the images are transmitted to an Azure Storage Container, a repository that allows users to store and manage large amounts of unstructured data in the cloud. The application itself is written in Python and relies on a dataset of labeled data. Since we did not have access to such a labeled dataset ourselves, we used a pre-trained YOLOv5 model in Pytorch, an object detection model trained on similar camera images in Montreal (Canada).  To track the many moving objects in a video recording, we rely on BYTEtrack, a state-of-the-art Multi Object Tracking algorithm that determines the identity, location and trajectory of each moving object, even in cases where the object is partially or completely covered (occluded). Processing of all camera images is done on dockers in Azure Cloud.

The trajectories are stored in Citus, a distributed PostgreSQL database, and all the infrastructure is managed with Terraform, an infrastucture-as-code tool that allows us to manage the data infrastructure.

The Mobility and Public Works Department (MOW) of the Flemish government makes Flanders move: by road, by water and by air. Their experts on the move work every day for safe, smart and sustainable mobility and for today’s road and (air)port infrastructure. The MOW Department supports the Minister’s policy in terms of content, both for mobility and traffic safety and for investment, management and operation of the transport and port infrastructure. The MOW Department also performs administrative and technical support tasks including expertise and advice on concrete and steel structures, ground tests, dynamic traffic management, hydrological research, and so on. Finally, the Department also guarantees maritime access to the Flemish seaports.

More info on

Working together for safer traffic

As experts in data intelligence, we are very proud to help MOW in the field of machine learning with object detection and ML ops. The project came about thanks to Cronos Public Services, the sub-domain of the Cronos Group which pools and facilitates the expertise of its sub-companies for public services, and which has long maintained a framework contract with the department.

The project has since been transferred from the data lab of the Department of MOW to the Agency for Roads and Traffic (AWV), which in turn will continue to use the cameras in analyzing high-risk locations all over Flanders. The cameras will thus become a very important tool in the fight against traffic accidents. As Vectr.Consulting, we hope to do our bit to make our environment safer by deploying the right technology in the right place.

In addition to detecting unsafe traffic situations, we also assist MOW with other ML projects. Be sure to check out our case studies on detecting HARO block movements and water bodies.