SANRAL to add machine learning to road safety arsenal


SANRAL’s Technical Innovation Hub (TIH) is currently probing the extent to which machine learning can be harnessed in the quest to improve road safety, reduce congestion and inform infrastructure development.

The TIH is at the forefront of harnessing technology to inform, improve and expedite road safety across the South African road network. The Hub draws from extensive research into industry best practices and collaborations with various stakeholders in the road safety arena, both nationally and abroad.

Mechatronic Engineer in the TIH Ruan van Breda explains: “Machine learning can be used to detect and segment objects within a camera frame. Each frame of a video is analysed as a still image. These objects can then be classified based on pre-trained image classifiers. Within the road environment this allows one to detect and classify different types of vehicles, pedestrians, different types of animals, cyclists, etc.”


The possibilities are infinite, based on what training data is available. There is already ample data for the abovementioned classification types. However, Van Breda explains that these genres can be further expanded through the creation of custom data sets and training classifiers, to be able to distinguish, for example, between slow-moving traffic and a road traffic crash.

This can also be used to create new classification classes based on unique experiences, or the requirements of the road authority (e.g. fire or protest detection, foreign objects such as rocks, tyre detection). This information can then be used to activate the appropriate response through the Road Incident Management System (RIMS), remedy the situation and inform road users – in real time.

One can also look at how these different objects interact with one another, for example to detect unusual vehicle behaviour such as a vehicle stopping on the freeway. One is also able to infer information about the interaction between multiple ‘objects’ such as cars and pedestrians.

If a vehicle is detected moving to the side of the road and coming to a standstill, and pedestrians are detected moving towards the vehicle and entering it, this can be classified as an informal pick-up. As more and more data is collected, these trends can aid road authorities with infrastructure planning, such as drop-off/pick-up points, or aid law enforcement to stop illegal pick-ups if this is considered a safety risk.

Technology of this nature also comes with significant risks. However, all efforts are being made to understand how to use it effectively while maintaining strict compliance with legislation regarding the privacy of road users. Some ways to mitigate potential privacy risks are through strict security and access controls. Data can also be anonymous at the point of capture. After all, the intention is not to observe individuals, but to identify trends and incidents to inform appropriate responses and interventions.


While this technology is still in the exploratory phase in SA, it already has tongues wagging in countries like China, where they use machine learning to incorporate facial recognition for law enforcement. They are able to identify the driver of a vehicle and instantly issue fines, if that driver does not have a valid driver’s licence. Fines can also be issued automatically for individuals who jaywalk or gain access to restricted areas.

As with any technological advances, there are pros and cons. For now in SA we are looking into and learning about the potential of machine learning.