# Machine Learning-Driven Calibration of Traffic Models Based on a Real-Time Video Analysis
## 1 Introduction
### Implementation of Intelligent Transport Systems via Simulation Model of Traffic Flow  
ITS utilizing vehicle-to-everything (V2X) technology [6] meet the demands of modern transport systems [7, 8, 9] by continuously collecting data on road traffic through various sensors [4]. The collected and systematized data, which represent the context of traffic situations, are crucial for determining the evolving requirements of ITS functionality over time [10]. Context data play a vital role in analyzing sensor data, reasoning, and modeling intelligent systems, significantly impacting the effectiveness of ITSs. Two concepts and their interaction can be used to visually represent the real context of the traffic situation and its display in the ITS: physical and virtual transport space (PTS and VTS). The interaction diagram of the PTS and VTS within the metaverse transportation system offers a comprehensive representation of the context of the entire transport system [11]. The PTS environment is the data source that the ITS sensor system is designed to collect. The VTS is created by simulating the processes occurring in the PTS by processing sensor system data. The VTS can generate data similar to the PTS but with controlled process dynamics parameters and various associated factors. The VTS supports computational experiments with feedback optimization relative to the real PTS [11], which connects the operation of many systems at a high level and controls data generation. However, the representativeness of data generated using VTS depends on the accuracy of the correspondence between real and simulated processes. In VTS, these PTS processes are modeled using the simulation model of traffic flow (SMTF). The SMTF generates random events representing vehicle appearances on simulated routes based on the context of traffic situations embedded in the model. Predetermined parameters and time within the simulated space define this context [12], influencing movement scenarios, interactions, traffic density, and infrastructure behavior on the road. The choice of model for implementing SMTF is primarily determined by the type of PTS processes that require mapping to the VTS. Existing SMTF models can be divided into macroscopic, microscopic, and mesoscopic models [13]. Macroscopic models study the transport flow as a whole, making it possible to use elements of the physical phenomena analysis [14; 15]. These models describe traffic flow characteristics like speed, density, and intensity. Macroscopic models depict general trends and are suitable for efficient analysis of large networks, but they cannot account for the behavior and interactions of individual drivers [14]. Microscopic models can represent the behavior of vehicles and drivers. These models are computationally intensive and suitable for studying detailed situations [14; 16; 17]. On the other hand, mesoscopic models represent traffic as transport packets, combining the detailed information of microscopic models with the statistical approach of macroscopic models [14]. To construct a general SMTF for a limited section of the highway without the need for a detailed analysis of vehicle behavior, the most suitable option would be to use a macroscopic model [14]. This solution requires less input data than microscopic and mesoscopic models [18] while providing sufficient accuracy in modeling the main PTS processes [13; 19]. Macroscopic traffic models focus on vehicle behavior and statistical characteristics. Therefore, most implementations of these models concentrate on depicting the dynamics of a specific section of the route based on available data [20]. A vital element of the macroscopic model is the demand model. This concept is taken from the queuing theory and, in the context of the theory of transport flows, is characterized as the origin-destination Matrix (ODM) [21]. The ODM determines the number of trips between each pair of zones or nodes in the network, directly impacting the mapping of the spatio-temporal characteristics of the PTS processes into the VTS.