Foggy road accident scene vehicle detection method fusing backbone and hypergraph computation
By improving the backbone and neck networks of the YOLOv12 model, high accuracy and real-time performance of vehicle detection in foggy road accident scenarios were achieved, solving the problems of accuracy and real-time performance of vehicle detection in complex foggy environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTH CHINA UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-09
AI Technical Summary
In foggy road accident scenarios, existing target detection methods struggle to achieve high accuracy and real-time vehicle detection, especially for multi-target and small-target vehicles, which are prone to errors. Furthermore, existing deep learning methods have high computational complexity, making it difficult to meet the requirements for rapid response.
The improved YOLOv12 model uses the backbone network for original feature extraction, fog interference removal, and semantic feature extraction. It combines the neck network for cross-level feature fusion and feature enhancement, and uses the improved prediction network for vehicle detection.
It improves the accuracy and real-time performance of vehicle detection in foggy road accident scenarios, reduces false detections and missed detections of multi-target and small-target vehicles, and meets the rapid response requirements of practical applications.
Smart Images

Figure CN122176649A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a vehicle detection method for foggy road accident scenes using a fusion backbone and hypergraph computing approach. Background Technology
[0002] High-precision target detection relies on high-quality, clear video or images, which are often difficult to obtain in foggy road accident scenarios. Therefore, accurate vehicle detection in foggy road accident scenarios is more challenging than conventional target detection. However, existing target detection methods are prone to errors due to fog interference, varying vehicle sizes and deformations, and mutual occlusion. Furthermore, existing target detection methods typically have high computational complexity, making it difficult to meet the rapid response requirements of accident detection scenarios, resulting in poor real-time vehicle detection in foggy road accident scenarios.
[0003] Therefore, improving the accuracy and real-time performance of vehicle detection in foggy road accident scenarios is a pressing issue that needs to be addressed. Summary of the Invention
[0004] This application provides a vehicle detection method for foggy road accident scenarios that integrates a backbone and hypergraph computing, in order to improve the accuracy and real-time performance of vehicle detection in foggy road accident scenarios.
[0005] In a first aspect, embodiments of this application provide a vehicle detection method for foggy road accident scenarios using a fusion of backbone and hypergraph computing, the method comprising: According to the set image sampling frequency, the target traffic accident image is obtained from the traffic accident video data of foggy roads; The backbone network in the improved YOLOv12 model sequentially extracts the original features, eliminates fog interference, and extracts semantic features from the target traffic accident image, resulting in the original features, fog-dissipated features, and multiple semantic features of the target traffic accident image. The improved YOLOv12 model uses the neck network to perform cross-level feature fusion on the original features, features after fog interference removal, and multiple semantic features to obtain the first fused feature. Then, the first fused feature is successively enhanced and multi-scale feature fusion is performed to obtain multiple second fused features. By inputting multiple second fusion features into the prediction network of the improved YOLOv12 model, vehicle detection results for foggy road accident scenarios corresponding to the multiple second fusion features are obtained.
[0006] Secondly, embodiments of this application also provide a vehicle detection device for foggy road accident scenarios that integrates backbone and hypergraph computing, the device comprising: The image acquisition module is used to acquire target traffic accident images from traffic accident video data on foggy roads according to a set image sampling frequency; The feature extraction module is used to sequentially extract the original features, eliminate fog interference, and extract semantic features of the target traffic accident image through the backbone network in the improved YOLOv12 model, so as to obtain the original features, fog interference-eliminated features, and multiple semantic features of the target traffic accident image. The feature fusion module is used to perform cross-level feature fusion on the original features, features after fog interference removal, and multiple semantic features through the neck network in the improved YOLOv12 model to obtain the first fused feature. Then, the first fused feature is subjected to feature enhancement and multi-scale feature fusion in sequence to obtain multiple second fused features. The vehicle detection module is used to input multiple second fusion features into the prediction network of the improved YOLOv12 model to obtain vehicle detection results for foggy road accident scenarios corresponding to the multiple second fusion features.
[0007] In an optional embodiment, when acquiring a target traffic accident image from traffic accident video data on foggy roads according to a set image sampling frequency, the image acquisition module is specifically used for: Based on the image sampling frequency determined by the time interval between collision moments in a traffic accident, traffic accident video data is converted into continuous multi-frame traffic accident images. Obtain the target traffic accident image from multiple frames of traffic accident images.
[0008] In one optional embodiment, the backbone network includes: a first sub-network, a second sub-network, a third sub-network, a fourth sub-network, and a fifth sub-network connected in sequence; wherein, the first sub-network includes: a pinwheel-shaped convolution (PConv) module, the second sub-network includes: a PConv module and a MixStructure Dehaze Block (MSDBlock) module, the third and fourth sub-networks each include: a PConv module and a Mixed Aggregation Network (MANet) module, and the fifth sub-network includes: a PConv module, a MANet module, and an Area-Attention Enhanced Cross-Feature (A2C2f) module; When the backbone network in the improved YOLOv12 model sequentially performs original feature extraction, fog interference removal, and semantic feature extraction on the target traffic accident image to obtain the original features, fog-disturbed features, and multiple semantic features of the target traffic accident image, the feature extraction module is specifically used for: The target traffic accident image is convolved in a windmill shape by the PConv module in the first sub-network, and the obtained first image features are then normalized and nonlinearly processed in sequence to obtain the original features. The original features are convolved in a windmill shape by the PConv module in the second sub-network, and the obtained second image features are then normalized and nonlinearly processed in sequence to obtain the first intermediate features. The MSDBlock module in the second sub-network sequentially performs multi-scale parallel large convolution processing and enhanced parallel attention processing on the first intermediate features to obtain features after eliminating fog interference. The PConv module in the third sub-network performs windmill-shaped convolution on the features after fog interference removal, and then performs normalization and nonlinear processing on the obtained third image features to obtain the second intermediate features. The second intermediate features are calibrated at the channel level, processed at the spatial level, and integrated with enhanced features by the MANet module in the third sub-network to obtain multiple third intermediate features. The first semantic feature is obtained by concatenating the features based on the multiple third intermediate features. The first semantic feature is convolved in a windmill shape by the PConv module in the fourth sub-network, and the obtained fourth image feature is then normalized and nonlinearly processed in sequence to obtain the fourth intermediate feature. The MANet module in the fourth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the fourth intermediate feature to obtain multiple fifth intermediate features. Based on these multiple fifth intermediate features, feature concatenation is performed to obtain the second semantic feature. The second semantic feature is convolved in a windmill shape by the PConv module in the fifth sub-network, and the obtained fifth image feature is then normalized and nonlinearly processed in sequence to obtain the sixth intermediate feature. The MANet module in the fifth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the sixth intermediate feature to obtain multiple seventh intermediate features. Based on these multiple seventh intermediate features, feature concatenation is performed to obtain the eighth intermediate feature. The third semantic feature is obtained by sequentially performing region attention processing and at least one enhanced feature integration on the eighth intermediate feature through the A2C2f module in the fifth sub-network.
[0009] In an optional embodiment, when the first intermediate features are sequentially subjected to multi-scale parallel large convolution processing and enhanced parallel attention processing through the MSDBlock module in the second sub-network to obtain the features after eliminating fog interference, the feature extraction module is specifically used for: The first intermediate feature is then normalized, followed by 5×5 pointwise convolution and 1×1 pointwise convolution to obtain the first local feature. By performing depth-expansion convolution on the first local feature with a set number of dilated convolution kernels of different sizes, the second local feature, the third local feature, and the fourth local feature are obtained. Based on the first splicing feature determined by the second local feature, the third local feature, and the fourth local feature, and the first local feature, the first residual connection feature is obtained; The first residual connection feature is sequentially subjected to 1×1 pointwise convolution, nonlinear processing, and 1×1 pointwise convolution to obtain the third fused feature. The third fusion feature is processed by simple pixel attention, pixel attention, and channel attention respectively to obtain the attention features corresponding to simple pixel attention, pixel attention, and channel attention respectively. The second residual connection feature is obtained based on the second concatenation feature determined by the attention features corresponding to simple pixel attention, pixel attention and channel attention respectively, and the third fusion feature. The second residual connection feature is sequentially subjected to 1×1 pointwise convolution, nonlinear processing, and 1×1 pointwise convolution to obtain the feature after eliminating fog interference.
[0010] In an optional embodiment, when multiple third intermediate features are obtained by performing channel-level feature calibration, spatial feature processing, and enhanced feature integration on the second intermediate features through the MANet module in the third sub-network, the feature extraction module is specifically used for: The second intermediate feature is subjected to two 1×1 pointwise convolutions to obtain the third intermediate feature corresponding to the channel-level feature calibration. The second intermediate feature is then subjected to two 1×1 pointwise convolutions and one convolution. k × k Depthwise separable convolution and one 1×1 pointwise convolution are used to obtain the third intermediate feature corresponding to spatial feature processing. The second intermediate feature is subjected to one 1×1 pointwise convolution and data segmentation process to obtain two third intermediate features corresponding to the enhanced feature integration. Furthermore, one of the two third intermediate features is used as the input feature of the first convolutional module in at least two convolutional modules that are sequentially connected, and the output features of each of the at least two convolutional modules are used as enhancement features to integrate the corresponding third intermediate feature.
[0011] In an optional embodiment, when the eighth intermediate feature is sequentially processed by the A2C2f module in the fifth sub-network to perform region attention processing and at least one enhanced feature integration to obtain the third semantic feature, the feature extraction module is specifically used for: The eighth intermediate feature is divided into multiple eighth sub-intermediate features, and the self-attention features corresponding to each of the multiple eighth sub-intermediate features are fused to obtain the fourth fused feature. The fourth fusion feature is subjected to at least one enhanced feature integration to obtain the third semantic feature.
[0012] In one optional embodiment, the neck network includes: a sixth sub-network; the sixth sub-network includes: a downsampling module set for the original features, the features after fog interference removal, and the first semantic features respectively, an upsampling module set for the third semantic features, and a first splicing module; When performing cross-level feature fusion on the original features, fog-free features, and multiple semantic features through the neck network in the improved YOLOv12 model to obtain the first fused feature, the feature fusion module is specifically used for: Through the three downsampling modules in the sixth sub-network, the original feature, the feature after eliminating fog interference, and the first semantic feature are downsampled according to the feature size of the second semantic feature to obtain three downsampled features; The upsampling module in the sixth sub-network upsamples the third semantic feature according to the feature size of the second semantic feature to obtain the upsampled feature. The first fusion feature is obtained by concatenating the three downsampled features, the second semantic feature, and the upsampled feature through the first concatenation module in the sixth sub-network.
[0013] In an optional embodiment, the neck network further includes a seventh sub-network and an eighth sub-network; wherein the seventh sub-network includes a 1×1 convolutional kernel, a Hypergraph Computation (Hyper-CM) module, and a MANet module; the eighth sub-network includes a first size feature fusion channel, a second size feature fusion channel, and a third size feature fusion channel; the first size feature fusion channel includes an upsampling module, a second concatenation module, and a first MANet module connected in series; the second concatenation module is used to concatenate the output features of the upsampling module and the first semantic features; the second size feature fusion channel includes a third concatenation module, a second MANet module, a fourth concatenation module, and a third MANet module connected in series; a first downsampling module is provided between the output of the first MANet module and the input of the fourth concatenation module; and the third concatenation module is used to concatenate the output features of the seventh sub-network and the eighth sub-network. The output features of the MANet module and the second semantic features in the network are concatenated. The fourth concatenation module is used to concatenate the output features of the first downsampling module and the second MANet module. The third size feature fusion channel includes: the second downsampling module, the fifth concatenation module, a 1×1 convolutional kernel, the sixth concatenation module and the A2C2f module. The third downsampling module is set between the output end of the third MANet module and the input end of the sixth concatenation module. The fifth concatenation module is used to concatenate the output features of the second downsampling module and the third semantic features. The sixth concatenation module is used to concatenate the output features of the third downsampling module and the output features of the 1×1 convolutional kernel in the third size feature fusion channel. When performing feature enhancement and multi-scale feature fusion sequentially on the first fused feature to obtain multiple second fused features, the feature fusion module is specifically used for: The enhanced features are obtained by sequentially performing 1×1 pointwise convolution, hypergraph convolution, channel-level feature calibration, spatial feature processing, and enhanced feature integration on the first fusion feature through the seventh sub-network. The enhanced features are input into the first size feature fusion channel, the second size feature fusion channel, and the third size feature fusion channel respectively, to obtain the second fused features output by the first size feature fusion channel, the second size feature fusion channel, and the third size feature fusion channel respectively.
[0014] In an optional embodiment, after inputting multiple second fusion features into the prediction network of the improved YOLOv12 model to obtain vehicle detection results for foggy road accident scenarios corresponding to the multiple second fusion features respectively, the device further includes: a model training module, which is specifically used for: Based on the vehicle inspection results for multiple road accident scenarios in foggy weather, the following operations were performed respectively: Based on the vehicle detection results of the first foggy road accident scenario and its corresponding theoretical vehicle detection results, the bounding box regression loss value, classification loss value, and confidence loss value of the target vehicle in the vehicle detection results of the first foggy road accident scenario are determined; wherein, the vehicle detection results of the first foggy road accident scenario are any one of the vehicle detection results of multiple foggy road accident scenarios. The fusion loss value is obtained based on the bounding box regression loss value, classification loss value, and confidence loss value, as well as their respective loss value weights. If the fusion loss value is greater than or equal to the set loss value threshold, then adjust the network parameters of the improved YOLOv12 model until the fusion loss value of the improved YOLOv12 model is less than the loss value threshold.
[0015] Thirdly, embodiments of this application provide an electronic device, including: processor; Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the vehicle detection method for foggy road accident scenarios using a fusion backbone and hypergraph computing as described in the first aspect.
[0016] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the vehicle detection method for foggy road accident scenarios using fusion backbone and hypergraph computing as described in the first aspect.
[0017] Fifthly, this application provides a computer program product that, when invoked by a computer, causes the computer to execute the vehicle detection method for foggy road accident scenarios using fusion backbone and hypergraph computing as described in the first aspect.
[0018] The beneficial effects of this application are as follows: In the vehicle detection method for foggy road accident scenes using a fusion-based backbone and hypergraph computing provided in this application embodiment, a target traffic accident image is obtained from traffic accident video data on foggy roads according to a set image sampling frequency. Then, the backbone network in the improved YOLOv12 model sequentially extracts original features, eliminates fog interference, and extracts semantic features from the target traffic accident image, obtaining the original features, fog-dissipated features, and multiple semantic features of the target traffic accident image. Further, the neck network in the improved YOLOv12 model performs cross-level feature fusion on the original features, fog-dissipated features, and multiple semantic features to obtain a first fused feature. The first fused feature is then sequentially enhanced and multi-scale fused to obtain multiple second fused features. Finally, the multiple second fused features are input into the prediction network in the improved YOLOv12 model to obtain vehicle detection results for the foggy road accident scene corresponding to each of the multiple second fused features.
[0019] In this way, the backbone network and neck network in the original YOLOv12 model are improved. The backbone network integrates original feature extraction, fog interference elimination and semantic feature extraction, while the neck network integrates cross-level feature fusion, which improves the accuracy of vehicle detection in foggy road accident scenarios and enhances the real-time performance of vehicle detection.
[0020] Furthermore, other features and advantages of this application will be set forth in the following description and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described herein are used to provide a further understanding of this application, constitute a part of this application, and do not constitute an improper limitation of this application. In the accompanying drawings: Figure 1 This is a schematic diagram of an optional system architecture applicable to the embodiments of this application.
[0022] Figure 2 This is a schematic diagram illustrating the implementation process of a vehicle detection method for foggy road accident scenarios using a fusion backbone and hypergraph computing approach, as provided in an embodiment of this application.
[0023] Figure 3 This is a schematic diagram of the structure of an improved YOLOv12 model provided in an embodiment of this application.
[0024] Figure 4This is a logical schematic diagram of feature extraction from a target traffic accident image provided in an embodiment of this application.
[0025] Figure 5 This is a schematic diagram of the structure of a PConv module provided in an embodiment of this application.
[0026] Figure 6 This is a schematic diagram of the structure of an MSDBlock module provided in an embodiment of this application.
[0027] Figure 7 This is a schematic diagram of the structure of a MANet module provided in an embodiment of this application.
[0028] Figure 8 This is a schematic diagram illustrating a specific scenario of vehicle detection results provided in an embodiment of this application.
[0029] Figure 9 This is a schematic diagram of a vehicle detection device for foggy road accident scenarios that integrates backbone and hypergraph computing, as provided in an embodiment of this application.
[0030] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0032] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.
[0033] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this application are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0034] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0036] First, the design concept of the embodiments of this application will be briefly introduced below: Foggy weather, with its reduced visibility, obstructed vision, and slippery roads, greatly increases the risk of traffic accidents, seriously threatening road safety. Most target detection methods rely on high-quality, clear video or images. However, obtaining such high-quality, clear video or images is typically difficult in foggy road scenarios. Therefore, accurate detection of multiple and small vehicles is even more challenging in foggy road accident scenarios. The interference of fog, the varying sizes and deformations of vehicles, and mutual occlusion create complex conditions that easily lead to false detections of multiple and small vehicles using existing target detection methods. Furthermore, real-time vehicle detection is crucial in actual foggy road accident scenarios.
[0037] Existing methods for vehicle detection in foggy road conditions can be categorized into traditional methods and deep learning methods. Traditional methods typically employ histogram equalization and dark channel priors to remove fog before vehicle detection. However, these traditional defogging methods often result in image blockiness, halos, and overexposure, leading to low vehicle detection accuracy. Furthermore, these sequential processing methods are difficult to adapt to parallel computing architectures, resulting in low computational efficiency and failing to meet the demands of complex traffic scenarios. Deep learning-based vehicle detection methods for foggy conditions typically incorporate convolutional neural networks to enhance parallel processing capabilities. YOLOv12, in particular, offers advantages over other network models in terms of accuracy and speed in detecting multiple and small targets. However, it neglects feature correlation, resulting in lower accuracy for detecting multiple and small targets in foggy road accident scenarios. Traffic accident videos often contain multiple targets, most of which are small, and some are deformed or occluded. The blurred targets in foggy videos further complicate vehicle detection in foggy road accident scenarios, highlighting the continued high demand for real-time vehicle detection in real-world foggy road accident situations. Current deep learning-based vehicle detection methods in foggy weather still fall short of practical application requirements, mainly in the following four aspects: (1) In foggy road scenes, the accuracy of vehicle detection is generally low. Suspended particles in the fog cause light scattering, resulting in an exponential decrease in the energy of reflected light from vehicles with increasing distance, giving the overall image a "grayish-white foggy" effect. In this environment, fog severely blurs the outline and texture of vehicles, and may even cause multiple adjacent vehicles to "stick together" in the image, forming blurry blocky areas. Especially when detecting multi-target and small-target accident vehicles, the influence of fog is amplified due to the small size of the targets themselves and the occlusion and deformation between them, making it difficult to extract features effectively. Existing deep learning object detection methods perform well in normal clear scenes, but they have not been fully optimized for the complex degradation characteristics of multi-target and small-target vehicles in foggy road accident scenes, so their detection performance decreases when applied directly.
[0038] (2) Detection of multiple targets and small targets in foggy weather suffers from high rates of false positives and false negatives. Under complex conditions such as fog interference, varying target scales, deformation, and mutual occlusion, existing detection methods struggle to reliably distinguish foreground vehicles from background noise, leading to frequent false detections. Current deep learning-based target detection methods rely heavily on feature pyramid structures for multi-scale feature extraction. However, when dealing with small targets in foggy weather, shallow features often lack sufficient semantic information, while deep features suffer from spatial resolution loss due to downsampling, resulting in weak feature representation capabilities and inaccurate vehicle detection. Most existing deep learning-based target detection methods employ anchor box mechanisms or keypoint matching. When fog blurs target boundaries and weakens features, inaccurate anchor box matching or missing keypoint responses can easily occur, leading to the method mistakenly deleting real targets with low confidence, resulting in false negatives of multiple targets and small targets.
[0039] (3) The existing YOLOv12 lacks the ability to model feature associations, resulting in low accuracy in detecting multi-target and small-target accident vehicles in foggy weather. In foggy videos, the local features of a vehicle (such as headlights and wheels) and its global contour may be broken or blurred due to fog, resulting in spatially non-adjacent but semantically related feature points in the feature map, i.e., high-order associations across locations. There are also high-order associations across layers between shallow edge features (such as vehicle contours) and deep semantic features (such as vehicle categories). As a typical detection model, YOLOv12 mainly relies on linear convolution and skip connections to achieve multi-scale feature fusion, which can only capture the local relationships between adjacent layers (such as simple splicing of shallow contours and middle-layer semantics), and does not have the ability to model high-order associations, resulting in low accuracy in detecting multi-target and small-target accident vehicles in complex foggy scenes.
[0040] (4) Current deep learning-based vehicle detection methods in foggy weather suffer from poor real-time performance. Existing deep learning methods typically have high computational complexity, making it difficult to meet the requirements of rapid response in accident detection scenarios. Therefore, it is necessary to design lightweight models for practical applications, optimize the network structure, reduce computational and storage overhead, improve the real-time performance of vehicle detection in foggy road accident scenarios, and better support vehicle collision warning and accident handling.
[0041] In view of this, in order to solve or improve the above problems, this application provides a vehicle detection method for foggy road accident scenes using a fusion backbone and hypergraph computing, which specifically includes: acquiring a target traffic accident image from traffic accident video data on foggy roads according to a set image sampling frequency; then, sequentially extracting original features, eliminating fog interference, and extracting semantic features from the target traffic accident image through the backbone network in the improved YOLOv12 model, to obtain the original features, fog-dissipated features, and multiple semantic features of the target traffic accident image; further, performing cross-level feature fusion on the original features, fog-dissipated features, and multiple semantic features through the neck network in the improved YOLOv12 model to obtain a first fused feature, and sequentially performing feature enhancement and multi-scale feature fusion on the first fused feature to obtain multiple second fused features; finally, inputting the multiple second fused features into the prediction network in the improved YOLOv12 model to obtain vehicle detection results for the foggy road accident scene corresponding to the multiple second fused features. In this way, the backbone network and neck network in the original YOLOv12 model are improved. The backbone network integrates original feature extraction, fog interference elimination and semantic feature extraction, while the neck network integrates cross-level feature fusion, which improves the accuracy of vehicle detection in foggy road accident scenarios and enhances the real-time performance of vehicle detection.
[0042] In particular, the preferred embodiments of this application will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments of this application and the features in the embodiments can be combined with each other unless otherwise specified.
[0043] See Figure 1The diagram illustrates an optional system architecture applicable to an embodiment of this application. This system architecture may include: terminal devices (101a, 101b) and server 102. The terminal devices (101a, 101b) and server 102 can interact via a communication network. The communication network may employ wireless communication or wired communication methods. For example, the terminal devices (101a, 101b) can access the network and communicate with server 102 via cellular mobile communication technology. The cellular mobile communication technology may include, for example, 5th Generation Mobile Networks (5G) technology or next-generation mobile communication technology. Optionally, the terminal devices (101a, 101b) can access the network and communicate with server 102 via short-range wireless communication. The short-range wireless communication technology may include, for example, Wireless Fidelity (Wi-Fi) technology.
[0044] This application embodiment does not impose any limitation on the number of communication devices involved in the above system architecture. For example, the above system architecture may include more terminal devices, or fewer terminal devices, or other network devices. Figure 1 As shown, only terminal devices (101a, 101b) and server 102 are described as examples. The following is a brief introduction to each of the above communication devices and their respective functions.
[0045] A terminal device (101a, 101b) is a device that can provide voice and / or data connectivity to a user, and may be a device that supports wired and / or wireless connections.
[0046] For example, terminal devices (101a, 101b) may include, but are not limited to: mobile phones, tablets, laptops, handheld computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in autonomous driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.
[0047] Furthermore, the terminal devices (101a, 101b) can be equipped with relevant client software, such as applications (APPs), browsers, short video software, web pages, mini-programs, etc. It should be noted that the terminal devices (101a, 101b) in this embodiment can enable the aforementioned client related to vehicle detection in foggy road accidents to send traffic accident video data of foggy roads to the server 102, so that subsequent methods and steps such as vehicle detection can be performed on the target traffic accident images in the traffic accident video data.
[0048] Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0049] In this embodiment, server 102 can be used to acquire target traffic accident images from traffic accident video data on foggy roads according to a set image sampling frequency; then, the backbone network in the improved YOLOv12 model sequentially performs original feature extraction, fog interference removal, and semantic feature extraction on the target traffic accident image to obtain the original features, fog interference-removed features, and multiple semantic features of the target traffic accident image; further, the neck network in the improved YOLOv12 model performs cross-level feature fusion on the original features, fog interference-removed features, and multiple semantic features to obtain a first fused feature, and sequentially performs feature enhancement and multi-scale feature fusion on the first fused feature to obtain multiple second fused features; finally, the multiple second fused features are input into the prediction network in the improved YOLOv12 model to obtain vehicle detection results for the foggy road accident scene corresponding to the multiple second fused features. Figure 1 As shown, server 102 is deployed with an improved YOLOv12 model, but this embodiment of the application does not specifically limit this.
[0050] The following describes the vehicle detection method for foggy road accident scenarios using fusion backbone and hypergraph computing provided by exemplary embodiments of this application, in conjunction with the above system architecture and with reference to the accompanying drawings. It should be noted that the above system architecture is only shown for the purpose of understanding the spirit and principles of this application, and the embodiments of this application are not limited in any way.
[0051] See Figure 2The diagram shown illustrates the implementation flow of a vehicle detection method for foggy road accident scenarios using a fusion backbone and hypergraph computing approach, as provided in this application embodiment. Taking a server as an example, the specific implementation flow of this method is as follows: S201: Obtain the target traffic accident image from traffic accident video data on foggy roads according to the set image sampling frequency.
[0052] In one alternative implementation, when performing step S201, the server can convert traffic accident video data into a series of multi-frame traffic accident images according to an image sampling frequency determined based on the time interval between the moment of collision in the traffic accident, thereby obtaining the target traffic accident image from the multi-frame traffic accident images.
[0053] Since the collision process in a traffic accident typically occurs within 0.1 to 0.5 seconds, to clearly capture crucial information such as vehicle displacement and attitude changes at the moment of impact, avoiding the loss of core details due to an excessively low image sampling frequency and preventing data redundancy due to an excessively high image sampling frequency, the collision instant capture interval can be 0.05 seconds, meaning the image sampling frequency (or frame rate) can be 20fps. Furthermore, 20fps exceeds the basic perceptual requirements of the human eye for dynamic images (16fps is sufficient for continuous vision), meeting the "smoothness" requirements for manual review or methodological analysis.
[0054] Furthermore, the target traffic accident image can be any one frame of a traffic accident image obtained by the server from multiple frames of traffic accident images. Of course, the target traffic accident image can also be a one-frame traffic accident image selected by the server from multiple frames of traffic accident images according to certain image selection rules (such as image clarity sorting, etc.), and this application embodiment does not limit this.
[0055] S202: The backbone network in the improved YOLOv12 model is used to sequentially extract the original features, eliminate fog interference, and extract semantic features of the target traffic accident image, so as to obtain the original features, the features after eliminating fog interference, and multiple semantic features of the target traffic accident image.
[0056] In one alternative implementation, see [link to relevant documentation]. Figure 3As shown, the improved YOLOv12 model includes a backbone network comprising: a first subnetwork B.Stage.1, a second subnetwork B.Stage.2, a third subnetwork B.Stage.3, a fourth subnetwork B.Stage.4, and a fifth subnetwork B.Stage.5, connected in series. Specifically, the first subnetwork B.Stage.1 may include a PConv module; the second subnetwork B.Stage.2 may include a PConv module and an MSDBlock module; the third subnetwork B.Stage.3 and the fourth subnetwork B.Stage.4 may each include a PConv module and a MANet module; and the fifth subnetwork B.Stage.5 may include a PConv module, a MANet module, and an A2C2f module.
[0057] Therefore, during step S202, after obtaining the target traffic accident image, the server can perform reference operations on the target traffic accident image. Figure 4 Feature extraction operations shown: S401: The target traffic accident image is convolved in a windmill shape by the PConv module in the first sub-network, and the obtained first image features are normalized and nonlinearly processed in sequence to obtain the original features.
[0058] Standard convolutions typically ignore the spatial distribution characteristics of small targets, resulting in poor detection performance for low-contrast small targets. PConv, however, uses grouped convolutions to increase the receptive field while minimizing the number of parameters. The effectiveness of the PConv receptive field gradually decreases outwards, resembling a Gaussian distribution. Furthermore, the smaller the target, the more concentrated its features become, highlighting the importance of central features. This better matches the Gaussian distribution characteristics of low-contrast small targets, enhancing the feature extraction capability of convolutions.
[0059] In this way, only the PConv module can be set in the first sub-network, mainly because only the lowest-level features of small objects need to be extracted, such as contours, edges, and colors, to preserve the most original detailed information of small objects. Given that PConv can accurately extract the low-level features of small objects, it can be used at the beginning of each sub-network in the backbone network to extract the low-level features of small objects, providing the most original features for subsequent feature enhancement.
[0060] PConv uses asymmetric padding to create horizontal and vertical convolution kernels for different regions of the image, and the kernels spread outwards. For the specific structure of the PConv module, please refer to [link / reference needed]. Figure 5 As shown, h 1. w 1 and c 1 represents the input tensor X( h 1, w 1,c 1) Height, width, and channel size (or number of channels). After each convolution, batch normalization (BN) and sigmoid linear units (SiLU) are used to enhance training stability and speed. The first layer of PConv performs parallel convolutions, resulting in a height of... Width is The number of channels is The characteristics are shown in formula (1).
[0061] (1) in, This represents the convolution operation; It is a size of The number of output channels is convolution kernel, Indicates the first k One convolutional kernel; padding parameters This indicates the number of pixels filled in the four directions: left, right, top, and bottom. It is the number of channels in the final output feature map. This represents the convolution stride.
[0062] Formula (1) is spliced along the channel dimension. ), and through convolution kernel After applying BN and SiLU activation functions, the output size is obtained as ( h 2, w 2, c The final features (i.e., the original features) of 2) are shown in formula (2).
[0063] (2) like Figure 3 As shown, the original features output by the first sub-network are denoted as... B 1.
[0064] S402: The original features are convolved in a windmill shape by the PConv module in the second sub-network, and the obtained second image features are normalized and nonlinearly processed in sequence to obtain the first intermediate features.
[0065] S403: The first intermediate feature is processed sequentially by multi-scale parallel large convolution and enhanced parallel attention through the MSDBlock module in the second sub-network to obtain the feature after eliminating fog interference.
[0066] The MSDBlock module achieves multi-scale feature extraction in non-uniform fog scenes by combining a multi-scale parallel large convolution kernel (MSPLCK) with enhanced parallel attention (EPA). MSPLCK in the MSDBlock module performs multi-scale feature alignment to address the scale differences in non-uniform fog, while EPA layer-wise addresses fog interference across different dimensions. Multiple attention mechanisms address the differences in non-uniform fog. Therefore, adding a two-layer MSDBlock layer to the backbone network (or second sub-network) reduces the impact of fog on the accuracy of vehicle detection in traffic accident videos.
[0067] In one optional implementation, when executing step S403, the server performs the following operations on the first intermediate feature: First, the first intermediate feature is normally processed, followed by 5×5 pointwise convolution and 1×1 pointwise convolution to obtain the first local feature; second, the first local feature is depth-expanded by dilated convolution kernels of a set number and different kernel sizes to obtain the second, third, and fourth local features; then, based on the first concatenation feature determined by the second, third, and fourth local features, and the first local feature, the first residual connection feature is obtained; furthermore, the first residual connection feature is sequentially subjected to 1×1 pointwise convolution, non-linear processing, and 1×1 pointwise convolution to obtain the third fusion feature; then, the third fusion feature is processed by Simple Pixel Attention (SPA) and Pixel Attention (Pixel ... Attention (PA) and channel attention (CA) processing are used to obtain attention features corresponding to simple pixel attention, pixel attention, and channel attention, respectively. Further, based on the second concatenation feature determined by the attention features corresponding to simple pixel attention, pixel attention, and channel attention, and the third fusion feature, the second residual connection feature is obtained. Finally, the second residual connection feature is sequentially subjected to 1×1 pointwise convolution, nonlinear processing, and 1×1 pointwise convolution to obtain the feature after eliminating fog interference.
[0068] See Figure 6 The MSDBlock module shown, when aligning multi-scale features in fog regions, first aligns the features X output by the PConv module. PConv Normalization 5×5 pointwise convolution 1×1 pointwise convolution yields relatively large-scale local features in foggy weather. (i.e., the first local feature), as shown in formula (3).
[0069] (3) Local features Three parallel dilated convolution kernels with sizes of [size missing] are fed into the convolution. Depth-dilated convolutions (e.g., can be represented as: To match different scale ranges of non-uniform fog regions, the second, third, and fourth local features are concatenated using Concat. The concatenated features... (i.e., the first splicing feature) See formula (4).
[0070] (4) Features after splicing The features are progressively fused by sequentially applying a 1×1 pointwise convolution, a GELU activation function, and another 1×1 pointwise convolution. Finally, the result is compared with the features output by the PConv module. Figure X PConv The first residual connectivity feature (or multi-scale diversification feature) is obtained by adding elements one by one. As shown in formula (5).
[0071] (5) In this way, we can achieve "precise alignment between fog area features and original small target features", which preserves the underlying details of small targets and obtains fog features of fog areas at different scales.
[0072] When focusing on differences in non-uniform fog, the primary focus should be on the first residual connectivity feature. X m The fog differences are analyzed using three dimensions: SPA, PA, and CA, to enhance the expressive power of the features.
[0073] Simple pixel attention F s Focusing on the differences in fog distribution across different regions of an image, we first analyze the multi-scale, diverse features X... m Batch normalization is performed, and pointwise convolution PWConv(.) is used to refine the features. Then, standard convolution Conv(.) with a kernel size of 3×3 is used to extract features. Sigmoid(.) is used to implement pixel gating and filter fog pixel features, as shown in formula (6).
[0074] (6) Pixel attention F pTo extract global pixel gated features, the PWConv-GELU-PWConv structure is used to fit the global pixel dependency relationship and reconstruct the spatial structure association of small targets cut off by fog, as shown in Equation (7).
[0075] (7) Channel attention F c To focus on the information interaction between different channels, global average pooling (GAP) is added after batch normalization in formula (8) to capture the semantic interaction between channels, strengthen the weight of small target semantic channels, and suppress the interference of fog-related redundant channels, as shown in formula (8).
[0076] (8) In this way, the three different attention gating results (i.e., the attention features corresponding to SPA, PA, and CA, respectively) are concatenated along the channel dimension. Then, a multilayer perceptron (MLP) containing PWConv-GELU-PWConv is used to reduce the channel dimension of the concatenated features to the dimension of the first residual connection feature. X m Same dimension, and features that eliminate fog interference according to formula (6) X m Add them together to obtain the characteristics after eliminating fog interference. y As shown in formula (9).
[0077] (9) like Figure 3 As shown, the features output by the second sub-network after eliminating fog interference. y Record B 2.
[0078] S404: The PConv module in the third sub-network performs windmill-shaped convolution on the features after fog interference removal, and then performs normalization and nonlinear processing on the obtained third image features to obtain the second intermediate features.
[0079] S405: The second intermediate features are calibrated at the channel level, processed at the spatial level, and integrated with enhanced features by the MANet module in the third sub-network to obtain multiple third intermediate features. The first semantic feature is obtained by concatenating the features based on the multiple third intermediate features.
[0080] Therefore, in order to enhance the semantic depth of small target features and improve the feature representation ability of multi-scale small targets, the MANet module is introduced into the third and fourth sub-networks of the backbone network.
[0081] In one optional implementation, during step S405, the server can perform two 1×1 pointwise convolutions on the second intermediate feature to obtain the third intermediate feature corresponding to the channel-level feature calibration; then, the second intermediate feature can be performed two 1×1 pointwise convolutions and one... k × k Depthwise separable convolution and one 1×1 pointwise convolution are performed to obtain the third intermediate feature corresponding to spatial feature processing; then, the second intermediate feature is sequentially subjected to one 1×1 pointwise convolution and data segmentation to obtain two third intermediate features corresponding to enhanced feature integration; and one of the two third intermediate features is used as the input feature of the first convolutional module in at least two convolutional modules that are sequentially connected, and the output features of each of the at least two convolutional modules are used as the third intermediate feature corresponding to enhanced feature integration.
[0082] For example, see Figure 7 As shown, this MANet module integrates three typical convolutional variants to enhance the semantic depth of small targets by generating diverse and rich gradient flows during the training phase. A 1×1 pointwise convolution is used for channel-level feature recalibration, and a single pass... k × k Depthwise separable convolution (DSConv) is used for efficient spatial feature processing, and the C2f module is used to enhance feature integration. This is achieved by concatenating these three third intermediate features along the channel dimension and employing... Pointwise convolution is used for fusion and compression, ultimately generating 2 channels. c Output characteristics X out , that is Figure 3 The first semantic feature shown B 3, as shown in formula (10).
[0083] (10) in, X in The number of channels is 2 c , X 1, X 2, …, X 4+n The number of channels for each feature in the dataset is... c Each time the MANet module is used, the number of channels for the feature is the same as the number of channels output from the previous layer.
[0084] Therefore, in order to reduce the computational overhead caused by the extensive use of convolution operations in the MANet module, the MANet module is lightweighted by reducing the number of branches from the original 4 branches to 2 branches, adjusting the number of convolution channels in each branch, and introducing a mechanism for sharing computational results between branches.
[0085] S406: The first semantic feature is convolved in a windmill shape by the PConv module in the fourth sub-network, and the obtained fourth image feature is then normalized and nonlinearly processed in sequence to obtain the fourth intermediate feature.
[0086] S407: The MANet module in the fourth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the fourth intermediate feature to obtain multiple fifth intermediate features. Based on these multiple fifth intermediate features, feature concatenation is performed to obtain the second semantic feature.
[0087] Based on the semantic feature extraction described in steps S405-S407 above, the features after eliminating fog interference will be... B 2. Inputting two consecutive layers of the third and fourth sub-networks, each consisting of a MANet module and a PConv module, extracts deep semantic features, resulting in the following: Figure 3 The first semantic feature shown B 3. Second semantic features B 4.
[0088] S408: The second semantic feature is convolved in a windmill shape by the PConv module in the fifth sub-network, and the obtained fifth image feature is then normalized and nonlinearly processed in sequence to obtain the sixth intermediate feature.
[0089] S409: The MANet module in the fifth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the sixth intermediate feature to obtain multiple seventh intermediate features. Based on these multiple seventh intermediate features, feature concatenation is performed to obtain the eighth intermediate feature.
[0090] S410: The eighth intermediate feature is processed sequentially by the A2C2f module in the fifth sub-network, and at least one enhanced feature integration is performed to obtain the third semantic feature.
[0091] In one optional implementation, during step S410, after obtaining the eighth intermediate feature, the server can divide the eighth intermediate feature into multiple eighth sub-intermediate features, and perform feature fusion on the self-attention features corresponding to each of the multiple eighth sub-intermediate features to obtain a fourth fused feature. This fourth fused feature is then subjected to at least one enhanced feature integration to obtain, as shown below. Figure 3 The third semantic feature shown B 5.
[0092] Because integrating attention mechanisms directly into the object detection process allows for rapid feature extraction, it is possible to employ... Figure 3The YOLOv12 A2C2f module shown consists of Area Attention (A2) and two cascaded CSP bottleneck layers (C2f). A2 will have a resolution of ( H , W The feature map of ) is divided horizontally or vertically into ( H / I , W )or( H,W / I )of I Area segment (default) I =4), each region independently performs self-attention computation to capture contextual dependencies within the region, and finally, cross-region information fusion is performed on the attention features output by each region through 1×1 pointwise convolution. Among them, C2f adopts Residual Efficient Layer Aggregation Networks (R-ELAN) to solve the optimization instability problem after the model introduces attention.
[0093] S203: The neck network in the improved YOLOv12 model is used to perform cross-level feature fusion on the original features, features after fog interference removal, and multiple semantic features to obtain the first fused feature. Then, feature enhancement and multi-scale feature fusion are performed on the first fused feature in sequence to obtain multiple second fused features.
[0094] In one alternative implementation, it is still as follows Figure 3 As shown, the improved YOLOv12 model includes a neck network that can include a sixth sub-network, N.Stage.1. The sixth sub-network, N.Stage.1, can include features tailored to the original characteristics. B 1. Characteristics after eliminating fog interference B 2 and first semantic features B 3. The down-sampling module (Down-Sample) and the module targeting the third semantic features are set up respectively. B 5. The upsampling module Up-Sample and the first splicing module Concat are set.
[0095] Therefore, the server processes the original features through the neck network in the improved YOLOv12 model. B 1. Characteristics after eliminating fog interference B 2. First semantic features B 3. Second semantic features B 4 and the third semantic feature B 5. When performing cross-level feature fusion to obtain the first fused feature, it can be obtained through the three downsampling modules (Down-Sample) in the sixth sub-network N.Stage.1, according to the second semantic feature. B 4. Feature size, relative to the original featuresB 1. Characteristics after eliminating fog interference B 2 and first semantic features B 3. Downsampling is performed to obtain 3 downsampling features; then, through the upsampling module Up-Sample in the sixth sub-network N.Stage.1, according to the second semantic features... B The feature size of 4, for the third semantic feature B 5. Upsampling is performed to obtain upsampled features; finally, the three downsampled features and the second semantic feature are processed through the first concatenation module Concat in the sixth sub-network N.Stage.1. B 4. The features are concatenated with the upsampled features to obtain the first fused feature.
[0096] Still Figure 3 As shown, the improved YOLOv12 model's neck network can further include a seventh sub-network N.Stage.2 and an eighth sub-network N.Stage.3. The seventh sub-network N.Stage.2 can include a 1×1 convolutional kernel, a Hyper-CM module, and a MANet module. The eighth sub-network N.Stage.3 can include a first-size feature fusion channel Channel.F.1, a second-size feature fusion channel Channel.F.2, and a third-size feature fusion channel Channel.F.3. The first-size feature fusion channel Channel.F.1 can include a sequentially connected upsampling module Up-Sample, a second concatenation module Concat, and a first MANet module. The second concatenation module Concat can be used to combine the output features of the upsampling module Up-Sample with the first semantic features. B 3. Feature concatenation is performed. The second-size feature fusion channel, Channel F.2, may include: a third concatenation module Concat, a second MANet module, a fourth concatenation module Concat, and a third MANet module connected in series. A first downsampling module Down-Sample is set between the output of the first MANet module and the input of the fourth concatenation module Concat. The third concatenation module Concat can be used to process the output features and second semantic features of the MANet module in the seventh sub-network. B4. Feature concatenation is performed. The fourth concatenation module, Concat, can be used to concatenate the output features of the first downsampling module (Down-Sample) and the second MANet module. The third-size feature fusion channel, Channel.F.3, may include: the second downsampling module (Down-Sample), the fifth concatenation module (Concat), a 1×1 convolutional kernel, the sixth concatenation module (Concat), and an A2C2f module. The third downsampling module (Down-Sample) is set between the output of the third MANet module and the input of the sixth concatenation module (Concat). The fifth concatenation module (Concat) can be used to concatenate the output features of the second downsampling module (Down-Sample) and the third semantic features. B 5. Feature concatenation is performed. The sixth concatenation module, Concat, can be used to concatenate the output features of the third downsampling module, Down-Sample, and the output features of the 1×1 convolutional kernel in the third size feature fusion channel, Channel.F.3.
[0097] Therefore, when the server sequentially performs feature enhancement and multi-scale feature fusion on the first fused feature to obtain multiple second fused features, it can sequentially perform 1×1 pointwise convolution, hypergraph convolution, channel-level feature calibration, spatial feature processing, and enhanced feature integration on the first fused feature through the seventh sub-network to obtain enhanced features. These enhanced features are then input into the first-size feature fusion channel (Channel.F.1), the second-size feature fusion channel (Channel.F.2), and the third-size feature fusion channel (Channel.F.3) to obtain the second fused features output by each of these channels, such as... Figure 3 shown N 3. N 4 and N 5. Among them, the first size feature fusion channel Channel.F.1 can also be called the small-scale feature fusion channel, the second size feature fusion channel Channel.F.2 can also be called the medium-scale feature fusion channel, and the third size feature fusion channel Channel.F.3 can also be called the large-scale feature fusion channel. The embodiments of this application do not specifically limit this.
[0098] For example, the server performs semantic collection to construct a hypergraph, and obtains the raw features. B 1. Characteristics after eliminating fog interference B 2. First semantic features B 3. Second semantic features B 4 and the third semantic feature B5. After upsampling and downsampling, the cross-level visual features are obtained by stitching together. M The hypergraph G = {V, E} is typically defined by a vertex set V and a hyperedge set E. V is obtained by mesh-based visual feature deconstruction, i.e., the original features obtained from the backbone network. B 1. Characteristics after eliminating fog interference B 2. First semantic features B 3. Second semantic features B 4 and the third semantic feature B 5. A cross-level visual feature set formed by stitching together upsampling and downsampling. X x = B 1|| B 2|| B 3|| B 4|| B 5. E is the distance threshold between feature points, centered at each feature point. The set of spheres with radius , i.e. .
[0099] Among them, distance threshold These are core parameters, such as the distance threshold set according to the Hyper-YOLO literature. The value is set to 8. In calculations, the hypergraph G is typically represented by its incidence matrix. H express.
[0100] After the hypergraph G is constructed, hypergraph computation is performed in the semantic space, that is, message propagation is performed on the feature map using hypergraph convolution to obtain features. This invention utilizes typical spatial domain hypergraph convolution and adds additional residual connections to perform high-order learning of vertex features. A schematic diagram of the hypergraph convolution is shown below. Figure 7 As shown.
[0101] For ease of calculation, a matrix form is used here. The features after hypergraph convolution are shown in formula (11). and Let these be the diagonal matrices representing the vertices and hyperedges, respectively. These are trainable parameters.
[0102] (11) Hypergraph convolution has high computational complexity, increasing computational overhead. To improve real-time performance without compromising detection accuracy, this invention specifically simplifies the hypergraph convolution module by reducing the number of model parameters and computational complexity. A downsampling mechanism is added to the hypergraph convolution, using 0.5x downsampling to reduce the number of nodes in the graph. The more efficient cosine distance is used to approximate the original L2 distance metric, and the division normalization operation in the semantic aggregation stage is removed and replaced with simple summation to further reduce computational complexity. Furthermore, the projection layer structure is simplified by sharing grouped convolution weights to reuse input and output projection parameters, reducing the number of learnable parameters and retaining only the core residual connection weights and necessary convolution parameters. These optimizations improve the model's computational efficiency while maintaining feature association modeling capabilities.
[0103] Furthermore, the server performs upsampling-concatenation, downsampling-concatenation, and direct concatenation on the results of hypergraph convolution calculations, respectively, and obtains the final high-level semantic features through pointwise convolution, MANet, A2C2f, and other operations. .
[0104] in, N 3. N 4. N 5 represents semantic features at different scales. Each scale of semantic features includes cross-level semantic information, cross-positional semantic relationships, and higher-order semantic features.
[0105] S204: Input multiple second fusion features into the prediction network of the improved YOLOv12 model to obtain vehicle detection results for foggy road accident scenarios corresponding to the multiple second fusion features respectively.
[0106] For example, the prediction network head in the improved YOLOv12 model may include: a first detection head (Head1), a second detection head (Head2), and a third detection head (Head3). Each detection head consists of a multi-scale feature input layer, a convolutional prediction layer, and non-maximum suppression. The multi-scale feature input layer, composed of convolutions and ReLU activation functions, receives feature maps at three scales from the neck network output, i.e., three second fused features. N 3. N 4 and N 5.
[0107] Further, after executing step S204, the server can perform the following operations for any one of the vehicle detection results in multiple foggy road accident scenarios, such as the vehicle detection result in the first foggy road accident scenario: Based on the vehicle detection result in the first foggy road accident scenario and its corresponding theoretical vehicle detection result, determine the bounding box regression loss value Loss.1, classification loss value Loss.2, and confidence loss value Loss.3 of the target vehicle in the vehicle detection result of the first foggy road accident scenario; then, based on the bounding box regression loss value Loss.1, classification loss value Loss.2, and confidence loss value Loss.3 and their respective corresponding loss value weights, obtain the fusion loss value Loss.F; finally, if the fusion loss value is greater than or equal to the set loss value threshold, adjust the various network parameters of the improved YOLOv12 model until the fusion loss value of the improved YOLOv12 model is less than the loss value threshold.
[0108] Optionally, the convolutional prediction layers in the prediction network head can be responsible for computing bounding box regression, confidence scores, and class probabilities. Bounding box regression is used to predict the location and size of the target, outputting the center coordinates of the bounding box. x,y ) and width, height ( w,h The confidence score is used to predict whether each bounding box contains an object and the confidence level of the object. The class probability is used to predict the probability that the object belongs to each class. In addition, non-maximum suppression retains the bounding box with the highest confidence and removes other bounding boxes with high overlap with it, ensuring that each object is detected only once.
[0109] It should also be noted that when the fusion loss value of the improved YOLOv12 model is less than the preset loss value threshold, the loss value of the fusion loss function converges. That is, the total loss value of the improved YOLOv12 model gradually decreases and eventually stabilizes within a relatively small numerical range and no longer changes, outputting the vehicle detection results in the foggy road accident scenario.
[0110] The improved YOLOv12 loss function (i.e., fusion loss function) consists of bounding box loss, classification loss, and confidence loss. In the fusion loss function, the bounding box loss directly predicts the distance from the target's center point to its four sides, reducing the dependence on hyperparameter tuning and improving the robustness of detecting deformed target vehicles. The classification loss directly incorporates the intersection over union (IoU) of the predicted and ground truth boxes into the weights of the classification loss calculation, making the model focus more on samples that are both correctly classified and accurately located during training, making it more suitable for small target detection. The confidence loss reduces the contribution of easily classified samples to the total loss, making the model focus more on difficult-to-classify samples, improving the accuracy of confidence prediction and its correlation with localization quality, and enhancing the reliability of small target and occluded target detection results.
[0111] Furthermore, the weights of the bounding box loss, classification loss, and confidence loss can be set differently depending on the task. This invention places greater emphasis on the localization of the target bounding box and the reliability of the target detection results. Therefore, the weights of the bounding box loss, classification loss, and confidence loss are 7.5, 0.5, and 1.5, respectively. Other weight values are also possible, but they must adhere to the rule that the bounding box loss has the highest weight, followed by the confidence loss, and then the classification loss has the lowest weight.
[0112] Therefore, Figure 3 The improved YOLOv12 model shown is more sensitive to multiple targets and small targets, and its lightweight architecture is more conducive to accelerating parallel inference. Furthermore, the improved YOLOv12 includes the addition of PConv, MSDBlock, and MANet modules to the YOLOv12 backbone network, as well as a Hyper-CM-based neck network, which improves the accuracy of detecting multiple small target vehicles in foggy road accident scenarios.
[0113] In addition, the hypergraph convolution and MANet modules in the Hyper-CM module are lightweighted, and a decoupled structure is adopted between modules to improve the real-time performance of detecting multiple small target vehicles in foggy road accident scenarios.
[0114] In summary, the vehicle detection method for foggy road accident scenes using a fusion-based backbone and hypergraph computing provided in this application embodiment obtains target traffic accident images from traffic accident video data on foggy roads according to a set image sampling frequency. Then, the backbone network in the improved YOLOv12 model sequentially extracts original features, eliminates fog interference, and extracts semantic features from the target traffic accident image, obtaining the original features, fog-dissipated features, and multiple semantic features of the target traffic accident image. Further, the neck network in the improved YOLOv12 model performs cross-level feature fusion on the original features, fog-dissipated features, and multiple semantic features to obtain a first fused feature. The first fused feature is then sequentially enhanced and multi-scale fused to obtain multiple second fused features. Finally, the multiple second fused features are input into the prediction network in the improved YOLOv12 model to obtain vehicle detection results for the foggy road accident scene corresponding to each of the multiple second fused features. By improving the backbone and neck networks in the original YOLOv12 model, the backbone network integrates original feature extraction, fog interference elimination, and semantic feature extraction, while the neck network integrates cross-level feature fusion, thereby improving the accuracy and real-time performance of vehicle detection in foggy road accident scenarios.
[0115] For example, the training process and detection performance of the improved YOLOv12 model in a vehicle detection method for foggy road accident scenarios using a fusion backbone and hypergraph computing are as follows: (1) Experimental setup The experimental environment for this invention uses a Linux system, an NVIDIA GeForce RTX 2080 Ti graphics processing unit (GPU), and the CUDA 12.1 + PyTorch 2.2.2 framework, with Pthon 3.11.11 as the programming language. The optimizer employs stochastic gradient descent (SGD), which updates model parameters sample by sample or mini-batch samples instead of using the entire dataset, significantly improving computational efficiency.
[0116] The initial learning rate was set to 0.01, and the batch size for each training step was set to 20 to balance computational efficiency and memory usage. The number of experimental iterations was set to 500 to ensure that the model converged fully.
[0117] (2) Dataset selection method This invention selects Real-Time Traffic Surveillance (RTTS), FoggyCityscapes, and TAV-VAD datasets as experimental datasets. RTTS and FoggyCityscapes are benchmark datasets in the field of computer vision used to evaluate the performance of object detection methods under adverse weather conditions, with a particular focus on the impact of rain and fog on visual perception. Their core advantages are complementary, providing solid support for the training and validation of vehicle detection models in foggy weather. The RTTS dataset validates the model's performance and practicality in real-world foggy conditions. The FoggyCityscapes dataset validates the model's generalization ability and robustness in systematically synthesizing foggy conditions, and facilitates academic benchmarking. The combination of the RTTS and FoggyCityscapes datasets allows for thorough verification of the method's superiority under both "real-world" and "simulated" environmental conditions.
[0118] The RTTS dataset contains 4322 real-world foggy images, including numerous images captured by traffic and driving cameras. This invention randomly selects images from the RTTS dataset, comprising 3888 images for training, 100 images for validation, and 334 images for testing. The categories include person, car, bus, bicycle, and motorbike, covering five common targets in urban traffic.
[0119] The Foggy Cityscapes dataset is a synthetic fog dataset that simulates fog in real-world scenes. Each foggy image is rendered using a clear image and depth map from the Foggy Cityscapes dataset. It contains three fog concentration levels, simulating gradual weather conditions from light fog to dense fog. Currently, the Foggy Cityscapes dataset has become an important benchmark in the fields of foggy image processing and autonomous driving. This invention uses 1723 images in the training set, 392 images in the validation set, and 100 images in the test set, covering categories including car, person, rider, truck, bus, train, motorcycle, and bicycle.
[0120] Since there is currently a lack of labeled datasets for vehicle detection in foggy road accident scenarios, this invention constructs its own TAV-VDD dataset. The TAV-VDD dataset is built from road traffic accident videos captured from various data source platforms, synthesized using an atmospheric scattering model to create foggy video data, and from foggy videos in the existing traffic accident video dataset MM-AU. This dataset contains 375 videos and 7963 images, including three types of vehicles commonly found in traffic accidents: cars, buses, and trucks.
[0121] The atmospheric scattering model was proposed by McCartney in 1975 based on the Mie scattering theory, and its calculation formula is shown in formula (12).
[0122] (12) in, I ( x (This is a foggy image.) J ( x () is a fog-free image; t ( x () represents transmittance; A It is the atmospheric light value.
[0123] By acquiring the dark channel image of foggy images from the MM-AU dataset, counting the image pixels, selecting the brightest part of the pixel, and mapping it one-to-one with the original image, the pixel point in the highest grayscale image is selected. For ease of calculation, the pixel values of the three channels of this pixel point are averaged and normalized, and the resulting value is taken as the atmospheric light value. The atmospheric light value calculated by this invention is 0.8. The formula for calculating the atmospheric transmittance estimate is shown in formula (13).
[0124] (13) in, It is the scattering coefficient; It is the distance from each pixel to the center of the image. It is the width of the image. It is the height of the image. This indicates the maximum value to be selected for the image width and height. It can control the concentration of fog. A higher value indicates a higher fog concentration. The value of is generally between (0,1).
[0125] For example, the present invention calculates the reverse calculation using formula (13) by comparing the images with foggy days in the MM-AU dataset. The value indicates a light fog. The value is 0.03, indicating relatively dense fog. A value of 0.05 indicates dense fog. The value is 0.07.
[0126] Optionally, in the fog forecast levels, fog with visibility above 1000 meters is classified as light fog, fog with visibility between 500 and 1000 meters as moderate fog, and fog with visibility between 200 and 500 meters as dense fog. In light fog videos, targets are relatively clear; their boundaries, colors, and sizes are clearly visible to the naked eye. In moderate fog videos, targets are relatively blurry; the outlines of the targets can be barely observed by the human eye. In dense fog videos, the fog concentration is so high that targets are impossible to observe by the human eye.
[0127] (3) Objective evaluation indicators for vehicle inspection This invention uses recall (R), precision (P), mean average precision (mAP50) when the IoU threshold is greater than or equal to 0.5, number of model parameters (Params), number of billion floating-point operations (GFLOPs), and frames per second (FPS) as evaluation metrics to comprehensively and objectively evaluate the performance of the proposed method.
[0128] Recall is defined as the proportion of true positive samples that are correctly predicted as positive by the model. Recall reflects the proportion of samples that the model successfully identifies among all actual positive samples. Precision determines the probability of correct detection and focuses on evaluating the model's accuracy. Recall and precision directly reflect the model's vehicle detection capability.
[0129] mAP50 is a core comprehensive accuracy metric for object detection. It takes into account both recall and precision, and can comprehensively evaluate the overall detection accuracy of the model.
[0130] Params, a key metric for measuring model complexity, reflect the total number of adjustable weight parameters in the model. The number of model parameters directly relates to the model's structural complexity and its computational resource requirements. Models with fewer parameters have a more compact structure, reducing not only the computational burden during training but also the hardware resource consumption required for prediction, thereby improving the efficiency of vehicle detection.
[0131] GFLOPs refers to the theoretical number of floating-point operations per second required for a model to perform forward or backward propagation. It is used to evaluate the theoretical computational load required by a model during forward inference or backward optimization. A lower GFLOPs value means that the model requires fewer floating-point operations per unit time, reflecting its computational efficiency advantage. This advantage is not only reflected in processing speed but also in its friendliness to computational resources.
[0132] FPS refers to the number of still image frames that a model can efficiently process and continuously output detection results per second. This metric is directly related to the model's real-time response capability, that is, the speed at which the model processes data and provides immediate feedback. A higher frame rate means that the model can process more image frames per second, and the stronger its real-time response capability.
[0133] These metrics can be used to comprehensively evaluate the method’s overall performance in three aspects: detection accuracy (R, P, mAP50), model efficiency (Params, GFLOPs) and real-time performance (FPS), and verify its effectiveness in vehicle detection in foggy road accident scenarios. The calculation of R, P, mAP50 and FPS metrics is shown in formulas (14), (15), (16) and (17).
[0134] (14) (15) (16) (17) In formulas (14), (15), and (16), T P This represents the number of correctly predicted positive samples. F P This indicates a false positive, meaning the target's location was detected, but the target's category was incorrectly identified. F N This indicates the number of undetected targets. The IoU threshold is a standard used to measure the overlap between the predicted bounding box and the ground truth bounding box. This represents the average precision for each category when the IoU threshold is greater than or equal to 0.5, which is the average of the precision values obtained when the recall is in the range of 0-1.
[0135] In formula (17), N ( p () indicates the total number of images processed. T ( p The value indicates the image processing time. Higher values for R, P, mAP50, and FPS indicate better detection performance.
[0136] (4) Performance comparison and analysis of MANet and Hyper-CM modules before and after weight reduction This invention compares the performance of vehicle detection methods in foggy road accident scenarios using a fusion-based backbone and hypergraph computing approach, where neither the MANet nor the Hyper-CM module has been lightweighted, with the MANet and Hyper-CM modules being lightweighted individually (Light-MANet, Light-HyperCM), and with both the MANet and Hyper-CM modules being lightweighted simultaneously (Light(MANet+Hyper-CM)). The experimental results are shown in Table 1.
[0137] Table 1. Performance comparison results of the two modules before and after weight reduction.
[0138] As shown in Table 1, regarding the P-value, the method of simultaneously lightweighting the MANet and Hyper-CM modules showed little change on the Foggy Cityscapes and TAV-VDD datasets compared to before lightweighting, but a significant improvement was observed on the RTTS dataset (from 0.65 to 0.716). This indicates that the lightweighting operation does not negatively affect the accuracy of the method, and the method can still accurately detect targets.
[0139] Regarding the R-value, the method of simultaneously lightweighting the MANet and Hyper-CM modules decreased on the RTTS dataset (from 0.608 to 0.547), while it slightly improved on the Foggy Cityscapes and TAV-VDD datasets. This indicates that the method of simultaneously lightweighting the MANet and Hyper-CM modules can still detect targets in images, but it is also affected by the characteristics of the dataset, resulting in a decrease in recall in some scenarios.
[0140] mAP50 is an important metric for evaluating the overall performance of detection methods. The method that simultaneously uses lightweight MANet and Hyper-CM modules performs well on this metric. On the RTTS dataset, the mAP50 value decreases slightly (from 0.681 to 0.67), while it improves on the Foggy Cityscapes and TAV-VDD datasets. This indicates that the lightweight method has good accuracy, but its adaptability to datasets with different characteristics varies.
[0141] It is worth noting that when the MANet module or Hyper-CM module is lightened alone, the values of P, R, and mAP50 are higher than when both the MANet and Hyper-CM modules are lightened together. However, the number of parameters and model complexity are still relatively high when the MANet module or Hyper-CM module is lightened alone. Therefore, overall, lightening both the MANet module and Hyper-CM module simultaneously achieves a balance between speed and accuracy.
[0142] In terms of the evaluation metrics of Params and GFLOPs, the method of simultaneously lightweighting the MANet and Hyper-CM modules significantly reduced the computational cost compared to the original method. Specifically, on the RTTS dataset, Params decreased from 4.142M to 2.322M, and GFLOPs decreased from 10.558 to 6.942; on the Foggy Cityscapes dataset, Params decreased from 4.143M to 2.324M, and GFLOPs decreased from 10.561 to 6.945; and on the TAV-VDD dataset, Params decreased from 4.142M to 2.321M, and GFLOPs decreased from 10.556 to 6.939. This demonstrates that the reduction in Params and GFLOPs indicates that the lightweight method requires fewer computational resources at runtime.
[0143] Faster Image Speed (FPS) is a key metric for evaluating the real-time performance of a method. FPS values show relatively small differences within the same dataset but significant differences across different datasets. This is because, within the same dataset, the statistical distribution of target density in the image is relatively stable, resulting in small differences in FPS values and consistent post-processing times among different methods. However, significant differences exist in target density and the number of candidate boxes across different datasets, leading to larger fluctuations in dynamic overhead during post-processing and thus noticeable differences in FPS values. Specifically, on the RTTS dataset, the FPS value increased from 31.8 to 35.67; on the Foggy Cityscapes dataset, it increased from 85.98 to 89.1; and on the TAV-VDD dataset, it increased from 222.95 to 241.32. This demonstrates that the improved FPS values indicate that methods that simultaneously lightweight the MANet and Hyper-CM modules can process images faster, meeting the demands of real-time detection.
[0144] In summary, by lightweighting the MANet and Hyper-CM modules, the vehicle detection method for foggy road accident scenarios proposed in this invention, which integrates backbone and hypergraph computing, maintains high accuracy while reducing the number of parameters and improving computational efficiency and real-time performance, making it more advantageous in practical applications.
[0145] (5) Experimental comparison results and analysis of the method of this invention with other methods To verify the effectiveness of the method proposed in this invention, comparative experiments were conducted with FINet, YOLOv5, YOLOv8, DERT, YOLOv10, YOLOv11, YOLOv12, YOLOv13, DEIM, RT-DETR, and Hyper-YOLO. The experimental results are shown in Table 2. All methods were performed in 10 independent replicates on the same hardware platform, with only the random seed differing. The results were averaged.
[0146] Table 2. Experimental results of different methods on the RTTS, Foggy Cityscapes, and TAV-VDD datasets.
[0147] As shown in Table 2, the FPS fluctuations of FINet, DETR, and RT-DETR are relatively small across different datasets. This is mainly because Transformer-based detection methods use a fixed number of queries, and the computational complexity of their decoding stage is independent of the scene content. With a fixed input resolution, their FPS remains relatively stable. Furthermore, FINet performs dehazing and object detection jointly in the feature space, avoiding a complete image reconstruction process and reducing GPU memory read / write overhead. Therefore, despite its higher model complexity, its FPS remains relatively stable. In contrast, the post-processing stages of the YOLO series methods (such as the number of candidate boxes and non-maximum suppression (NMS) operations) are more sensitive to the dataset, leading to significant differences in the actual FPS of YOLO models across different datasets.
[0148] On the three datasets, the method of this invention has the lowest number of parameters compared to other comparative methods. Compared with FINet, DERT, RT-DERT, and Hyper-YOLO, the GFLOPs of the method of this invention are significantly reduced, by 10.1, 53.4, 26.6, and 3.9 respectively. While the GFLOPs of the method of this invention are not the best compared to DEIM, YOLOv5, YOLOv8, YOLOv10, YOLOv11, YOLOv12, and YOLOv13, they are close to these values. In the foggy road accident scenario studied in this invention (i.e., the TAV-VDD dataset), the lowest FPS value is 30. This is because the vehicle speed is high; for example, on urban roads at 60 km / h = 16.7 m / s, a 30 FPS frame interval of 33 ms corresponds to a movement distance of only 0.55 m, which meets the requirements for real-time detection. The FPS value of the method of this invention is higher than 30, meeting the requirements for real-time detection. In terms of accuracy, the method of this invention shows improvements in precision, recall, and mAP across the three datasets compared to other methods. Compared to the two-stage foggy target detection method FINet, the method of this invention significantly improves precision, recall, and mAP across all three datasets. The main reason is that FINet requires generating candidate boxes through a region proposal network before classifying and regressing them, leading to candidate box redundancy and error accumulation. In contrast, the method of this invention, based on the YOLO single-stage detection framework, employs an end-to-end prediction mode, directly regressing the target's location and category from the backbone feature map. This eliminates the candidate box generation step, removing the error accumulation from the two stages, improving localization accuracy, and consequently enhancing precision, recall, and mAP.
[0149] Compared to DEIM, the accuracy, recall, and mAP of the method proposed in this invention are improved by 19.3%, 6.7%, and 19.7% respectively on the RTTS dataset; by 17.1%, 11.2%, and 18.9% respectively on the Foggy Cityscapes dataset; and by 14.5%, 2.5%, and 1.3% respectively on the TAV-VDD dataset. The main reason why DEIM's accuracy is worse than the method proposed in this patent is that DEIM is a training and optimization framework that does not address the problems of low contrast, blurred details, and atmospheric scattering noise in foggy images, resulting in insufficient ability to extract target features in foggy conditions, leading to false positives and false negatives. Compared with the DERT and RT-DERT methods, the method of this invention shows significant improvements in accuracy, recall, and mAP on the RTTS and Foggy Cityscapes datasets, with improvements of at least 6%. On the TAV-VDD dataset, the accuracy, recall, and mAP of the method of this invention are 92.3%±1.2%, 89.2%±1.1%, and 91.6%±0.8%, respectively, indicating that the method of this invention has high accuracy in foggy road accident scenarios.
[0150] Compared to object detection methods in the YOLO series, the method of this invention shows significant improvements in accuracy and mAP on the RTTS dataset. The recall rate of this invention is higher than YOLOv12 and YOLOv13. This is because the sample size for a few target classes is extremely small, resulting in insufficient feature learning by the model and missed detections of these types of targets. YOLOv13's precision, recall, and mAP are all higher than YOLOv12, indicating that YOLOv13 is more accurate than YOLOv12 when the target is complete. This is mainly because YOLOv13 focuses more on the global fusion of high-level features, making it more suitable for detecting complete targets. The YOLOv13 model has higher complexity than YOLOv12, primarily due to the introduction of the HyperACE mechanism, which has higher complexity. However, the number of parameters and FPS are lower than YOLOv12. This is because YOLOv13 uses a series of lightweight modules based on depthwise separable convolutions to replace large convolutional kernels, reducing the number of parameters and accelerating the running speed.
[0151] On the Foggy Cityscapes dataset, FogYOLOv12-APMMS achieved the highest precision, recall, and mAP. Due to the influence of synthetic fog and shooting location, YOLOv13's recall and mAP were lower than YOLOv12's on the Foggy Cityscapes dataset, while its precision was higher. This indicates that YOLOv13 cannot detect targets with blurred boundaries or small sizes, hence the low recall and mAP, but high precision. Furthermore, on the Foggy Cityscapes dataset, YOLOv13 still runs faster than YOLOv12. This pattern persists on the TAV-VDD dataset, but the improvement in precision, recall, and mAP50 of the method in this invention is relatively small.
[0152] Experimental results on the RTTS, Foggy Cityscapes, and TAV-VDD datasets show that the YOLOv12 model outperforms the FINet, DEIM, and YOLO series methods in detection performance. Although YOLOv13 is faster than YOLOv12, its target detection accuracy is poor in foggy road accident scenarios and scenarios with occluded or deformed vehicles, failing to meet the requirements of this invention to address the low accuracy of multi-target and small-target vehicle detection in foggy road accident scenarios.
[0153] On the RTTS, Foggy Cityscapes, and TAV-VDD datasets, partial detection results of the baseline model YOLOv12 and the method of this invention are visualized. (See attached document.) Figure 8 As shown. Optionally, only the bounding box color for the vehicle type that needs to be detected in this invention can be fixed, while the bounding box colors for other targets are randomly generated. For example, dark blue represents cars, light blue represents buses, and white represents trucks.
[0154] In light or dense fog conditions, YOLOv12 may exhibit false positives or false negatives when vehicles are incompletely displayed or are small and occluded. This is because YOLOv12's feature interactions primarily rely on intra-layer or cross-layer convolutions, failing to explicitly model feature associations for incomplete or occluded scenes. The visible features of incomplete or occluded vehicles are isolated and cannot be associated with the semantic features of a "complete vehicle," causing the classification module to fail to identify them as vehicle targets. Furthermore, fog reduces the vehicle's contour gradient and local texture response, leading to instability in the lower-level features of the backbone network, resulting in false positives and false negatives. Additionally, YOLOv12 exhibits overlapping bounding boxes for the same target. This is because target edges in foggy conditions form a "blurred transition zone" due to scattering, such as a gradual decrease in the grayscale gradient between the car and the background. YOLO's anchor box mechanism, based on the assumption of clear boundaries, misclassifies different local regions of the same target (such as the front and body of the car) as independent targets, generating overlapping bounding boxes.
[0155] Compared to YOLOv12, the method of this invention utilizes PConv to extract low-level features of small targets, removes the influence of fog on the detection results through the MSDBlock module, enhances the semantic depth of features using MANet, and models the high-order correlation of occluded target features through hypergraph computation. Therefore, it can accurately detect individual vehicle targets, and the method of this invention has a high confidence level in detecting vehicle targets. Even when multiple small vehicle targets occlude each other, the method of this invention can still accurately detect vehicle targets.
[0156] Specifically, on the TAV-VDD dataset, YOLOv12 sometimes detects multiple small vehicle targets repeatedly or classifies them as a single vehicle target when multiple small vehicle targets are occluded. This is because YOLOv12's feature extraction network does not sufficiently extract features from occluded small vehicle targets, failing to effectively distinguish between multiple targets and resulting in their being detected as a single vehicle target. Furthermore, fog reduces the distinction between the background and small vehicle targets, leading to duplicate labeling of small vehicle targets. This invention's patented method reduces the impact of fog on small vehicle target detection results through the MSDBlock module, enhances the YOLOv12 backbone network's feature extraction capability for small vehicle targets using PConv and MANet, and introduces hypergraph computation into the neck network of YOLOv12. Through cross-level feature fusion and modeling of the relationships between higher-order features, it improves the detection accuracy of multiple small vehicle targets when occlusion exists.
[0157] In summary, in foggy road accident scenarios, the vehicle detection performance of the method of this invention is the best, while the detection performance of FINet, YOLOv5, YOLOv8, DERT, YOLOv10, YOLOv11, YOLOv12, YOLOv13, DEIM, RT-DETR and Hyper-YOLO methods is relatively poor.
[0158] In addition, there are eight alternative solutions that can also achieve the purpose of this invention: YOLOv12, YOLOv12 + MSDBlock, YOLOv12 + MSDBlock + PConv, YOLOv12 + MSDBlock + MANet, YOLOv12 + MSDBlock + Hyper-CM, YOLOv12 + MSDBlock + PConv + MANet, YOLOv12 + MSDBlock + PConv + Hyper-CM, and YOLOv12 + MSDBlock + MANet + Hyper-CM. The "+" sign indicates which modules are used simultaneously; for example, MSDBlock + PConv indicates that both MSDBlock and PConv modules are used.
[0159] The detection results of the above eight alternatives on the RTTS, Foggy Cityscapes, and TAV-VAD datasets are shown in Tables 3, 4, and 5, respectively. The last row of the aforementioned three tables represents the method of this invention. It should also be noted that the √ symbol in the tables indicates a module with a corresponding column name.
[0160] Table 3 shows the ablation experimental results on the RTTS dataset.
[0161] Table 4 shows the ablation experiment results on the Foggy Cityscapes dataset.
[0162] Table 5 shows the ablation experimental results on the TAV-VAD dataset.
[0163] The experimental results in Tables 3, 4 and 5 show that as the number of target types to be detected increases, the values of P, R and mAP50 decrease. However, the variation patterns of P, R and mAP50 are consistent across the same dataset.
[0164] Replacing the standard convolutions in YOLOv12 with PConv alone reduces the number of parameters in the model. On three datasets, the model exhibits high accuracy and recall, indicating that PConv can effectively address the issue of missed detections in small object detection, and it requires fewer parameters than the standard convolutions. Replacing all C3k2 modules and some A2C2f modules in the YOLOv12 backbone network with MANet alone significantly improves the model's accuracy, demonstrating its ability to better detect mutually occluded targets and its stronger feature extraction capabilities. However, the number of parameters and model complexity increase by 0.93M and 2.6 respectively compared to YOLOv12 + MSDBlock + PConv.
[0165] When the neck network is Hyper-Neck, i.e., a neck network containing the Hyper-CM module, the model has high detection accuracy on the RTTS and Foggy Cityscapes datasets. However, on the TAV-VDD dataset, the model's detection accuracy decreases instead of increasing. This indicates that when the scene becomes a complex foggy road accident scene, simply replacing the YOLOv12 neck network with Hyper-Neck is not appropriate. It is necessary to combine it with a better feature extraction network to improve detection accuracy.
[0166] Replacing the core modules of the YOLOv12 backbone network with the MSDBlock + PConv + MANet combination resulted in a smaller increase in the number of parameters, but the mAP50 value was higher than that of the baseline YOLOv12. The MSDBlock + PConv and MSDBlock + MANet methods showed that the MSDBlock + PConv + MANet combination was more accurate than using them alone or not at all.
[0167] When the backbone network is a combination of MSDBlock + PConv and the neck network is Hyper-Neck, the number of parameters increases significantly compared to YOLOv12, MSDBlock + PConv, and MSDBlock + Hyper-CM, indicating that despite the lightweighting of the Hyper-CM module, the number of parameters remains large. The mAP50 value is significantly improved compared to the previous schemes in the table, indicating that Hyper-Neck can improve detection accuracy.
[0168] When the backbone network is a combination of MSDBlock + MANet and the neck network is Hyper-Neck, the number of parameters is higher than that of the MSDBlock + PConv + Hyper-CM combination, indicating that the MANet module is another module that causes a sharp increase in the number of model parameters. The mAP50 value of the MSDBlock + MANet + Hyper-CM combination is higher than that of the previous schemes in the table, but the improvement is not significant compared with the MSDBlock + PConv + Hyper-CM combination.
[0169] The synergistic effect of MSDBlock + PConv + MANet + Hyper-CM outperforms other schemes in accuracy across three datasets, demonstrating its effectiveness in object detection in foggy conditions. This indicates that the combined effect of PConv, MSDBlock, MANet, and Hyper-CM is more effective in improving model accuracy. The FPS and GFLOPs values show that the method presented in this invention exhibits good real-time performance. In summary, the method presented in this invention boasts high precision and average accuracy, with the lowest false negative rate. It exhibits low GFLOPs and Params, and high FPS, meeting the real-time requirements for vehicle detection in real-world foggy road accident scenarios. While maintaining low computational complexity, it possesses high real-time processing capabilities and detection accuracy, making it suitable for scenarios with high accuracy requirements for vehicle detection in foggy road accidents, where resources are limited and real-time performance is crucial.
[0170] Furthermore, based on the same technical concept, embodiments of this application provide a vehicle detection device for foggy road accident scenarios that integrates backbone and hypergraph computing. This device is used to implement the method flow described above in the embodiments of this application. For example, see [link to relevant documentation]. Figure 9 As shown, the fog-day road accident vehicle detection device 900, which integrates a backbone and hypergraph computing, may include: an image acquisition module 901, a feature extraction module 902, a feature fusion module 903, a vehicle detection module 904, and a model training module 905, wherein: The image acquisition module 901 is used to acquire target traffic accident images from traffic accident video data on foggy roads according to a set image sampling frequency; The feature extraction module 902 is used to sequentially extract the original features, eliminate fog interference, and extract semantic features of the target traffic accident image through the backbone network in the improved YOLOv12 model, so as to obtain the original features, the features after fog interference elimination, and multiple semantic features of the target traffic accident image. The feature fusion module 903 is used to perform cross-level feature fusion on the original features, the features after fog interference removal and multiple semantic features through the neck network in the improved YOLOv12 model to obtain the first fused feature, and then perform feature enhancement and multi-scale feature fusion on the first fused feature in sequence to obtain multiple second fused features. The vehicle detection module 904 is used to input multiple second fusion features into the prediction network of the improved YOLOv12 model to obtain vehicle detection results for foggy road accident scenarios corresponding to the multiple second fusion features respectively.
[0171] In an optional embodiment, when acquiring a target traffic accident image from traffic accident video data on foggy roads according to a set image sampling frequency, the image acquisition module 901 is specifically used for: Based on the image sampling frequency determined by the time interval between collision moments in a traffic accident, traffic accident video data is converted into continuous multi-frame traffic accident images. Obtain the target traffic accident image from multiple frames of traffic accident images.
[0172] In one optional embodiment, the backbone network includes: a first sub-network, a second sub-network, a third sub-network, a fourth sub-network, and a fifth sub-network connected in series; wherein, the first sub-network includes: a PConv module, the second sub-network includes: a PConv module and an MSDBlock module, the third and fourth sub-networks each include: a PConv module and a MANet module, and the fifth sub-network includes: a PConv module, a MANet module, and an A2C2f module; When the backbone network in the improved YOLOv12 model sequentially performs original feature extraction, fog interference removal, and semantic feature extraction on the target traffic accident image to obtain the original features, fog-disturbed features, and multiple semantic features of the target traffic accident image, the feature extraction module 902 is specifically used for: The target traffic accident image is convolved in a windmill shape by the PConv module in the first sub-network, and the obtained first image features are then normalized and nonlinearly processed in sequence to obtain the original features. The original features are convolved in a windmill shape by the PConv module in the second sub-network, and the obtained second image features are then normalized and nonlinearly processed in sequence to obtain the first intermediate features. The MSDBlock module in the second sub-network sequentially performs multi-scale parallel large convolution processing and enhanced parallel attention processing on the first intermediate features to obtain features after eliminating fog interference. The PConv module in the third sub-network performs windmill-shaped convolution on the features after fog interference removal, and then performs normalization and nonlinear processing on the obtained third image features to obtain the second intermediate features. The second intermediate features are calibrated at the channel level, processed at the spatial level, and integrated with enhanced features by the MANet module in the third sub-network to obtain multiple third intermediate features. The first semantic feature is obtained by concatenating the features based on the multiple third intermediate features. The first semantic feature is convolved in a windmill shape by the PConv module in the fourth sub-network, and the obtained fourth image feature is then normalized and nonlinearly processed in sequence to obtain the fourth intermediate feature. The MANet module in the fourth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the fourth intermediate feature to obtain multiple fifth intermediate features. Based on these multiple fifth intermediate features, feature concatenation is performed to obtain the second semantic feature. The second semantic feature is convolved in a windmill shape by the PConv module in the fifth sub-network, and the obtained fifth image feature is then normalized and nonlinearly processed in sequence to obtain the sixth intermediate feature. The MANet module in the fifth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the sixth intermediate feature to obtain multiple seventh intermediate features. Based on these multiple seventh intermediate features, feature concatenation is performed to obtain the eighth intermediate feature. The third semantic feature is obtained by sequentially performing region attention processing and at least one enhanced feature integration on the eighth intermediate feature through the A2C2f module in the fifth sub-network.
[0173] In an optional embodiment, when the first intermediate features are sequentially subjected to multi-scale parallel large convolution processing and enhanced parallel attention processing through the MSDBlock module in the second sub-network to obtain features after eliminating fog interference, the feature extraction module 902 is specifically used for: The first intermediate feature is then normalized, followed by 5×5 pointwise convolution and 1×1 pointwise convolution to obtain the first local feature. By performing depth-expansion convolution on the first local feature with a set number of dilated convolution kernels of different sizes, the second local feature, the third local feature, and the fourth local feature are obtained. Based on the first splicing feature determined by the second local feature, the third local feature, and the fourth local feature, and the first local feature, the first residual connection feature is obtained; The first residual connection feature is sequentially subjected to 1×1 pointwise convolution, nonlinear processing, and 1×1 pointwise convolution to obtain the third fused feature. The third fusion feature is processed by simple pixel attention, pixel attention, and channel attention respectively to obtain the attention features corresponding to simple pixel attention, pixel attention, and channel attention respectively. The second residual connection feature is obtained based on the second concatenation feature determined by the attention features corresponding to simple pixel attention, pixel attention and channel attention respectively, and the third fusion feature. The second residual connection feature is sequentially subjected to 1×1 pointwise convolution, nonlinear processing, and 1×1 pointwise convolution to obtain the feature after eliminating fog interference.
[0174] In an optional embodiment, when multiple third intermediate features are obtained by performing channel-level feature calibration, spatial feature processing, and enhanced feature integration on the second intermediate features through the MANet module in the third sub-network, the feature extraction module 902 is specifically used for: The second intermediate feature is subjected to two 1×1 pointwise convolutions to obtain the third intermediate feature corresponding to the channel-level feature calibration. The second intermediate feature is then subjected to two 1×1 pointwise convolutions and one convolution. k × k Depthwise separable convolution and one 1×1 pointwise convolution are used to obtain the third intermediate feature corresponding to spatial feature processing. The second intermediate feature is subjected to one 1×1 pointwise convolution and data segmentation process to obtain two third intermediate features corresponding to the enhanced feature integration. Furthermore, one of the two third intermediate features is used as the input feature of the first convolutional module in at least two convolutional modules that are sequentially connected, and the output features of each of the at least two convolutional modules are used as enhancement features to integrate the corresponding third intermediate feature.
[0175] In an optional embodiment, when the eighth intermediate feature is sequentially processed by the A2C2f module in the fifth sub-network through region attention processing and at least one enhanced feature integration to obtain the third semantic feature, the feature extraction module 902 is specifically used for: The eighth intermediate feature is divided into multiple eighth sub-intermediate features, and the self-attention features corresponding to each of the multiple eighth sub-intermediate features are fused to obtain the fourth fused feature. The fourth fusion feature is subjected to at least one enhanced feature integration to obtain the third semantic feature.
[0176] In one optional embodiment, the neck network includes: a sixth sub-network; the sixth sub-network includes: a downsampling module set for the original features, the features after fog interference removal, and the first semantic features respectively, an upsampling module set for the third semantic features, and a first splicing module; When performing cross-level feature fusion on the original features, the features after fog interference removal, and multiple semantic features through the neck network in the improved YOLOv12 model to obtain the first fused feature, the feature fusion module 903 is specifically used for: Through the three downsampling modules in the sixth sub-network, the original feature, the feature after eliminating fog interference, and the first semantic feature are downsampled according to the feature size of the second semantic feature to obtain three downsampled features; The upsampling module in the sixth sub-network upsamples the third semantic feature according to the feature size of the second semantic feature to obtain the upsampled feature. The first fusion feature is obtained by concatenating the three downsampled features, the second semantic feature, and the upsampled feature through the first concatenation module in the sixth sub-network.
[0177] In an optional embodiment, the neck network further includes a seventh sub-network and an eighth sub-network; wherein the seventh sub-network includes a 1×1 convolutional kernel, a Hypergraph Computation (Hyper-CM) module, and a MANet module; the eighth sub-network includes a first size feature fusion channel, a second size feature fusion channel, and a third size feature fusion channel; the first size feature fusion channel includes an upsampling module, a second concatenation module, and a first MANet module connected in series; the second concatenation module is used to concatenate the output features of the upsampling module and the first semantic features; the second size feature fusion channel includes a third concatenation module, a second MANet module, a fourth concatenation module, and a third MANet module connected in series; a first downsampling module is provided between the output of the first MANet module and the input of the fourth concatenation module; and the third concatenation module is used to concatenate the output features of the seventh sub-network and the eighth sub-network. The output features of the MANet module and the second semantic features in the network are concatenated. The fourth concatenation module is used to concatenate the output features of the first downsampling module and the second MANet module. The third size feature fusion channel includes: the second downsampling module, the fifth concatenation module, a 1×1 convolutional kernel, the sixth concatenation module and the A2C2f module. The third downsampling module is set between the output end of the third MANet module and the input end of the sixth concatenation module. The fifth concatenation module is used to concatenate the output features of the second downsampling module and the third semantic features. The sixth concatenation module is used to concatenate the output features of the third downsampling module and the output features of the 1×1 convolutional kernel in the third size feature fusion channel. When performing feature enhancement and multi-scale feature fusion sequentially on the first fused feature to obtain multiple second fused features, the feature fusion module 903 is specifically used for: The enhanced features are obtained by sequentially performing 1×1 pointwise convolution, hypergraph convolution, channel-level feature calibration, spatial feature processing, and enhanced feature integration on the first fusion feature through the seventh sub-network. The enhanced features are input into the first size feature fusion channel, the second size feature fusion channel, and the third size feature fusion channel respectively, to obtain the second fused features output by the first size feature fusion channel, the second size feature fusion channel, and the third size feature fusion channel respectively.
[0178] In an optional embodiment, after inputting multiple second fusion features into the prediction network of the improved YOLOv12 model to obtain vehicle detection results for foggy road accident scenarios corresponding to the multiple second fusion features respectively, the model training module 905 is specifically used for: Based on the vehicle inspection results for multiple road accident scenarios in foggy weather, the following operations were performed respectively: Based on the vehicle detection results of the first foggy road accident scenario and its corresponding theoretical vehicle detection results, the bounding box regression loss value, classification loss value, and confidence loss value of the target vehicle in the vehicle detection results of the first foggy road accident scenario are determined; wherein, the vehicle detection results of the first foggy road accident scenario are any one of the vehicle detection results of multiple foggy road accident scenarios. The fusion loss value is obtained based on the bounding box regression loss value, classification loss value, and confidence loss value, as well as their respective loss value weights. If the fusion loss value is greater than or equal to the set loss value threshold, then adjust the network parameters of the improved YOLOv12 model until the fusion loss value of the improved YOLOv12 model is less than the loss value threshold.
[0179] Based on the description of the method and apparatus embodiments above, an exemplary embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the method of the embodiments of the present invention.
[0180] This application also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform the method of this application embodiment.
[0181] This application also provides a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform the methods of this application embodiment.
[0182] See Figure 10The diagram illustrates a structural block diagram of an electronic device 1000 that can serve as a server or client in this application, and is an example of a hardware device that can be applied to various aspects of this application. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown in this invention, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0183] like Figure 10 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of the device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0184] Multiple components in electronic device 1000 are connected to I / O interface 1005, including: input unit 1006, output unit 1007, storage unit 1008, and communication unit 1009. Input unit 1006 can be any type of device capable of inputting information to electronic device 1000. Input unit 1006 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 1007 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1008 may include, but is not limited to, disk and optical disk. Communication unit 1009 allows electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, WiFi devices, Worldwide Interoperability for Microwave Access (WiMax) devices, cellular communication devices, and / or the like.
[0185] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a GPU, various artificial intelligence (AI) computing chips, various computing units running machine learning model methods, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above. For example, in some embodiments, the vehicle detection method in the foggy road accident scenario described above can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or communication unit 1009. In some embodiments, the computing unit 1001 can be configured by any other suitable means (e.g., by means of firmware) to perform the vehicle detection method in the foggy road accident scenario with fused backbone and hypergraph computing described above.
[0186] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0187] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM) or flash memory, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0188] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0189] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0190] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0191] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0192] Furthermore, it should be understood that the above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of this invention are still within the scope of this application.
Claims
1. A vehicle detection method for foggy road accident scenarios using a fusion of backbone and hypergraph computing, characterized in that, include: According to the set image sampling frequency, the target traffic accident image is obtained from the traffic accident video data of foggy roads; The backbone network in the improved YOLOv12 model sequentially performs original feature extraction, fog interference removal, and semantic feature extraction on the target traffic accident image, thereby obtaining the original features, fog interference-removed features, and multiple semantic features of the target traffic accident image. The improved YOLOv12 model uses the neck network to perform cross-level feature fusion on the original features, the features after fog interference removal, and the multiple semantic features to obtain a first fused feature. Then, the first fused feature is sequentially enhanced and multi-scale feature fusion is performed to obtain multiple second fused features. The multiple second fusion features are input into the prediction network of the improved YOLOv12 model to obtain the vehicle detection results of the foggy road accident scenario corresponding to the multiple second fusion features respectively.
2. The method as described in claim 1, characterized in that, The step of acquiring the target traffic accident image from traffic accident video data on foggy roads according to a set image sampling frequency includes: The traffic accident video data is converted into a series of multi-frame traffic accident images according to the image sampling frequency determined based on the time interval between the collision moments of the traffic accident. The target traffic accident image is obtained from the multiple frames of traffic accident images.
3. The method as described in claim 1 or 2, characterized in that, The backbone network comprises: a first sub-network, a second sub-network, a third sub-network, a fourth sub-network, and a fifth sub-network connected in sequence; wherein, the first sub-network comprises: a windmill-shaped convolutional PConv module, the second sub-network comprises: a PConv module and a hybrid structure dehazing module MSDBlock module, the third sub-network and the fourth sub-network each comprise: a PConv module and a hybrid aggregation network MANet module, and the fifth sub-network comprises: a PConv module, a MANet module, and a region attention-enhanced cross-feature A2C2f module; The improved YOLOv12 model's backbone network sequentially extracts original features, removes fog interference, and extracts semantic features from the target traffic accident image, resulting in the original features, fog-dissipated features, and multiple semantic features of the target traffic accident image, including: The target traffic accident image is subjected to windmill-shaped convolution by the PConv module in the first sub-network, and the obtained first image features are sequentially normalized and nonlinearly processed to obtain the original features; The original features are subjected to windmill-shaped convolution by the PConv module in the second sub-network, and the obtained second image features are then normalized and nonlinearly processed in sequence to obtain the first intermediate features. The first intermediate feature is processed sequentially by multi-scale parallel large convolution and enhanced parallel attention through the MSDBlock module in the second sub-network to obtain the feature after eliminating fog interference. The PConv module in the third sub-network performs a windmill-shaped convolution on the features after fog interference removal, and then performs normalization and nonlinear processing on the obtained third image features in sequence to obtain the second intermediate features. The second intermediate feature is subjected to channel-level feature calibration, spatial feature processing and enhanced feature integration by the MANet module in the third sub-network to obtain multiple third intermediate features. The first semantic feature is obtained by concatenating the multiple third intermediate features. The first semantic feature is convolved in a windmill shape by the PConv module in the fourth sub-network, and the obtained fourth image feature is then normalized and nonlinearly processed in sequence to obtain the fourth intermediate feature. The MANet module in the fourth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the fourth intermediate feature to obtain multiple fifth intermediate features. Based on these multiple fifth intermediate features, feature concatenation is performed to obtain the second semantic feature. The second semantic feature is convolved in a windmill shape by the PConv module in the fifth sub-network, and the obtained fifth image feature is then normalized and nonlinearly processed in sequence to obtain the sixth intermediate feature. The MANet module in the fifth sub-network performs channel-level feature calibration, spatial feature processing, and enhanced feature integration on the sixth intermediate feature to obtain multiple seventh intermediate features. Based on these multiple seventh intermediate features, feature splicing is performed to obtain the eighth intermediate feature. The third semantic feature is obtained by sequentially performing region attention processing and at least one enhanced feature integration on the eighth intermediate feature through the A2C2f module in the fifth sub-network.
4. The method as described in claim 3, characterized in that, The process of performing multi-scale parallel large convolution processing and enhanced parallel attention processing on the first intermediate features through the MSDBlock module in the second sub-network to obtain the features after eliminating fog interference includes: The first intermediate feature is subjected to normalization, 5×5 pointwise convolution and 1×1 pointwise convolution in sequence to obtain the first local feature; By performing depth-expansion convolution on the first local feature with a set number of dilated convolution kernels of different sizes, the second local feature, the third local feature, and the fourth local feature are obtained. Based on the first splicing feature determined by the second local feature, the third local feature, and the fourth local feature, and the first local feature, a first residual connection feature is obtained; The first residual connection feature is sequentially subjected to 1×1 pointwise convolution, nonlinear processing, and 1×1 pointwise convolution to obtain the third fused feature. The third fusion feature is subjected to simple pixel attention processing, pixel attention processing, and channel attention processing respectively to obtain attention features corresponding to the simple pixel attention, pixel attention, and channel attention respectively; The second concatenation feature is obtained based on the second concatenation feature determined by the attention features corresponding to the simple pixel attention, the pixel attention, and the channel attention, respectively, and the third fusion feature; The second residual connection feature is sequentially subjected to 1×1 pointwise convolution, nonlinear processing, and 1×1 pointwise convolution to obtain the feature after eliminating fog interference.
5. The method as described in claim 3, characterized in that, The second intermediate features are processed by the MANet module in the third sub-network through channel-level feature calibration, spatial feature processing, and enhanced feature integration to obtain multiple third intermediate features, including: The second intermediate feature is subjected to two 1×1 pointwise convolutions to obtain the third intermediate feature corresponding to the channel-level feature calibration. The second intermediate feature is then subjected to two 1×1 pointwise convolutions and one convolution. k × k Depth-separable convolution and one 1×1 pointwise convolution are used to obtain the third intermediate feature corresponding to the spatial feature processing. The second intermediate feature is subjected to one 1×1 pointwise convolution and data segmentation process in sequence to obtain two third intermediate features corresponding to the enhanced feature integration. Furthermore, one of the two third intermediate features is used as the input feature of the first convolutional module in at least two convolutional modules that are sequentially connected, and the output features of each of the at least two convolutional modules are used as the third intermediate feature corresponding to the enhanced feature integration.
6. The method as described in claim 3, characterized in that, The third semantic feature is obtained by sequentially performing region attention processing and at least one enhanced feature integration on the eighth intermediate feature through the A2C2f module in the fifth sub-network, including: The eighth intermediate feature is divided into multiple eighth sub-intermediate features, and the self-attention features corresponding to each of the multiple eighth sub-intermediate features are fused to obtain the fourth fused feature. The fourth fusion feature is subjected to at least one enhanced feature integration to obtain the third semantic feature.
7. The method as described in claim 3, characterized in that, The neck network includes a sixth sub-network; the sixth sub-network includes a downsampling module set for the original feature, the feature after fog interference removal and the first semantic feature respectively, an upsampling module set for the third semantic feature and the first splicing module; The improved YOLOv12 model uses a neck network to perform cross-level feature fusion on the original features, the features after fog interference removal, and the multiple semantic features to obtain a first fused feature, including: Using the three downsampling modules in the sixth sub-network, the original feature, the feature after fog interference removal, and the first semantic feature are downsampled according to the feature size of the second semantic feature to obtain three downsampled features; The third semantic feature is upsampled according to the feature size of the second semantic feature by the upsampling module in the sixth sub-network to obtain the upsampled feature; The first fusion feature is obtained by concatenating the three downsampled features, the second semantic feature, and the upsampled feature through the first concatenation module in the sixth sub-network.
8. The method as described in claim 7, characterized in that, The neck network further includes a seventh sub-network and an eighth sub-network; wherein, the seventh sub-network includes a 1×1 convolutional kernel, a Hyper-CM module, and a MANet module; the eighth sub-network includes a first size feature fusion channel, a second size feature fusion channel, and a third size feature fusion channel; the first size feature fusion channel includes an upsampling module, a second concatenation module, and a first MANet module connected in series; the second concatenation module is used to concatenate the output features of the upsampling module and the first semantic features; the second size feature fusion channel includes a third concatenation module, a second MANet module, a fourth concatenation module, and a third MANet module connected in series; a first downsampling module is provided between the output of the first MANet module and the input of the fourth concatenation module; the seventh sub-network includes a seventh sub-network and an eighth sub-network. The third splicing module is used to splice the output features of the MANet module in the seventh sub-network and the second semantic features. The fourth splicing module is used to splice the output features of the first downsampling module and the second MANet module. The third-size feature fusion channel includes: a second downsampling module, a fifth splicing module, a 1×1 convolutional kernel, a sixth splicing module, and an A2C2f module. A third downsampling module is provided between the output end of the third MANet module and the input end of the sixth splicing module. The fifth splicing module is used to splice the output features of the second downsampling module and the third semantic features. The sixth splicing module is used to splice the output features of the third downsampling module and the output features of the 1×1 convolutional kernel in the third-size feature fusion channel. The first fused feature is sequentially enhanced and multi-scale feature fusion is performed to obtain multiple second fused features, including: The first fused feature is sequentially subjected to 1×1 pointwise convolution, hypergraph convolution, channel-level feature calibration, spatial feature processing and enhanced feature integration through the seventh sub-network to obtain the enhanced feature; The enhanced features are input into the first size feature fusion channel, the second size feature fusion channel, and the third size feature fusion channel respectively, to obtain the second fused features output by the first size feature fusion channel, the second size feature fusion channel, and the third size feature fusion channel respectively.
9. The method as described in claim 1 or 2, characterized in that, After inputting the plurality of second fusion features into the prediction network of the improved YOLOv12 model to obtain the vehicle detection results for the foggy road accident scenario corresponding to the plurality of second fusion features respectively, the method further includes: Based on the vehicle inspection results for multiple road accident scenarios in foggy weather, the following operations were performed respectively: Based on the vehicle detection results of the first foggy road accident scenario and its corresponding theoretical vehicle detection results, the bounding box regression loss value, classification loss value, and confidence loss value of the target vehicle in the vehicle detection results of the foggy road accident scenario are determined; wherein, the vehicle detection result of the first foggy road accident scenario is any one of the vehicle detection results of the plurality of foggy road accident scenarios. Based on the bounding box regression loss value, the classification loss value, and the confidence loss value, and their respective corresponding loss value weights, the fusion loss value is obtained; If the fusion loss value is greater than or equal to the set loss value threshold, then the network parameters of the improved YOLOv12 model are adjusted until the fusion loss value of the improved YOLOv12 model is less than the loss value threshold.
10. A vehicle detection device for foggy road accident scenarios integrating backbone and hypergraph computing, characterized in that, include: The image acquisition module is used to acquire target traffic accident images from traffic accident video data on foggy roads according to a set image sampling frequency; The feature extraction module is used to sequentially extract the original features, eliminate fog interference, and extract semantic features from the target traffic accident image through the backbone network in the improved YOLOv12 model, so as to obtain the original features, fog interference-eliminated features, and multiple semantic features of the target traffic accident image. The feature fusion module is used to perform cross-level feature fusion on the original features, the features after fog interference removal, and the multiple semantic features through the neck network in the improved YOLOv12 model to obtain a first fused feature, and then perform feature enhancement and multi-scale feature fusion on the first fused feature in sequence to obtain multiple second fused features. The vehicle detection module is used to input the multiple second fusion features into the prediction network of the improved YOLOv12 model to obtain the vehicle detection results of the foggy road accident scene corresponding to the multiple second fusion features respectively.