Traffic accident identification method based on computer vision

The computer vision-based traffic accident identification system efficiently processes data from multiple sources to rapidly identify and report accidents, reducing response times and congestion through integrated event recognition.

CN120318778APending Publication Date: 2025-07-15BEIHUA UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510365735.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In the event of a traffic accident, the traffic police need to deal with it on the spot, resulting in traffic jams and safety hazards, and untimely rescue may lead to a second accident.

Method used

Data is collected through traffic surveillance video, on-board cameras and drones, image preprocessing and target detection are carried out, vehicle spacing, collision risks, pedestrian interactions with vehicles, and vehicle side slip deviations, abnormal behaviors are identified and alarms are triggered, and pushed to the traffic management center and on-board system.

Benefits of technology

Quickly identify traffic accidents, improve police efficiency, reduce congestion on accident sections, alleviate traffic congestion, improve traffic diversion efficiency and rescue efficiency, and reduce manual consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318778A_ABST
    Figure CN120318778A_ABST
Patent Text Reader

Abstract

The invention relates to a traffic accident identification method based on computer vision, which belongs to the traffic accident identification technology and comprises a data acquisition module, a data preprocessing module, a target detection and tracking module, a behavior analysis module, an event identification model and an alarm module. The data acquisition module acquires data from traffic monitoring videos, a vehicle-mounted camera and an unmanned aerial vehicle for aerial photography. According to the invention, traffic monitoring personnel can quickly respond to traffic accidents occurring in real time by quickly identifying the traffic accidents on the road, so that the traffic accidents can be timely responded and pushed to a traffic management center, the police efficiency is improved, and an alarm signal is pushed to a vehicle-mounted system to assist navigation to change a route, reduce traffic jam of an accident road section and improve the traffic safety. And the alarm signal is pushed to a traffic broadcast, and a driver is prompted to carry out route planning in time, so that traffic jam caused by traffic accidents can be relieved, the traffic dispersion efficiency and the traffic rescue efficiency are improved, the labor consumption required by traffic monitoring is reduced, and the working efficiency of traffic management work is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic accident identification, and particularly to a traffic accident identification method based on computer vision. Background Art

[0002] With the rapid expansion of the urban scale and the rapid increase in the number of traffic vehicles, traffic accidents have become the most troublesome problem in traffic management. When a traffic accident occurs, traffic police usually need to go to the scene to divide the responsibilities of the traffic accident, and even ambulances are needed for rescue and fire trucks for fire extinguishing and explosion prevention. From the occurrence of a traffic accident to the arrival of the traffic police at the scene, processes such as answering the alarm call, positioning, and transferring the traffic police are usually required, which takes a certain amount of time. If a traffic accident occurs during the rush hour, traffic may be severely blocked during the waiting process for the traffic police, and secondary traffic accidents may be triggered, posing a safety hazard.

[0003] Quick identification of traffic accidents can reduce property losses and casualties caused by untimely rescue and can quickly respond to the location of traffic accidents. Thus, traffic accident information can be released through traffic broadcasts and other means, so that drivers can avoid the accident road in time and prompt the traffic police to conduct traffic control in time. For this reason, a traffic accident identification method based on computer vision is proposed. Video data is collected through traffic monitoring videos, in-vehicle cameras, and drone aerial photography and preprocessed, so that traffic data can be transmitted to the target detection and tracking module. The target detection and tracking module can output the position, speed, movement direction, and trajectory data of the target, thereby enabling behavior analysis and event identification, so that traffic events can be quickly identified and reported, enabling traffic monitoring personnel to quickly respond to traffic events, and a training data set is provided to fully train past traffic accident data, thereby optimizing the anomaly threshold and improving the recognition accuracy. Summary of the Invention

[0004] The present invention provides a traffic accident identification method based on computer vision, which solves the problems raised in the above-mentioned background art. It enables traffic monitoring personnel to quickly respond to real-time traffic accidents, so as to promptly respond and push them to the traffic management center, improve the efficiency of dispatching police, push the alarm signal to the in-vehicle system to assist in navigation and route change, reduce congestion on the accident section, and push the alarm signal to the traffic broadcast to prompt drivers to plan routes in time.

[0005] The solution of the present invention to the above technical problems is as follows: A traffic accident identification method based on computer vision includes a data acquisition module, a data preprocessing module, a target detection and tracking module, a behavior analysis module, an event recognition model, and an alarm module. The data of the data acquisition module is collected from traffic monitoring videos, in-vehicle cameras, and drone aerial photography;

[0006] The traffic accident recognition method includes the following steps:

[0007] S1: The data acquisition module collects video data through traffic monitoring videos, in-vehicle cameras, and drone aerial photography, and transmits the collected data to the data preprocessing module. The data preprocessing module performs image denoising, distortion correction, and video frame sampling on the collected data to form target data, which includes target position data, target speed data, target motion direction data, and target trajectory data.

[0008] S2: Behavior analysis. The target data is sent to the behavior analysis module, which judges the target data. According to the target position, it analyzes the vehicle distance and collision risk, the interaction between pedestrians and vehicles, and the detection of vehicle side slip and deviation. When abnormal behavior occurs, it sends the abnormal behavior data to the event recognition model.

[0009] Vehicle distance and collision risk analysis:

[0010] Input: The center pixel coordinates of the detection frames of two consecutive vehicles: (u1, v1) and (u2, v2); vehicle speeds (calculated by the tracker or obtained through the CAN bus): v_ego (the speed of the vehicle itself), v_front (the speed of the vehicle in front); camera calibration parameters: fx = 1200, fy = 1200, cx = 640, cy = 360, h = 1.5m, θ = 30°.

[0011] Output:

[0012] Real-time vehicle distance (in meters)

[0013] Collision risk level (safe / warning / urgent)

[0014] Specific algorithm steps and formulas:

[0015] 1. Calculation of vehicle actual coordinates

[0016] Use the inverse perspective projection formula (see the previous text) to convert the pixel coordinates into actual ground coordinates: \begin{cases}

[0017] X = \frac{h\cdot x_{\text{norm}}}{\sinθ - y_{\text{norm}}\cosθ}\\

[0018] Y = \frac{h\cdot\cosθ}{\sinθ - y_{\text{norm}}\cosθ}

[0019] \end{cases};

[0020] Where

[0021] 2. Real-time distance calculation

[0022] Euclidean distance formula:

[0023] $D_{\text{current}}=\sqrt{(X_2 - X_1)^2+(Y_2 - Y_1)^2}$

[0024] 3. Relative speed calculation

[0025] Traveling in the same direction:

[0026] Traveling in the same direction:

[0027] 4. Time to collision (TTC) calculation

[0028] $\text{TTC}=$

[0029] \begin{cases}

[0030] \frac{D_{\text{current}}}{v_{\text{rel}}}&\text{if}v_{\text{rel}}>0\text{ (dangerously approaching)}\\

[0031] \infty&\text{if}v_{\text{rel}}\leq0\text{ (safely away)}\\

[0032] \end{cases};

[0033] 5. Collision risk judgment rules

[0034] Safe: TTC > 5, D > 15;

[0035] Warning: 2 < TTC ≤ 5, 5 ≤ D ≤ 15;

[0036] Emergency: TTC ≤ 2, D < 5;

[0037] Pedestrian-vehicle interaction analysis: For motion direction prediction, use the optical flow method to track feature points with the Lucas-Kanade algorithm, calculate the predicted path segments of pedestrians and vehicles, and detect the intersection of line segments using the ray method or vector cross product;

[0038] Input:

[0039] Sequence of center pixel coordinates of pedestrian / vehicle detection boxes (last 5 frames)

[0040] Target speed vectors $(v_{\text{ped}},\theta_{\text{ped}})$ and $(v_{\text{veh}},\theta_{\text{veh}})$

[0041] Camera calibration parameters: fx = 1200, fy = 1200, cx = 640, cy = 360, h = 1.5m, θ = 30°

[0042] Output:

[0043] Interaction risk level (Safe / Low risk / High risk)

[0044] Predicted Time to Collision (PTC, Pedestrian Time to Collision);

[0045] Specific calculation method:

[0046] 1. Motion trajectory prediction

[0047] Short-term prediction (within the next 1 second):

[0048] \begin{cases}

[0049] x_{\text{future}} = x_0 + v\cdot\Delta t\cdot\cos\theta\\

[0050] y_{\text{future}} = y_0 + v\cdot\Delta t\cdot\sin\theta

[0051] \end{cases};

[0052] Long-term prediction (Social-LSTM model):

[0053] # Input: Historical trajectory coordinate sequence [X_{t - 4}, X_{t - 3},..., X_t]

[0054] # Output: 20 probabilistic trajectories for the next 3 seconds

[0055] lstm_hidden = social_lstm(history_trajectory)

[0056] future_trajs = trajectory_decoder(lstm_hidden);

[0057] 2. Path conflict detection

[0058] Ray intersection determination:

[0059] \begin{cases}

[0060] \text{Pedestrian path}: P(s) = P_0 + s\cdot\vec{v}_{\text{ped}}\\

[0061] Vehicle path: V(t) = V_0 + t·\vec{v}_{\text{veh}}

[0062] \end{cases};

[0063] 3. Space-time conflict analysis

[0064] \DeltaT = \left|\frac{D_{\text{ped\_to\_cross}}}{v_{\text{ped}}} - \frac{D_{\text{veh\_to\_cross}}}{v_{\text{veh}}}\right|

[0065] 4. Interaction risk judgment rules

[0066] Safe: \DeltaT > 3, D > 5;

[0067] Low risk: 1 ≤ \DeltaT ≤ 3, 2 ≤ D ≤ 5;

[0068] High risk: \DeltaT < 1, D < 2;

[0069] Vehicle side-slip offset detection: Extract the standard deviation of vehicle lateral displacement, curvature change rate, and yaw rate, and perform sliding window statistics;

[0070] Input data:

[0071] Vehicle trajectory coordinate sequence (frequency 20Hz): [(x0,y0),(x1,y1),...,(x n ,y n )]

[0072] Steering wheel angle (SteeringAngle): \delta ∈ [-540°, +540°]

[0073] Yaw rate (YawRate): ω (rad / s)

[0074] Vehicle speed: v (m / s)

[0075] Output:

[0076] Side-slip state (none / slight / severe)

[0077] Offset (meter)

[0078] Predicted risk time (STR, SlideTimeRisk)

[0079] Specific calculation method:

[0080] Feature 1: Lateral acceleration anomaly

[0081] a_{\text{lat}} = v\cdot\omega-\frac{v^2}{R}

[0082] \quad\text{where}\quad R=\frac{v}{\omega}\(\text{theoretical turning radius}\), and it is triggered when the deviation between the actual lateral acceleration and the theoretical value exceeds the threshold;

[0083] Feature 2: Standard deviation of lateral trajectory deviation

[0084] σ = lateral_deviation(real_traj,ref_traj)

[0085] Feature 3: Dynamic relationship between steering wheel and yaw angle

[0086] K=\frac{\omega\cdot L}{v\cdot\delta}\quad(L: wheelbase)

[0087] Under normal circumstances, K≈1, and when |K - 1|>0.3, it indicates tire sideslip;

[0088] No sideslip: σ<0.15, 0.7≤K≤1.3;

[0089] Slight sideslip: 0.15≤σ<0.3, K<0.5 or K>1.5:

[0090] Severe sideslip: σ≥0.3, K<0.3 or K>2.0,

[0091] A machine learning model can be constructed based on the features of lateral acceleration, steering wheel angle, and vehicle speed using an SVM or lightweight neural network classifier;

[0092] S3: Traffic alert processing, traffic time recognition, the event recognition model sets the abnormal behavior data threshold based on traffic regulations and past vehicle accident situations, analyzes the vehicle distance and collision risk to determine the risk level: safe (TTC>5s), warning (2s<TTC≤5s), emergency (TTC≤2s), analyzes the interaction between pedestrians and vehicles: determines whether there is an interaction risk, detects vehicle sideslip offset to check for sideslip warnings, and when the threshold is exceeded, exports the event recognition determination result and triggers an audible and visual alarm at the management personnel's location. The management personnel can then manually verify the identified traffic accidents in real time. After manual verification, the correct data verification results and incorrect data results can be used to form a training data set, and the data threshold can be adjusted based on the accuracy of the training data set. The event recognition model can also perform deep learning based on the available data, thereby further improving the accuracy of traffic recognition;

[0093] S4: If the manual preliminary verification determines that it is a traffic accident, the alarm module will be activated. The alarm module will push the alarm signal to the traffic management center, arrange for the nearest traffic police to arrive at the scene in a timely manner as needed, push the alarm signal to the in-vehicle system to assist in changing the navigation route, and push the alarm signal to the traffic radio so that the driver can timely understand the traffic accident situation.

[0094] Based on the above technical solutions, the present invention can be further improved as follows.

[0095] Further, in S1, the data preprocessing module performs enhanced light processing on the data at night and in bad weather to reduce the interference of complex environments such as low light, rain, snow, and fog.

[0096] Further, in S3, after manual preliminary verification, the correct data preliminary verification results and incorrect data results can form a training data set. The data threshold can be adjusted according to the accuracy rate of the training data set, and deep learning can be performed according to the available event recognition model, so as to further improve the accuracy rate of traffic recognition.

[0097] Further, the event recognition model in S1 can combine in-vehicle radar and lidar data to reduce false alarms of abnormal behaviors, thereby further improving the recognition accuracy rate.

[0098] The beneficial effects of the present invention are as follows: The present invention provides a traffic accident recognition method based on computer vision, having the following advantages:

[0099] 1. Video data is collected through traffic monitoring videos, in-vehicle cameras, and drone aerial photography and preprocessed, so that traffic data can be transmitted to the target detection and tracking module. The target detection and tracking module can output the position, speed, movement direction, and trajectory data of the target, thereby enabling behavior analysis and event recognition, quickly identifying traffic events and reporting them, enabling traffic monitoring personnel to quickly respond to traffic events;

[0100] 2. A training data set is set up to fully train past traffic accident data, thereby optimizing the abnormal threshold and improving the recognition accuracy rate;

[0101] 3. Quickly recognize traffic accidents on the road, enabling traffic monitoring personnel to quickly respond to real-time traffic accidents, and then timely respond and push them to the traffic management center, improving the efficiency of dispatching police. Pushing the alarm signal to the in-vehicle system can assist in changing the navigation route, reducing congestion on the accident section. Pushing the alarm signal to the traffic radio can prompt the driver to plan the route in a timely manner, thereby alleviating traffic jams caused by traffic accidents, improving the efficiency of traffic guidance and traffic rescue, reducing the manual consumption required for traffic monitoring, and improving the work efficiency of traffic management work.

[0102] The above description is only an overview of the technical solution of the present invention. In order to understand the technical means of the present invention more clearly and be able to implement it in accordance with the content of the specification, the following describes in detail with reference to the preferred embodiments of the present invention and the accompanying drawings. The specific implementation manners of the present invention are given in detail by the following embodiments and their accompanying drawings. Description of the Drawings

[0103] The drawings described herein are used to provide a further understanding of the present invention and form a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0104] Figure 1 is a flowchart of a method for traffic accident recognition based on computer vision provided by an embodiment of the present invention;

[0105] Figure 2 is a schematic diagram of a data acquisition module in a method for traffic accident recognition based on computer vision provided by an embodiment of the present invention;

[0106] Figure 3 is a schematic diagram of a data preprocessing module in a method for traffic accident recognition based on computer vision provided by an embodiment of the present invention;

[0107] Figure 4 is a schematic diagram of target data in a method for traffic accident recognition based on computer vision provided by an embodiment of the present invention;

[0108] Figure 5 is a flowchart of a behavior analysis module in a method for traffic accident recognition based on computer vision provided by an embodiment of the present invention. Detailed Implementation Manner

[0109] The following combines the attached Figures 1-5 Describe the principles and features of the present invention. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention. The present invention will be described more specifically by way of example in the following paragraphs with reference to the accompanying drawings. According to the following description and the claims, the advantages and features of the present invention will be clearer. It should be noted that the drawings are all in a very simplified form and use non-precise scales, only for the purpose of facilitating and clearly assisting in explaining the objectives of the embodiments of the present invention.

[0110] It should be noted that when a component is referred to as "fixed to" another component, it can be directly on the other component or there may be an intermediate component. When a component is considered to be "connected to" another component, it can be directly connected to the other component or there may be an intermediate component at the same time. When a component is considered to be "disposed on" another component, it can be directly disposed on the other component or there may be an intermediate component at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0111] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. The terms used in the specification of this invention are for the purpose of describing specific embodiments only and are not intended to limit the invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0112] As Figures 1-5 shown, the present invention provides a traffic accident recognition method based on computer vision, including a data acquisition module, a data preprocessing module, a target detection and tracking module, a behavior analysis module, an event recognition model, and an alarm module. The data acquisition module acquires data from traffic monitoring videos, in-vehicle cameras, and drone aerial photography.

[0113] The specific working principle and usage method of the present invention are as follows:

[0114] S1: Traffic data processing. The data acquisition module acquires video data through traffic monitoring videos, in-vehicle cameras, and drone aerial photography, and transmits the acquired data to the data preprocessing module. The data preprocessing module performs image denoising, distortion correction, and video frame sampling on the acquired data to form target data.

[0115] The processing of traffic monitoring video data is specifically as follows: 1. Non-local means (NLM) denoising; 2. Using checkerboard automatic calibration (calibrated monthly); 3. Event-driven sampling, switching to 30fps when an accident is detected by YOLOv7, and downsampling to 5fps during normal periods.

[0116] The processing of in-vehicle camera video data is specifically as follows: 1. Using the FFDNet lightweight model to process in-vehicle videos in real time; 2. Using SLAM to estimate distortion parameters online for calibration in real time; 3. IMU data fusion sampling, maintaining a high frame rate during sudden acceleration.

[0117] The processing of the video collected by the drone aerial photography is specifically as follows: 1. Use FastDVDNet multi-frame fusion for video noise reduction; 2. Fix the parameters of the Kannala-Brandt fisheye model; 3. Perform dynamic correction based on the elastic grid deformation of ORB feature matching;

[0118] The target data includes target position data, target speed data, target movement direction data, and target trajectory data. The data preprocessing module performs enhanced lighting processing on the data at night and in bad weather to reduce the interference of complex environments such as low light, rain, snow, and fog. The event recognition model can combine vehicle radar and lidar data to reduce false alarms of abnormal behaviors, thereby further improving the recognition accuracy;

[0119] S2: Behavior analysis. The target data is sent to the behavior analysis module. The behavior analysis module judges the target data, analyzes the vehicle distance and collision risk based on the target position, the interaction between pedestrians and vehicles, and detects vehicle side slip and deviation. When an abnormal behavior occurs, the abnormal behavior data is sent to the event recognition model;

[0120] The specific method is as follows:

[0121] Analysis of vehicle distance and collision risk:

[0122] Input: The center pixel coordinates of the detection frames of two vehicles: (u1, v1) and (u2, v2);

[0123] Vehicle speeds (calculated by the tracker or obtained through the CAN bus): v_ego (the speed of the vehicle itself), v_front (the speed of the vehicle in front);

[0124] Camera calibration parameters: fx = 1200, fy = 1200, cx = 640, cy = 360, h = 1.5m, θ = 30°;

[0125] Output:

[0126] Real-time vehicle distance (in meters)

[0127] Collision risk level (safe / warning / urgent)

[0128] Specific algorithm steps and formulas:

[0129] 1. Calculation of the actual vehicle coordinates

[0130] Use the inverse perspective projection formula (see the previous text for details) to convert the pixel coordinates into actual ground coordinates: \begin{cases}

[0131] X = \frac{h\cdot x_{\text{norm}}}{\sinθ - y_{\text{norm}}\cosθ}\\

[0132] Y = \frac{h\cdot\cosθ}{\sinθ - y_{\text{norm}}\cosθ}

[0133] \end{cases};

[0134] Where

[0135]

[0136] 2. Real - time distance calculation

[0137] Euclidean distance formula:

[0138] D_{\text{current}}=\sqrt{(X_2 - X_1)^2+(Y_2 - Y_1)^2}

[0139] 3. Relative - speed calculation

[0140] Traveling in the same direction:

[0141] v rel = v ego - v front

[0142] Traveling in the same direction:

[0143] v rel = v ego + v front

[0144] 4. Time - to - collision (TTC) calculation

[0145] \text{TTC} =

[0146] \begin{cases}

[0147] \frac{D_{\text{current}}}{v_{\text{rel}}}&\text{if}v_{\text{rel}}>0\ (\text{Dangerously approaching})\\

[0148] \infty&\text{if}v_{\text{rel}}\leq0\ (\text{Safe and far away})

[0149] \end{cases};

[0150] 5. Collision - risk judgment rule

[0151] Safe: TTC > 5, D > 15;

[0152] Warning: 2 < TTC ≤ 5, 5 ≤ D ≤ 15;

[0153] Emergency: TTC ≤ 2, D < 5;

[0154] Pedestrian-vehicle interaction analysis: motion direction prediction, using the optical flow method to track feature points with the Lucas-Kanade algorithm, calculating the predicted path segments of pedestrians and vehicles, and detecting the intersection of line segments by the ray method or vector cross product;

[0155] Input:

[0156] Sequence of center pixel coordinates of pedestrian / vehicle detection boxes (last 5 frames)

[0157] Target velocity vectors (v_ped, θ_ped) and (v_veh, θ_veh)

[0158] Camera calibration parameters: fx = 1200, fy = 1200, cx = 640, cy = 360, h = 1.5m, θ = 30°

[0159] Output:

[0160] Interaction risk level (safe / low risk / high risk)

[0161] Predicted time to collision (PTC, Pedestrian Time to Collision);

[0162] Specific calculation method:

[0163] 1. Motion trajectory prediction

[0164] Short-term prediction (within the next 1 second):

[0165] \begin{cases}

[0166] x_{\text{future}} = x_0 + v\cdot\Delta t\cdot\cos\theta\\y_{\text{future}} = y_0 + v\cdot\Delta t\cdot\sin\theta

[0167] \end{cases};

[0168] Long-term prediction (Social-LSTM model):

[0169] # Input: Sequence of historical trajectory coordinates [X_{t - 4}, X_{t - 3},..., X_t]

[0170] # Output: 20 probabilistic trajectories for the next 3 seconds

[0171] lstm_hidden = social_lstm(history_trajectory)

[0172] future_trajs = trajectory_decoder(lstm_hidden);

[0173] 2. Path conflict detection

[0174] Ray intersection determination:

[0175] \begin{cases}

[0176] Pedestrian path: P(s)=P_0 + s\cdot\vec{v}_{\text{ped}}\\

[0177] Vehicle path: V(t)=V_0 + t\cdot\vec{v}_{\text{veh}}

[0178] \end{cases};

[0179] 3. Spatiotemporal conflict analysis

[0180] \DeltaT=\left|\frac{D_{\text{ped\_to\_cross}}}{v_{\text{ped}}}-\frac{D_{\text{veh\_to\_cross}}}{v_{\text{veh}}}\right|

[0181] 4. Interaction risk judgment rules

[0182] Safe: \DeltaT>3, D>5;

[0183] Low risk: 1\leq\DeltaT\leq3, 2\leq D\leq5;

[0184] High risk: \DeltaT<1, D<2;

[0185] Vehicle side slip offset detection: Extract the standard deviation of vehicle lateral displacement, curvature change rate, and yaw angular velocity, and perform sliding window statistics;

[0186] Input data:

[0187] Vehicle trajectory coordinate sequence (frequency 20Hz): [(x0,y0),(x1,y1),...,(x n ,y n )]

[0188] Steering wheel angle (SteeringAngle): \delta\in[-540^{\circ}, +540^{\circ}]

[0189] Yaw Rate: ω (rad / s)

[0190] Vehicle speed: v (m / s)

[0191] Output:

[0192] Sideslip state (none / slight / severe)

[0193] Offset (meter)

[0194] Predicted risk time (STR, SlideTimeRisk)

[0195] Specific calculation method:

[0196] Feature 1: Abnormal lateral acceleration

[0197] a_{\text{lat}} = v\cdot\omega-\frac{v^2}{R}

[0198] \quad\text{where}\quad R=\frac{v}{\omega}\ (\text{theoretical turning radius}), and it is triggered when the deviation between the actual lateral acceleration and the theoretical value exceeds the threshold;

[0199] Feature 2: Standard deviation of lateral trajectory offset

[0200] σ = lateral_deviation(real_traj,ref_traj)

[0201] Feature 3: Dynamic relationship between steering wheel - yaw angle

[0202] K=\frac{\omega\cdot L}{v\cdot\delta}\quad(L: wheelbase)

[0203] Under normal circumstances, K≈1, and when |K - 1|>0.3, it indicates tire sideslip;

[0204] No sideslip: σ<0.15, 0.7≤K≤1.3;

[0205] Slight sideslip: 0.15≤σ<0.3, K<0.5 or K>1.5:

[0206] Severe sideslip: σ≥0.3, K<0.3 or K>2.0,

[0207] A machine learning model can be constructed with an SVM or lightweight neural network classifier based on the features of lateral acceleration, steering wheel angle, and vehicle speed;

[0208] S3: Traffic alarm processing, traffic time recognition, event recognition model sets abnormal behavior data thresholds based on traffic regulations and past vehicle accidents, and vehicle spacing and collision risk analysis determines risk levels: safe (TTC>5s), warning (2s <TTC≤5s)、紧急(TTC≤2s),行人与车辆交互分析:判断是否有交互风险,车辆侧滑偏移检测是否有侧滑预警,超过阈值即导出事件识别判定结果并触发管理人员处的声光报警,管理人员即可对识别的交通事故实时进行人工准核,人工准核后可将判断正确的数据准核结果和判断错误的数据结果构成训练数据集,并可根据训练数据集的准确率对数据阈值进行调节,并可根据可供事件识别模型进行深度学习,从而可进一步提高交通识别的准确率;

[0209] S4: If it is manually determined to be a traffic accident, the alarm module is activated, and the alarm module pushes the alarm signal to the traffic management center, and arranges the nearest traffic police to respond in time as needed. The alarm signal is pushed to the vehicle system to assist navigation in changing the route, and the alarm signal is pushed to the traffic broadcast so that the driver can understand the traffic accident situation in time.

[0210] Example 1: Vehicles traveling in the same direction

[0211] Vehicle A (this vehicle):

[0212] Pixel coordinates: (600,400) → actual coordinates (X1 = -0.72m, Y1 = 4.1m), speed: v_ego = 15m / s (54km / h);

[0213] Vehicle B (front vehicle):

[0214] 1. Pixel coordinates: (700,380) → actual coordinates (X2 = 1.62m, Y2 = 4.3m), speed: v_front = 12m / s (43.2km / h);

[0215] 2. Spacing calculation: D_{\text{current}}=\sqrt{(1.62-(-0.72))^2+(4.3-4.1)^2}≈2.35m;

[0216] 3. Relative speed: v_{\text{rel}}=15-12=3m / s\(\text{same direction, this car is faster});

[0217] 4. TTC calculation: \text{TTC}=\frac{2.35}{3}≈0.78s;

[0218] 5. Risk Judgment: TTC ≈ 0.78s < 2s, actual distance 2.35m < 5m → Emergency risk;

[0219] Example 2: Vehicle oncoming driving scenario

[0220] Vehicle A (this vehicle):

[0221] Actual coordinates (X1 = 10m, Y1 = 0m), speed: v_ego = 20m / s (72km / h);

[0222] Vehicle B (oncoming vehicle):

[0223] 1. Actual coordinates (X2 = -8m, Y2 = 0m) (opposite lane relative to this vehicle), speed: v_front = 18m / s (64.8km / h);

[0224] 2. Distance calculation: D_{\text{current}}=\sqrt{(-8 - 10)^2+(0 - 0)^2}=18m;

[0225] 3. Relative speed: v_{\text{rel}} = 20 + 18 = 38m / s (opposite direction superposition);

[0226] 4. TTC calculation: \text{TTC}=\frac{18}{38}\approx0.47s;

[0227] 5. Risk Judgment: TTC ≈ 0.47s < 2s, actual distance 18m > 5m → Emergency risk;

[0228] Example 3: Pedestrian crossing the road scenario

[0229] Current coordinates of the pedestrian: (X_ped = 2m, Y_ped = 3m), speed: v_ped = 1.5m / s, direction angle: θ_ped = 270° (due west);

[0230] Current coordinates of the vehicle: (X_veh = 15m, Y_veh = 3m), speed: v_veh = 10m / s, direction angle: θ_veh = 180° (due south);

[0231] 1. Path prediction:

[0232] Pedestrian path: Straight west, arriving at (2 - 1.5*1, 3)=(0.5m, 3m) after 1 second;

[0233] Vehicle path: Straight south, arriving at (15, 3 - 10*1)=(15m, -7m) after 1 second;

[0234] 2. Social-LSTM prediction:

[0235] Pedestrian's future 3 - second trajectory probability:

[0236] traj_probs = [0.6: Continuing westward, 0.3: Turning southwest, 0.1: Stopping]

[0237] Highest - probability path: Continuing westward into the lane;

[0238] 3. Spatiotemporal conflict detection:

[0239] Distance of the pedestrian to the conflict point: D_ped = 0m (already at the conflict point)

[0240] Longitudinal distance of the vehicle to the conflict point: D_veh = 15m - 2m = 13m

[0241] Estimated arrival time:

[0242] t_{\text{ped}} = 0 / 1.5 = 0s\quad t_{\text{veh}} = 13m / 10m / s = 1.3s;

[0243] Time difference: ΔT = |0 - 1.3| = 1.3s;

[0244] 4. Risk judgment: ΔT = 1.3s ∈ [1, 3] → Low risk, actual distance D = 0m < 2m → Upgraded to high risk (the pedestrian has entered the dangerous area)

[0245] Example 4: Vehicle right - turn and pedestrian conflict scenario

[0246] Pedestrian:

[0247] Current coordinates: (X = 5m, Y = 1m), speed 1.2m / s, direction 0° (due north);

[0248] Vehicle:

[0249] Current coordinates: (X = 5m, Y = 10m), speed 2m / s, direction 270° (due west, turning right);

[0250] Conflict area: Crosswalk area X ∈ [4, 6], Y ∈ [2, 3];

[0251] 1. Trajectory prediction:

[0252] Calculation of the vehicle's turning radius:

[0253] R=\frac{v^2}{g\cdot\mu}=\frac{2^2}{9.8\cdot0.7}\approx0.58m\quad (\mu is the friction coefficient);

[0254] Predicted path:

[0255] \begin{cases}

[0256] X_{\text{veh}}(t)=5 - R(1 - \cos(\frac{vt}{R}))\\

[0257] Y_{\text{veh}}(t)=10 - R\sin(\frac{vt}{R})

[0258] \end{cases};

[0259] 2. Space - time conflict analysis:

[0260] Time when pedestrian arrives at conflict area:

[0261] t_{\text{ped}}=\frac{2m}{1.2m / s}\approx1.67s;

[0262] Time when vehicle arrives at conflict area (solving the motion equation):

[0263] t_{\text{veh}}\approx2.1s;

[0264] Time difference: \(\Delta T = |1.67 - 2.1| = 0.43s\);

[0265] 3. Risk judgment:

[0266] \(\Delta T = 0.43s\lt1s\rightarrow\) High risk;

[0267] Example 5: Road surface emergency avoidance scenario

[0268] Vehicle parameters:

[0269] Vehicle speed: \(v = 25m / s(90km / h)\), steering wheel angle: \(\delta = 120^{\circ}\) (left turn), yaw rate: \(\omega = 0.45rad / s\), wheelbase: \(L = 2.8m\);

[0270] Trajectory data (partial): real_traj = [(0,0),(-0.2,4.9),(-0.8,9.8)] # Actual trajectory;

[0271] ref_traj = [(0,0),(0,5.0),(0,10.0)] # Expected straight - line trajectory actual spacing;

[0272] Detection process:

[0273] Feature calculation:

[0274] Lateral acceleration: R = 25 / 0.45 ≈ 55.56 m → a_lat = 25 × 0.45 - 25 2 / 55.56 ≈ 3.2 m / s 2 ;

[0275] Standard deviation of trajectory deviation: σ = lateral_deviation(real_traj, ref_traj) # Calculation result ≈ 0.28 m;

[0276] Steering wheel - yaw angle coefficient: K = (0.45 × 2.8) / (25 × 120° × π / 180) ≈ 0.45 × 2.8 / (25 × 2.094) ≈ 0.23;

[0277] Comprehensive judgment:

[0278] a_lat = 3.2 ∈ [2.5, 4.0) → Slight

[0279] σ = 0.28 ∈ [0.15, 0.3) → Slight

[0280] K = 0.23 < 0.5 → Slight

[0281] Final determination: Slight sideslip;

[0282] Example 6: Scenario of accelerating out of control on an icy road surface

[0283] Vehicle parameters:

[0284] Vehicle speed: v = 10 m / s (36 km / h), steering wheel angle: δ = 30° (right turn), yaw angular velocity: ω = 0.05 rad / s, wheelbase: L = 2.7 m

[0285] Trajectory data:

[0286] real_traj = [(0, 0), (1.2, 3.1), (2.5, 6.0)] # Significantly right - biased;

[0287] ref_traj = [(0, 0), (0.3, 3.0), (0.6, 6.0)] # Expected trajectory;

[0288] Detection process:

[0289] 1. Feature calculation: Lateral acceleration:

[0290] R = 10 / 0.05 = 200 m → a_lat = 10 × 0.05 - 10 2 / 200 = 0.5 - 0.5 = 0 m / s 2 ;

[0291] Standard deviation of trajectory deviation:

[0292] σ = lateral_deviation(real_traj, ref_traj) # Calculation result ≈ 1.7m;

[0293] Steering wheel - yaw angle coefficient:

[0294] K = (0.05 × 2.7) / (10 × 30° × π / 180) ≈ 0.135 / (10 × 0.523) ≈ 0.026

[0295] 2. Comprehensive judgment:

[0296] a_lat = 0 → Abnormal;

[0297] σ = 1.7 ≥ 0.3 → Severe;

[0298] K = 0.026 < 0.3 → Severe;

[0299] Final determination: Severe sideslip

[0300] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. The content not described in detail in this specification belongs to the prior art well known to those skilled in the art.

[0301] The above is only a preferred embodiment of the present invention, and does not impose any form of limitation on the present invention; any ordinary technician in the industry can smoothly implement the present invention according to the illustrations in the specification and the above description; however, any equivalent changes made by those skilled in the art within the scope of the technical solution of the present invention by using the technical content disclosed above for minor modifications, decorations and evolutions are equivalent embodiments of the present invention; at the same time, any equivalent changes, modifications and evolutions made to the above embodiments based on the essence of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A traffic accident recognition method based on computer vision, comprising a data acquisition module, a data preprocessing module, a target detection and tracking module, a behavior analysis module, an event recognition model, and an alarm module, characterized in that: The data acquisition module collects data from traffic monitoring videos, in-vehicle cameras, and drone aerial photography; The traffic accident recognition method includes the following steps: S1: Traffic data processing. The data acquisition module collects video data through traffic monitoring videos, in-vehicle cameras, and drone aerial photography, and transmits the collected data to the data preprocessing module. The data preprocessing module performs image denoising, distortion correction, and video frame sampling on the collected data to form target data; S2: Behavior analysis. The target data is sent to the behavior analysis module. The behavior analysis module judges the target data, analyzes the vehicle distance and collision risk, the interaction between pedestrians and vehicles, and the vehicle side slip offset detection based on the target position. When abnormal behavior occurs, it sends abnormal behavior data to the event recognition model; Vehicle distance and collision risk analysis: Input: Center pixel coordinates of the detection frames of two consecutive frames of vehicles: (u1, v1) and (u2, v2); Vehicle speeds (obtained through a tracker or CAN bus): v_ego (own vehicle speed), v_front (front vehicle speed); Camera calibration parameters: fx = 1200, fy = 1200, cx = 640, cy = 360, h = 1.5m, θ = 30°; Output: Real-time vehicle distance (meters) Collision risk level (safe / warning / urgent) Specific algorithm steps and formulas:

1. Calculation of vehicle actual coordinates Use the inverse perspective projection formula (see the previous text) to convert pixel coordinates to actual ground coordinates: \begin{cases} X=\frac{h\cdot x_{\text{norm}}}{\sin\theta - y_{\text{norm}}\cos\theta}\\Y=\frac{h\cdot\cos\theta}{\sin\theta - y_{\text{norm}}\cos\theta} \end{cases}; Where 2. Calculation of real-time distance Euclidean distance formula: D_{\text{current}}=\sqrt{(X_2 - X_1)^2+(Y_2 - Y_1)^2} 3. Calculation of relative speed Traveling in the same direction: Traveling in the same direction:

4. Calculation of time to collision (TTC) \text{TTC}= \begin{cases} \frac{D_{\text{current}}}{v_{\text{rel}}}&\text{if}v_{\text{rel}}>0\ (\text{dangerously approaching})\\ \infty&\text{if}v_{\text{rel}}\leq0\ (\text{safely away}) \end{cases}; 5. Collision risk judgment rules Safe: TTC > 5, D > 15; Warning: 2 < TTC ≤ 5, 5 ≤ D ≤ 15; Urgent: TTC ≤ 2, D < 5; Pedestrian and vehicle interaction analysis: motion direction prediction, using optical flow method to track feature points with Lucas-Kanade algorithm, calculating the predicted path segments of pedestrians and vehicles, and detecting the intersection of line segments by ray method or vector cross product; Input: Sequence of center pixel coordinates of pedestrian / vehicle detection boxes (last 5 frames) Target velocity vectors (v_ped, θ_ped) and (v_veh, θ_veh) Camera calibration parameters: fx = 1200, fy = 1200, cx = 640, cy = 360, h = 1.5m, θ = 30°. Output: Interaction risk level (safe / low risk / high risk) Predicted time to collision (PTC, Pedestrian Time to Collision); Specific calculation methods:

1. Motion trajectory prediction Short-term prediction (within the next 1 second): \begin{cases} x_{\text{future}} = x_0 + v\cdot\Delta t\cdot\cos\theta\\ y_{\text{future}} = y_0 + v\cdot\Delta t\cdot\sin\theta \end{cases}; Long-term prediction (Social-LSTM model): # Input: Sequence of historical trajectory coordinates [X_{t - 4}, X_{t - 3},..., X_t] # Output: 20 probabilistic trajectories for the next 3 seconds lstm_hidden = social_lstm(history_trajectory) future_trajs = trajectory_decoder(lstm_hidden); 2. Path conflict detection Ray intersection determination: \begin{cases} Pedestrian path: P(s) = P_0 + s\cdot\vec{v}_{\text{ped}}\\ Vehicle path: V(t) = V_0 + t\cdot\vec{v}_{\text{veh}} \end{cases}; 3. Spatiotemporal conflict analysis \Delta T=\left|\frac{D_{\text{ped\_to\_cross}}}{v_{\text{ped}}}-\frac{D_{\text{veh\_to\_cross}}}{v_{\text{veh}}}\right| 4. Interaction risk judgment rules Safe: \Delta T>3, D>5; Low risk: 1\leq\Delta T\leq3, 2\leq D\leq5; High risk: \Delta T<1, D<2; Vehicle side slip and offset detection: Extract the standard deviation of vehicle lateral displacement, curvature change rate, and yaw rate, and perform sliding window statistics; Input data: Vehicle trajectory coordinate sequence (frequency 20Hz): [(x0,y0),(x1,y1),...,(x n ,y n )] Steering angle: \delta\in[-540^{\circ}, +540^{\circ}] Yaw rate: \omega(rad / s) Vehicle speed: v(m / s) Output: Side-slip state (none / slight / severe) Offset (m) Predicted risk time (STR, SlideTimeRisk) Specific calculation method: Feature 1: Abnormal lateral acceleration a_{\text{lat}}=v\cdot\omega-\frac{v^2}{R} \quad\text{where}\quadR=\frac{v}{\omega}\(\text{theoretical turning radius}), and when the deviation between the actual lateral acceleration and the theoretical value exceeds the threshold, it is triggered; Feature 2: Standard deviation of lateral trajectory offset σ=lateral_deviation(real_traj,ref_traj) Feature 3: Dynamic relationship between steering wheel and yaw angle K=\frac{\omega\cdotL}{v\cdot\delta}\quad(L: wheelbase) Under normal circumstances, K≈1. When |K - 1|>0.3, it indicates tire side-slip; No side-slip: σ<0.15, 0.7≤K≤1.3; Slight side-slip: 0.15≤σ<0.3, K<0.5 or K>1.5: Severe side-slip: σ≥0.3, K<0.3 or K>2.0, A machine learning model can be constructed based on the lateral acceleration, steering wheel angle, and vehicle speed characteristics using an SVM or lightweight neural network classifier; S3: Traffic alert processing, traffic time recognition. The event recognition model sets the abnormal behavior data threshold based on traffic regulations and past vehicle accident situations. Vehicle distance and collision risk analysis are used to determine the risk level: safe (TTC>5s), warning (2s<TTC≤5s), emergency (TTC≤2s). Pedestrian-vehicle interaction analysis: Determine whether there is an interaction risk. Vehicle side-slip offset detection checks for side-slip warnings. When the threshold is exceeded, the event recognition determination result is exported and an audible and visual alarm is triggered at the management personnel's location. The management personnel can then manually verify the identified traffic accidents in real time. After manual verification, the correct and incorrect data verification results can form a training dataset, and the data threshold can be adjusted according to the accuracy of the training dataset. The event recognition model can perform deep learning based on the available data, thereby further improving the accuracy of traffic recognition; S4: If the manual verification determines that it is a traffic accident, the alarm module is activated. The alarm module pushes the alarm signal to the traffic management center, arranges for the nearest traffic police to arrive at the scene in a timely manner as needed, pushes the alarm signal to the in-vehicle system to assist in route change navigation, and pushes the alarm signal to the traffic radio so that the driver can promptly learn about the traffic accident situation.

2. The method for identifying traffic accidents based on computer vision according to claim 1, wherein In S1, the data preprocessing module performs enhanced lighting processing on the data at night and in bad weather.

3. The method for identifying traffic accidents based on computer vision according to claim 1, wherein In S3, after manual verification, the correct and incorrect data verification results can form a training dataset, and the data threshold can be adjusted according to the accuracy of the training dataset. The event recognition model can perform deep learning based on the available data.

4. The method for identifying traffic accidents based on computer vision according to claim 1, wherein The event recognition model in S1 can combine in-vehicle radar and lidar data to reduce false alarms of abnormal behaviors.

Citation Information

Cited By

  • Traffic alarm automatic processing system and method based on multi-modal large model

    CN121366489A