###### Abstract  
Automobiles have increased urban mobility, but traffic accidents have also increased. Therefore, road safety is a significant concern involving academics and government. Transit studies are the main supply for studying road accidents, congestion, and flow traffic, allowing the understanding of traffic flow. They require special equipment (sensors) to measure the car's speed. With technological advances, artificial intelligence, and videos, it is possible to estimate the speed in real-time without modifying the installed urban infrastructure. We need to employ public databases that provide reliable monocular videos to generate automated traffic studies. The problem of speed estimation with a monocular camera involves synchronizing data recording, tracking, and detecting the vehicles over the road considering the lanes and distance between cars. Usually, a set of constraints are considered, such as camera calibration, flat roads, including methods based on the homography and augmented intrusion lines, patterns or regions, or prior knowledge about the actual dimensions of some of the objects. In this paper, we present a system that generates a dataset from videos recorded from a highway--obtaining 532 samples; we separated the vehicle's detection by lane, estimating its speed. We use this data set to compare five different statistical methods and three machine learning methods to evaluate their accuracy in estimating the cars' speed in real-time. Our vehicle estimation requires a feature extraction process using YOLOv3 and Kalman filter to detect and track vehicles. The Linear Regression Model (LRM) yielded the best results obtaining a Mean Absolute Error (MAE) of 1.694 km/h for the center lane and 0.956 km/h for the last lane. The results were compared with several state-of-the-art works, having competitive performance. Hence, LRM is fast estimating speed in real time and does not require high computational resources allowing a future hardware implementation. statistical regression; kalman filter; vehicle tracking; vehicle speed estimation; YOLO +
Footnote †: journal: _Sciences_  
0
Footnote 0: _Applied Sciences_  
According to data from the National Institute of Statistics and Geographic Information in Mexico (INEGI, 2011), between 1997 and 2009, accidents in the region increased by 72.7% in urban and rural areas [3]. An essential element when reviewing the cause of road accidents is speeding. For this reason, studies of vehicular traffic focus on reviewing the causes of this element in a road section. These studies require an effective speed monitoring system. In addition, control systems have been developed to assist the driver when driving on the streets, known as ADAS (Advanced Driver Assistance Systems). Currently, a traffic study requires specialized equipment to generate the necessary data to analyze the situation and obtain possible solutions. Some of these devices are speed radars which use radio waves to calculate the time it takes for the wave to travel from the radar to the vehicle and back to the radar. While continuously using these devices is not feasible due to their high cost. Nevertheless, cities currently have a video surveillance system. It is possible to use this existing equipment in the town to determine various characteristics of vehicular flow such as speed, accidents, and others. Then, we can provide the traffic estimation to end-users, state security departments, planning departments, among others [4]. Intelligent traffic systems are divided into three types, depending on how they perform their vehicle detection and classification (i.e., Roadway-based, Over Roadway-based, Side Roadway-based). Roadway-based is an intrusive classification, as they need to be installed on the road. Leading to limit vehicular traffic during the period of installation of the devices. As example of this kind of classification are loop detectors [5], vibration sensors [6] and magnetic sensors [7].