A traffic accident identification method based on improved YOLOv11

CN122967006APending Publication Date: 2026-10-23CHANGCHUN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610282924.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-10
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]本发明所解决的技术问题是基于深度学习的图像识别方法在交通场景下对车辆事故的识别准确性较低,对不同尺度的目标适应能力不足的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application relates to the technical field of computer vision and visual perception, and solves the technical problem of vehicle accident identification in a traffic scene, and provides a traffic accident identification method based on an improved YOLOv11. The method is based on a YOLOv11 target detection framework, a deformable attention module (Deformable Attention) is introduced in a feature fusion network, a dual-branch detection head (Dual-Branch Head) is constructed, and a Focaler-IoU loss function is used, so that the modeling capability of the model for multi-view and subtle physical damage features is effectively enhanced, the ability to distinguish between accident appearances that are similar but have different semantic behaviors is improved, and the missed detection rate of minor collision accidents is significantly reduced. Under the premise of ensuring the calculation efficiency, the traffic accident identification algorithm is superior to the original method in terms of accuracy, recall rate and real-time performance, and good performance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention proposes an improved YOLOv11 traffic accident recognition method based on deep learning. Based on the YOLOv11 framework, a deformable attention module is introduced, which greatly enhances the model's ability to extract subtle physical damage features from varying perspectives and significantly reduces the false negative rate of minor collision features. Furthermore, the Focaler-IoU loss function is adopted to effectively alleviate the sample imbalance problem and optimize bounding box regression under extremely slight deformations. A dual-branch head is constructed to achieve task decoupling and refined attribute determination, and feature sharing is used to improve computational efficiency, effectively solving the problem of recognizing similar accident behaviors. Background Technology

[0002] With the development and popularization of transportation, the number of motor vehicles has continued to rise, and traffic accidents have become a major factor affecting road traffic safety. Among various types of traffic accidents, minor accidents (such as side scrapes, rear-end collisions, and door knocks) occur far more frequently than major accidents. Although these accidents cause relatively small direct property losses, if they are not handled promptly, they can easily lead to traffic congestion, secondary accidents, and insurance claims disputes. Therefore, using computer vision technology to identify traffic accidents has significant practical implications.

[0003] In practical applications, existing deep learning-based object detection algorithms still have some technical limitations in traffic accident identification: Their ability to extract features from minor collisions is insufficient. When visual differences are small, traditional object detection models often use convolutional kernels with fixed shapes for feature extraction, making it difficult to capture collision points with random and non-rigid deformation characteristics. This results in low sensitivity of the model to minor accidents. Furthermore, the accuracy of bounding box regression is insufficient for discrimination requirements. Existing IoU loss functions suffer from gradient vanishing or regression instability when target overlap is high, making it difficult for the model to accurately distinguish the boundary between "safe driving at close range" and "actual minor collision," thus limiting the system's ability to accurately determine minor accidents. Therefore, existing identification methods still have shortcomings in traffic accident identification. With continuous technological advancements, it is necessary to improve and refine object detection techniques to enhance the accuracy of traffic accident identification and processing and the model's generalization ability. Summary of the Invention

[0004] The technical problem addressed by this invention is the low accuracy of deep learning-based image recognition methods in identifying vehicle accidents in traffic scenarios and their insufficient adaptability to targets of different scales. To address this, this invention proposes a traffic accident recognition method based on an improved YOLOv11 model. This method significantly improves the model's detection accuracy, convergence speed, and inference stability in complex scenarios by specifically improving the backbone network and detection head of the original YOLOv11 model.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] A traffic accident identification method based on an improved YOLOv11 includes the following steps: Step 1: Dataset preprocessing. Collect and organize traffic accident datasets that meet the research requirements, mainly including the CADP dataset (Car Accident Detection and Prediction) and traffic accident datasets created using BeamNG.drive. Adjust the traffic accident datasets to a size that can be used for network training according to the needs. Step 2: Introduce the Deformable Attention module, which performs adaptive spatial sampling and weighted fusion on feature maps of different scales to achieve dynamic alignment of features across scales; Step 3: Use a dual-branch head. Branch A is designed to use the YOLO head, while Branch B is responsible for determining the occurrence and severity of the incident. Step 4: Adding the Focaler-IoU loss function can adjust the model's focus weight on easy and difficult samples, accelerate convergence, and improve the regression accuracy of bounding boxes.

[0007] The specific details of step one are as follows: Both training and validation in this experiment used the CADP (Car Accident Detection and Prediction) dataset and a traffic accident dataset created using BeamNG.drive. The CADP dataset, a collaboration between the Language Technologies Institute at Carnegie Mellon University and the University of Tokyo, is primarily used for accident detection and prediction type analysis. BeamNG.drive is a physics engine-based platform for realistic vehicle dynamics simulation, capable of generating samples of different categories of minor traffic accidents in a low-cost, systematic, and relatively realistic manner, aiming to construct a balanced accident dataset. The dataset contains 7900 images, divided into five categories: door opening accidents, rear-end collisions, side scrapes, single-vehicle accidents, and cornering scrapes. The ratio of the experimental, test, and validation sets is 7:2:1, with complex background environments and diverse vehicle orientations and postures; the batch size is set to 8.

[0008] The specific details of step two are as follows: (1) In the YOLOv11 network structure, a Deformable Attention module is introduced before the C3k2 module. The feature maps of different resolutions output by the backbone network are denoted as F3, F4, and F5. First, the feature maps of different scales are mapped to a unified dimension through 1×1 convolution. Then, the multi-scale feature maps are unfolded in the spatial dimension and concatenated to form a continuous feature sequence. Sample offsets and weights are generated in parallel. For each query point, the system makes a prediction through a lightweight linear layer. The relative coordinate offset of each sampling point relative to the reference point ( The offset is a floating-point number, meaning that the sampling point can fall not only at the center of the pixel, but also anywhere in the feature map, while simultaneously predicting... Contribution weights corresponding to each sampling point ; (2) Since the predicted offset is a continuous value and cannot be directly mapped to the pixel index, bilinear interpolation is used for cross-scale spatial sampling. Features are extracted simultaneously from the offset on the multi-layer feature maps from F3 to F5. At the same time, spatial focusing enables the high-resolution details of F3 and the high semantic information of F5 to be associated based on the overlapping collision contact points. Therefore, the dynamic weighted fusion calculation formula for cross-scale features is: ; Where M represents M attention heads that focus on different features, and the features of the sampling points at L levels are linearly combined.

[0009] The specific details of step three are as follows: (1) At the output of the YOLOv11 feature fusion network Neck, a parallel splitting structure is designed, namely Branch A and Branch B. This parallel branch structure receives multi-scale augmented features from Neck. Branch A maintains the YOLOv11 decoupled head structure and contains two sub-branches, Reg (regression) and Cls (classification), which are responsible for predicting the bounding boxes of the target vehicle in the accident. and specific accident categories Confidence level of the existence of the target Branch B determines whether the current target being detected is in an accident state. If the accident determination is positive, it further classifies or regresses the severity of the accident and outputs the determination level. By using the Sigmoid activation function, the output is normalized to the range [0,1] to represent the probability; (2) To enable the two branches to operate in a coordinated manner, a multi-task loss function is designed, with the following formula: ; in This represents the branch loss, used to calculate the cross-entropy between the true labels. This indicates dynamic weight adjustment, with the weights increased during the initial training phase. Ensure the detection box converges quickly; increase the size during the later stages of training. This allows the model to learn the visual differences between minor accidents, serious accidents, or no accidents.

[0010] The specific details of step four are as follows: (1) Add the Focaler-IoU loss function, superimposed on the existing YOLOv11 default CIoU, based on the predicted bounding box. and the true bounding box The original IoU is calculated using the following formula: ; The core of Focaler-IoU is achieved by setting two hyperparameters. To reconstruct IoU; Mapping function Defined as: , ; Where d represents the control model ignoring extremely difficult samples with very low overlap, and u represents the control model saturation point for easily identifiable samples; (2) Regarding the weight adjustment logic for the samples, by adjusting... The value of is used to focus on the difficulty of samples, such as those corresponding to minor traffic accidents. The value is usually low, by reducing and The value of causes the model to produce a larger gradient, forcing it to optimize those tiny collision boxes with only a few pixels of deviation, resulting in a reconstructed model. Substituting into the loss calculation formula, we get the following formula: Attached Figure Description

[0011] Figure 1 This is a diagram of the improved YOLOv11 network model used in this invention; Figure 2 This is a structural diagram of the Deformable Attention module used in this invention; Figure 3 This is a structural diagram of the Dual-Branch Head used in this invention; Figure 4 This is a diagram of the Focaler-IoU loss function structure used in this invention. Detailed Implementation

[0012] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings. The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0013] This invention presents a traffic accident recognition method based on an improved YOLOv11 framework. It introduces a deformable attention module, significantly enhancing the model's ability to extract subtle physical damage features from varying perspectives and substantially reducing the false negative rate of minor collision features. Furthermore, it employs the Focaler-IoU loss function to effectively alleviate the sample imbalance problem and optimize bounding box regression under extremely slight deformations. A dual-branch head is constructed to achieve task decoupling and refined attribute determination, while feature sharing improves computational efficiency. This effectively solves the problem of recognizing similar accident behaviors, thus completing a vehicle accident recognition algorithm for traffic scenarios.

[0014] The specific implementation steps are as follows: Step 1.1 Select a traffic accident dataset suitable for your research, such as the CADP dataset, and perform routine preprocessing on the accident images, including resizing and other operations. Step 2.1 Introduce the Deformable Attention module, which achieves dynamic alignment of features across scales by adaptively sampling and weighted fusion of feature maps at different scales. Step 2.2 Taking a certain fusion layer as an example, where As the initial input features for the fusion node, the high-level features F h Upsampling is performed to obtain U(F) h ), and the same scale of lateral features F l The fused features are obtained by concatenating the data along the channel dimension. ; Step 2.3 Merge features Generate query vector through linear transformation and key-value features : Based on the offset prediction branch Predict the two-dimensional offset of several sampling points and the corresponding attention weights : ; Step 2.4 For each location in the feature map In a set of several sampling points Top Perform bilinear interpolation sampling to obtain sampling features. and by weight Weighted summation to form the attention output: ; Step 3.1 Use a dual-branch head. Branch A is designed to use the YOLO head, while Branch B is responsible for determining the occurrence and severity of the incident. Step 3.2 Branch A uses a prediction method based on the YOLO detector head to output the following for each spatial location: .in, Indicates the target bounding box parameters. Indicates the accident label name. Indicating a confidence level for the target, Branch B, based on attribute features, determines whether the currently detected target is in an accident state. Assuming an accident determination is positive, it further classifies or regresses the severity of the accident, outputting the determination level. ,in It indicates the severity level, including mild and severe, and merges the detection and judgment results from Branch A and Branch B. Step 4.1 Adding the Focaler-IoU loss function can adjust the model's attention weight for easy and difficult samples, accelerate convergence, and improve the regression accuracy of bounding boxes; Step 4.2 Perform bounding box regression prediction on the input features to obtain the predicted bounding boxes: And obtain the corresponding ground truth bounding boxes from the labeled data: ; Based on the positional relationship between the predicted bounding box and the ground truth bounding box, the Intersection over Union (IoU) value, which measures the degree of overlap between them, is calculated as follows: ; The core of Focaler-IoU is achieved by setting two hyperparameters. To reconstruct the IoU, the reconstructed Substituting into the loss calculation formula, we get the following formula:

Claims

1. A traffic accident identification method based on an improved YOLOv11, comprising the following steps: Step 1: In the feature fusion network Neck, a deformable attention module is introduced to achieve dynamic alignment of features across scales by adaptively sampling and weighting feature maps at different scales. Step 2: Use a dual-branch head. Branch A is designed to use the YOLO head, while Branch B is responsible for determining the occurrence and severity of the incident. Step 3: Adding the Focaler-IoU loss function can adjust the model's attention weight for easy and difficult samples, accelerate convergence, and improve the regression accuracy of bounding boxes.

2. The traffic accident identification method based on the improved YOLOv11 according to claim 1, characterized in that, The specific process in Step 1 is as follows: Step 1.1 Perform routine preprocessing on the acquired vehicle accident images in the traffic scene, such as resizing and normalization, and convert them into a format suitable for model input. Step 1.2 In the original YOLOv11 network structure, add the Deformable Attention module after Concat, while ensuring that it is before C3k2; Step 1.3 The multi-scale feature maps output by the backbone network are denoted as F3, F4, and F5, among which F5 has the lowest resolution and the strongest semantic information, while F3 has the highest resolution and the richest detailed information. Step 1.4 Taking a certain fusion layer as an example, where... As the initial input features for the fusion node, the high-level features F h Upsampling is performed to obtain U(F) h ), and the same scale of lateral features F l The fused features are obtained by concatenating the data along the channel dimension. ; Step 1.5 Merge features Generate query vector through linear transformation and key-value features : ; Based on the offset prediction branch Predict the two-dimensional offset of several sampling points and the corresponding attention weights : ; in, This represents the dynamic sampling offset relative to the reference point. This represents the contribution weight of each sampling point, for each location in the feature map. In a set of several sampling points Top Perform bilinear interpolation sampling to obtain sampling features. and by weight Weighted summation to form attention output: ,in The number of sampling points; Step 1.6 The input is processed by the C3k2 convolutional fusion module for channel blending and local enhancement, resulting in the fused output features:

3. The traffic accident identification method based on the improved YOLOv11 according to claim 1, wherein the specific process in Step 2 is as follows: Step 2.1 Output multi-scale fused features from the feature fusion network Neck, denoted as: Different scale features correspond to targets of different sizes, which can be used for multi-scale detection and judgment. Step 2.2 Merge the features Simultaneously, the input features are fed into both the detection branch (Branch A) and the attribute determination branch (Branch B). The detection branch (Branch A) extracts features relevant to the detection task from the input features, generating features including bounding box regression, target category discrimination, and target presence confidence. The attribute determination branch (Branch B) fuses the input features. Perform attribute-task-oriented feature transformation to extract discriminative features related to the state and severity of the accident; Step 2.3 Branch A uses a prediction method based on the YOLO detector head to output the following for each spatial location: ; in, Indicates the target bounding box parameters. Indicates the accident label name. Indicating a confidence level for the target, Branch B, based on attribute features, determines whether the currently detected target is in an accident state. Assuming an accident determination is positive, it further classifies or regresses the severity of the accident, outputting the determination level. ,in It indicates the severity level, including mild and severe, and merges the detection and judgment results of Branch A and Branch B.

4. The traffic accident identification method based on the improved YOLOv11 according to claim 1, wherein the specific process in Step 3 is as follows: Step 3.1 Perform bounding box regression prediction on the input features to obtain the predicted bounding boxes: ; And obtain the corresponding ground truth bounding boxes from the labeled data: ; Based on the positional relationship between the predicted bounding box and the ground truth bounding box, the Intersection over Union (IoU) value, which measures the degree of overlap between them, is calculated as follows: ; Step 3.2 Construct the basic regression loss term based on IoU, expressed in a unified form as follows: ; To adjust the level of attention given to samples with different regression difficulties in the model, a Focaler weighting factor for IoU is introduced: ; in, The focusing parameter is adjustable; when the IoU is small, the weight increases, and when the IoU is large, the weight decreases. Step 3.3 Combines the above weighting factors with the basic IoU loss, assigning higher gradient responses to samples with large regression errors during training. This guides the model to prioritize optimizing predictions with larger localization biases, resulting in the Focaler-IoU loss: ; The Focaler-IoU loss is weighted and summed with other loss terms to form the overall training objective function: ; In the formula, Indicates the target category loss. Indicates the target confidence loss. This indicates the branch loss in the accident attribute judgment. This represents the weighting coefficient.