Pavement vehicle and pedestrian small target detection method based on PMEIE multi-scale edge information enhancement
Patent Information
- Application Number
- CN202511185991.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-08-22
AI Technical Summary
早期采用HOG、SIFT等手工特征结合SVM分类器,因对小目标特征表达能力有限,在VisDrone2019等数据集上精度不足50%而被淘汰;以Faster R-CNN、YOLOv3为代表的早期深度学习模型,虽通过CNN自动提取特征提升了性能,但存在特征融合不足(低层细节与高层语义结合不充分)、抗干扰弱(复杂背景误检率超30%)、尺度适应性差(固定锚框难匹配小目标极端尺度变化,像素<30的目标检出率低于40%)等局限
[0073] (1) The PMEIE module can accurately capture the edge features of the target at different resolutions through multi-scale edge enhancement, which solves the problem of edge feature loss at a single scale. This makes the model more accurate in the localization stage and reduces localization error, especially for irregularly shaped targets.
Smart Images

Figure CN121330624B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of deep learning technology, specifically relating to a method for detecting small targets on road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement. Background Technology
[0002] Small road surface targets refer to objects or items that are small in size (physical size or low pixel ratio in images) on or near the road surface. These targets are difficult to detect due to their small size and inconspicuous features, but they have a significant impact on traffic safety and autonomous driving decisions. Common small road surface targets include: small stones, gravel, bricks, glass shards; small debris (such as plastic bottles, cardboard boxes, fabric); small stones protruding from the road surface, fragments from crack edges; worn or small traffic markings (such as remnants of lane edge lines, parts of arrow markings), small traffic cones, the bases of road barriers, metal fragments such as nails and screws on the road surface, or small animals (such as mice, birds, insects, and other creatures active near the road surface), and small items dropped by pedestrians (such as mobile phones, keys, wallets).
[0003] The biggest problem with small targets is their typically small size, which limits the perception range of target detection algorithms. Furthermore, the limited number of pixels in small targets weakens their feature representation, leading to significant loss of detailed information and reduced effective data, thus lowering detection accuracy. In addition, small targets on highways are often in motion, and vehicles moving at long distances are prone to being missed or falsely detected. This is because small targets move at high speeds, are far away, and may be obscured, making it difficult for detection algorithms to accurately capture their position and shape.
[0004] Small target detection on complex road surfaces is a core technology at the intersection of computer vision and image processing. It aims to accurately identify and locate small targets (less than 0.1% of the total pixel count) in images acquired from aerial imaging devices such as drones, with applications in intelligent transportation, urban management, and emergency rescue. Early methods combined handcrafted features such as HOG and SIFT with SVM classifiers were abandoned due to their limited ability to represent small target features, achieving less than 50% accuracy on datasets like VisDrone2019. Early deep learning models, such as Faster R-CNN and YOLOv3, improved performance by automatically extracting features through CNNs, but suffered from limitations such as insufficient feature fusion (insufficient integration of low-level details and high-level semantics), weak anti-interference capabilities (false detection rate exceeding 30% in complex backgrounds), and poor scale adaptability (fixed anchor boxes struggle to match extreme scale changes in small targets, with a detection rate of less than 40% for targets <30 pixels).
[0005] Small target detection on complex road surfaces has significant value in multiple fields. However, early handcrafted feature methods and traditional deep learning models have many limitations. Existing handcrafted features have limited ability to express small target features and cannot effectively capture the differences between weak features of small targets and complex backgrounds. Early deep learning models lack feature fusion, fusing high and low-level features only through simple skip connections, resulting in large localization errors for small targets. Existing models do not have a dedicated suppression mechanism for complex backgrounds in complex road surface images, leading to high false detection rates due to background interference in complex urban scenes. Fixed anchor box designs are difficult to match extreme scale changes of small targets, resulting in low detection rates for small targets with few pixels. Some existing models have a large number of parameters and computational cost, making it difficult to achieve lightweight design while ensuring detection accuracy, and their feature capture capabilities and global perception performance need to be improved.
[0006] Early deep learning models such as Faster R-CNN and YOLOv3 suffered from problems such as insufficient feature fusion (insufficient combination of low-level details and high-level semantics leading to large localization errors for small targets), weak anti-interference ability (high false detection rate in complex backgrounds), and poor scale adaptability (fixed anchor boxes are difficult to match extreme scale changes of small targets, resulting in low detection rate).
[0007] Chinese patent document CN 119091394 A discloses a method and system for tracking and detecting dynamic small targets on highway surfaces based on improved YOLOv5 and ByteTrack. The method includes: decoding the video stream to obtain the current video frame, then labeling and desensitizing the targets in the current video frame; clustering and normalizing the dataset, then performing enhancement and equalization processing on the current video frame; using an optimized YOLOv5 backbone network structure to apply attention to the target feature regions of the dataset, then calculating the parameter loss of the optimized YOLOv5 backbone network structure; using the ByteTrack algorithm to predict bounding boxes using Kalman filtering, then using the Hungarian algorithm to match the target and trajectory, outputting a tracking image sequence to complete dynamic target tracking. This prior art solves the problems of easy loss and false detection of dynamic small targets at long distances by monitoring equipment, improving traffic safety, but still has insufficient feature extraction capabilities in small target detection.
[0008] Currently, the RT-DETR model (especially the RT-DETR-R18 model), as a Transformer-based object detection model, has high detection accuracy and efficiency. On the VisDrone2019 dataset, it achieves a precision of 60.8%, a recall of 46.4%, and a mAP@50 of 47.7%. Although the RT-DETR model (such as RT-DETR-R18) performs well, it still has shortcomings in small object detection, such as insufficient feature extraction capability (insufficient capture of detailed features such as small object edges and textures), insufficient balance between global perception and local details (the quality of encoder feature representation needs to be improved), and room for optimization in computational efficiency (large number of parameters and computational cost). Therefore, there is still room for improvement in small object feature capture, global perception, and efficiency.
[0009] Therefore, there is a need for a small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement, which can achieve high accuracy and fast training for the detection of small targets on road surfaces in complex conditions. Summary of the Invention
[0010] The technical problem to be solved by the present invention is to provide a method for detecting small targets of vehicles and pedestrians on the road surface based on PMEIE multi-scale edge information enhancement, which can achieve high accuracy and fast training detection of small targets on the road surface in complex conditions.
[0011] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement, which specifically includes the following steps:
[0012] S1 Selecting the dataset: Dividing the selected dataset;
[0013] Network improvement of S2 model: Using DT-DETR model as the baseline model, a new backbone is formed by combining PMEIE module and CFCA module to replace BottleNeck in RT-DETR model. At the same time, HiLo mechanism is used to improve Transformer encoder, and convolutional layer is used to replace fully connected layer, post-normalization strategy and Dropout layer are introduced to build TELHL module to obtain improved model.
[0014] S3 model training: Set training hyperparameters, use the training set to train the improved model, and obtain the trained model;
[0015] S4 Validate the model and detect the results: Set validation parameters to validate the model trained in step S3, and then use the validated model to extract features of small targets on complex road surfaces, thereby realizing the detection of small targets on complex road surfaces.
[0016] By adopting the above technical solution, the PMEIE module is designed to enhance the local detail representation of small targets, the CFCA module to improve feature discriminability, and the TELHL module to enhance feature capture and global perception capabilities. At the same time, the computational efficiency is optimized, thereby overcoming the shortcomings of existing technologies in feature extraction, detection accuracy, adaptability to complex scenes, and computational efficiency, and achieving high-accuracy and rapid training detection of small targets on complex road surfaces.
[0017] Preferably, the dataset selected in step S1 includes 10 categories: pedestrians, crowds, bicycles, cars, vans, trucks, tricycles, sunshade tricycles, buses, and motorcycles; the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0018] Preferably, the specific steps of step S2 are as follows:
[0019] S21: Obtain the PMEIE module based on the CSP structure improvement. Specifically, the PMEIE module achieves deep optimization of input features by combining the feature divide-and-conquer strategy of the CSP structure with the multi-scale edge information enhancement mechanism. During initialization, the PMEIE module inherits the basic parameter settings of the CSP structure, including the number of input channels c1, the number of output channels c2, the number of enhancement modules n, the shortcut parameter, the number of groups g, and the expansion coefficient e. The original Bottleneck module in the CSP structure is replaced by the MEIE (Multi-Scale Edge Information Enhance) module, thereby constructing the core processing link for feature enhancement.
[0020] S22: Obtaining the CFCA module based on C2f structure improvement Specifically, by inheriting the efficient framework of "feature splitting-multi-branch enhancement-fusion" from the C2f structure, the Bottleneck module in the C2f structure is replaced with the FCA (Feature Context Attention) module to achieve contextual information capture and fine-grained enhancement of input features. While retaining the lightweight feature extraction advantages of the C2f structure, this module significantly improves the semantic expressive power of features by successively using Spatial-Frequency Attention (SFA) and Channel Transposed Attention (CTA), and combining it with a Deep Feedforward Network (DFFN), making it suitable for visual tasks that require strong context awareness.
[0021] S23: Introducing the HiLo module, using a post-normalization strategy and introducing a Dropout layer to improve the Transformer encoder layer to obtain the TEHL module, thus obtaining the improved model and outputting the final features.
[0022] The above technical solution firstly designs a multi-scale edge information enhancement module (PMEIE) focusing on feature contours and a spatial frequency domain and channel domain feature selection module (CFCA) to replace the Bottleneck in RT-DETR. The PMEIE module effectively enhances local detail representation and improves small target detection performance through multi-scale edge enhancement, adapts to targets of different shapes through multi-scale processing, maintains computational efficiency by relying on the CSP structure, and is easy to implement in engineering. The CFCA module enhances the model's adaptability to targets of different scales and textures through alternating spatial-frequency attention and channel attention, and is based on the mature C2f architecture, which is computationally efficient and easily compatible with existing frameworks. Finally, in order to enhance the model's feature capture capability and strengthen its global perception performance, the HiLo module is used to improve the traditional Transformer encoder layer, and convolutional layers are used to replace fully connected layers, a post-normalization strategy is adopted, and a Dropout layer is introduced to construct the TELHL module. The TELHL module enhances the high and low frequency feature capture capability through the HiLo module, and combined with an efficient feedforward network and a stable training mechanism, it improves the feature representation quality of the RT-DETR encoder, provides a better input for the decoder, and ultimately enhances the accuracy and robustness of target detection.
[0023] Preferably, step S23 specifically involves: replacing traditional multi-head attention by introducing a HiLo (High-Lower Frequency Attention) mechanism, which, while retaining the feature modeling capabilities of Transformer, enables the collaborative capture of high-frequency details (such as edges and textures) and low-frequency global information (such as semantic distribution) in the input features, making it suitable for visual tasks that require consideration of both local details and global semantics; at the same time, the TEHL module adopts the classic Transformer link of "attention enhancement-residual fusion-nonlinear transformation", which further improves the robustness of feature representation through the cooperation of feedforward network and normalization mechanism.
[0024] Preferably, the specific processing steps of the PMEIE module in step S21 are as follows:
[0025] S211: The input features first enter the feature splitting stage of the PMEIE module; feature mapping is first performed through convolution, specifically: the dimension of the input features is... ,in Input the number of channels. and The height and width of the features are respectively represented by a 1×1 convolutional layer, which performs feature mapping to convert the number of channels to... ,in , Number of output channels The expansion coefficients are then used; subsequently, the mapped features are split into sub-features along the channel dimension. Features of the sub-species Sub-features Features of the sub-species The number of channels is ;
[0026] S212: Sub-features obtained from the splitting The input features are then processed in the enhancement branch, which consists of n cascaded MEIE modules. For each MEIE module, the input sub-features are first processed. The number of channels is Perform multi-scale feature extraction and edge enhancement, and then combine the obtained n enhanced features with the sub-features obtained from the splitting. They are combined and integrated; the final output channel count is Its characteristics.
[0027] Preferably, the formula for the feature splitting process in step S211 is expressed as follows:
[0028] (1);
[0029] (2);
[0030] In formula (1) As input features, The output features after convolution, For a 1×1 convolution operation, Set the number of channels for a 1×1 convolution operation;
[0031] In formula (2) These are the two output sub-features obtained after the splitting operation. For splitting operations, For the output features in formula (1), The number of split channels set.
[0032] Preferably, in step S212, the input sub-features are... The specific steps for multi-scale feature extraction and edge enhancement are as follows:
[0033] The PMEIE module contains n' parallel branches corresponding to the number of bins parameters. Each branch performs the same feature processing procedure, specifically: first, the input features are compressed to the corresponding scale using adaptive average pooling, resulting in... Then, the number of feature channels is reduced from 1×1 convolution. Down to (Because the number of bins is n); then, a 3×3 depthwise convolution is applied, resulting in a group number of... Perform local feature transformation to obtain ;
[0034] The features of each branch are then input into the EE (Edge Enhancer) module for edge enhancement. The specific steps for edge enhancement in the EE module are as follows: First, the input features are locally smoothed using 3×3 average pooling (stride of 1, padding of 1) to obtain smoothed features. ;
[0035] Then, edge information is extracted by the difference between the original features and the smoothed features, i.e. Subsequently, a weighted mapping of edge features is performed using a convolutional layer with a sigmoid activation function to obtain... ,in This is a convolution operation with Sigmoid activation;
[0036] Finally, the edge enhancement features are fused with the original input features through residual connections, resulting in the output. ;
[0037] After edge enhancement, the features of each branch are restored to the original input feature size, and the feature size is adjusted from [original input feature size] using a bilinear interpolation algorithm. Upsampling to Simultaneously, the MEIE module also performs local feature extraction on the original input features, processing them through a 3×3 convolutional layer local_conv to obtain... Then, local features The fused features are obtained by concatenating the upsampled features of n branches along the channel dimension. Its number of channels is Then, a 1×1 convolutional layer, final_conv, is used to compress the number of channels of the fused features back to their original value. This refers to the output of a single MEIE module;
[0038] After n MEIE modules process the signal sequentially, the enhancement branch will generate n enhancement features; the final output channel number is... Its characteristics.
[0039] Preferably, these enhanced features are combined with the sub-features obtained from the splitting. The specific steps for fusion are as follows: First, concatenate all features along the channel dimension to obtain the total number of channels. The splicing features are then fused and the channels are adjusted using a 1×1 convolutional layer, resulting in a final output with [number of channels]. Its characteristics.
[0040] Preferably, the specific steps of step S22 are as follows:
[0041] S221: The input features first enter the feature splitting stage of the CFCA module, where feature mapping is performed first, and then the mapped features are split to obtain the split sub-features. Features of the sub-species ;
[0042] S222: Sub-features after splitting Perform normalization, and then normalize the sub-features. The input attention module processes the sub-features. Attention enhancement is achieved by first normalizing using LayerNorm to stabilize the training process and enhance feature robustness.
[0043] Normalized features are input into the attention modules (SFA and CTA modules): First, the SFA module jointly models feature associations in the spatial and frequency domains, capturing local and global spatial relationships through block division and shift operations while incorporating frequency domain information; then, the CTA module reconstructs the attention computation space through channel dimension transposition, strengthening the semantic dependencies between channels; the attention-processed features are denoted as... Subsequently, the residual connection is used to fuse with the original sequence features, where the residual path adopts the DropPath strategy to reduce overfitting;
[0044] S223: After attention enhancement, the sub-features are input into a deep feedforward network for nonlinear feature transformation, followed by feature dimension restoration; the n enhanced features processed by the FCA module are then combined with the sub-features of the main branch obtained from the splitting. They jointly participate in the fusion, and then compress the number of channels to the target number of output channels.
[0045] Preferably, step S223 specifically involves: after completing attention enhancement, then... The feature is fed into a Deep Feedforward Network (DFFN) for nonlinear feature transformation, followed by feature dimension restoration. The enhanced features obtained after FCA module processing are combined with the sub-features of the main branch obtained from the decomposition. The final step of the FCA module performs feature dimension recovery, transposing the sequence back to its spatial format and reconstructing the dimensions to obtain... The characteristic is the output of a single FCA module;
[0046] In the feature fusion stage of the CFCA module, the enhanced features processed by n FCA modules will be combined with the sub-features of the main branch obtained from the splitting. They jointly participate in the fusion, and then compress the number of channels to the target number of output channels. .
[0047] Preferably, the fusion step specifically involves: concatenating all features along the channel dimension. Where "2+n" corresponds to the initial split of 2 sub-features and n FCA module output features, and then a 1×1 convolutional layer is used to compress the number of channels to the target number of output channels. .
[0048] Preferably, the specific steps of step S221 are as follows:
[0049] First, let the input features be... Where B is the batch size. Here, H represents the number of input channels, and W represents the height and width of the feature, respectively. Indicates B, The values of H and W are real numbers. A 1×1 convolutional layer is used for feature mapping to convert the number of channels into... ,in , Where e is the number of output channels, and e is the expansion factor.
[0050] Subsequently, the mapped features are split into two sub-features along the channel dimension. and The number of channels for each sub-feature is 1. ,Right now:
[0051] (3);
[0052] In formula (3) The two sub-features of the split output, For splitting operations, For the input features, To split by the channel dimension, The number of channels after each split is .
[0053] Preferably, the specific steps of step S23 are as follows:
[0054] S231: The input features first enter the attention enhancement stage of the TEHL module, and high and low frequency attention modeling is performed through the HiLo module. The correlation between high frequency and low frequency features is processed in parallel. That is, high frequency components are extracted from high frequency features, and low frequency components are extracted by average pooling of low frequency attention. Then, the high frequency components and low frequency components are fused to obtain the attention enhancement output features of the HiLo module.
[0055] S232: The attention-enhanced output features of the HiLo module are fed into the residual connection and normalization stage; to avoid information loss during feature transmission, residual connection is used to fuse and normalize the original input features with the output features of the HiLo module to obtain normalized features.
[0056] S233: Then, the normalized features are input into the feedforward network for nonlinear transformation. After feature dimension restoration, the features processed by the feedforward network are output. Specifically, the feedforward network consists of two convolutional layers and an activation function. First, a 1×1 convolutional layer expands the number of feature channels from C to cm. Then, an activation function introduces a non-linear transformation to enhance the non-linear expressive power of the features, resulting in... To reduce overfitting, the activated features are processed by dropout; finally, a 1×1 convolutional layer is used to compress the number of channels back to C, thus restoring the feature dimension and obtaining the features. ;
[0057] S234: Features output by the feedforward network The final output features are obtained by fusing residual connections with normalized features. Specifically, the features are first processed through a dropout layer. Perform random inactivation, then combine with features Residual fusion; finally, the fused features are normalized using a second LayerNorm, calculated in the same way as... Consistency is achieved, resulting in the final output features. Its dimensions are still .
[0058] Preferably, the specific steps of step S231 are as follows:
[0059] S2311: Let the input features be... Where B is the batch size. Here, H represents the number of input channels, and W represents the height and width of the feature, respectively. Indicates B, The values of H and W are real numbers, and this feature is directly input into the HiLo module for high and low frequency attention modeling.
[0060] S2312: High-Frequency Attention (HFA) is performed using the HiLo module. It extracts high-frequency components from the input features (e.g., through differencing or high-frequency filtering) to generate a (Q, K, V) matrix. During computation, scaled dot product attention is used to capture local detail relationships. The formula is as follows:
[0061] (4);
[0062] Using the HiLo module for low-frequency attention, the low-frequency components, i.e., the smoothed global features, are extracted through average pooling, generating a (Q,K,V) matrix. The attention calculation formula is as follows:
[0063] (5);
[0064] Among them, in formulas (4) and (5) or For the output attention features, the matrix (Q,K,V) contains Q as the query, K as the key, and V as the value, which are the input triples for the attention mechanism. The dot product operation for query and key is used to calculate the similarity between Q and K. is a scaling factor used to mitigate the problem of excessively large values after the dot product, which can cause the gradient of the Softmax activation function to vanish; Softmax is the activation function.
[0065] The high-frequency attention features and low-frequency attention features are concatenated and then fused through a projection layer (convolution or linear transformation) to obtain the output features of the HiLo module. ; Indicates B, The values of H and W are real numbers.
[0066] The formula for feature fusion in step S232 is as follows:
[0067] (6);
[0068] In formula (6) The features output after residual connection are These are the original input features. For regularization operations, The output characteristics of the HiLo module;
[0069] The fused features are normalized using LayerNorm to stabilize the feature distribution and accelerate convergence. The formula for LayerNorm normalization is as follows:
[0070] (7);
[0071] In formula (7) The features output after normalization The output features of the residual connection and the normalized input features are... For output features The mean across the channel dimension, For output features The variance in the channel dimension, C For channel dimensions; It is a tiny constant used to prevent the denominator from being zero.
[0072] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0073] (1) The PMEIE module can accurately capture the edge features of the target at different resolutions through multi-scale edge enhancement, which solves the problem of edge feature loss at a single scale. This makes the model more accurate in the localization stage and reduces localization error, especially for irregularly shaped targets.
[0074] (2) The CFCA module can adaptively focus on the key features of the target while filtering background noise by alternating spatial-frequency attention and channel attention. This design allows the model to remain sensitive to target features in complex scenarios, providing more discriminative features for the subsequent decoder and ultimately improving detection accuracy.
[0075] (3) The TELHL module enhances the high and low frequency feature capture capability through the HiLo module. Combined with an efficient feedforward network and a stable training mechanism, it improves the feature representation quality of the RT-DETR encoder, provides a better input for the decoder, and ultimately enhances the accuracy and robustness of target detection.
[0076] (4) Compared with RT-DETR-R18, the improved network performance is significantly enhanced: Precision is increased by 1.5%, Recall by 2.4%, mAP@50 by 2.1%, and mAP@50:95 by 1.3%. At the same time, the number of network parameters and computational cost are reduced by 27.14% and 12.46% respectively, achieving effective model lightweighting while ensuring detection accuracy. Attached Figure Description
[0077] Figure 1 This is a flowchart illustrating the detection process of the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to the present invention.
[0078] Figure 2 This is a diagram of the improved RT-DETR network model in the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement in this invention.
[0079] Figure 3 This is a structural diagram of the PMEIE module designed in the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement in this invention.
[0080] Figure 4 This is a structural diagram of the EE module in the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement of the present invention;
[0081] Figure 5This is a structural diagram of the CFCA module in the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement of the present invention;
[0082] Figure 6 This is a structural diagram of the FCA module in the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement of the present invention;
[0083] Figure 7 This is a structural diagram of the TELHL module in the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement of the present invention;
[0084] Figure 8 This is a structural diagram of the HiLo module in the road vehicle and pedestrian small target detection method based on PMEIE multi-scale edge information enhancement of the present invention;
[0085] Figure 9 The figure shows the experimental results of the model of the small target detection method for road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to the present invention. Detailed Implementation
[0086] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solutions of the present invention more clearly, and should not be used to limit the scope of protection of the present invention.
[0087] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0088] Example: Figure 1 As shown, this method for detecting small targets on road surfaces, including vehicles and pedestrians, based on PMEIE multi-scale edge information enhancement, specifically includes the following steps:
[0089] S1 Selecting the dataset: Dividing the selected dataset;
[0090] In some embodiments, the publicly available visdrone2019 dataset of small targets on complex road surfaces captured by drones is used; the dataset selected in step S1 includes 10 categories: pedestrians, crowds, bicycles, cars, vans, trucks, tricycles, sunshade tricycles, buses, and motorcycles; the dataset is divided into training set, validation set, and test set in a ratio of 8:1:1.
[0091] Network Improvement of S2 Model: Using the DT-DETR model as the baseline, a new backbone is formed by combining the PMEIE and CFCA modules to replace the BottleNeck in the RT-DETR model. Simultaneously, the HiLo mechanism is used to improve the Transformer encoder, and convolutional layers are used instead of fully connected layers. A post-normalization strategy and the introduction of Dropout layers are also employed to construct the TELHL module, resulting in an improved model. Figure 2 As shown;
[0092] The specific steps of step S2 are as follows:
[0093] S21: The PMEIE module is obtained based on the CSP structure improvement. The PMEIE module is the Cross-Stage-Partial Multi-Scale Edge Information Enhancement Unit proposed in this paper. The structure diagram is as follows. Figure 3 As shown, this module maintains the lightweight and efficient characteristics of CSP while introducing adaptive multi-scale pooling and residual edge enhancement mechanisms, thereby significantly improving the feature map's ability to capture high-frequency semantic details such as target contours and textures. Specifically, it achieves deep optimization of input features by combining the feature divide-and-conquer strategy of the CSP structure with the multi-scale edge information enhancement mechanism. During initialization, the PMEIE module inherits the basic parameter settings of the CSP structure, including the number of input channels c1, the number of output channels c2, the number of enhancement modules n, the shortcut parameter, the number of groups g, and the expansion coefficient e. It replaces the original Bottleneck module in the CSP structure with the MEIE (Multi-Scale Edge Information Enhance) module to construct the core processing link for feature enhancement.
[0094] The specific processing steps of the PMEIE module in step S21 are as follows:
[0095] S211: The input features first enter the feature splitting stage of the PMEIE module; feature mapping is first performed through convolution, specifically: the dimension of the input features is... ,in Input the number of channels. and The height and width of the features are respectively represented by a 1×1 convolutional layer, which performs feature mapping to convert the number of channels to... ,in , Number of output channels This is the expansion factor;
[0096] The mapped features are then split into sub-features along the channel dimension. Features of the sub-species Sub-features Features of the sub-species The number of channels is ;
[0097] S212: Sub-features obtained from the splitting The input features are then processed in the enhancement branch, which consists of n cascaded MEIE modules. For each MEIE module, the input sub-features are first processed. The number of channels is Perform multi-scale feature extraction and edge enhancement, and then combine the obtained n enhanced features with the sub-features obtained from the splitting. They are combined and integrated; the final output channel count is Features;
[0098] The formula for the feature splitting process in step S211 is expressed as follows:
[0099] (1);
[0100] (2);
[0101] In formula (1) As input features, The output features after convolution, For a 1×1 convolution operation, Set the number of channels for a 1×1 convolution operation;
[0102] In formula (2) These are the two output sub-features obtained after the splitting operation. For splitting operations, For the output features in formula (1), The number of split channels set;
[0103] In some embodiments, the enhanced branch consists of four MEIE modules connected in series;
[0104] In step S212, the input sub-features The specific steps for multi-scale feature extraction and edge enhancement are as follows:
[0105] The PMEIE module contains n' parallel branches corresponding to the number of bins parameters. Each branch performs the same feature processing procedure: first, adaptive average pooling is used to compress the input features to the corresponding scale, resulting in... Then, the number of feature channels is reduced from 1×1 convolution. Down to Then, a 3×3 depthwise convolution is applied, resulting in a group number of... Perform local feature transformation to obtain ;
[0106] In some embodiments, the bins parameter is set to [3,6,9,12], therefore the PMEIE module has 4 parallel branches, and the same feature processing procedure is performed on each branch. Specifically, the input features are first compressed to the corresponding scales through adaptive average pooling, namely 3×3, 6×6, 9×9, and 12×12, to obtain... Then, the number of feature channels is reduced from 1×1 convolution. Down to (Since the number of bins is 4); then, a 3×3 depthwise convolution is applied, resulting in a group size of... Perform local feature transformation to obtain ;
[0107] The features of each branch are then input into the EE (Edge Enhancer) module for edge enhancement, as shown in the structure diagram below. Figure 4 As shown; the specific steps for edge enhancement in the EE module are as follows: First, the input features are locally smoothed using 3×3 average pooling (stride of 1, padding of 1) to obtain smoothed features. ;
[0108] Then, edge information is extracted by the difference between the original features and the smoothed features, i.e. Subsequently, a weighted mapping of edge features is performed using a convolutional layer with a sigmoid activation function to obtain... ,in This is a convolution operation with Sigmoid activation;
[0109] Finally, the edge enhancement features are fused with the original input features through residual connections, resulting in the output. ;
[0110] After edge enhancement, the features of each branch are restored to the original input feature size, and the feature size is adjusted from [original input feature size] using a bilinear interpolation algorithm. Upsampling to Simultaneously, the MEIE module also performs local feature extraction on the original input features, processing them through a 3×3 convolutional layer local_conv to obtain... Then, local features The fused features are obtained by concatenating the upsampled features of n branches (4 branches in some embodiments) along the channel dimension. Its number of channels is Then, a 1×1 convolutional layer, final_conv, is used to compress the number of channels of the fused features back to their original value. This refers to the output of a single MEIE module;
[0111] After n MEIE modules are processed sequentially, the enhancement branch will generate n enhanced features. These enhanced features, along with the sub-features obtained from the split, are then processed. The features are first concatenated along the channel dimension to obtain a total number of channels. The splicing features are then fused and the channels are adjusted using a 1×1 convolutional layer, resulting in a final output with [number of channels]. Features;
[0112] S22: The CFCA module is obtained based on the C2f structure improvement. Specifically, by inheriting the efficient framework of "feature splitting - multi-branch enhancement - fusion" from the C2f structure, the CFCA module structure diagram is as follows: Figure 5 As shown, the Bottleneck module in the C2f structure is replaced with the FCA (Feature Context Attention) module, and the structure diagram is as follows. Figure 6 As shown, this module captures and refines the contextual information of input features. While retaining the advantages of lightweight feature extraction of the C2f structure, it significantly improves the semantic expressive power of features by successively using spatial-frequency attention (SFA) and channel transpose attention (CTA) and combining them with a deep feedforward network (DFFN). It is suitable for visual tasks that require strong context awareness.
[0113] The specific steps of step S22 are as follows:
[0114] S221: The input features first enter the feature splitting stage of the CFCA module, where feature mapping is performed first, and then the mapped features are split to obtain the split sub-features. Features of the sub-species ;
[0115] The specific steps of step S221 are as follows:
[0116] First, let the input features be... Where B is the batch size. Here, H represents the number of input channels, and W represents the height and width of the feature, respectively. Indicates B, The values of H and W are real numbers. A 1×1 convolutional layer is used for feature mapping to convert the number of channels into... ,in , Where e is the number of output channels, and e is the expansion factor.
[0117] Subsequently, the mapped features are split into two sub-features along the channel dimension. and The number of channels for each sub-feature is 1. ,Right now:
[0118] (3);
[0119] In formula (3) The two sub-features of the split output, For splitting operations, For the input features, To split by the channel dimension, The number of channels after each split is ;
[0120] S222: Sub-features after splitting Perform normalization, and then normalize the sub-features. The input attention module processes the sub-features. Attention enhancement is achieved through the following steps: First, LayerNorm is used for normalization to stabilize the training process and enhance feature robustness. The normalized features are then input into the attention modules (SFA and CTA): The SFA module jointly models feature relationships in the spatial and frequency domains, capturing local and global spatial relationships through block partitioning and shifting operations while incorporating frequency domain information. The CTA module then reconstructs the attention computation space through channel dimension transposition, strengthening the semantic dependencies between channels. The attention-processed features are denoted as... Subsequently, the residual connection is used to fuse with the original sequence features, where the residual path adopts the DropPath strategy to reduce overfitting;
[0121] S223: After attention enhancement is completed, the sub-features are input into a deep feedforward network for nonlinear feature transformation, and then feature dimension restoration is performed; the n enhanced features processed by the FCA module are fused together with the sub-features of the main branch obtained by splitting, and then the number of compressed channels is increased to the target number of output channels;
[0122] In some embodiments, after attention enhancement is performed, the sub-features are then... The input is processed by a Deep Feedforward Network (DFFN) for nonlinear feature transformation, followed by feature dimension restoration. The enhanced features obtained after processing by the FCA module are combined with the sub-features of the main branch obtained from the decomposition. The final step of the FCA module performs feature dimension recovery, transposing the sequence back to its spatial format and reconstructing the dimensions to obtain... The characteristic is the output of a single FCA module;
[0123] In the feature fusion stage of the CFCA module, the enhanced features processed by n FCA modules will be combined with the sub-features of the main branch obtained from the splitting. They jointly participate in the fusion, and then compress the number of channels to the target number of output channels. ; Specifically, this involves concatenating all features along the channel dimension. Where "2+n" corresponds to the initial split of 2 sub-features and n FCA module output features, and then a 1×1 convolutional layer is used to compress the number of channels to the target number of output channels. ;
[0124] S23: Improve the traditional Transformer encoder layer to obtain the TEHL module, the structure diagram is as follows. Figure 7 As shown; Specifically, this involves replacing traditional multi-head attention with a HiLo (High-Local-Frequency Attention) mechanism, and the HiLo structure diagram... Figure 8 As shown, while retaining the feature modeling capabilities of Transformer, it achieves the collaborative capture of high-frequency details (such as edges and textures) and low-frequency global information (such as semantic distribution) in the input features, making it suitable for visual tasks that require both local details and global semantics. At the same time, the TEHL module adopts the classic Transformer link of "attention enhancement-residual fusion-nonlinear transformation", and further improves the robustness of feature representation through the cooperation of feedforward network and normalization mechanism.
[0125] The specific steps of step S23 are as follows:
[0126] S231: The input features first enter the attention enhancement stage of the TEHL module, and high and low frequency attention modeling is performed through the HiLo module. The correlation between high frequency and low frequency features is processed in parallel. That is, high frequency components are extracted from high frequency features, and low frequency components are extracted by average pooling of low frequency attention. Then, the high frequency components and low frequency components are fused to obtain the attention enhancement output features of the HiLo module.
[0127] The specific steps of step S231 are as follows:
[0128] S2311: Let the input features be... Where B is the batch size. Here, H represents the number of input channels, and W represents the height and width of the feature, respectively. Indicates B, The values of H and W are real numbers, and this feature is directly input into the HiLo module for high and low frequency attention modeling.
[0129] S2312: High-Frequency Attention (HFA) is performed using the HiLo module. It extracts high-frequency components from the input features (e.g., through differencing or high-frequency filtering) to generate a (Q, K, V) matrix. During computation, scaled dot product attention is used to capture local detail relationships. The formula is as follows:
[0130] (4);
[0131] Using the HiLo module for low-frequency attention, the low-frequency components, i.e., the smoothed global features, are extracted through average pooling, generating a (Q,K,V) matrix. The attention calculation formula is as follows:
[0132] (5);
[0133] Among them, in formulas (4) and (5) or For the output attention features, the matrix (Q,K,V) contains Q as the query, K as the key, and V as the value, which are the input triples for the attention mechanism. The dot product operation for query and key is used to calculate the similarity between Q and K. is a scaling factor used to mitigate the problem of excessively large values after the dot product, which can cause the gradient of the Softmax activation function to vanish; Softmax is the activation function.
[0134] The high-frequency attention features and low-frequency attention features are concatenated and then fused through a projection layer (convolution or linear transformation) to obtain the output features of the HiLo module. ;
[0135] S232: The attention-enhanced output features of the HiLo module are fed into the residual connection and normalization stage; to avoid information loss during feature transmission, residual connection is used to fuse and normalize the original input features with the output features of the HiLo module to obtain normalized features.
[0136] The formula for feature fusion in step S232 is as follows:
[0137] (6);
[0138] In formula (6) The features output after residual connection are These are the original input features. For regularization operations, The output characteristics of the HiLo module;
[0139] The fused features are normalized using LayerNorm to stabilize the feature distribution and accelerate convergence. The formula for LayerNorm normalization is as follows:
[0140] (7);
[0141] In formula (7) The features output after normalization The output features of the residual connection and the normalized input features are... For output features The mean across the channel dimension, For output features The variance in the channel dimension, C For channel dimension, It is a tiny constant used to prevent the denominator from being zero;
[0142] S233: Then, the normalized features are input into the feedforward network for nonlinear transformation. After feature dimension restoration, the features processed by the feedforward network are output. Specifically, the feedforward network consists of two convolutional layers and an activation function. First, a 1×1 convolutional layer expands the number of feature channels from C to cm. Then, an activation function introduces a non-linear transformation to enhance the non-linear expressive power of the features, resulting in... To reduce overfitting, the activated features are processed by dropout; finally, a 1×1 convolutional layer is used to compress the number of feature channels back to C, thus restoring the feature dimension and obtaining the feature. ;
[0143] S234: Features output by the feedforward network The final output features are obtained by fusing residual connections with normalized features. Specifically, the features are first processed through a dropout layer. Perform random inactivation, then combine with features Residual fusion; finally, the fused features are normalized using a second LayerNorm, calculated in the same way as... Consistency is achieved, resulting in the final output features. Its dimensions are still ;
[0144] S3 model training: Set training hyperparameters, use the training set to train the improved model, and obtain the trained model;
[0145] In some embodiments, the training hyperparameters are set as follows: the number of training rounds is 300, and the BatchSize is set to -1.
[0146] S4 Validate the model and detect the results: Set validation parameters to validate the model trained in step S3, and then use the validated model to extract features of small targets on complex road surfaces, thereby realizing the detection of small targets on complex road surfaces;
[0147] In some embodiments, evaluation metrics include Precision, Recall, mAP, Parameters, and GFLOPS, with mAP@0.5 and mAP@0.5:0.95 (IoU threshold range from 0.5 to 0.95) used as precision metrics, respectively. mAP is the average precision of the detection results for each category; AP refers to the area under the curves formed by precision and recall on the horizontal and vertical axes. The calculation formulas for Recall and Precision are shown in formulas (7) and (8), respectively.
[0148] (7);
[0149] (8);
[0150] In the formula, TP represents the number of correctly identified targets. Generally, when the IoU threshold is greater than or equal to 0.5, it is considered a correctly identified target; FP represents the number of incorrectly identified targets; FN represents the number of missed targets; Precision is the proportion of correct targets among the targets detected by the model; Recall is the proportion of targets correctly identified by the model among the total number of real targets.
[0151] In some embodiments, the number of species detected in this invention is 6, so the mAP is as shown in (9);
[0152] (9);
[0153] In the formula, i represents the number of species, i = 1 to 6.
[0154] Application Example: The publicly available Visdrone 2019 dataset, used to capture small objects on complex road surfaces by drones, contains 10,209 still images. These images cover a wide range of aspects, including location (taken from 14 different cities across thousands of kilometers in China), environment (urban and rural), objects (pedestrians, vehicles, bicycles, etc.), and density (sparse and crowded scenes). The images in the dataset vary in size, ranging from 480×360 to 2000×1500. The dataset includes 10 categories: pedestrians, crowds, bicycles, cars, vans, trucks, tricycles, sunshade tricycles, buses, and motorcycles. The dataset is divided into training, validation, and test sets in an 8:1:1 ratio. The training set contains 8167 images, the validation set contains 1021 images, and the test set contains 1021 images. Training is performed on a laboratory host computer. The testing hardware platform environment is Python 3.8, CUDA 11.3, an NVIDIA RTX 4090 GPU, and 24GB of RAM. The training hyperparameters are set as follows: 300 training epochs, and BatchSize set to -1. The improved model is trained using the training set, and the results are then validated using the validation set.
[0155] Compared to RT-DETR-R18, the improved network exhibits significantly enhanced performance: precision increased by 1.5%, recall by 2.4%, mAP@50 by 2.1%, and mAP@50:95 by 1.3%. Simultaneously, the number of network parameters and computational cost decreased by 27.14% and 12.46%, respectively, achieving effective model lightweighting while maintaining detection accuracy. Comparison with other image detection algorithms and lightweight object detection algorithms fully validates the effectiveness and feasibility of the improved algorithm presented in this invention.
[0156] To verify the effectiveness and advancement of the proposed method, several comparative experiments were conducted, as shown in Table 1.
[0157] Any deep learning experiment involves randomness. To improve the reliability of the experimental results, the improved model of this invention is compared with other models. Evaluation metrics include Precision, Recall, mAP, Parameters, and GFLOPS. mAP@0.5 and mAP@0.5:0.95 (IoU threshold range from 0.5 to 0.95) are used as accuracy metrics. mAP is the average precision of the detection results for each category. AP refers to the area under the curves of precision and recall on the horizontal and vertical axes. The evaluation results of each model are shown in Table 1.
[0158] Table 1 Comparison Experiments of Various Models SSD 21.1 35.8 24.0 11.9 12.3 63.2 RetinaNet 23.5 37.9 26.5 12.4 19.8 93.7 QueryDet 41.1 33.4 31.6 17.4 18.9 44.3 Faster-RCNN 45.3 33.8 33.2 17.0 41.2 206.7 Swin Transformer - - 35.6 20.6 34.2 44.5 YOLOv5m 50.3 37.9 36.3 19.2 21.2 48.3 YOLOv5l 45.1 35.2 38.7 24.3 25.8 78.7 YOLOv7 54.1 43.6 42.8 22.5 37.2 103.3 YOLOv8m 55.7 44.3 40.9 24.3 25.8 78.7 YOLOv10m 53.8 42.6 44.0 26.6 15.3 58.9 YOLOv11m 54.1 43.1 44.4 27.3 20.0 67.7 Deformable DETR - - 43.1 27.1 29.0 196.0 MSM-DETR - - 49.5 30.6 22.2 72.9 RT-DETR-R18 60.8 46.4 47.7 29.2 19.9 57.0 MFL-DETR 62.3 48.8 49.8 30.5 14.5 44.0
[0159] The experimental results of this invention are as follows: Figure 9 As shown, the horizontal axis represents the number of training epochs, and the vertical axis represents the accuracy of mAP50. This mAP50(B) comparison curve visually presents the performance difference between MFL-DETR (after improvement) and RT-DETR (before improvement). In the early stages of training, MFL-DETR converges faster, rapidly approaching 0.4 from 0 in the first 50 epochs (especially 0-30 epochs), demonstrating a more efficient feature extraction and convergence mechanism. In the later stages of training (after 200 epochs), MFL-DETR stabilizes at around 0.5, while RT-DETR is approximately 0.48. The improved network breaks through the performance bottleneck of the original model, showing significant advantages in feature depth mining, and the training process is more stable.
[0160] For those skilled in the art, the specific embodiments are merely illustrative descriptions of the present invention. Obviously, the specific implementation of the present invention is not limited to the above-described manner. Any non-substantial improvements made using the inventive concept and technical solution of the present invention, or the direct application of the inventive concept and technical solution to other situations without modification, are all within the protection scope of the present invention.
Claims
1. A method for detecting small targets on road surfaces, including vehicles and pedestrians, based on PMEIE multi-scale edge information enhancement, characterized in that... Specifically, the following steps are included: S1 Selecting the dataset: Divide the selected dataset proportionally; wherein, the dataset contains static images; the static images include location, environment, objects, and density; Network improvement of S2 model: Using RT-DETR model as the baseline model, a new backbone is formed by combining PMEIE module and CFCA module to replace BottleNeck in RT-DETR model. At the same time, HiLo mechanism is used to improve Transformer encoder, and convolutional layer is used to replace fully connected layer, post-normalization strategy and Dropout layer are introduced to build TEHL module to obtain improved model. S3 model training: Set training hyperparameters, train the improved model, and obtain the trained model; S4 Validate the model and detect the results: Set validation parameters to validate the model trained in step S3, and then use the validated model to extract features of small targets on complex road surfaces, thereby realizing the detection of small targets on complex road surfaces; The specific steps of step S2 are as follows: S21: Obtaining the PMEIE module based on CSP structure improvement; Specifically, by combining the feature divide-and-conquer strategy of the CSP structure with a multi-scale edge information enhancement mechanism, the PMEIE module inherits the basic parameter settings of the CSP structure during initialization, including the number of input channels. Number of output channels The number of enhanced modules n, shortcut parameters, number of groups g, and expansion coefficient e are increased, and the original Bottleneck module in the CSP structure is replaced with the MEIE module. S22: Based on the improvement of the C2f structure, the CFCA module is obtained. Specifically, by inheriting the efficient framework of "feature splitting-multi-branch enhancement-fusion" of the C2f structure, the Bottleneck module in the C2f structure is replaced with the FCA module. S23: Introducing the HiLo module, using a post-normalization strategy and introducing a Dropout layer to improve the Transformer encoder layer to obtain the TEHL module, thus obtaining the improved model and outputting the final features; The specific processing steps of the PMEIE module in step S21 are as follows: S211: The input features first enter the feature splitting stage of the PMEIE module; first, feature mapping is performed through convolution, and then the mapped features are split into sub-features along the channel dimension. Features of the sub-species Sub-features Features of the sub-species The number of channels is ; S212: Sub-features obtained from the splitting The input features are then processed in the enhancement branch, which consists of n cascaded MEIE modules. For each MEIE module, the input sub-features are first processed. Perform multi-scale feature extraction and edge enhancement, and then combine the obtained n enhanced features with the sub-features obtained from the splitting. They are combined and integrated; the final output channel count is Features; The specific steps of step S22 are as follows: S221: The input features first enter the feature splitting stage of the CFCA module, where feature mapping is performed first, and then the mapped features are split to obtain the split sub-features. Features of the sub-species ; S222: Sub-features after splitting Perform normalization, and then normalize the sub-features. The input attention module processes the sub-features. Complete attention enhancement; S223: After completing the attention enhancement, then the sub-features The input is processed by a deep feedforward network to perform nonlinear feature transformation, and then the feature dimension is restored. Take the n enhanced features processed by the FCA module and combine them with the sub-features obtained from the splitting. They jointly participate in the fusion, and then compress the number of channels to the target number of output channels. .
2. The method for small target detection of road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to claim 1, characterized in that, The formula for the feature splitting process in step S211 is expressed as follows: (1); (2); In formula (1) As input features, The output features after convolution, For a 1×1 convolution operation, Set the number of channels for a 1×1 convolution operation; Number of channels; In formula (2) These are the two output sub-features obtained after the splitting operation. For splitting operations, For the output features in formula (1), The number of split channels set, This represents the number of channels.
3. The method for small target detection of road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to claim 2, characterized in that, In step S212, the input sub-features The specific steps for multi-scale feature extraction and edge enhancement are as follows: The PMEIE module contains n' parallel branches corresponding to the number of bins parameters, each branch corresponding to the input sub-features. All perform the same feature processing procedure; The features of each branch are then input into the EE module for edge enhancement. After edge enhancement, the features of each branch are restored to the original input feature size. After n MEIE modules process the features sequentially, the enhanced branches will generate n enhanced features, and the final output channel number is... Its characteristics.
4. The method for small target detection of road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to claim 1, characterized in that, The specific steps of step S221 are as follows: First, let the input features be... Where B is the batch size. Here, H represents the number of input channels, and W represents the height and width of the feature, respectively. Indicates B, The values of H and W are real numbers. A 1×1 convolutional layer is used for feature mapping to convert the number of channels into... ,in , Where e is the number of output channels, and e is the expansion factor. Subsequently, the mapped features are split into two sub-features along the channel dimension. and The number of channels for each sub-feature is 1. ,Right now: (3); In formula (3) The two sub-features of the split output, For splitting operations, For the input features, To split by the channel dimension, The number of channels after each split is .
5. The method for small target detection of road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to claim 3, characterized in that, The specific steps of step S23 are as follows: S231: The input features first enter the attention enhancement stage of the TEHL module, and high and low frequency attention modeling is performed through the HiLo module. The correlation between high frequency and low frequency features is processed in parallel. That is, high frequency components are extracted from high frequency features, and low frequency components are extracted by average pooling of low frequency attention. Then, the high frequency components and low frequency components are fused to obtain the attention enhancement output features of the HiLo module. S232: The attention-enhanced output features of the HiLo module are fused and normalized with the original input features and the output features of the HiLo module using residual connections to obtain normalized features; S233: Then, the normalized features are input into the feedforward network for nonlinear transformation to complete the feature dimension recovery, and the features processed by the feedforward network are output. ; S234: Features output by the feedforward network The final output features are obtained by fusing residual connections with normalized features. .
6. The method for small target detection of road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to claim 5, characterized in that, The specific steps of step S231 are as follows: S2311: Let the input features be... Where B is the batch size. Here, H represents the number of input channels, and W represents the height and width of the feature, respectively. Indicates B, The values of H and W are real numbers, and this feature is directly input into the HiLo module for high and low frequency attention modeling. S2312: High-frequency attention feature extraction is performed using the HiLo module. Specifically, a (Q, K, V) matrix is generated by extracting high-frequency components from the input features. During computation, scaled dot product attention is used to capture local detail associations. The formula is as follows: (4); The HiLo module is used for low-frequency attention feature extraction, which extracts low-frequency components, i.e., smoothed global features, through average pooling, and generates a (Q,K,V) matrix. The attention calculation formula is as follows: (5); Among them, in formulas (4) and (5) For the high-frequency attention features of the output, The low-frequency attention features are output, where Q represents the query, K represents the key, and V represents the value. These are the input triples for the attention mechanism. The dot product operation for query and key is used to calculate the similarity between Q and K. Softmax is the scaling factor, and Softmax is the activation function; The high-frequency attention features and low-frequency attention features are concatenated and then fused through a projection layer to obtain the output features of the HiLo module. Where B is the batch size. Here, H represents the number of input channels, and W represents the height and width of the feature, respectively. Indicates B, The values of H and W are real numbers.
7. The method for small target detection of road vehicles and pedestrians based on PMEIE multi-scale edge information enhancement according to claim 6, characterized in that, The formula for feature fusion using residual connections in step S232 is as follows: (6); In formula (6) The features output after residual connection are These are the original input features. For regularization operations, The output characteristics of the HiLo module; The fused features are normalized using LayerNorm. The formula for LayerNorm normalization is as follows: (7); In formula (7) The features output after normalization The output features of the residual connection are also the normalized input features; For output features The mean across the channel dimension, For output features Variance in the channel dimension The channel dimension of the feature. It is a constant.
Citation Information
Patent Citations
Highway pavement dynamic small target tracking detection method and system based on improved YOLOv5 and ByteTrack
CN119091394A
Lightweight road damage detection method based on RT-DETR improvement
CN119784759A