# Highly Accurate Deep Learning Models for Estimating Traffic Characteristics from Video Data
## 1 Introduction  
Unstable traffic dynamics that may lead to road traffic collisions is a complex phenomenon involving the interaction of road geometry, environment, traffic dynamics, vehicles, and humans [1, 2]. Due to obstacles and inconveniences in acquiring traffic data, conventional freeway crash prediction models rarely incorporate real-time traffic dynamics (e.g., speed, speed variance, traffic flow, vehicle types) as explanatory variables into their analyses. However, atypical changes in direction and speed which are indicated by traffic dynamics, usually place other road users in jeopardy of collision [3]. Much evidence shows that traffic conflicts are crash precursors, and traffic dynamics are therefore related to vehicle crashes [4]. Recently, high-resolution detectors have provided abundant data regarding vehicle speed, lane traffic flow, vehicle types, and weather information, which makes real-time crash prediction possible and more accurate. However, acquiring real-time traffic motion parameters by means of high-resolution detectors such as LiDAR, radar, and controller coil may not be practical in many cases. First, unlike surveillance cameras, LiDAR, radar, and inductive loops only cover key road segments. Most typical road segments are not covered. Second, installation of LiDAR, radar, and inductive loops is costly and labour-intensive, whereas extracting traffic motion parameters from roadside surveillance cameras is more effective and straightforward. Third, LiDAR, radar, and inductive loops cannot acquire certain motion parameters, such as lane change behaviour, vehicle trajectory, detecting fire, and lane occupancy. Taking the above-mentioned factors into consideration, it would be more desirable if various traffic motion parameters could be directly extracted from video data. A plethora of roadside surveillance cameras have been installed to observe traffic. In China, there are 626 million surveillance cameras in total, of which around 24 million are installed on roadways [1]. However, fewer than 2% of surveillance cameras are smart cameras that can detect vehicle speed and traffic violations [1]. Most roadside cameras are not intended to observe traffic operating features at the time of installation. They are typically used by operators who can tilt, pan, and zoom to change the camera calibration [5]. The combination of movable cameras and lack of calibration makes estimating speed and volume and detecting abnormal running status impossible [5]. Nevertheless, recently developed deep learning and computer vision techniques provide the possibility of obtaining real-time traffic operating parameters, such as traffic incidents, traffic flow, abnormal scenarios, speed, weather detection, congestion, firing, human walking, vehicle trajectory, and vehicle types from the bare and simple roadside camera [6]. By making use of prompt traffic information, it is possible to construct an intelligent alert system that informs not only the control management centre of current traffic operating conditions but also builds a forecasting system to predict an upcoming crash. The fairness multi-object tracking (FairMOT) network has recently been initiated to combine the detection and re-ID stages and has achieved high efficiency and effectiveness in performing an object tracking task. The FairMOT network structure could be adopted to track vehicles and reconstruct their trajectories [7]. To improve FairMOT re-ID ability in traffic scenarios, a modified version of FariMOT with CSPDarknet53 (a cross-stage partial DarkNetwork with 53 layers) is proposed in this study. A comparison of the modified FairMOT and other conventional methods is presented in Table 1.  
This study applies a modified fairness multi-object tracking (FairMOT) network and derives a spatial transformation matrix to calculate world coordinates from an image plane to estimate lane-based traffic volume, individual vehicle speed, vehicle types, and vehicle trajectory in real time.