Long-distance underwater tunnel traffic accident sensing method based on computer vision
By applying computer vision technology in long-distance underwater tunnels, detecting and tracking vehicles and judging their stationary state and appearance damage, accurate identification and timely alarm of vehicle accidents in the tunnel are achieved, and difficult problems in identifying and alarming traffic accidents are solved, and emergency response speed is improved.
Patent Information
- Application Number
- CN202411508717.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-03-04
AI Technical Summary
The incidence of traffic accidents in long-distance underwater tunnels is high, resulting in traffic congestion and emergency rescue work hindering. It is difficult for the existing technology to achieve accurate automatic identification and timely alarm of vehicle accidents in tunnels.
Using a computer vision-based method, the vehicle in the tunnel is detected and tracked through a target detection model (such as yolov4), combined with the vehicle re-identification model and classification model, it is used to determine whether the vehicle is in a stationary state and determine whether its appearance is damaged, thereby identifying a traffic accident and sending an alarm.
It realizes accurate automatic identification and timely alarm of vehicle accidents in the tunnel, significantly improves emergency response speed, and provides strong auxiliary support for traffic management.
Smart Images

Figure CN119559585A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of transportation, and in particular relates to a method for perceiving traffic accidents in long-distance underwater tunnels based on computer vision. Background Art
[0002] With the continuous progress of economy and technology, vehicle traffic has become an indispensable part of modern social life. The number of cross-regional long-distance tunnels has gradually increased due to their convenience advantages and the significant improvement of domestic infrastructure construction capabilities. However, with the widespread popularization of vehicle traffic, the incidence of traffic accidents has shown a clear upward trend. It is particularly noteworthy that the roads inside the tunnel are relatively narrow. Once a traffic accident occurs, it is very easy to cause traffic congestion, which in turn has an adverse impact on people's daily travel and rescue work in emergency situations. Summary of the invention
[0003] Purpose of the invention: In order to solve the problems existing in the above-mentioned prior art, the present invention provides a long-distance underwater tunnel traffic accident perception method based on computer vision.
[0004] Technical solution: The present invention provides a method for sensing traffic accidents in long-distance underwater tunnels based on computer vision, comprising the following steps:
[0005] Step 1: Detect the vehicle in the tunnel;
[0006] Step 2: Track the detected multiple vehicle targets and obtain the track and appearance features of the tracked vehicles;
[0007] Step 3: Determine whether the vehicle is stationary based on the vehicle trajectory obtained in step 2;
[0008] Step 4: Determine whether the stationary vehicle is damaged based on the appearance features in step 2; if there is damage, determine that a traffic accident has occurred.
[0009] Furthermore, in step 1, yolov4 is used as the target detection model, and a vehicle detection data set in an underwater tunnel scenario is constructed, the target detection model is trained using the data set, and finally the trained target detection model is used to perform vehicle detection on the real-time video stream in the tunnel.
[0010] Furthermore, the step 2 is specifically as follows:
[0011] Step 2.1: Build a vehicle re-identification dataset,
[0012] Step 2.2: Train the vehicle re-identification model based on the constructed dataset;
[0013] Step 2.3: Based on the trained vehicle re-identification model, extract the appearance features of the vehicle detected in step 1 and save them.
[0014] Furthermore, the step 3 is specifically as follows:
[0015] Step 3.1: Use the sliding average strategy to smooth the trajectories of all vehicles in the current time period;
[0016] Step 3.2: Using a sliding window, for the smoothed trajectory, calculate the distance between the starting position in the sliding window and the current frame position; determine whether the vehicle is stationary based on the distance.
[0017] Furthermore, in step 3.2, if the distance between the starting position and the current frame position in the sliding window is less than a preset threshold, the vehicle is considered to be stationary.
[0018] Furthermore, the step 4 is specifically as follows:
[0019] Step 4.1: Construct two types of data sets of normal vehicles and damaged vehicles;
[0020] Step 4.2: Train the classification model based on the constructed two-category dataset;
[0021] Step 4.3: Input the appearance features in step 2 into the classification model to determine whether the appearance of the vehicle is damaged.
[0022] Furthermore, the classification model adopts ResNet-50 as the backbone network architecture, and adds a fully connected layer on this basis for classification tasks.
[0023] Beneficial effects: The present invention cleverly integrates existing computer vision technology with tunnel monitoring camera equipment, and successfully realizes accurate automatic identification of vehicle accidents inside tunnels by implementing specific algorithm improvements and system integration. In addition, the system is also equipped with an automatic alarm function, which can immediately notify relevant personnel when an accident is detected, significantly improving the speed of emergency response and police dispatch, and providing strong auxiliary support for traffic management.
[0024] The computer vision-based long-distance underwater tunnel accident perception algorithm proposed in this invention shows significant innovation in multiple dimensions, including technology integration, application scenario expansion, performance parameter optimization, and user experience improvement. By creatively integrating and optimizing existing technologies, this invention constructs a new system framework with high practical value, which is designed for accurate detection and timely reminder of vehicle accidents in underwater tunnels. This innovative solution not only heralds technological progress in the field of traffic management, but is also expected to bring substantial improvements to the efficiency and response speed of traffic management. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of the present invention.
[0026] Figure 2 It is an implementation example diagram of a specific scenario of the present invention. DETAILED DESCRIPTION
[0027] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0028] like Figure 1 As shown, the specific process of this implementation is:
[0029] Step S1: Extract frames from the camera video stream to perform vehicle detection.
[0030] Step S2: Track multiple vehicle targets detected and obtain their trajectories by integrating multi-frame tracking results.
[0031] Step S3: Figure 2 (a) and Figure 2 As shown in (b), if the displacement distance of the target is less than the threshold within a period of time, the target is considered to be in a stationary state.
[0032] Step S4: further classify the appearance of the stationary target to determine whether the vehicle appearance is damaged.
[0033] Step S5: If the appearance is damaged, send corresponding alarm information to the monitoring center, such as Figure 2 (c) and Figure 2 As shown in (d) in the figure, the boxes clearly indicate that multiple vehicles have exterior damage, and the system promptly feeds back alarm perception information of the traffic accident.
[0034] In step S1, the camera video stream is framed for vehicle detection, and the specific steps are as follows:
[0035] Step S11: Construct a vehicle detection dataset in an underwater tunnel scenario. The dataset should include all scenarios to be solved, including different camera perspectives, road sections, etc.
[0036] Step S12: Based on the data obtained in S11, the target detection model is trained, and the target detection method adopted is yolov4.
[0037] Step S13: Based on the model trained in S12, vehicle target detection is performed on the input real-time video stream every a certain number of frames to obtain the position information of all vehicles in the field of view.
[0038] In step S2, multiple vehicle targets are tracked based on the detection, and their trajectories are obtained by integrating the multi-frame tracking results. The specific steps are:
[0039] Step S21: Obtain vehicle detection results of multiple frames, and give the same vehicle an identical ID, based on which a vehicle re-identification dataset is constructed.
[0040] Step S22: Train a vehicle re-identification model based on the data set constructed in S21.
[0041] Step S23: Based on the model trained in S22, the appearance features of the detected vehicle are extracted and saved. At the same time, the Kalman filtering method is used to obtain the vehicle position of the current frame based on the vehicle position of the previous frame, and the vehicle is matched in combination with the aforementioned appearance features to obtain the vehicle of the current frame and its ID.
[0042] In step S3, if the displacement distance of the target is less than a threshold within a period of time, the target is considered to be in a stationary state. The specific steps are:
[0043] Step S31: Smoothing the trajectories of all vehicles in the current time period using a sliding average strategy.
[0044] Step S32: For the smoothed trajectory, calculate the distance between the end position and the starting position (i.e., the displacement distance of the target within a period of time). If the distance is less than the threshold, the target is in a stationary state, and the stationary vehicle in the tunnel is a candidate abnormal vehicle (forced to stop due to traffic jam or accident).
[0045] In step S4, the appearance of the stationary target is further classified to determine whether the vehicle appearance is damaged. The specific steps are as follows:
[0046] Step S41: construct two types of data sets of normal vehicles and damaged vehicles.
[0047] Step S42: Based on the data set constructed in S41, the vehicle re-identification model obtained in step S2 is used to extract features and construct a classification model. The classification model of this embodiment uses ResNet-50 as the backbone network architecture, and adds a fully connected layer for classification tasks on this basis, and finally outputs a binary classification result to accurately determine whether there is damage to the vehicle appearance, that is, to distinguish between "normal" and "damaged" states.
[0048] Step S43: Based on the appearance features of the stationary vehicle obtained in S3 and the classification model obtained in S42, the damage to the appearance of the vehicle is judged. If there is damage, the stationary state of the vehicle may be caused by an accident.
[0049] In step S5, for a stationary vehicle with damaged appearance, corresponding warning information and camera location information are sent to the monitoring room to promptly remind relevant staff to handle the problem.
[0050] All implementation steps of this application are based on the premise that the camera can cover the area, through a series of computer vision methods, to analyze the real-time traffic video stream, automatically identify traffic accidents, and promptly feedback the monitored accidents to the relevant personnel for processing, thereby improving the efficiency of traffic accident handling.
[0051] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
Claims
1. A method for perceiving traffic accidents in long-distance underwater tunnels based on computer vision, characterized in that: The steps include: Step 1: Detect the vehicle in the tunnel; Step 2: Track the detected multiple vehicle targets and obtain the track and appearance features of the tracked vehicles; Step 3: Determine whether the vehicle is stationary based on the vehicle trajectory obtained in step 2; Step 4: Determine whether the stationary vehicle is damaged based on the appearance features in step 2; if there is damage, determine that a traffic accident has occurred.
2. The method for sensing traffic accidents in long-distance underwater tunnels based on computer vision according to claim 1 is characterized in that: The step 1 uses yolov4 as the target detection model, and constructs a vehicle detection data set in an underwater tunnel scene, uses the data set to train the target detection model, and finally uses the trained target detection model to perform vehicle detection on the real-time video stream in the tunnel.
3. The method for sensing traffic accidents in long-distance underwater tunnels based on computer vision according to claim 1, characterized in that: The step 2 is specifically as follows: Step 2.1: Build a vehicle re-identification dataset, Step 2.2: Train the vehicle re-identification model based on the constructed vehicle re-identification dataset; Step 2.3: Based on the trained vehicle re-identification model, extract the appearance features of the vehicle detected in step 1 and save them.
4. The method for sensing traffic accidents in long-distance underwater tunnels based on computer vision according to claim 1, characterized in that: The step 3 is specifically as follows: Step 3.1: Use the sliding average strategy to smooth the trajectories of all vehicles in the current time period; Step 3.2: Using a sliding window, for the smoothed trajectory, calculate the distance between the starting position in the sliding window and the current frame position; determine whether the vehicle is stationary based on the distance.
5. The method for sensing traffic accidents in long-distance underwater tunnels based on computer vision according to claim 4 is characterized in that: In step 3.2, if the distance between the starting position and the current frame position in the sliding window is less than a preset threshold, the vehicle is considered to be stationary.
6. The method for sensing traffic accidents in long-distance underwater tunnels based on computer vision according to claim 1, characterized in that: The step 4 is specifically as follows: Step 4.1: Construct two types of data sets of normal vehicles and damaged vehicles; Step 4.2: Train the classification model based on the constructed two-category dataset; Step 4.3: Input the appearance features in step 2 into the classification model to determine whether the appearance of the vehicle is damaged.
7. The method for sensing traffic accidents in long-distance underwater tunnels based on computer vision according to claim 6, characterized in that: The classification model uses ResNet-50 as the backbone network architecture, and adds a fully connected layer for classification tasks.
8. The method for sensing traffic accidents in long-distance underwater tunnels based on computer vision according to claim 1, characterized in that: The method further comprises, If a traffic accident is determined to have occurred in step 4, an alarm message is sent to relevant personnel.