# Highly Accurate Deep Learning Models for Estimating Traffic Characteristics from Video Data
## 1 Introduction
The video processing algorithm developed in this study is robust and stable for any conditions such as day and night, bright and foggy, sunny and rainy. It does not rely on any facilities such as radar, nor does it require calibration measurements, for example, of speed cameras. The algorithm is flexible, and this can be used to analyse both real-time and historical video data. The initiated algorithm makes good use of roadside cameras. A great quantity of roadway operating data provides valuable information for freeway management and crash prediction. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Model Comparison** & **Benefits** & **Drawback** \\ \hline Visual average speed & & \multicolumn{1}{p{113.8 pt}}{Intensively relies on object detection.} \\ computer and recorder of OpenCV (VASCAR) [8] & Light computing & If the first crossing point of the reference line or the exiting point appears earlier or later, speed will be calculated differently. \\ \hline Yolo+DeepSORT [9] & Resolves the time difference problem by not setting a reference line & Suffers from the segregation of the detection and tracking processes. The overall speed detection accuracy is influenced by small disturbances. \\ \hline FairMOT [7] & Combines detection and re-ID process & Re-ID accuracy should be improved to be more robust. \\ \hline Modified FairMOT & Can be adopted to track vehicles and their trajectory generation & Not apparent drawback. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of modified FairMOT with other conventional methods. The key contributions of the paper are summarized as follows:  
* This paper introduces a new affine transformation from the image space to the world space, which is deduced from the referenced literature. The projection matrix is generated according to road markings to obtain a representation of the offset of each vehicle's position relative to the camera for speed evaluation [10]. * A modified fairness multi-object tracking (mFairMOT) network is applied to strengthen the ability of a typical FairMOT network to detect and track traffic conditions. When utilising mFairMOT and a spatial affine transformation matrix, it is feasible to detect various traffic parameters such as individual vehicle speed, traffic flow, vehicle type, and abnormal incidents like fire, congestion, and parking. * The developed algorithm can be used not only for extracting real-time traffic parameters but also for historical video data without requiring any calibration. In order to showcase the practicality of obtaining dynamic traffic parameters, video data were gathered from a freeway in southern China to develop crash prediction models. More specifically, one year of video data were processed using the proposed deep learning methods, and the number of crashes was obtained from the local traffic police stations. A rolling base zero-inflated logarithmic link for count time-series (ZILT) model with a negative binomial distributional assumption was built for daily crash predictions [11]. It was found that dynamic traffic features play an important role in crash predictions, as crash characteristics are largely related to traffic operations.