Road Barrier Detection
published October 20, 2020
Note: This PoC was completed in conjunction with Microsoft Data Science
Goal
To inform strategic barrier placement to hopefully decrease fatalities as well as to facilitate strategic planning for maintenance and upgrades of the road barrier system.
Preamble
The aim of the project was to detect wire rope and solid metal barriers placed within the state road network. No record of where these barriers have been built had been maintained to date, with construction occurring reflexively after major traffic accidents. The exact locations, barrier type and side of the road were required by the project, so as to gain a comprehensive understanding of where these assets have been deployed. The immediate goal is to improve budgeting and possibly to save money by being more strategic. Future work will use this information in combination with safety data to assess how effective the barriers have been in reducing injuries and mortality.
Data
Every two years, jpeg images of all sections of the road network in the state are recorded by a contractor. These 1920 x 1080, 96 dpi resolution images each contain a header with the exact latitude and longitude where it was taken, the name of the road, the route number and chainage (distance from the beginning of the road). A subset of over 3,500 of these images were used to train the models.
Method
These images were loaded into VGG Image Annotator, where labels were manually added to sections that contained each of the two barrier types. Three customvision.ai models were then coded to parse these images sequentially:
· Barrier detection model
· Barrier-type classification model
· Side-of-the-road classification model
The Barrier detection model returned a binary yes/no indicator of whether the image contained one of the barriers or not.
The images where a positive indication that they contained a barrier were then funnelled through a Barrier-type classification model to return the type of barriers contained.
This dual approach to barrier detection was discovered through trial and error, where detection or classification alone where not as accurate.
A third model classified the side of the road that the detected barrier was situated.
Finally, the Azure Read API was used to extract the textual information from the image banner.
Results
The best barrier classifier model results were found when the categories included an ’Other Barrier’ category, and when the numbers of images presented to the model of each barrier type were balanced.
Both Accuracy and Recall were high for both barrier types.
In contrast to the barrier classification model, the barrier detection model performed best without an ‘Other’ category.
For the side-of-the-road classifier, a similarly high accuracy and recall was obtained.
See below for an integrated example.
All the model data was then stored in an Azure SQL Server database.
Finally, sitting on top of all this primary and generated data, a PowerBI dashboard was developed to facilitate exploration of the distribution of road-side barriers throughout the road network.