Complex traffic scene-oriented small object and shelter detection method and system, electronic equipment and storage medium

By introducing an adaptive attention-enhanced wavelet module and a feature-enhanced attention-upsampling module into the YOLOv11 model, the accuracy and robustness issues of small target and occlusion detection in complex traffic scenarios are solved, achieving efficient target recognition and feature fusion.

CN121811337APending Publication Date: 2026-04-07ZHENGZHOU XINDA ADVANCED TECH RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing small target detection based on YOLO series models is prone to missing detections in complex traffic scenarios, has insufficient extraction of occluded target features, and lacks robustness, thus failing to meet the full-scenario accurate target detection requirements of intelligent transportation systems.

Method used

The backbone and neck network of YOLOv11 are replaced by an adaptive attention-enhanced wavelet module and a feature-enhanced attention-enhanced upsampling module. A hybrid attention module is added before the prediction branch of the detection head network to improve feature extraction and fusion capabilities through multi-scale frequency decomposition, lightweight convolution and attention mechanism.

Benefits of technology

It significantly improves the detection accuracy of small targets and occlusions, reduces the false negative rate and the false positive rate, and enhances the robustness and computational efficiency of the model in complex traffic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121811337A_ABST
    Figure CN121811337A_ABST
Patent Text Reader

Abstract

The invention provides a small object and shelter detection method and system for a complex traffic scene, electronic equipment and a storage medium. The detection of the traffic scene is realized by constructing an image processing model based on YOLOv11 improvement. Comprising the following steps: replacing a C3k2 module in a YOLOv11 backbone network with an AAEWM module for improving the weak feature representation capability of a small object and a shelter and suppressing background redundant noise interference; a C3k2 module in the YOLOv11 neck network is replaced by an AAEWM module, and an up-sampling module is replaced by an FEAUM module, so that the semantic correlation and spatial positioning accuracy of different scale features are enhanced, and the multi-scale feature fusion effect of small objects and shelters is optimized; an MFTAM module is additionally arranged in front of each prediction branch of a YOLOv11 detection head and is used for dynamically weighting feature information from multiple dimensions, enhancing association between target key features and global semantics and improving the detection precision of small objects and shelters in a complex traffic scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of target detection, in particular, relates to a small object and occlusion detection method and system for complex traffic scenes, electronic equipment and storage medium. BACKGROUND

[0002] The YOLO series model based on deep learning has become the mainstream technical solution for traffic scene object detection, with its "end-to-end" detection architecture, balanced speed and accuracy performance. However, the complexity of the actual traffic scene poses strict requirements on the detection technology, which is specifically manifested in the following aspects: high small target detection missing rate, insufficient occluded target feature extraction, and insufficient detection robustness in complex environments, which seriously restricts the application effect of intelligent transportation system.

[0003] The Chinese invention patent with publication number CN120388311A discloses a lightweight traffic vehicle detection method under the perspective of unmanned aerial vehicle. The method is based on YOLOv11 algorithm and improves the vehicle detection performance through the following aspects: on the basis of maintaining the three-scale detection architecture, a high-resolution detection layer for small targets is added to retain more detailed features; a shared lightweight detection head is used to reduce network parameter quantity and calculation amount; wavelet transform is used instead of traditional convolution in the backbone and neck network to extract multi-scale features using low-frequency and high-frequency components; an RDS module is embedded in the C3K2 module to realize high-level feature perception range expansion and shallow and deep layer feature fusion; in the target box screening stage, the Soft-NMS algorithm is used instead of NMS to retain high confidence predictions in overlapping boxes through softening suppression strategy to avoid missing detection of small targets due to hard threshold filtering.

[0004] Although the above-mentioned patent solution has made certain progress in improving small target detection accuracy and reducing model calculation amount, target occlusion is a typical scenario that occurs frequently in actual complex traffic scenes, such as partial occlusion of vehicle body caused by vehicle rear-end collision, mutual occlusion formed by pedestrian and non-motor vehicle crossing, and target edge occlusion caused by roadside green belts or buildings, etc. The solution does not carry out targeted design for the feature loss problem caused by object occlusion or blur, resulting in low detection accuracy of occluded objects, which cannot meet the demand of intelligent transportation system for accurate detection of all-scene targets.

[0005] In order to solve the above problems, people have been seeking an ideal technical solution. SUMMARY

[0006] The present application aims at the deficiencies of the prior art, and provides a small object and occlusion detection method and system for complex traffic scenes, electronic equipment and storage medium, which can balance small target detection, occluded target identification and complex environment robustness.

[0007] To achieve the above object, the application provides a small object and occlusion detection method for complex traffic scenes, comprising: constructing an improved image processing model based on YOLOv11, obtaining a traffic scene image to be detected, inputting the traffic scene image into the image processing model, outputting a traffic scene detection result through feature extraction, fusion and target prediction of the image processing model; The image processing model comprises a backbone network, a neck network and a detection head network. The C3k2 module in the YOLOv11 backbone network is replaced by an attention enhancement module, which is used to improve the weak feature representation ability of small objects and occlusions and suppress background redundant noise interference. The C3k2 module in the YOLOv11 neck network is replaced by an attention enhancement module, and the up-sampling module is replaced by an attention up-sampling module, which is used to enhance the semantic correlation and spatial positioning accuracy of different scale features and optimize the multi-scale feature fusion effect of small objects and occlusions. The detection head network adds a hybrid attention module before each prediction branch of the YOLOv11 detection head, which is used to dynamically weight feature information from multiple dimensions, strengthen the association between target key features and global semantics, and improve the detection accuracy of small objects and occlusions in complex traffic scenes.

[0008] By replacing the C3k2 module in the YOLOv11 backbone network and the neck network with an attention enhancement module, the weak features of small objects and the incomplete features of occlusions in complex traffic scenes can be accurately captured, and the noise interference of redundant information such as background vehicles, road facilities and pedestrians can be effectively suppressed, solving the technical pain point of insufficient feature extraction of small targets and occluded targets in traditional detection models. The attention up-sampling module used in the neck network can enhance the semantic correlation and spatial positioning accuracy of different scale features, avoid the small object features being covered by large target features in the multi-scale fusion process, significantly improve the feature fusion efficiency of small objects and occlusions, and make the model better adapt to the characteristics of large target size difference in traffic scenes. The hybrid attention module added before each prediction branch of the detection head network can dynamically weight feature information from multiple dimensions such as channels and space, strengthen the association between target key features and global semantics, and effectively reduce the miss detection rate and false detection rate in complex traffic scenes (such as morning and evening peak, vehicle dense occlusion, etc.).

[0009] As a preferred technical scheme of the application, the attention up-sampling module adopts a feature enhancement attention up-sampling module, which comprises: performing a Ghost convolution operation on the input feature map to generate a first output feature, and inputting the first output feature into a dynamic channel weighting module. In the dynamic channel weighting module, dynamic weighting and convolution operations are performed in parallel on the first output feature. The outputs of the two processes are multiplied and fused element-wise to obtain the dynamic channel weighted feature. The dynamic channel weighted feature is then segmented, and the segmented feature is input to the Shuffle attention module. In the Shuffle attention module, the input segmented features are processed sequentially through a global pooling layer, a 1×1 convolution and ReLU layer, a Sigmoid layer, and a channel weighting layer to generate channel attention weights. The channel attention weights are then concatenated and merged with the corresponding segmented dynamic channel weighted features, and then input into the channel shuffling layer to obtain attention-enhanced features. The attention-enhancing features are input into the upsampling module, and nearest neighbor interpolation and convolution operations are performed on the attention-enhancing features in parallel. The outputs of the two operations are fused to obtain the output feature map of the feature-enhancing attention upsampling module.

[0010] The Feature Enhancement Attention Upsampling module enhances the model's multi-scale representation capabilities and perceptual accuracy. It constructs an efficient upsampling path that balances computational efficiency and representation quality by synergistically integrating lightweight Ghost convolution, Shuffle attention mechanism, and detail-preserving upsampling techniques. On one hand, the synergistic effect of lightweight Ghost convolution and Shuffle attention mechanism efficiently preserves feature information and reduces computational complexity. On the other hand, the detail-preserving upsampling strategy effectively alleviates the semantic ambiguity and spatial information degradation problems caused by traditional upsampling operations. This module not only improves the network's ability to recognize small targets but also enhances the model's robustness to densely distributed scenes in complex traffic environments. While avoiding performance degradation, it achieves accurate preservation of detail information, improving detection accuracy at a lower computational cost.

[0011] As a preferred technical solution of the present invention, the attention enhancement module adopts an adaptive attention enhancement wavelet module, which includes: performing a two-dimensional discrete wavelet transform on the input features to decompose the input features into four frequency sub-bands containing different frequency components; The four frequency sub-bands are respectively input into four parallel convolution branches, and the four features corresponding to each frequency sub-band are extracted through the convolution operation of each convolution branch. The four features are input into the SE attention module, which adaptively assigns weights to each of the four features and then sums and fuses the weighted features to obtain the output features of the adaptive attention-enhanced wavelet module.

[0012] The adaptive attention-enhanced wavelet module employs multi-scale wavelet decomposition to capture information at different frequencies, thereby enhancing the model's structural perception capabilities across frequency levels and improving its ability to extract blurred local features. The adaptive attention mechanism dynamically highlights occluded regions and blurred details, optimizing the structural perception and information selection capabilities of feature extraction and fusion through these two methods. Compared to the C3k2 module in YOLOv11, the adaptive attention-enhanced wavelet module, based on wavelet decomposition and sub-band attention mechanisms, achieves structural transformation from single-channel to multi-scale features, demonstrating stronger expressive power for targets with complex textures, small sizes, and severe occlusion in practical applications.

[0013] The adaptive attention-enhanced wavelet module and the feature-enhanced attention-upsampling module play different roles in the network. During the feature extraction and fusion stage, the adaptive attention-enhanced wavelet module improves structure perception by modeling multi-scale frequency components, thereby enhancing the representation of occluded targets. Meanwhile, the feature-enhanced attention-upsampling module is positioned along the top-down path of the feature pyramid to compensate for information loss during upsampling, restore fine details, and selectively enhance information channels and key locations, while keeping computational overhead low. Therefore, the adaptive attention-enhanced wavelet module and the feature-enhanced attention-upsampling module address different types of feature degradation problems, complementing each other.

[0014] As a preferred technical solution of the present invention, the hybrid attention module adopts a multi-scale fusion lightweight triple attention module, which includes: simultaneously inputting the input features into a pointwise convolutional branch and a depthwise separable convolutional branch set in parallel, and merging the output features of the two branches to obtain compressed features; The compressed features are input into the channel attention branch, spatial attention branch and position attention branch respectively. Through feature processing of each branch, the corresponding channel weights, spatial weights and position weights are generated. The channel weights, spatial weights, and positional weights are fused with the compressed features through multiplication to obtain the output features of the multi-scale fusion lightweight triple attention module.

[0015] The multi-scale fusion lightweight triple attention module integrates pointwise convolution and depthwise separable convolution, while fusing channel features, spatial features, and pyramid features to effectively integrate multi-scale features and enhance the saliency response of the target region. By optimizing the feature fusion performance of multi-scale small targets, this module significantly enhances the saliency representation of targets in complex backgrounds while maintaining computational efficiency, thereby improving the detection accuracy and stability of the model in complex scenes.

[0016] As a preferred embodiment of the present invention, the spatial attention includes performing max pooling and average pooling operations on the input features respectively to extract the corresponding spatial features; fusing the spatial features obtained by max pooling and average pooling, and then inputting them into a convolutional layer for feature transformation to generate a spatial response map; then performing a Sigmoid activation operation on the spatial response map to obtain spatial weights for feature weighting, the calculation expression of which is: A s =σ(Conv([MaxPool(X sep AvgPool(X) sep )])); Among them, X sep For compression features, A s σ represents spatial weights; MaxPool represents max pooling, AvgPool represents average pooling; σ represents the Sigmoid activation function, and Conv represents convolution.

[0017] Spatial attention is based on dual pooling collaborative operation to extract salient spatial regions in feature maps. By performing max pooling and average pooling in parallel, it captures the extreme response regions of the target and the global spatial distribution information of the background, respectively. After feature fusion and transformation, it accurately locates the spatial position of low saliency regions such as small targets and occluded targets.

[0018] As a preferred embodiment of the present invention, the channel attention adopts an SE structure, performs global average pooling on the input features to obtain feature statistics for each channel; the feature statistics are then sequentially input into a two-layer fully connected network for feature transformation and weight learning, ultimately obtaining the channel weights used for feature channel weighting, calculated as follows: A c =σ(FC2(δ(FC1(GAP(X sep ))))); Among them, X sep For compression features, A c σ represents the channel weights; σ represents the Sigmoid activation function; FC1 and FC2 are fully connected layers; δ represents the ReLU activation function; and GAP represents the global average pooling operation.

[0019] The channel attention module adopts an SE structure, which adaptively determines the importance weight of each feature channel. First, it performs global channel information statistics on the input compressed features, and then completes feature transformation and weight learning through a fully connected network and activation function. Finally, it generates channel weights that can distinguish the importance of channels, thereby achieving targeted enhancement of the core channels related to the target and effective suppression of redundant noise channels, improving the channel discrimination of features and the detection performance of the model.

[0020] As a preferred embodiment of the present invention, the positional attention introduces a coordinate encoding mechanism to encode the input features to enhance the representation of spatial positional information. Then, based on the self-attention mechanism, the long-distance dependency between target spatial positions is calculated on the encoded features to obtain the positional weights used for feature position weighting. The calculation expression is as follows: ; Among them, A p d represents the position weight; Q, K, and V are the query, key, and value vectors obtained through linear transformation, d is the vector dimension, and M is the length of the position sequence.

[0021] The position attention module overcomes the limitations of traditional local modeling through a self-attention mechanism, efficiently capturing long-distance dependencies between target spatial locations. It can fully explore the positional association information of targets across regions and scales, and effectively correct the positional deviation of local features. At the same time, combined with the accurate spatial positional representation provided by coordinate encoding, it further improves the accuracy of positional localization of small targets, densely distributed targets, and occluded targets, providing more reliable positional feature support for subsequent detection tasks.

[0022] This invention also provides a small object and occlusion detection system for complex traffic scenarios, comprising: The image acquisition module is used to acquire traffic scene image data to obtain the image to be detected; The detection module is used to input the image to be detected into a pre-trained image processing model for recognition, and obtain traffic scene detection results.

[0023] The present invention also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the processor; wherein the memory stores instructions executable by the processor, the instructions being executed by the processor to enable the processor to perform the above-described method for detecting small objects and obstructions in complex traffic scenarios.

[0024] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method for detecting small objects and obstructions in complex traffic scenarios.

[0025] This invention has outstanding substantive features and significant progress compared to the prior art, specifically: (1) The backbone network and neck network adopt an adaptive attention-enhanced wavelet module to replace the traditional C3k2 module. With the help of multi-scale frequency sub-band decomposition and SE attention weighting, the ability to extract fuzzy features is improved, the details of the occluded area are highlighted adaptively, and the weak features of small objects and the incomplete features of occluded objects are accurately captured. (2) The neck network’s feature enhancement attention upsampling module adopts a detail-preserving upsampling strategy to alleviate semantic ambiguity and spatial information degradation, make up for information loss during the upsampling process, avoid small target features being covered by large targets, and strengthen the semantic association of multi-scale features. (3) The multi-scale fusion lightweight triple attention module added before the prediction branch dynamically weights features from the three dimensions of channel, space and location, strengthens the key information of the target and the global correlation, significantly improves the detection accuracy of small objects and occlusions in complex traffic scenarios, and reduces the false detection rate. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the overall model structure of the present invention; Figure 2 This is a schematic diagram of the adaptive attention-enhanced wavelet module of the present invention; Figure 3 This is a schematic diagram of the feature enhancement attention upsampling module of the present invention; Figure 4 This is a schematic diagram of the structure of the multi-scale fusion lightweight triple attention module of the present invention. Detailed Implementation

[0027] The technical solution of the present invention will be further described in detail below through specific embodiments.

[0028] To facilitate understanding of the technical solutions provided in this application, the technical terms involved in the embodiments of this application are explained below.

[0029] YOLO11 is a computer vision model from Ultralytics' YOLO series.

[0030] Ghost convolution is a lightweight convolution module that generates more feature maps through low-cost linear transformations, thereby reducing computational complexity and the number of parameters while maintaining model performance.

[0031] The Shuffle attention mechanism combines spatial and channel attention, aiming to improve the efficiency and performance of deep learning models.

[0032] The Squeeze-and-Excitation (SE) attention mechanism improves the network's representational power by adaptively recalibrating the feature responses in the channel orientation.

[0033] The backbone network is the main feature extraction part of the model, used to extract high-level, semantically rich features from the input image.

[0034] The Neck Module (NECK) is an intermediate layer between the backbone network and the head module. Its role is to further perform feature fusion, context enhancement, and other operations based on the features extracted by the backbone network.

[0035] The head detection network (HEAD) is the output part of the model and is responsible for the final task prediction.

[0036] Example 1 like Figure 1 As shown in the embodiments of this application, a method for detecting small objects and occlusions in complex traffic scenarios is proposed, including: constructing an image processing model based on YOLOv11, acquiring a traffic scene image to be detected, inputting the traffic scene image into the image processing model, and outputting traffic scene detection results through feature extraction, fusion and target prediction of the image processing model; The image processing model includes a backbone network, a neck network, and a detection head network; The backbone network replaces the C3k2 module in the YOLOv11 backbone network with an attention enhancement module to improve the weak feature representation ability of small objects and occluded objects and suppress background redundant noise interference. The neck network replaces the C3k2 module in the YOLOv11 neck network with an attention enhancement module and the upsampling module with an attention upsampling module, in order to enhance the semantic relevance and spatial localization accuracy of features at different scales and optimize the multi-scale feature fusion effect of small objects and occlusions. The detection head network adds a hybrid attention module before each prediction branch of the YOLOv11 detection head to dynamically weight feature information from multiple dimensions, strengthen the correlation between key target features and global semantics, and improve the detection accuracy of small objects and occlusions in complex traffic scenarios.

[0037] This embodiment uses YOLOv11 as the basic model framework to specifically address the pain points of detecting small objects in complex traffic scenarios, such as weak features, incomplete information about occluders, and strong background interference. The core principle involves the collaborative optimization of three network layers: In the backbone network, the original C3k2 module is replaced with an attention enhancement module. This attention mechanism accurately captures the weak features of small objects and the incomplete features of occluders, while suppressing redundant background noise, laying a high-quality foundation for subsequent feature processing. In the neck network, on the one hand, the original C3k2 module is replaced with an attention enhancement module to strengthen feature representation; on the other hand, the traditional upsampling module is replaced with an attention upsampling module to enhance the semantic correlation and spatial localization accuracy of features at different scales, preventing small target features from being covered by large targets in multi-scale fusion and improving the feature fusion efficiency of small objects and occluders. A hybrid attention module is added before each prediction branch of the detection head network to dynamically weight feature information from multiple dimensions such as channel, space, and position, strengthening the correlation between key target features and global semantics, reducing the false negative and false positive rates in complex scenarios, and finally outputting accurate detection results that include both small objects and occluders.

[0038] Example 2 like Figure 2 As shown, in order to enhance the model's ability to represent occluded and blurred targets in complex traffic scenarios, this embodiment proposes an Adaptive Attention-Enhanced Wavelet Module (AAEWM). This module aims to optimize the structural perception and information selection capabilities of the feature extraction module through both frequency-specific modeling and attention mechanisms.

[0039] Specifically, the input features are first subjected to a two-dimensional discrete wavelet transform (DWT) operation, which decomposes the original features into four frequency sub-bands containing different frequency components, thereby highlighting key visual information such as edges, textures, and contours. Then, each frequency sub-band is input into the corresponding convolution branch, and each convolution branch uses a learnable convolution kernel to perform convolution operations to obtain the corresponding four features. This process not only further enhances the expressive power of the features, but also effectively reduces the interference of frequency noise on the features. After entering the feature reconstruction stage, the four features mentioned above are input into the SE (SE) attention module. This module dynamically adjusts the information extraction process to increase the weight ratio of the target-related regions. At the structural level, this module first generates channel descriptors through global pooling, and then uses a two-layer fully connected network to calculate the weight coefficients corresponding to each feature. Finally, based on the weight coefficients, weights are assigned to each frequency sub-band feature, and the weighted high-frequency and low-frequency features are fused to obtain the final output features.

[0040] The computational expression for the adaptive attention-enhanced wavelet module is as follows: Input feature map X∈R D×W×H It is decomposed into four frequency sub-bands: {X LL X LH X HL X HH} = DWT(X); Extract features for each frequency sub-band: F i =W i •X i ; Among them, X i For frequency subbands, i∈{LL, LH, HL, HH}; W i For learnable convolutional kernels; F i Features extracted.

[0041] Calculate the weights of the features for each frequency sub-band, and the features output by the adaptive attention-enhanced wavelet module: S i =σ(W2δ(W1Pool(F i ))); ; Where σ represents the Sigmoid activation function, W1 and W2 are learnable parameters, PooI represents the global pooling operation, and δ represents the ReLU activation function; i For the weight, F out To enhance the features of the wavelet module output for adaptive attention enhancement.

[0042] To fully utilize the global structure and local details of small targets, the adaptive attention-enhanced wavelet module achieves explicit separation and fusion of low-frequency and high-frequency components through two-dimensional discrete wavelet transform. The low-frequency sub-band primarily preserves the global structure and rough outline of the target (e.g., the overall shape of vehicles and pedestrians), providing crucial global context for target recognition in complex traffic scenarios. The high-frequency sub-band accurately captures the fine edges, texture details, and local features of the target, supporting the precise localization of small targets and occluders. Subsequently, a channel attention mechanism is introduced to adaptively weight each of the separated frequency sub-bands. By learning the contribution of different sub-bands to the detection of small targets and occluders, the module selectively enhances the detail response of the high-frequency sub-band while fully preserving the global context information of the low-frequency sub-band. Finally, feature map reconstruction is completed through weighted summation. This effectively highlights the boundary features and local details of small targets and occluders without losing crucial global structural information in complex traffic scenarios, laying a precise feature foundation for subsequent multi-scale feature fusion and target prediction.

[0043] The adaptive attention-enhanced wavelet module, as a fundamental enhancement unit for feature extraction, is deployed in the feature extraction links of the backbone and neck networks. It captures different frequency components of features through multi-scale wavelet decomposition and combines adaptive attention weighting to enhance weak features of small targets and incomplete features of occluded targets, while suppressing redundant background noise. Its core function is to provide high-quality, highly discriminative basic features for subsequent feature processing, solving the problems of small target features being easily obscured and occluded target features being incomplete in traditional feature extraction. It is the prerequisite and foundation for the entire feature optimization process.

[0044] Example 3 like Figure 3 As shown, in order to improve the small target detection performance while reducing computational overhead, this embodiment proposes a feature-enhanced attention upsampling module (FEAUM). It integrates Ghost convolution and Shuffle attention mechanism, adopts an upsampling strategy that preserves details, and constructs an efficient upsampling path that balances computational efficiency and representation quality.

[0045] Specifically, in the feature generation stage, FEAUM first processes the input features using a Ghost convolution branch. The Ghost convolution branch extracts basic structural features and generates low-dimensional redundant features through a series of low-cost linear transformation operations. This method constructs a feature map with strong expressive power while strictly controlling the structure distribution to reduce computational overhead.

[0046] The expression for calculating Ghost convolution is: F ghost =GhostConv(X).

[0047] Subsequently, a Shuffle attention mechanism (using channel shuffling) is introduced to further refine the fine-grained feature modeling of small targets. Channel attention weights are generated through global average pooling, and then combined with convolutional operations: a c =σ(W1•Pool(X)); Where W1 is a learnable parameter, Pool represents the global average pooling operation, and σ is the ReLU activation function.

[0048] To enhance the adaptability under different input scenarios, a dynamic channel weighting mechanism is introduced between Ghost convolution and segmentation operations. This is achieved through a small convolutional network to dynamically adjust the importance of each channel. Lightweight 1×1 convolution is used to process the feature map, generating a channel-dimensional weight vector, which is then multiplied element-wise with the feature map.

[0049] The calculation expression for the dynamic channel weighting mechanism is: F weighted =F ghos t⊙ωdyn ; Where, ω dyn This represents the weight vector along the channel dimension, and ⊙ represents element-wise multiplication.

[0050] The weighted feature map then undergoes channel shuffling and weighting operations: F shuffled =Shuffle(F weighted ,σ c ); Where, σ c F represents the channel attention weight. weighted This indicates the characteristics of dynamic channel weighting.

[0051] During the upsampling phase, FEAUM employs a hybrid strategy: combining nearest-neighbor interpolation with convolution operations, applied to the shuffled feature maps. The upsampling operation is designed as follows: F output =U nn (F shuffled )+Conv(F shuffled ); Among them, U nn (•) represents the nearest neighbor interpolation operation, and Conv(•) represents the standard convolution operation.

[0052] Ghost convolution, through its design of "standard convolution generating core features + lightweight linear transformation generating additional features", significantly reduces the number of model parameters and floating-point operations (FLOPs) while ensuring feature representation capabilities. This not only provides an efficient and lightweight feature foundation for subsequent attention modeling, but also significantly improves the feasibility of deploying the model on resource-constrained devices.

[0053] The dynamic channel weighting mechanism enables the model to adaptively adjust channel priorities based on input features, thereby enhancing the feature response of target-related channels and suppressing interference from redundant noise channels. This improves the model's robustness to problems such as variable target scale and strong background interference in complex traffic scenarios.

[0054] The channel shuffling and weighting process creates synergistic gains: on the one hand, it enhances the feature response capability to weakly salient regions of small targets, accurately capturing subtle features of small targets; on the other hand, it effectively promotes cross-channel information interaction, ensuring global consistency of feature representation. Compared with traditional attention modules such as Squeeze-and-Excitation (SE) and Convolutional Block Attention Module (CBAM), Shuffle Attention, while retaining the global channel redundancy suppression function, further optimizes computational efficiency and feature perception capability. This characteristic makes it more advantageous in traffic scenarios with densely distributed small targets, enabling accurate identification of dense small targets while performing efficient computation.

[0055] In the upsampling submodule, the nearest neighbor interpolation component rapidly expands the feature scale, efficiently improving the feature map resolution; the convolution component simultaneously supplements the structural information and semantic smoothness of the features, correcting for details lost during the interpolation process. Working together, they effectively suppress checkerboard artifacts that are prone to occur in traditional upsampling, significantly improving the fidelity of target boundary reconstruction; simultaneously, they enhance the global consistency and representational stability of features, mitigating gradient decay during feature structure propagation, and strengthening the information continuity and semantic relevance between multi-scale features, providing a more reliable foundation for multi-scale feature fusion of small targets and occluders.

[0056] The Feature Enhancement Attention Upsampling Module receives the basic features output by the Adaptive Attention Enhancement Wavelet Module and serves as the core optimization unit for multi-scale feature fusion in the neck network, deployed along the top-down path of the feature pyramid. It compensates for spatial information degradation during upsampling through lightweight Ghost convolutions, Shuffle attention mechanisms, and detail-preserving upsampling strategies, enhancing the semantic relevance of features at different scales and preventing small target features from being covered by large target features in multi-scale fusion. This module represents a secondary processing and cross-scale integration of the underlying enhanced features, further improving the spatial localization accuracy and multi-scale consistency of features on top of the basic features. It provides the detection head with rich, detailed multi-scale features, achieving a progression from single-scale feature enhancement to multi-scale feature synergy.

[0057] Example 4 like Figure 4 As shown, this embodiment proposes a multi-scale fusion lightweight triple attention module (MFTAM) to effectively integrate multi-scale features and enhance regional saliency, thereby improving the detection accuracy and stability of the model in complex scenes.

[0058] Specifically, in the feature transformation stage, the input features are compressed using a lightweight bottleneck structure. The input features are processed through depthwise separable convolution (DWConv) and pointwise convolution (PWConv) respectively, reducing parameters and computational cost while preserving effective semantic information. This process is defined as: X sep =DWConv(X)+PWConv(X); Where DWConv(•) and PWConv(•) represent depthwise separable convolution and pointwise convolution operations, respectively, and X is the input feature. sep These are the compressed features.

[0059] Subsequently, to enhance the model's sensitivity to multi-scale targets, a triple attention mechanism was integrated, fusing channel, spatial, and positional attention.

[0060] In one alternative embodiment, channel attention employs a squeeze-excitation (SE) structure, calculating the importance weights of different channels through global average pooling (GAP), followed by processing through a two-layer fully connected network to obtain the channel weights. The calculation expression is as follows: A c =σ(FC2(δ(FC1(GAP(X sep ))))); Among them, X sep For compression features, A c σ represents the channel weights; σ represents the Sigmoid activation function; FC1 and FC2 are fully connected layers; δ represents the ReLU activation function; and GAP represents the global average pooling operation.

[0061] In one optional embodiment, spatial attention extracts spatially salient regions through max pooling and average pooling operations, then generates a spatial response map through convolution, followed by sigmoid activation to obtain spatial weights, calculated as follows: A s =σ(Conv([MaxPool(X sep AvgPool(X) sep )])); Among them, X sep For compression features, A s σ represents spatial weights; MaxPool represents max pooling, AvgPool represents average pooling; σ represents the Sigmoid activation function, and Conv represents convolution.

[0062] In one alternative embodiment, positional attention introduces a coordinate encoding mechanism to calculate the long-range dependency of the target's spatial location based on self-attention. The calculation expression is as follows: ; Among them, A p d represents the position weight; Q, K, and V are the query, key, and value vectors obtained through linear transformation, d is the vector dimension, and M is the length of the position sequence.

[0063] Finally, these three attention weights are integrated and applied to the compressed feature map to obtain enhanced features that incorporate multi-dimensional responses. The calculation expression is as follows: Y=A c •A s •A p •X sep ; The fusion features generated by the Multi-Scale Fusion Lightweight Triple Attention Module (MFTAM) fully integrate complementary information from the three dimensions of channel, space, and location, providing more discriminative multi-scale semantic support for subsequent detection heads and facilitating the accurate identification of small targets and occluded objects. This module achieves an optimal balance between lightweight design and strong feature representation capabilities: it significantly enhances the model's feature perception ability and target localization accuracy through an efficient feature weighting mechanism, while avoiding additional computational burden due to its streamlined structural design, making it particularly suitable for small target detection tasks in complex traffic scenarios.

[0064] Unlike the sequential execution logic of traditional attention mechanisms, MFTAM employs a parallel attention computation architecture. It simultaneously computes channel, spatial, and positional attention weights on the same compressed feature map, and then combines these three weights to apply them to the original feature map. This fusion operation is an explicit collaborative processing of channel, spatial, and positional data, with no fixed execution order, effectively avoiding the redundant overhead of sequential computation and improving the efficiency of attention modeling. The three attention branches respectively achieve effective feature selection in the channel dimension, accurate target region localization in the spatial dimension, and capture long-distance dependencies in the positional dimension, forming a complementary gating effect. Ultimately, this results in multi-scale enhanced semantic support, providing comprehensive and accurate feature guarantees for target prediction by the detection head.

[0065] The multi-scale fusion lightweight triple attention module, serving as the optimization unit for the detection head's prediction branch, receives multi-scale fusion features from the neck network. It achieves lightweight feature compression through pointwise convolution and depthwise separable convolution, and then generates attention weights in parallel across channel, spatial, and positional dimensions to dynamically weight the fused features. Its core function is to precisely semantically focus on features before prediction, strengthening key target region features and suppressing background interference. This further transforms the high-quality features generated by preceding modules into highly discriminative and targeted prediction features. This module is the final enabling step in the entire feature optimization process. Based on the feature enhancement results of the adaptive attention-enhanced wavelet module and the feature-enhanced attention-upsampling module, it achieves a progression from improving feature quality to ensuring detection accuracy, directly determining the accuracy and robustness of target prediction.

[0066] Example 5 This embodiment discloses a small object and occlusion detection system for complex traffic scenarios, used to execute the small object and occlusion detection methods for complex traffic scenarios described in embodiments 1-4, including: The image acquisition module is used to acquire traffic scene image data to obtain the image to be detected; The detection module is used to input the image to be detected into a pre-trained image processing model for recognition, and obtain traffic scene detection results.

[0067] This embodiment also provides an electronic device, which can be a server. The electronic device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities; the memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database, while the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium; the database stores all data required for the process of the small object and occlusion detection method for complex traffic scenarios; and the network interface is used for communication with external terminals via a network connection. When the processor is executed, it implements the small object and occlusion detection method for complex traffic scenarios described in embodiments 1-4.

[0068] This embodiment also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the small object and occlusion detection method for complex traffic scenarios described in embodiments 1-4.

[0069] The following are the experimental results of the MSF-YOLOv11n image processing model, which is an improved YOLOv11 based on this invention, on different datasets: On the UA-DETRAC dataset, MSF-YOLOv11n improves mAP50-95 by 3.8% and mAP50 by 3.7% compared to YOLOv11n.

[0070] On the DAIR-V2X dataset, MSF-YOLOv11n achieves a 3.6% improvement in mAP50-95 and a 3.9% improvement in mAP50 compared to YOLOv11n.

[0071] Furthermore, the model of this invention has low computational overhead (6.5 GFLOPs) and high inference speed (100 FPS), ensuring real-time inference capabilities and making it suitable for use in intelligent transportation systems and real-time traffic monitoring.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.

Claims

1. A method for detecting small objects and occlusions in complex traffic scenarios, characterized in that, include: An improved image processing model based on YOLOv11 is constructed to acquire traffic scene images to be detected. The traffic scene images are input into the image processing model, and the traffic scene detection results are output through feature extraction, fusion and target prediction of the image processing model. The image processing model includes a backbone network, a neck network, and a detection head network; The backbone network replaces the C3k2 module in the YOLOv11 backbone network with an attention enhancement module to improve the weak feature representation ability of small objects and occluded objects and suppress background redundant noise interference. The neck network replaces the C3k2 module in the YOLOv11 neck network with an attention enhancement module and the upsampling module with an attention upsampling module, in order to enhance the semantic relevance and spatial localization accuracy of features at different scales and optimize the multi-scale feature fusion effect of small objects and occlusions. The detection head network adds a hybrid attention module before each prediction branch of the YOLOv11 detection head to dynamically weight feature information from multiple dimensions, strengthen the correlation between key target features and global semantics, and improve the detection accuracy of small objects and occlusions in complex traffic scenarios.

2. The method for detecting small objects and obstructions in complex traffic scenarios according to claim 1, characterized in that, The attention upsampling module employs a feature-enhanced attention upsampling module, including: Perform a Ghost convolution operation on the input feature map to generate a first output feature, and input the first output feature into the dynamic channel weighting module; In the dynamic channel weighting module, dynamic weighting and convolution operations are performed in parallel on the first output feature. The outputs of the two processes are multiplied and fused element-wise to obtain the dynamic channel weighted feature. The dynamic channel weighted feature is then segmented, and the segmented feature is input to the Shuffle attention module. In the Shuffle attention module, the input segmented features are processed sequentially through a global pooling layer, a 1×1 convolution and ReLU layer, a Sigmoid layer, and a channel weighting layer to generate channel attention weights. The channel attention weights are then concatenated and merged with the corresponding segmented dynamic channel weighted features, and then input into the channel shuffling layer to obtain attention-enhanced features. The attention-enhancing features are input into the upsampling module, and nearest neighbor interpolation and convolution operations are performed on the attention-enhancing features in parallel. The outputs of the two operations are fused to obtain the output feature map of the feature-enhancing attention upsampling module.

3. The method for detecting small objects and obstructions in complex traffic scenarios according to claim 2, characterized in that, The attention enhancement module employs an adaptive attention enhancement wavelet module, including: A two-dimensional discrete wavelet transform is performed on the input features to decompose the input features into four frequency sub-bands containing different frequency components; The four frequency sub-bands are respectively input into four parallel convolution branches, and the four features corresponding to each frequency sub-band are extracted through the convolution operation of each convolution branch. The four features are input into the SE attention module, which adaptively assigns weights to each of the four features and then sums and fuses the weighted features to obtain the output features of the adaptive attention-enhanced wavelet module.

4. The method for detecting small objects and obstructions in complex traffic scenarios according to claim 3, characterized in that, The hybrid attention module employs a multi-scale fusion lightweight triple attention module, including: The input features are simultaneously fed into a pointwise convolutional branch and a depthwise separable convolutional branch set in parallel. The output features of the two branches are then merged to obtain compressed features. The compressed features are input into the channel attention branch, spatial attention branch and position attention branch respectively. Through feature processing of each branch, the corresponding channel weights, spatial weights and position weights are generated. The channel weights, spatial weights, and positional weights are fused with the compressed features through multiplication to obtain the output features of the multi-scale fusion lightweight triple attention module.

5. The method for detecting small objects and obstructions in complex traffic scenarios according to claim 4, characterized in that, The spatial attention mechanism involves performing max pooling and average pooling operations on the input features to extract corresponding spatial features; fusing the spatial features obtained from max pooling and average pooling, and then inputting them into a convolutional layer for feature transformation to generate a spatial response map; finally, performing a sigmoid activation operation on the spatial response map to obtain spatial weights for feature weighting, calculated as follows: A s =σ(Conv([MaxPool(X sep );AvgPool(X sep )])); Among them, X sep For compression features, A s σ represents spatial weights; MaxPool represents max pooling, AvgPool represents average pooling; σ represents the Sigmoid activation function, and Conv represents convolution.

6. The method for detecting small objects and obstructions in complex traffic scenarios according to claim 5, characterized in that, The channel attention uses a SE structure, performing global average pooling on the input features to obtain feature statistics for each channel. These statistics are then sequentially input into a two-layer fully connected network for feature transformation and weight learning, ultimately yielding the channel weights used for feature channel weighting. The calculation expression is as follows: A c =σ(FC2(δ(FC1(GAP(X sep ))))); Among them, X sep For compression features, A c σ represents the channel weights; σ represents the Sigmoid activation function; FC1 and FC2 are fully connected layers; δ represents the ReLU activation function; and GAP represents the global average pooling operation.

7. The method for detecting small objects and obstructions in complex traffic scenarios according to claim 6, characterized in that: The positional attention mechanism introduces a coordinate encoding mechanism to encode the input features to enhance the representation of spatial positional information. Then, based on the self-attention mechanism, it calculates the long-distance dependencies between target spatial positions on the encoded features to obtain the positional weights used for feature position weighting. The calculation expression is as follows: ; Among them, A p d represents the position weight; Q, K, and V are the query, key, and value vectors obtained through linear transformation, d is the vector dimension, and M is the length of the position sequence.

8. A small object and obstruction detection system for complex traffic scenarios, used to perform the method described in any one of claims 1-7, characterized in that, include: The image acquisition module is used to acquire traffic scene image data to obtain the image to be detected; The detection module is used to input the image to be detected into a pre-trained image processing model for recognition, and obtain traffic scene detection results.

9. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to the processor; wherein the memory stores instructions executable by the processor, the instructions being executed by the processor to enable the processor to perform the method for detecting small objects and obstructions in complex traffic scenarios according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for detecting small objects and obstructions in complex traffic scenarios as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Lightweight traffic vehicle detection method under view angle of unmanned aerial vehicle

    CN120388311A