Highway tunnel vehicle accident early warning method, system, equipment and medium

The YOLOv8s recognition model trained through the deep learning framework recognizes the vehicle center coordinates in highway tunnels and analyzes speed information, solving the accuracy and timeliness of vehicle accident warnings in the prior art, and achieving efficient traffic safety monitoring.

CN120147979APending Publication Date: 2025-06-13GANNAN UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510145378.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The prior art has problems such as environmental factors, low sensitivity and lagging detection results in vehicle accident warning in highway tunnels, and accurate and timely early warning and judgment cannot be achieved.

Method used

The YOLOv8s recognition model is trained using a deep learning framework, and the vehicle center coordinates are identified through real-time tunnel monitoring video, the vehicle speed information is analyzed, and early warning signals are generated to trigger corresponding alarm and guidance strategies.

Benefits of technology

It realizes the rapid and accurate detection of vehicle operating status and accident type in highway tunnels, improves the accuracy and timeliness of accident warnings, and enhances traffic safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147979A_ABST
    Figure CN120147979A_ABST
Patent Text Reader

Abstract

The invention discloses a highway tunnel vehicle accident early warning method, system and device and a medium, and the method comprises the steps: training a constructed YOLOv8s recognition model according to the tunnel vehicle historical sample data through a deep learning framework, and the YOLOv8s recognition model is designed to at least recognize the vehicle center coordinates in each video frame image; inputting the obtained real-time tunnel monitoring video into the trained identification model, and performing identification analysis on an identification result to obtain pose information of each vehicle in the current tunnel; based on a deep learning framework and the pose information, analyzing the change of the vehicle center coordinate of each vehicle to obtain the speed information of each vehicle; and generating a corresponding tunnel early warning signal based on an analysis result of the speed information. According to the invention, rapid autonomous early warning can be realized for emergency situations such as vehicle faults or accidents in the tunnel, and secondary accidents are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of highway traffic safety, and in particular, to a method, system, device and medium for warning of vehicle accidents in highway tunnels. Background Art

[0002] When a vehicle breaks down or has an accident in a highway tunnel, if not handled properly or in a timely manner, it may cause more serious accident disasters. Therefore, when a vehicle breaks down on a highway, especially in an emergency in a tunnel, it is crucial to give a correct and rapid warning to avoid the occurrence of secondary accidents.

[0003] In the prior art, sensor detection, traffic flow data analysis detection, and unmanned aerial vehicle detection technology are often used to intelligently detect vehicle accidents. However, these means have obvious limitations in traffic detection, and there are defects such as being easily affected by environmental factors, low sensitivity, and lagging detection results, thus being unable to achieve accurate and timely warning and judgment of vehicle accidents.

[0004] Therefore, how to effectively warn of vehicle accidents in tunnels and improve traffic safety has become a technical problem that needs to be urgently solved by those skilled in the art. Summary of the Invention

[0005] The present invention provides a method, system, device and medium for warning of vehicle accidents in highway tunnels, so as to solve the problem of how to avoid the influence of environmental factors in the tunnel, accurately analyze and judge vehicle accident information, and give a rapid warning, and improve the safety of vehicle driving control in the tunnel.

[0006] To solve the above technical problems, an embodiment of the present invention provides a method for warning of vehicle accidents in highway tunnels, including:

[0007] Using a deep learning framework, training a constructed YOLOv8s recognition model according to historical sample data of tunnel vehicles, and the YOLOv8s recognition model is designed to identify at least the vehicle center coordinates in each video frame image;

[0008] Inputting the obtained real-time tunnel monitoring video into the trained YOLOv8s recognition model, and performing identification analysis on the recognition result to obtain the pose information of each vehicle in the current tunnel;

[0009] Based on the deep learning framework and the pose information, analyzing the change of the vehicle center coordinates of each vehicle to obtain the speed information of each vehicle;

[0010] Generating a corresponding tunnel warning signal based at least on the analysis result of the speed information.

[0011] Further, the construction process of the YOLOv8s recognition model includes:

[0012] Integrate a preset attention mechanism into the backbone network of the selected YOLOv8s network model to update the parameters of the YOLOv8s network model;

[0013] Input the historical sample data of tunnel vehicles into the updated YOLOv8s network model for training, and introduce a preset AFPN feature fusion module for configuration adjustment to construct the YOLOv8s recognition model.

[0014] Further, before inputting the acquired real-time tunnel monitoring video into the trained YOLOv8s recognition model, it also includes:

[0015] Collect the initial real-time tunnel monitoring video, and use an image restoration network to repair the low-light video frames in the read initial real-time tunnel monitoring video to obtain a first enhanced video;

[0016] Perform frame-by-frame histogram equalization and contrast enhancement on the first enhanced video to obtain a second enhanced video;

[0017] Reconstruct the second enhanced video to obtain the real-time tunnel monitoring video.

[0018] Further, based on the deep learning framework and the pose information, analyzing the change of the vehicle center coordinates of each vehicle to obtain the speed information of each vehicle includes:

[0019] Determine the displacement information of the target vehicle according to the coordinate change of the center position of the target vehicle in two adjacent video images recognized; wherein, the displacement of the target vehicle is represented by the following formula:

[0020]

[0021] In the formula, x 1 , y 1 represent the center position of the vehicle in the current frame image; x 2 , y 2 represent the center position of the vehicle in the previous frame image;

[0022] Determine the speed information according to the displacement information and the time interval between the two adjacent images.

[0023] Further, based on the analysis result of the speed information, generating a corresponding tunnel warning signal includes:

[0024] Input the speed information into the normal driving speed model trained by the deep learning framework for anomaly detection;

[0025] When it is detected that the output result of the normal driving speed model meets the preset speed anomaly warning condition, trigger a warning.

[0026] Further, after generating the corresponding tunnel warning signal, it further includes:

[0027] In response to the received tunnel warning signal, execute the corresponding first alarm strategy and second guidance strategy; wherein, the first alarm strategy is reflected in responding to the corresponding alarm device at the entrance of the highway tunnel, and the second guidance strategy is reflected in responding to the corresponding guidance device at the vehicle accident location;

[0028] Record the relevant data of the vehicle accident and send it to the highway traffic terminal.

[0029] Further, the method further includes:

[0030] Collect the real-time vehicle traffic flow data, weather data and road construction data in the tunnel;

[0031] Use machine learning technology to analyze the vehicle traffic flow data, the weather data and the road construction data;

[0032] According to the analysis results, formulate and execute the optimal vehicle traffic path planning strategy.

[0033] Another embodiment of the present invention provides a highway tunnel vehicle accident warning system, including:

[0034] An identification model training module, which is used to use the deep learning framework to train the constructed YOLOv8s identification model according to the historical sample data of tunnel vehicles, and the YOLOv8s identification model is designed to at least identify the vehicle center coordinates in each video frame image;

[0035] A vehicle identification and detection module, which is used to input the acquired real-time tunnel monitoring video into the trained YOLOv8s identification model and perform identification analysis on the identification results to obtain the pose information of each vehicle in the current tunnel;

[0036] A vehicle speed detection module, which is used to analyze the change of the vehicle center coordinates of each vehicle based on the deep learning framework and the pose information to obtain the speed information of each vehicle;

[0037] An accident warning module, which is used to generate a corresponding tunnel warning signal at least based on the analysis result of the speed information.

[0038] Another embodiment of the present invention provides a computer device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the above-mentioned highway tunnel vehicle accident warning method is implemented.

[0039] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the device where the computer-readable storage medium is located executes the computer program, the above-mentioned highway tunnel vehicle accident warning method is implemented.

[0040] Compared with the prior art, the beneficial effects of the embodiments of the present invention are at least one of the following:

[0041] The embodiments of the present invention utilize the machine vision detection technology of YOLOv8s, and can quickly and accurately detect the running state and accident type of vehicles in the tunnel through the acquired real-time monitoring images; by introducing the big data model of the deep learning framework PyTorch, the accuracy of the YOLOv8s model in judging the type and severity of vehicle accidents in the tunnel can be further improved; analyze the driving speed of the vehicle based on the detection results, and activate devices such as an audible and visual alarm device, a fault display device inside and outside the tunnel, an automatic warning fault device, and an intelligent traffic guide to quickly and autonomously warn of sudden situations such as vehicle faults or accidents in the tunnel, improving the safety of traffic operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a schematic flowchart of the highway tunnel vehicle accident warning method in one embodiment of the present invention;

[0043] Figure 2 is a schematic flowchart of the trigger of the intelligent warning device in one embodiment of the present invention;

[0044] Figure 3 is a schematic structural diagram of the highway tunnel vehicle accident warning system in one embodiment of the present invention;

[0045] Figure 4 is a structural block diagram of a preferred embodiment of a computer device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0047] In the description of this application, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", "third", etc. may explicitly or implicitly include one or more of such features. In the description of this application, unless otherwise stated, the meaning of "a plurality" is two or more.

[0048] In the description of this application, it should be noted that unless otherwise clearly defined and limited, the terms "installed", "connected", "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two components. The terms "vertical", "horizontal", "left", "right", "up", "down" and similar expressions used herein are only for the purpose of illustration and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation of the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0049] In the description of this application, it should be noted that unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as commonly understood by those of ordinary skill in the technical field to which this technology belongs. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0050] According to the regulations, on the highway, the vehicle speed is relatively fast. Once a vehicle breaks down and stops, in order to give sufficient reaction time and safety distance to the following vehicles to avoid collisions, the driver is required to set up a triangular warning sign more than 150 meters away from the breakdown vehicle in the oncoming direction; in case of special circumstances: if it is at night, or in low visibility meteorological conditions such as rain, snow, fog, dust, hail, etc., the setting distance of the triangular warning sign should be appropriately increased to more than 150 meters, and at the same time, turn on the hazard warning flashers (double flashers), contour lights and rear position lights and other lighting devices to further enhance the warning effect and ensure the driving safety of oneself and the following vehicles. Based on this, an embodiment of the present invention provides a method for warning vehicle accidents in highway tunnels. Specifically, please refer to Figure 1 , Figure 1 which shows the method for warning vehicle accidents in highway tunnels in one embodiment of the present invention, including the following steps:

[0051] S1. Using a deep learning framework, train the constructed YOLOv8s recognition model according to the historical sample data of tunnel vehicles. The YOLOv8s recognition model is designed to at least recognize the vehicle center coordinates in each video frame image.

[0052] In the embodiment of the present invention, a deep learning framework is used to train a machine vision model for detecting vehicle monitoring videos in tunnels. It can be understood that PyTorch is an open-source deep learning framework for machine learning and deep learning, which is widely used in artificial intelligence fields such as computer vision and natural language processing. It provides powerful GPU-accelerated tensor computing capabilities and a dynamic computational graph for building deep learning models. In addition, PyTorch also supports distributed training, and the model can be trained in parallel on multiple GPUs or machines to improve the training speed. In vehicle driving, fast and accurate object detection is crucial for driving safety. YOLOv8s can be used to detect roads, vehicles, pedestrians, etc.

[0053] Based on this, in some embodiments of the present invention, a deep learning framework is used to train the YOLOv8s recognition model. During this process, the collected relevant historical tunnel monitoring videos are used as the historical sample data set of tunnel vehicles to train the constructed YOLOv8s recognition model.

[0054] In the present invention, vehicle monitoring video data in highway tunnels is collected using high-definition high-speed cameras at different time periods, such as day, night, peak hours, and off-peak hours, and under various weather conditions, such as hot, cold, and foggy weather. The collected data should cover various types of vehicles, such as cars, trucks, buses, etc., and different driving states of vehicles, such as accelerating, decelerating, and maintaining a constant speed.

[0055] After collecting relevant historical tunnel monitoring videos, the vehicle monitoring video data will be annotated according to the vehicle type and the bounding box position. Specifically, in the embodiments of the present invention, a professional annotation tool CVAT is used to annotate the collected vehicle monitoring video data frame by frame, and the annotation content includes the vehicle category such as sedan, truck, etc. and the bounding box position (represented by pixel coordinates).

[0056] In the process of using the annotated vehicle monitoring video data for training the YOLOv8s recognition model, a deep learning framework is introduced to train the YOLOv8s recognition model. In this process, the YOLOv8s recognition model will learn how to identify and locate the feature information of the vehicles in each frame of the video, including the center coordinate information, and PyTorch provides efficient tools and algorithms to accelerate this training process.

[0057] Specifically, in some embodiments of the present invention, the annotated vehicle monitoring video data is divided into a training set, a validation set, and a test set, and the division ratio can be 70%, 20%, 10%. In the configuration file of YOLOv8s, training parameters are set, including the learning rate, batch size, number of training epochs, and optimizer. As a preferred example, in the embodiments of the present invention, the learning rate is set to 0.001, the batch data is adjusted to 32, the number of training epochs can be set to 200 epochs, and the Adam optimizer is selected. The prepared training set is used to train the YOLOv8s model. During the training process, the weight file of the model is saved regularly to evaluate and select the best model on the validation set, and the early stopping method Early Stopping is used to avoid overfitting of the model, that is, when the performance on the validation set no longer improves, the training is stopped.

[0058] In order to improve the accuracy of the YOLOv8s recognition model in detecting low-light video images such as tunnel video monitoring, in the embodiments of the present invention, an attention mechanism, an improved feature fusion module, and a strategy for adjusting the loss function are introduced during the training process to enhance the vehicle detection ability of the YOLOv8s recognition model under low-light conditions such as tunnels.

[0059] Specifically, the present invention integrates a preset attention mechanism into the backbone network of the selected YOLOv8s network model to update the parameters of the YOLOv8s network model. Preferably, in the embodiments of the present invention, the CoTA attention mechanism is integrated into the backbone network of YOLOv8s (such as CSPDarknet53) or the feature fusion part (such as PANet), and according to the parameter requirements of the attention mechanism, the parameters of the YOLOv8s network model are updated.

[0060] Input the historical sample data of the tunnel vehicles into the updated YOLOv8s network model for training, and introduce a preset AFPN feature fusion module for configuration adjustment to construct the YOLOv8s recognition model. Preferably, in the embodiment of the present invention, the AFPN feature fusion module is preferably used to replace the position of the original simple upsampling operation in the YOLOv8s model, so as to realize the configuration optimization of the YOLOv8s network model. After replacement, input the historical sample data of the tunnel vehicles into the optimized YOLOv8s network model for training, which helps the model to accurately extract the subtle target features in low-light images.

[0061] In some other embodiments of the present invention, in the loss function of the YOLOv8s network model, the original IoU loss is replaced with the MPDIoU loss. The MPDIoU loss is more suitable for the loss function of target detection under low-light conditions, and can also improve the training effect of bounding box regression, improve the convergence speed and regression accuracy, and at the same time simplify the calculation process, which is beneficial to improving the recognition speed of low-light images.

[0062] S2. Input the acquired real-time tunnel monitoring video into the trained YOLOv8s recognition model, and perform identification analysis on the recognition results to obtain the pose information of each vehicle in the current tunnel.

[0063] Once the YOLOv8s recognition model is trained, it can be used for real-time vehicle detection. The real-time tunnel monitoring video will be input into the trained YOLOv8s recognition model, and the model will output the positions and bounding boxes of the vehicles detected in the video. Before that, in order to improve the image quality of the input real-time tunnel monitoring video and reduce noise interference. The present invention performs a video stream reading operation on the initial real-time tunnel monitoring video collected in real time by a high-definition high-speed camera, and performs enhancement and repair processing on each frame of low-light video frame image read. Preferably, in the embodiment of the present invention, OpenCV is used to read each frame of the video stream, and the low-light video frame image is enhanced and repaired through an image restoration network such as the AirNet network.

[0064] Furthermore, perform frame-by-frame histogram equalization and contrast enhancement processing on the first enhanced video obtained after repair to highlight the edges and details of the image and reduce the noise interference in the image. Perform reconstruction processing on the second enhanced video obtained after interference removal to obtain the real-time tunnel monitoring video for detection. In some embodiments of the present invention, the video image can also be optimized by adopting the region of interest extraction technology (ROI). Specifically: according to the regional characteristics of vehicle driving in the tunnel, automatically extract the region of interest, remove the background region irrelevant to vehicle detection, and reduce the calculation amount and interference.

[0065] At that time, the real-time tunnel monitoring video will be input into the trained YOLOv8s recognition model for vehicle target detection. The YOLOv8s recognition model will output recognition results including the category, attribute features, bounding box position, confidence level, and vehicle center coordinates of each vehicle.

[0066] By analyzing information such as the center coordinates of each target vehicle recognized by the YOLOv8s recognition model, the position and pose information of each target vehicle in the lane lines of the real-time tunnel monitoring video can be calibrated. In the embodiment of the present invention, a target tracking algorithm is used to track each vehicle in the continuously read video frames. By matching the tracking results in the current frame with those in the previous frame, a unique identifier is assigned to each vehicle, and its motion trajectory is recorded. According to the tracking and recognition results and the center coordinates, the pose information of each target vehicle in the lane lines can be determined.

[0067] S3. Based on the deep learning framework and the pose information, analyze the change in the vehicle center coordinates of each vehicle to obtain the speed information of each vehicle.

[0068] According to the coordinate change of the center position of the target vehicle in the recognized adjacent two-frame video images, determine the displacement information of the target vehicle. Among them, for each vehicle, calculate the center position coordinates of its bounding box in the current frame and the previous frame, expressed as: (x 1 , y 1 ) and (x 2 , y 2 ).

[0069] Then the displacement of the target vehicle is expressed by the following formula:

[0070]

[0071] In the formula, x 1 , y 1 represent the center position of the vehicle in the current frame image; x 2 , y 2 represent the center position of the vehicle in the previous frame image;

[0072] According to the displacement information and the time interval between the adjacent two frames of images, determine the speed information. Among them, the time interval is expressed as: fps represents the frame rate of the video. Then, according to the displacement and the time interval, the speed of the vehicle is expressed as: To improve the accuracy of speed calculation, the embodiment of the present invention will perform an average calculation on multiple frames.

[0073] S4. Generate corresponding tunnel warning signals based at least on the analysis results of the speed information.

[0074] In some embodiments of the present invention, smoothing filtering such as the Kalman filtering algorithm can be used to analyze the speed information of the vehicle to reduce speed fluctuations. According to the calculated speed information, historical vehicle driving data, and safety standards, a speed anomaly warning threshold is set.

[0075] The speed information is input into a normal driving speed model trained by a deep learning framework for anomaly detection. When it is detected that the output result of the normal driving speed model meets the preset speed anomaly warning conditions, it is considered that the vehicle has a fault, and a warning will be triggered.

[0076] Considering the interaction between multiple vehicles in the tunnel, in the embodiment of the present invention, based on the deep learning framework PyTorch, the calculated speeds are compared. For example, if the vehicle speed v = 0, it is considered that the vehicle has a fault, or if there is a traffic jam or the distance between two vehicles is negative, then the deep learning framework PyTorch will further compare the color features and size features of the abnormal vehicle to determine whether there is a vehicle fault or accident.

[0077] When responding to the generated tunnel warning signal, an instruction will be sent to the rapid warning device, and the warning device will immediately start the response program for traffic warning. Specifically, please refer to Figure 2 as shown Figure 2 which shows the trigger flow chart of the intelligent warning device in one of the embodiments of the present invention.

[0078] It can be seen that in response to the received tunnel warning signal, the rapid warning device will execute the corresponding first alarm strategy and second traffic guidance strategy. Among them, the first alarm strategy is reflected in the response of the corresponding alarm devices at the entrance of the highway tunnel, 150 meters from the entrance, and the accident lane in the tunnel, including the display screen showing the lane accident and the audible and visual alarm. The second traffic guidance strategy is reflected in the response of the corresponding traffic guidance devices at 150 meters from the tunnel entrance and the location of the vehicle accident. The traffic guidance devices include an automated warning device (containing red cone barrels) and an intelligent traffic guidance doll (with functions such as voice, action, and automatic broadcast).

[0079] Based on Figure 2 the trigger flow of the intelligent warning device as shown, the present invention will provide the following specific warning strategies to refine the above process:

[0080] a. Setting of automated warning devices: Install a guide rail on each side inside the tunnel. Set multiple mobile automated warning devices on the guide rail. The devices can automatically arrange red cone barrels (with sound and light alarm functions) on-site. When the central control system issues a rapid warning instruction, the automated warning devices quickly reach the location of vehicle failure or vehicle accident, and quickly arrange multiple red cone barrels about 150m behind the location of vehicle failure or vehicle accident, thus quickly closing the accident lane and reducing the occurrence of secondary vehicle accidents. The devices have functions such as voice, action, and automatic broadcast.

[0081] b. Setting of intelligent traffic guidance dolls: Set an intelligent traffic guidance doll (with functions such as voice, action, and automatic broadcast) about 150m away from the tunnel entrance. When the central control system issues a rapid warning instruction, the intelligent traffic guidance doll automatically moves to the accident lane through the guide rail to remind the following vehicles to slow down or change lanes in advance.

[0082] At the same time, record the relevant data of the vehicle accident and send it to the highway traffic terminal so that relevant staff can respond in a timely manner.

[0083] In most cases, when a vehicle abnormal accident occurs, there are often situations of vehicle congestion and traffic chaos. Based on this, the embodiment of the present invention will further collect real-time vehicle traffic flow data, weather data, and road construction data inside the tunnel, and use machine learning technology to analyze these data to formulate and execute the optimal vehicle traffic path planning strategy.

[0084] In summary, the embodiment of the present invention trains the YOLOv8s model through a deep learning framework, enabling it to have the ability to accurately identify vehicles. Using the deep learning framework combined with YOLOv8s as a vehicle recognition model for monitoring videos, it can quickly and accurately identify the pose information of vehicles in the tunnel monitoring video frames. By analyzing the change of the vehicle center coordinates, the speed information of each vehicle can be calculated. Based on the analysis results of the speed information, corresponding tunnel warning signals can be generated and different alarm devices and traffic guidance devices can be triggered to start, timely reminding relevant vehicles to take measures such as avoidance or deceleration, thus effectively preventing the occurrence of secondary vehicle accidents in the tunnel and ensuring road traffic safety.

[0085] An embodiment of the present invention provides a highway tunnel vehicle accident warning system. Specifically, please refer to Figure 3 , Figure 3 which shows the structural schematic diagram of the highway tunnel vehicle accident warning system in one of the embodiments of the present invention, including the following steps:

[0086] The recognition model training module M1 is used to train the constructed YOLOv8s recognition model according to the historical sample data of tunnel vehicles by using a deep learning framework. The YOLOv8s recognition model is designed to recognize at least the vehicle center coordinates in each video frame image.

[0087] The vehicle recognition and detection module M2 is used to input the acquired real-time tunnel monitoring video into the trained YOLOv8s recognition model, and perform identification analysis on the recognition results to obtain the pose information of each vehicle in the current tunnel.

[0088] The vehicle speed detection module M3 is used to analyze the change of the vehicle center coordinates of each vehicle based on the deep learning framework and the pose information to obtain the speed information of each vehicle.

[0089] The accident warning module M4 is used to generate corresponding tunnel warning signals based at least on the analysis results of the speed information.

[0090] As Figure 4 shown, an embodiment of the present invention further provides a computer device. Figure 4 It is a structural block diagram of a preferred embodiment of a computer device provided by the present invention. The computer device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the highway tunnel vehicle accident warning method as described above.

[0091] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2,...). The one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of completing specific functions, and these instruction segments are used to describe the execution process of the computer program in the computer device.

[0092] The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor. The processor is the control center of the terminal device, and connects various parts of the terminal device through various interfaces and circuits.

[0093] The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc., and the data storage area can store relevant data, etc. In addition, the memory may be a high-speed random access memory, or may also be a non-volatile memory, such as a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., or the memory may also be other volatile solid-state storage devices.

[0094] It should be noted that the above terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 4 The structural block diagram is only an example of the terminal device, and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or different components. Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above methods. Among them, the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM), etc.

[0095] Correspondingly, an embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program. Among them, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the steps in the highway tunnel vehicle accident warning method in the above embodiment, such as Figure 1Steps S1 to S4 described therein.

[0096] The technical features and technical effects of the highway tunnel vehicle accident warning system proposed in the embodiments of the present invention are the same as those of the highway tunnel vehicle accident warning method proposed in the embodiments of the present invention, and will not be elaborated herein.

[0097] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the present invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the appended claims.

Claims

1. A method for early warning of vehicle accidents in highway tunnels, characterized in that: include: Using a deep learning framework, the constructed YOLOv8s recognition model is trained based on historical sample data of tunnel vehicles, wherein the YOLOv8s recognition model is designed to at least recognize the center coordinates of the vehicle in each video frame image; The acquired real-time tunnel monitoring video is input into the trained YOLOv8s recognition model, and the recognition result is analyzed to obtain the position information of each vehicle in the current tunnel; Based on the deep learning framework and the position information, analyzing the change of the vehicle center coordinates of each of the vehicles to obtain the speed information of each of the vehicles; At least based on the analysis result of the speed information, a corresponding tunnel warning signal is generated.

2. The highway tunnel vehicle accident early warning method according to claim 1, characterized in that: The construction process of the YOLOv8s recognition model includes: Integrate a preset attention mechanism into the backbone network of the selected YOLOv8s network model to update the parameters of the YOLOv8s network model; The tunnel vehicle historical sample data is input into the updated YOLOv8s network model for training, and the preset AFPN feature fusion module is introduced for configuration adjustment to construct the YOLOv8s recognition model.

3. The highway tunnel vehicle accident early warning method according to claim 1, characterized in that: Before inputting the acquired real-time tunnel monitoring video into the trained YOLOv8s recognition model, the method further includes: Collecting an initial real-time tunnel monitoring video, and using an image restoration network to repair low-light video frames in the read initial real-time tunnel monitoring video to obtain a first enhanced video; Performing frame-by-frame histogram equalization and contrast enhancement processing on the first enhanced video to obtain a second enhanced video; The second enhanced video is reconstructed to obtain the real-time tunnel monitoring video.

4. The highway tunnel vehicle accident early warning method according to claim 1, characterized in that: The analyzing the change of the vehicle center coordinate of each of the vehicles based on the deep learning framework and the posture information to obtain the speed information of each of the vehicles includes: According to the coordinate change of the center position of the target vehicle in two adjacent frames of video images, the displacement information of the target vehicle is determined; wherein the displacement of the target vehicle is expressed by the following formula: Where x1 and y1 represent the center position of the vehicle in the current frame image; x2 and y2 represent the center position of the vehicle in the previous frame image; The speed information is determined according to the displacement information and the time interval between the two adjacent frames of images.

5. The highway tunnel vehicle accident early warning method according to claim 1, characterized in that: The generating a corresponding tunnel warning signal based on the analysis result of the speed information includes: Inputting the speed information into a normal driving speed model trained by a deep learning framework to perform anomaly detection; When it is detected that the output result of the normal driving speed model meets the preset speed abnormality warning condition, a warning is triggered.

6. The highway tunnel vehicle accident early warning method according to claim 1, characterized in that: After the corresponding tunnel warning signal is generated, the method further includes: In response to the received tunnel warning signal, a corresponding first alarm strategy and a second diversion strategy are executed; wherein the first alarm strategy is reflected in responding to a corresponding alarm device at the entrance of the highway tunnel, and the second diversion strategy is reflected in responding to a corresponding diversion device at the location where the vehicle accident occurs; Record relevant data of vehicle accidents and send them to highway traffic terminals.

7. The highway tunnel vehicle accident early warning method according to claim 1, characterized in that: The method further comprises: Collect real-time vehicle traffic flow data, weather data and road construction data in the tunnel; Analyzing the vehicle traffic flow data, the weather data, and the road construction data using machine learning technology; Based on the analysis results, the optimal vehicle traffic path planning strategy is formulated and implemented.

8. A highway tunnel vehicle accident warning system, characterized in that: include: A recognition model training module is used to train a constructed YOLOv8s recognition model based on historical sample data of tunnel vehicles using a deep learning framework, wherein the YOLOv8s recognition model is designed to at least recognize the center coordinates of the vehicle in each video frame image; The vehicle recognition and detection module is used to input the acquired real-time tunnel monitoring video into the trained YOLOv8s recognition model, and perform identification analysis on the recognition results to obtain the position information of each vehicle in the current tunnel; A vehicle speed detection module, configured to analyze changes in the vehicle center coordinates of each of the vehicles based on the deep learning framework and the position information to obtain speed information of each of the vehicles; The accident warning module is used to generate a corresponding tunnel warning signal based at least on the analysis result of the speed information.

9. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for early warning of vehicle accidents in highway tunnels as claimed in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the highway tunnel vehicle accident warning method as described in any one of claims 1 to 7 is implemented.