Masters Project: Determining the Speed of Vehicles from Video Images using Machine Learning

My masters project focused on the use of road-side video cameras as a non-intrusive alternative to current intelligent transportation systems. I investigated the use of video to determine the speed of vehicles traveling on major roads. The key tasks were object detection, tracking and camera calibration. I used a neural network, YOLOv3, for the purpose of object detection with an accuracy of 98% mAP. I also used a simple Kalman filter to track the vehicles across the video frame, which worked well but struggled with longer periods of occlusion. I calibrated the camera using road markings in place of a reference object. The calibration method proved to be accurate; however, a constant error was introduced if the road markings were not consistent with the government specifications. The average vehicle speeds calculated were within the expected range and the model was able to run at real-time speeds. An example of a result achieved can be seen in Figure 1 below. I received a 1st class for the project. Thank you to Q-Free for supporting the project by supplying the labelled training data and providing help along the way.

The project led to the publication of the paper Camera-Based System for the Automatic Detection of Vehicle Axle Count and Speed Using Convolutional Neural Networks in the International Journal of Intelligent Transportation Systems Research 20(2022).

For more details about the project you can read my final report. If you wish to implement, repeat or expand upon the project, the code and instructions can be found on my GitHub.

Two successive captures from the video output:
Output frame 50
a) Frame 50
Output frame 77
b) Frame 77, approximately one second later