Image Feature Enhancement Model for Target Detection Based on RTDETR Network

By using the image feature enhancement model of the RTDETR network, and leveraging the orthogonal attention mechanism and efficient hybrid encoder, the stability problem of steel plate defect detection under complex lighting conditions was solved, and efficient detection of small-scale and low-visibility defects was achieved.

CN121582559BActive Publication Date: 2026-05-05WUXI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUXI UNIV
Filing Date
2026-01-27
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Traditional steel plate defect detection algorithms are unstable in complex lighting environments, and are prone to missed detections due to low contrast or false alarms due to high light interference. They are difficult to effectively detect complex defects that are small in scale, have low visibility, and are sensitive to environmental conditions.

Method used

An image feature enhancement model based on the RTDETR network is adopted. By introducing a backbone network with a positive directional attention mechanism to extract key sub-feature maps, and combining an efficient hybrid encoder and decoder, robustness to complex lighting environments and detail visibility are achieved, thereby improving the accuracy of defect detection.

Benefits of technology

It enhances the model's sensitivity to minor and weakly textured defects, improves its ability to characterize complex defect patterns, and enhances the accuracy and robustness of target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582559B_ABST
    Figure CN121582559B_ABST
Patent Text Reader

Abstract

This invention discloses an image feature enhancement model for target detection based on the RTDETR network. The method involves acquiring an image of an object surface and inputting it into a backbone network constructed based on a ResNet residual network. Multiple sub-feature maps are extracted through several orthogonal attention residual modules connected sequentially within the backbone network. These sub-feature maps are then input into an efficient hybrid encoder, where SP-PEU spatial location-aware enhancement units and CCFF cross-scale feature fusion modules perform feature enhancement and fusion operations to obtain multiple unified feature maps. A fixed number of these unified feature maps are selected as the initial object query for the decoder based on an IoU-aware query selection module. An RTDETR decoder with an auxiliary prediction head is employed, and the initial object query is iteratively optimized using a multi-layer Transformer structure to generate the target's category and bounding box, ultimately outputting accurate target detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a target detection method based on an image feature enhancement model using the RTDETR network. Background Technology

[0002] Steel plates, as a key material in manufacturing and infrastructure construction, directly determine the safety and service life of engineering structures. During production, defects such as cracks, pits, and oxide scale easily occur on the surface of steel plates due to factors such as process conditions, operational control, production equipment, and environmental factors. The detection of some small-scale, low-visibility, and environmentally sensitive complex defects is particularly challenging. These defects not only damage the appearance and performance of the steel plate and shorten its service life but may also cause serious safety hazards. Traditional steel plate defect detection algorithms include manual inspection, non-destructive testing (NDT), and machine vision inspection. However, manual inspection suffers from low efficiency and high false negative rates. NDT is limited by factors such as the condition of the steel plate, the area of ​​the defect, and the inspection environment, making it difficult to meet practical needs. Machine vision inspection algorithms based on deep learning are mainly divided into single-stage and two-stage algorithms according to their processing flow. Deep learning-based defect detection algorithms are limited by local receptive fields, making it difficult to fully capture global contextual information, resulting in difficulties in identifying complex defects and limitations in global modeling and post-processing.

[0003] Deep learning-based defect detection algorithms commonly employ a backbone-neck network architecture. However, in complex lighting conditions in industrial settings, dynamically changing shadows and metallic reflections can directly distort the original image. This causes defects, such as scratches and dents, to become weak, blend into the background, or even be completely lost during the initial extraction process through the backbone network. Since the neck network and attention mechanism operate after feature extraction, they essentially perform post-processing and weighted filtering of the extracted features, but they cannot fundamentally recover information lost or severely degraded in the early stages due to lighting issues. Therefore, traditional defect detection algorithms are unstable in the face of changing lighting conditions, prone to missed detections due to low contrast or false alarms due to high-light interference. Summary of the Invention

[0004] Purpose of the invention: In order to overcome the shortcomings of the existing technology, the present invention provides an image feature enhancement model target detection method based on RTDETR network. By introducing a backbone network with a positive directional channel attention mechanism, key sub-feature maps are extracted. A high-efficiency hybrid encoder is used to model global dependencies and local details and improve the robustness of features to complex lighting environments. The constructed RTDETR decoder outputs accurate target detection results.

[0005] Technical solution: To achieve the above objectives, the present invention provides an image feature enhancement model target detection method based on RTDETR network, comprising the following steps:

[0006] Step 1: Obtain the object surface image and input it into the backbone network built based on the ResNet residual network. The S3 sub-feature map, S4 sub-feature map and S5 sub-feature map are extracted through multiple orthogonal attention residual modules connected in sequence in the backbone network.

[0007] Step 2: Input the S3 sub-feature map, S4 sub-feature map and S5 sub-feature map into the high-efficiency hybrid encoder. The SP-PEU spatial location awareness enhancement unit and CCFF cross-scale feature fusion module in the high-efficiency hybrid encoder perform feature enhancement and fusion operations on the S3 sub-feature map, S4 sub-feature map and S5 sub-feature map respectively to obtain multiple unified feature maps.

[0008] The SP-PEU spatial location awareness enhancement unit incorporates a location awareness attention module and a SEFN spatial enhancement feedforward network. The location awareness attention module uses learnable location encoding, dividing the input features into a query matrix, a key matrix, and a value matrix through linear transformation. The query matrix and key matrix are decomposed and subjected to power function operations to obtain sharpened positive and negative polarity maps. These maps are then multiplied and concatenated with the value matrix to obtain attention-enhanced features. The SEFN spatial enhancement feedforward network module is constructed based on the traditional FFN feedforward network, incorporating spatial modeling and gating fusion mechanisms. By using the input features of the SP-PEU spatial location awareness enhancement unit as perception guidance, spatial awareness weights are calculated. These weights are then fused with the input features of the SEFN spatial enhancement feedforward network module to obtain its output features, thus enhancing the encoded features.

[0009] The CCFF cross-scale feature fusion module introduces an IELC3 brightness enhancement convolution module, which is constructed by introducing the RTDETR framework into the IEL intensity enhancement layer. In the IELC3 brightness enhancement convolution module, the input features are processed by deep convolution to obtain the illumination component and the reflection component by capturing the receptive fields of global low-frequency signals and local high-frequency signals, respectively. The perturbation amount of the illumination component and the reflection component is calculated to enhance the illumination component and the reflection component. The enhanced illumination component and the reflection component are fused to output the output feature of the IELC3 brightness enhancement convolution module.

[0010] Step 3: Based on the IoU-aware query selection module, a fixed number of unified feature maps are selected as the initial object query for the decoder. The RTDETR decoder, which is constructed using a Transformer structure with an auxiliary prediction head, iterates and optimizes the initial object query through the multi-layer Transformer structure in the RTDETR decoder to generate the target category and bounding box, and finally outputs accurate target detection results.

[0011] Furthermore, the backbone network constructed based on the ResNet residual network includes multiple ConvNorm convolutional normalization layers, MaxPool max pooling layers, a first orthogonal attention residual module, a second orthogonal attention residual module, a third orthogonal attention residual module, and a fourth orthogonal attention residual module connected in series. The object surface image is input to the multiple ConvNorm convolutional normalization layers connected in series for multiple convolutional normalization operations to obtain convolutional output features. The convolutional output features are input to the MaxPool max pooling layer for pooling operations to obtain the S1 sub-feature map. The S1 sub-feature map is input to the first orthogonal attention residual module for feature extraction to obtain the S2 sub-feature map. The S2 sub-feature map is input to the second orthogonal attention residual module for feature extraction to obtain the S3 sub-feature map. The S3 sub-feature map is input to the third orthogonal attention residual module for feature extraction to obtain the S4 sub-feature map. The S4 sub-feature map is input to the fourth orthogonal attention residual module for feature extraction to obtain the S5 sub-feature map.

[0012] Furthermore, the efficient hybrid encoder includes an SP-PEU spatial position awareness enhancement unit and a CCFF cross-scale feature fusion module. The SP-PEU spatial position awareness enhancement unit is constructed by introducing position awareness attention and SEFN spatial enhancement feedforward network into the AIFI attention-based intra-scale feature interaction module. The CCFF cross-scale feature fusion module is constructed based on CNN convolutional neural network and introduces IELC3 brightness enhancement convolution module. The S5 sub-feature map is input to the SP-PEU spatial position awareness enhancement unit after convolution operation to perform feature enhancement operation and obtain unit output features. The unit output features, S3 sub-feature map and S4 sub-feature map are input to the CCFF cross-scale feature fusion module to perform feature enhancement and fusion operation to obtain multiple unified feature maps.

[0013] Furthermore, the SP-PEU spatial location awareness enhancement unit includes a location awareness attention module, a first Dropout module, a first-layer normalization module, a SEFN spatial enhancement feedforward network module, a second Dropout module, and a second-layer normalization module. The unit input features of the SP-PEU spatial location awareness enhancement unit are input to the location awareness attention module for attention weight calculation to obtain attention enhancement features. These attention enhancement features are then input to the first Dropout module for processing to obtain the output of the first Dropout module. The output of the first Dropout module is added to and fused with the unit input features to obtain the input of the first-layer normalization module. The output of the first-layer normalization module... The input undergoes normalization by the first-layer normalization module to obtain its output. This output is then fed into the SEFN spatial augmentation feedforward network module for further processing, resulting in its own output. The output of the SEFN module is then fed into the second Dropout module for further processing, yielding its own output. The output of the second Dropout module is then added to and fused with the output of the first-layer normalization module to obtain the input to the second-layer normalization module. This input is then normalized by the second-layer normalization module to obtain its own output, which serves as the unit's output feature.

[0014] Furthermore, the position-aware attention module includes a linear transformation module, a splitting module, a ReLU activation function, a power function mapping module, and a polarity-aware linear attention mechanism module. The unit input features are input to the linear transformation module for linear transformation to obtain a query matrix, a key matrix, and a value matrix. The query matrix and key matrix are then input to the ReLU activation function for decomposition to obtain a positive polarity fraction matrix and a negative polarity fraction matrix. These matrices are then input to the power function mapping module for power function operation to obtain a sharpened positive polarity map and a sharpened negative polarity map, which are then input to the polarity-aware linear attention mechanism module. The value matrix is ​​input to the splitting module to split it into v values ​​along the channel dimension. s Value matrix and v o The value matrix is ​​input into the polarity-aware linear attention mechanism module; the polarity-aware linear attention mechanism module will then input v... s Value matrix and v o The value matrix is ​​multiplied by the sharpened positive polarity map and the sharpened negative polarity map respectively, and the results are concatenated and fused to obtain the attention-enhanced features.

[0015] Furthermore, the SEFN spatial enhancement feedforward network module is constructed by introducing spatial modeling and gating fusion mechanisms based on the traditional FFN feedforward network. In the SEFN spatial enhancement feedforward network module, the unit input features are extracted through average pooling and convolution to extract multi-scale spatial features, and spatially aware weights γ are generated through upsampling. The calculation process is as follows:

[0016]

[0017] In the formula, Up represents the upsampling operation, f represents the convolution operation between two convolutional blocks, AvgPool represents the average pooling operation, and S... before Represented as unit input features;

[0018] Attention-enhancing feature S after Divided by channel dimension Some features and Some features, among which After concatenating and fusing some features with spatially perceived weights γ, the input is fed into a gating mechanism consisting of a linear transformation and a GELU activation function to generate a modulated signal gate; the modulated signal gate is then combined with... Partial feature multiplication is performed to obtain the output of the SEFN spatial augmentation feedforward network module; the calculation process is shown below:

[0019]

[0020]

[0021] In the formula, GELU represents the GELU activation function, W1 represents a 1×1 convolution operation, and W... d3 This is represented as a 3×3 convolution operation, and output represents the output of the SEFN spatial enhancement feedforward network module.

[0022] Furthermore, the IELC3 brightness enhancement convolutional module is constructed by introducing the IEL intensity enhancement layer into the RTDETR framework. The IELC3 brightness enhancement convolutional module includes a first convolutional layer, a second convolutional layer, an intensity enhancement layer module, a fusion layer, and a third convolutional layer. The input features of the IELC3 brightness enhancement convolutional module are input to the first convolutional layer for convolution operation to obtain the output of the first convolutional layer. The output of the first convolutional layer is input to the intensity enhancement layer module for processing to obtain a first feature, and the first feature is input to the fusion layer. The input features of the intensity enhancement layer module are input to the second convolutional layer for convolution operation to obtain a second feature, and the second feature is input to the fusion layer. The fusion layer concatenates and fuses the first and second features to obtain the output of the fusion layer. The output of the fusion layer is input to the third convolutional layer for convolution operation to obtain the output of the IELC3 brightness enhancement convolutional module.

[0023] Furthermore, the intensity enhancement layer module consists of multiple IEL intensity enhancement layers. In each IEL intensity enhancement layer, the input features are channel-expanded to obtain initial features. These initial features are then input to the illumination branch and the reflection branch, respectively, and depthwise convolution operations are performed to obtain the illumination component and the reflection component. An activation function is used to calculate the illumination perturbation of the illumination component and the reflection perturbation of the reflection component. The illumination component is enhanced by the illumination perturbation, and the reflection component is enhanced by the reflection perturbation. The enhanced illumination component and the enhanced reflection component are multiplied element-wise to obtain a fused feature map. Pointwise convolution and channel compression operations are performed on the fused feature map to obtain an enhanced feature map, which serves as the output feature of the IEL intensity enhancement layer. The calculation process is as follows:

[0024]

[0025]

[0026]

[0027] In the formula, W I This represents the deep convolution operation in the depthwise convolutional layer of the illumination branch, W. R This represents a deep convolution operation in a deep convolutional layer within the reflection branch; Y Y Y represents the input feature of the IEL intensity enhancement layer. I Represented as the illumination component, Y R Let W represent the reflection component, tanh represent the tanh activation function, and W represent the reflection component. S Y represents the convolution operation of a depthwise separable convolutional layer; Y represents the enhanced feature map.

[0028] Beneficial effects: The image feature enhancement model target detection method based on the RTDETR network of this invention introduces an orthogonal channel attention mechanism into the residual module of the backbone network to construct an orthogonal attention residual module. Through orthogonal filtering and channel recalibration, redundancy is suppressed and key features are highlighted, enhancing the model's sensitivity to small and weak texture defects. In the efficient hybrid encoder part, a novel interactive module is proposed, namely the SP-PEU spatial position awareness enhancement unit, which combines position awareness linear attention and spatial enhancement feedforward network to effectively model global dependencies and local details, improving the ability to characterize complex defect patterns. In the neck feature fusion stage, the IELC3 brightness enhancement convolution module is introduced to decompose the illumination and reflection branches, improving the robustness of features to complex lighting environments and the visibility of details. Attached Figure Description

[0029] Figure 1 This is a network structure diagram of an image feature enhancement model based on the RTDETR network;

[0030] Figure 2 This is a network structure diagram of the orthogonal attention residual module;

[0031] Figure 3 Network structure diagram of the SP-PEU spatial location awareness enhancement unit;

[0032] Figure 4 This is a network structure diagram of the location-aware attention module;

[0033] Figure 5 Network structure diagram of SEFN spatial enhancement feedforward network module;

[0034] Figure 6 This is a network structure diagram of the IELC3 brightness enhancement convolutional module;

[0035] Figure 7 This is a network structure diagram of the IEL strength enhancement layer. Detailed Implementation

[0036] The invention will now be further described with reference to the accompanying drawings.

[0037] like Figure 1 As shown, the image feature enhancement model target detection method based on the RTDETR network includes the following steps:

[0038] Step 1: Obtain the object surface image and input it into the backbone network built based on the ResNet residual network. The S3 sub-feature map, S4 sub-feature map and S5 sub-feature map are extracted through multiple orthogonal attention residual modules connected in sequence in the backbone network.

[0039] Step 2: Input the S3 sub-feature map, S4 sub-feature map and S5 sub-feature map into the high-efficiency hybrid encoder. The SP-PEU spatial location awareness enhancement unit and CCFF cross-scale feature fusion module in the high-efficiency hybrid encoder perform feature enhancement and fusion operations on the S3 sub-feature map, S4 sub-feature map and S5 sub-feature map respectively to obtain multiple unified feature maps.

[0040] The SP-PEU spatial location awareness enhancement unit incorporates a location awareness attention module and a SEFN spatial enhancement feedforward network. The location awareness attention module uses learnable location encoding, dividing the input features into a query matrix, a key matrix, and a value matrix through linear transformation. The query matrix and key matrix are decomposed and subjected to power function operations to obtain sharpened positive and negative polarity maps. These maps are then multiplied and concatenated with the value matrix to obtain attention-enhanced features. The SEFN spatial enhancement feedforward network module is constructed based on the traditional FFN feedforward network, incorporating spatial modeling and gating fusion mechanisms. By using the input features of the SP-PEU spatial location awareness enhancement unit as perception guidance, spatial awareness weights are calculated. These weights are then fused with the input features of the SEFN spatial enhancement feedforward network module to obtain its output features, thus enhancing the encoded features.

[0041] The CCFF cross-scale feature fusion module introduces an IELC3 brightness enhancement convolution module, which is constructed by introducing the RTDETR framework into the IEL intensity enhancement layer. In the IELC3 brightness enhancement convolution module, the input features are processed by deep convolution to obtain the illumination component and the reflection component by capturing the receptive fields of global low-frequency signals and local high-frequency signals, respectively. The perturbation amount of the illumination component and the reflection component is calculated to enhance the illumination component and the reflection component. The enhanced illumination component and the reflection component are fused to output the output feature of the IELC3 brightness enhancement convolution module.

[0042] Step 3: Based on the IoU-aware query selection module, a fixed number of unified feature maps are selected as the initial object queries for the decoder. The RTDETR decoder, constructed using a Transformer structure with auxiliary prediction heads, iteratively optimizes the initial object queries through multiple layers of Transformer structures, generating target categories and bounding boxes, and finally outputting accurate target detection results. The IoU-aware query selection module, also known as IOU-Aware QuerySelection, selects a fixed number of high-quality candidates from multiple unified feature maps as the initial object queries and their reference boxes. Iterative updates of the initial object queries are performed through a multi-layered Transformer structure, and at each layer, classification and regression prediction heads are used to progressively optimize the target categories and bounding boxes, ultimately outputting accurate target detection results.

[0043] like Figure 1As shown, the backbone network constructed based on the ResNet residual network includes multiple ConvNorm convolutional normalization layers, MaxPool max pooling layers, a first orthogonal attention residual module, a second orthogonal attention residual module, a third orthogonal attention residual module, and a fourth orthogonal attention residual module connected in series. The object surface image is input to the multiple ConvNorm convolutional normalization layers connected in series for multiple convolutional normalization operations to obtain convolutional output features. The convolutional output features are input to the MaxPool max pooling layer for pooling operations to obtain the S1 sub-feature map. The S1 sub-feature map is input to the first orthogonal attention residual module for feature extraction to obtain the S2 sub-feature map. The S2 sub-feature map is input to the second orthogonal attention residual module for feature extraction to obtain the S3 sub-feature map. The S3 sub-feature map is input to the third orthogonal attention residual module for feature extraction to obtain the S4 sub-feature map. The S4 sub-feature map is input to the fourth orthogonal attention residual module for feature extraction to obtain the S5 sub-feature map.

[0044] like Figure 1 As shown, the sequentially connected ConvNorm convolutional normalization layers include a first ConvNorm convolutional normalization layer, a second ConvNorm convolutional normalization layer, and a third ConvNorm convolutional normalization layer. The first ConvNorm convolutional normalization layer receives an object surface image as its input. It extracts features from the object surface image to obtain its output features. The output features of the first ConvNorm convolutional normalization layer are then input to the second ConvNorm convolutional normalization layer. The second ConvNorm convolutional normalization layer extracts features from the output features of the first ConvNorm convolutional normalization layer to obtain its output features. Finally, the output features of the second ConvNorm convolutional normalization layer are input to the third ConvNorm convolutional normalization layer. The third ConvNorm convolutional normalization layer extracts features from the output features of the second ConvNorm convolutional normalization layer to obtain its convolutional output features.

[0045] The ConvNorm convolutional normalization layer includes a Conv convolutional layer, a Batch Normalization (BN) layer, and a ReLU activation function layer. The input of the Conv convolutional layer serves as the input of the ConvNorm convolutional normalization layer. The Conv convolutional layer performs a convolution operation on its input features to obtain the output features of the Conv convolutional layer. The output features of the Conv convolutional layer are input to the Batch Normalization (BN) layer for normalization to obtain the output features of the BN layer. The output features of the BN layer are then input to the ReLU activation function layer for processing to obtain the output features of the ReLU activation function layer. The output features of the ReLU activation function layer serve as the output features of the ConvNorm convolutional normalization layer.

[0046] like Figure 2 As shown, the first, second, third, and fourth orthogonal attention residual modules are all orthogonal attention residual modules. The backbone network is constructed based on the ResNet residual network, and the orthogonal channel attention mechanism Ortho is introduced into the backbone network to construct the orthogonal attention residual module, BasicBlock-Ortho, which is BasicBlock-O. The orthogonal attention residual module uses orthogonal filters and channel attention to extract diverse and non-redundant information from the feature space, which significantly enhances the ability to express key channel feature information in the defect detection task.

[0047] The orthogonal attention residual module comprises multiple ConvN convolutional layers, AvgPool average pooling layers, Ortho-Attention layers, and ReLU activation function layers. The input features of the orthogonal attention residual module are divided into two parts. One part of the features undergoes two convolution operations through two ConvN convolutional layers before being input to the Ortho-Attention layer, which processes the input features to obtain its output features. The other part of the features passes sequentially through an AvgPool average pooling layer and a ConvN convolutional layer to obtain pooled convolutional features. The output features of the Ortho-Attention layer and the pooled convolutional features are then added and fused, and the fused features are input to the ReLU activation function layer for processing to obtain the output of the orthogonal attention residual module, which is the sub-feature map.

[0048] The orthogonal channel attention mechanism in the Ortho-Attention layer projects the input features onto a set of mutually orthogonal filters, and then calculates the channel attention vector to explicitly model each channel in the input features, thereby enhancing important features and suppressing irrelevant information. First, the orthogonal channel attention mechanism randomly initializes a set of three-dimensional filters, and then orthogonals these filters using Gram-Schmidt orthogonalization to generate a set of orthogonal filter kernels K∈I. C×H×W These filters form a set of independent and non-redundant basis vectors in the feature space, which can effectively reduce the correlation between channel representations, thereby improving the discriminativeness and robustness of the compressed features. Then, the input features on each channel are processed by the convolutional block and combined with the orthogonal filter K on the corresponding channel. c Element-wise multiplication and spatial weighted summation are performed to obtain the squeeze value of channel c after compression. The squeeze value of each channel together forms the compressed description vector 'squeezed'. The calculation process of the squeeze value of channel c is as follows:

[0049]

[0050] In the formula, X c,h,w K represents the value at the position (h, w) of the c-th channel. c,h,w F represents the weights at corresponding positions in an orthogonal filter. ortho (X) c This is represented as the squeeze value of channel c.

[0051] The channel description vector `squeezed` is then fed into an attention generation module consisting of two fully connected layers, which outputs a channel weight vector A∈[0,1]. c The calculation process is as follows:

[0052]

[0053] In the formula, W1 and W2 represent learnable weight matrices, σ represents the sigmoid function, and δ represents the ReLU function;

[0054] The input feature X of the Ortho-Attention layer is multiplied channel-by-channel with the channel weight vector to obtain the weighted feature map Xʹ, as shown in the following calculation process:

[0055]

[0056] In the formula, ⊙ represents the channel-wise dot product operation; the weighted feature map Xʹ obtained is added to the input feature X and fused to obtain the final output, which is the output feature of the Ortho-Attention layer; the output feature of the Ortho-Attention layer not only retains the complete information in the original feature, but also explicitly emphasizes the key channel features through the attention mechanism, thereby improving the discriminative ability and generalization performance of the network while maintaining feature diversity.

[0057] The high-efficiency hybrid encoder includes an SP-PEU spatial position awareness enhancement unit and a CCFF cross-scale feature fusion module. The SP-PEU spatial position awareness enhancement unit is constructed by introducing position awareness attention and SEFN spatial enhancement feedforward network into the AIFI attention-based intra-scale feature interaction module. The CCFF cross-scale feature fusion module is constructed based on CNN convolutional neural network and introduces IELC3 brightness enhancement convolution module. The S5 sub-feature map is input to the SP-PEU spatial position awareness enhancement unit after convolution operation to perform feature enhancement operation and obtain unit output features. The unit output features, S3 sub-feature map and S4 sub-feature map are input to the CCFF cross-scale feature fusion module to perform feature enhancement and fusion operation to obtain multiple unified feature maps.

[0058] The CCFF cross-scale feature fusion module includes a first IELC3 brightness enhancement convolution module, a second IELC3 brightness enhancement convolution module, a third IELC3 brightness enhancement convolution module, and a fourth IELC3 brightness enhancement convolution module. The feature map resulting from the unit output features undergoing convolution and upsampling operations is fused with the feature map resulting from the convolution operation of the S4 sub-feature map, and this fusion serves as the input to the first IELC3 brightness enhancement convolution module. The first IELC3 brightness enhancement convolution module processes its input to obtain its output. The feature map resulting from the first IELC3 brightness enhancement convolution module undergoing convolution and upsampling operations is fused with the feature map resulting from the convolution operation of the S3 sub-feature map, and this fusion serves as the input to the second IELC3 brightness enhancement convolution module. The second IELC3 brightness enhancement convolution module processes its input to obtain its output. The feature map resulting from the convolution operation of the output of the second IELC3 brightness enhancement convolutional module is fused with the feature map resulting from the convolution operation of the output of the first IELC3 brightness enhancement convolutional module, and used as the input of the third IELC3 brightness enhancement convolutional module. The third IELC3 brightness enhancement convolutional module processes its input to obtain its output. The feature map resulting from the convolution operation of the output of the third IELC3 brightness enhancement convolutional module is then fused with the feature maps resulting from the convolution operation of the unit output features, and used as the input of the fourth IELC3 brightness enhancement convolutional module. The fourth IELC3 brightness enhancement convolutional module processes its input to obtain its output. The outputs of the second, third, and fourth IELC3 brightness enhancement convolutional modules are all used as a unified feature map.

[0059] The SP-PEU spatial position perception enhancement unit is the Spatial-Position PerceptionEnhancement Unit. The AIFI attention-based intra-scale feature interaction module in the baseline RTDETR network is the Attention-based Intra-scale Feature Interaction module. It uses a single-layer Transformer for feature processing, and its core is the Multi-head Self-Attention (MSA) mechanism. This multi-head self-attention mechanism models global dependencies through query-key relevance, captures long-range interactions and contextual information, and thus improves the model's ability to recognize targets. However, the MSA multi-head self-attention mechanism has limitations in the calculation of attention weights and the Softmax normalization process. The MSA multi-head self-attention mechanism cannot explicitly model the positive and negative polarity relationships between query-keys, which leads to the neglect of interaction information driven by negative values. Furthermore, when the feature differences are not significant, Softmax will further homogenize the attention distribution, weakening the directionality and discriminativeness of attention, thereby limiting the model's ability to focus on key defect areas. Therefore, a position-aware attention module, including Position-aware LinearAttention, PolaLinear Attention, and a Spatially Enhanced Feedforward Network (SEFN), is introduced into the AIFI attention-based intra-scale feature interaction module to construct the SP-PEU spatial position-aware enhancement unit. Through the synergistic effect of the position-aware attention module and the SEFN spatial enhancement feedforward network, the model's spatial perception capability is further enhanced, making fuller use of local context and global spatial dependencies, achieving more efficient feature interaction and expression. Meanwhile, the explicit positional encoding (Positional Embedding) in the AIFI attention-based intra-scale feature interaction module has limitations in spatial representation and is difficult to adaptively capture positional information under different defect scenarios. Therefore, this operation is removed in the SP-PEU spatial position-aware enhancement unit. Instead, a learnable positional encoding is set in the position-aware attention module to dynamically embed spatial positional information, which is more suitable for the fine capture and discrimination of target areas in steel plate defect detection scenarios.

[0060] In the SP-PEU spatial location-aware enhancement unit, the location-aware attention module calculates long-distance dependencies between pixels in the feature map, enabling the model to associate spatially dispersed but semantically related defect features, forming a holistic understanding of defect morphology. Simultaneously, its internal SEFN spatial enhancement feedforward network module preserves and enhances the local spatial structure of features during feature transformation, avoiding the blurring or loss of key local details during the establishment of global associations. Through an encoding process combining attention and spatial structure preservation, features are deeply integrated in a structured manner, resulting in encoded features containing rich spatial contextual information. This improves the model's understanding of irregular, non-local defects and enhances the accuracy of defect identification.

[0061] like Figure 3 As shown, the SP-PEU spatial location awareness enhancement unit includes a location awareness attention module, a first Dropout module, a first-layer normalization module, a SEFN spatial enhancement feedforward network module, a second Dropout module, and a second-layer normalization module. The unit input features of the SP-PEU spatial location awareness enhancement unit are input to the location awareness attention module for attention weight calculation to obtain attention enhancement features. These attention enhancement features are then input to the first Dropout module for processing to obtain the output of the first Dropout module. The output of the first Dropout module is added to and fused with the unit input features to obtain the input of the first-layer normalization module. The first layer normalization module performs a normalization operation to obtain its output. This output is then fed into the SEFN spatial augmentation feedforward network module for further processing. The output of the SEFN module is then fed into the second Dropout module for further processing. The output of the second Dropout module is then added to the output of the first layer normalization module to obtain its input. This input is then normalized by the second layer normalization module to obtain its output, which serves as the unit output feature. Both the first and second layer normalization modules are LayerNorm modules, representing layer normalization operations. Similarly, both the first and second Dropout modules are Dropout modules, representing regularization techniques in deep learning.

[0062] like Figure 4As shown, the position-aware attention module includes a linear transformation module, a splitting module, a ReLU activation function, a power function mapping module, and a polarity-aware linear attention mechanism module. The unit input features are input to the linear transformation module for linear transformation to obtain a query matrix, a key matrix, and a value matrix. The query matrix and key matrix are then input to the ReLU activation function for decomposition to obtain a positive polarity fraction matrix and a negative polarity fraction matrix. These matrices are then input to the power function mapping module for power function operation to obtain a sharpened positive polarity map and a sharpened negative polarity map, which are then input to the polarity-aware linear attention mechanism module. The value matrix is ​​input to the splitting module to split it into v values ​​along the channel dimension. s Value matrix and v o The value matrix is ​​input into the polarity-aware linear attention mechanism module; the polarity-aware linear attention mechanism module will then input v... s Value matrix and v o The value matrix is ​​multiplied by the sharpened positive polarity map and the sharpened negative polarity map respectively, and the results are concatenated and fused to obtain the attention-enhanced features.

[0063] like Figure 4 As shown, the position-aware attention module injects positional information using learnable positional encoding. Through positive and negative polarity interaction modeling and power function mapping mechanism, it effectively retains the discriminative information driven by negative values ​​and enhances the contrast and sparsity of the attention distribution, thereby improving the model's focusing ability in key regions. First, the input feature map X∈I... B×N×C The input is fed into a linear transformation module for linear projection, generating a query matrix q, a key matrix k, and a value matrix v. Here, the query matrix q is the query vector, the key matrix k is the key vector, and the value matrix v is the value vector. Then, learnable position encoding (pos-encoding) is injected into the key matrix k. The ReLU activation function is used to decompose the query matrix q and the key matrix k into positive and negative polarity components, generating a positive polarity fraction matrix x. + and negative polarity fraction matrix x∈{q,k}, used for subsequent polarity modeling;

[0064] , , ;

[0065] To restore the low-entropy characteristic of softmax attention, a dimensionally learnable power function transformation g(x;p) is introduced, which is the power function operation in the power function mapping module, for the positive polarity fraction matrix x. + and negative polarity fraction matrix x - The elements in the matrix are subjected to a power function transformation; the calculation process of the power function transformation g(x; p) is shown below:

[0066] ,

[0067] In the formula, p i denoted as the power exponent for each dimension, α represents a hyperparameter that controls the scaling magnitude; wi represents a learnable parameter used to scale the kernelized feature map of the query-key interaction, improving the contrast and sparsity of the attention distribution while maintaining non-negativity.

[0068] Based on polarity decomposition, sharpened positive polarity maps and sharpened negative polarity maps are constructed. The sharpened positive polarity map is the Same-signed Stream, and the sharpened negative polarity map is the Opposite-signed Stream. The interaction between the query matrix and the key matrix is ​​encoded. The value matrix v is split into v_i and v_j in the channel dimension. s Value matrix and v o Value matrix, set two groups of G s Learnable polarity weight matrix and G o Learnable polarity weight matrix; in the polarity-aware linear attention mechanism module, through G s Learnable polarity weight matrix and G o The learnable polarity weight matrix controls the weighted output of paths with the same sign and paths with different signs, and concatenates and fuses the outputs of paths with the same sign and paths with different signs to obtain the attention-enhanced feature O. t ;This involves sharpening the positive polarity map and sharpening the negative polarity map, along with v s Value matrix and v o Matrix multiplication of the value matrix yields the outputs of paths with the same sign and paths with opposite signs; attention-enhancing feature O t The calculation process is as follows:

[0069]

[0070] In the formula, Represented as a kernel function mapping, q + q - These are represented as the positive and negative polarity components of the query vector in the query matrix, respectively; k + k - Let represent the positive and negative polarity components of the key vectors in the key matrix, respectively, where i represents the i-th key vector and j represents the j-th key vector; ⊙ represents the dot product operation. , T represents the transpose matrix.

[0071] like Figure 5As shown, the SEFN spatial enhancement feedforward network module is constructed by introducing spatial modeling and gating fusion mechanisms based on the traditional FFN feedforward network. The overall structure of the SEFN spatial enhancement feedforward network module mainly includes feature extraction, receptive field expansion, spatial perception index generation, and gating modulation. In the SEFN spatial enhancement feedforward network module, the SEFN spatial enhancement feedforward network module takes unit input features S before As a perception guide, the unit input feature S before Multi-scale spatial features are extracted through average pooling and convolution, and spatially aware weights γ are generated through upsampling, effectively encoding the spatial relationships of the original features; the calculation process is shown below:

[0072]

[0073] In the formula, Up represents the upsampling operation, f represents the convolution operation between two convolutional blocks, AvgPool represents the average pooling operation, and S... before Represented as unit input features;

[0074] To construct a collaborative mechanism between spatial augmentation branches and gating branches, attention-enhancing features S... after Divided by channel dimension Some features and Some features, among which After concatenating and fusing some features with spatially perceived weights γ, the input is fed into a gating mechanism consisting of a linear transformation and a GELU activation function to generate a modulated signal gate; the modulated signal gate is then combined with... A pointwise multiplication operation is performed on some features to obtain the output of the SEFN spatial enhancement feedforward network module, thereby enhancing spatially salient features and suppressing invalid redundancy; the calculation process is shown below:

[0075]

[0076]

[0077] In the formula, GELU represents the GELU activation function, W1 represents a 1×1 convolution operation, and W... d3 This represents a 3×3 convolution operation, where `output` represents the output of the SEFN spatial augmentation feedforward network module, and `⊙` represents an electrical dot product operation. This is represented as a splicing and fusion operation. The SP-PEU spatial location awareness enhancement unit innovatively integrates location awareness attention and SEFN spatial enhancement feedforward network, realizing the synergistic enhancement of global structure understanding and local detail modeling, significantly improving the model's ability to discriminate features and focus on key regions.

[0078] like Figure 6As shown, in the benchmark RTDETR network, the RepC3 module used in the feature fusion stage mainly relies on conventional convolution stacking to integrate multi-scale features. This makes it difficult to effectively suppress feature instability caused by illumination and color coupling, and it lacks specific optimizations for low contrast and noise interference. Therefore, its defect detection performance is limited under complex conditions such as uneven illumination or low contrast. Therefore, the IEL intensity enhancement layer (IEL) is introduced into the RTDETR framework to construct the IELC3 brightness enhancement convolution module. This module achieves brightness and color decoupling, noise suppression, and detail enhancement in the feature fusion stage, thereby improving feature representation capabilities, detection accuracy, and reducing the false negative rate. The IELC3 luminance enhancement convolutional module is constructed by introducing the IEL intensity enhancement layer into the RTDETR framework. The IELC3 luminance enhancement convolutional module includes a first convolutional layer, a second convolutional layer, an intensity enhancement layer module, a fusion layer, and a third convolutional layer. The input features of the IELC3 luminance enhancement convolutional module are input to the first convolutional layer for convolution to obtain the output of the first convolutional layer. The output of the first convolutional layer is input to the intensity enhancement layer module for processing to obtain a first feature, which is then input to the fusion layer. The input features of the intensity enhancement layer module are input to the second convolutional layer for convolution to obtain a second feature, which is then input to the fusion layer. The fusion layer concatenates and fuses the first and second features to obtain the output of the fusion layer. The output of the fusion layer is input to the third convolutional layer for convolution to obtain the output of the IELC3 luminance enhancement convolutional module, which is the output encoded feature.

[0079] like Figure 7 As shown, the intensity enhancement layer module is composed of multiple IEL intensity enhancement layers; the input feature of the IEL intensity enhancement layer is Y. Y ∈I H×W×C The input features of the IEL intensity enhancement layer are decomposed into pixel-level photometric features to achieve channel expansion and obtain initial features. The channels are expanded to H×W×μC, where μ is a grouping factor to independently process the intensity information of each pixel and avoid spatial mixing. Further decoupling is achieved through grouped depthwise convolution, outputting two parallel illumination and reflection branches. The initial features are then input into the illumination and reflection branches respectively, and depthwise convolution operations are performed on each branch to obtain the illumination component Y corresponding to the global brightness distribution. I and the reflection component Y corresponding to local texture details RThe illumination perturbation of the illumination component and the reflection perturbation of the reflection component are calculated using the tanh activation function. The illumination perturbation is added to the illumination component to enhance it; similarly, the reflection perturbation is added to the reflection component to enhance it. The enhanced illumination and reflection components are then multiplied element-wise to obtain a fused feature map. This fused feature map is then subjected to pointwise convolution and channel compression to obtain an enhanced feature map, which serves as the output feature of the IEL intensity enhancement layer. Pointwise convolution is used to compress and fuse the features along the channel dimension, restoring the original size and ensuring the output feature of the IEL intensity enhancement layer is smooth and rich in detail. The calculation process is shown below:

[0080]

[0081]

[0082]

[0083] In the formula, W I This represents a deep convolution operation in the illumination branch, used to capture the receptive field of global low-frequency signals; W R This represents a deep convolution operation in the reflection branch, used to capture the receptive field of local high-frequency signals; Y Y Y represents the input feature of the IEL intensity enhancement layer. I Represented as the illumination component, Y R It is represented as the reflection component; tanh represents the tanh activation function, where tanh(W S Y I ) represents the lighting disturbance, tanh(W) S Y R ) represents the reflected perturbation; ⊙ represents the element-wise multiplication operation, W S The convolution operation is represented by a depthwise separable convolutional layer; Y represents the enhanced feature map. The IELC3 brightness enhancement convolutional module, through Retinex theoretical decomposition and Tanh activation optimization of the IEL intensity enhancement layer, outperforms the RepC3 module in brightness enhancement, color suppression, and nonlinear expression. It can better adapt to representing complex defect features that are unstable, thus enhancing the robustness of the model in complex scenes.

[0084] The IELC3 brightness enhancement convolutional module introduces parallel illumination and reflection branches, transforming passive processing into active decomposition. At the feature level, it decouples the input feature map into an illumination component representing global macroscopic brightness and a reflection component representing local microscopic texture. This shifts the management of illumination interference from a coupled state to targeted processing of independent components. Then, by calculating and compensating for the perturbations of the illumination and reflection components separately, it achieves normalized suppression of the illumination component and targeted enhancement of the reflection component containing defect details. The final encoded features are then input into the constructed RTDETR decoder, thus fundamentally removing the interference of illumination artifacts and improving the problem of defect features being submerged or distorted. This provides a more robust and discriminative feature representation for subsequent defect prediction tasks, thereby improving the stability and reliability of the entire object detection method under varying lighting conditions.

[0085] Example

[0086] The parameters for this experiment are configured as follows: input image resolution is set to 640×640 pixels, batch size is 4, and training epochs are 300. An early stopping strategy is introduced during training, with a patience value of 50. This means that training is terminated early if the validation set performance does not show a significant improvement within 50 consecutive epochs, reducing the risk of overfitting and unnecessary computational overhead. To ensure that the improved model and the original model are trained under the same initial conditions, thus maintaining the fairness and reproducibility of the results in comparative analysis, no pre-trained weights are loaded in this experiment. The dataset used is the Northeastern University steel plate surface defect dataset NEU-DET, which classifies defect types into 6 categories: Cracking (Cr); Inclusion (In); Patches (Pa); Pitted surface (Ps); Rolled-in scale (Rs); and Scratches (Sc). The dataset contains a total of 1800 images.

[0087] To simulate the various complex imaging conditions that industrial cameras may encounter when acquiring images of steel plate surfaces, such as motion blur, sensor noise, illumination changes, and viewing angle changes, this paper pre-augmented the original dataset, expanding it to 3600 images. Specific augmentation methods include: motion blur, noise injection, random brightness adjustment, random rotation, and random scaling. The augmented dataset is divided into training, validation, and test sets in an 8:1:1 ratio.

[0088] This experiment uses mean AP50, precision (P), and recall (R) as the accuracy evaluation metrics for the model. Higher values ​​for these metrics indicate better detection performance. The computational resource consumption of the model is quantified by the number of floating-point operations (GFLOPs) and the number of parameters (Params); lower values ​​indicate a more efficient model.

[0089] To further verify the superiority of the improved RTDETR proposed in this paper, we compared the performance of the improved RTDETR with the mainstream YOLO series algorithms and other RTDETR series algorithms under the same experimental environment, training parameters and dataset. The comparison results of each model are shown in Table 1.

[0090] Table 1 Comparative test results

[0091]

[0092] Experimental results show that the model in this invention exhibits significant advantages in several key dimensions. In terms of the core detection accuracy metric mAP50, the model achieves 80.7%, surpassing the RTDETR series algorithms and matching the highest accuracy of the YOLO series algorithms, YOLO11m. Regarding precision and recall, the model achieves 81.4% precision and 77.3% recall, demonstrating a balanced approach to precision and missed detection control. In contrast, the YOLO series algorithms suffer from either high precision but low recall, or high recall but insufficient precision, and the RTDETR series algorithms also struggle to achieve a balance between the two. In terms of computational cost and parameter count, the model in this invention has a GFLOPs of 57.4 and a parameter count of 21.5M, lower than most YOLO series algorithm models and approaching the r18 algorithm in the lightweight RTDETR series. The model in this invention achieves a highly efficient balance between high precision and low overhead.

[0093] Furthermore, considering the performance of various algorithms across specific defect categories, the model in this invention achieves AP values ​​of 68.7% and 74.0% for fine-grained or low-contrast defects such as cracks and inclusions, respectively, significantly higher than most comparative models, demonstrating a strong ability to perceive complex defects. Simultaneously, the model performs evenly across other categories, contributing to a more robust category distribution overall. In summary, the model in this invention achieves higher average precision and better precision-recall balance without significantly increasing computational load and parameters, also demonstrating superior detection efficiency and robustness for low-visibility and environmentally sensitive defects.

[0094] The above description is merely a preferred embodiment of the present invention. Those skilled in the art can make several modifications and optimizations based on the above disclosure without departing from the basic principles described above. These modifications and optimizations should be considered within the scope of protection as understood by the present invention.

Claims

1. A target detection method based on an image feature enhancement model using an RTDETR network, characterized in that: Includes the following steps: Step 1: Obtain the object surface image and input it into the backbone network built based on the ResNet residual network. The S3 sub-feature map, S4 sub-feature map and S5 sub-feature map are extracted through multiple orthogonal attention residual modules connected in sequence in the backbone network. Step 2: Input the S3 sub-feature map, S4 sub-feature map and S5 sub-feature map into the high-efficiency hybrid encoder. The SP-PEU spatial location awareness enhancement unit and CCFF cross-scale feature fusion module in the high-efficiency hybrid encoder perform feature enhancement and fusion operations on the S3 sub-feature map, S4 sub-feature map and S5 sub-feature map respectively to obtain multiple unified feature maps. The SP-PEU spatial position awareness enhancement unit incorporates a position awareness attention module and a SEFN spatial enhancement feedforward network. The position-aware attention module incorporates learnable positional encoding. Input features are divided into a query matrix, a key matrix, and a value matrix through linear transformation. The query and key matrices are decomposed and subjected to power function operations to obtain sharpened positive and negative polarity maps. These maps are then multiplied and concatenated with the value matrix to obtain attention-enhanced features. The SEFN spatial enhancement feedforward network module is constructed by introducing spatial modeling and gating fusion mechanisms based on the traditional FFN feedforward network. By using the input features of the SP-PEU spatial position-aware enhancement unit as perception guidance, spatial perception weights are calculated. These weights are then fused with the input features of the SEFN spatial enhancement feedforward network module to obtain its output features, thus enhancing the encoded features. The CCFF cross-scale feature fusion module introduces an IELC3 brightness enhancement convolution module, which is constructed by introducing the RTDETR framework into the IEL intensity enhancement layer. In the IELC3 brightness enhancement convolution module, the input features are processed by deep convolution to obtain the illumination component and the reflection component by capturing the receptive fields of global low-frequency signals and local high-frequency signals, respectively. The perturbation amount of the illumination component and the reflection component is calculated to enhance the illumination component and the reflection component. The enhanced illumination component and the reflection component are fused to output the output feature of the IELC3 brightness enhancement convolution module. Step 3: Based on the IoU-aware query selection module, a fixed number of unified feature maps are selected as the initial object query for the decoder. The RTDETR decoder, which is constructed using a Transformer structure with an auxiliary prediction head, iterates and optimizes the initial object query through the multi-layer Transformer structure in the RTDETR decoder to generate the target category and bounding box, and finally outputs accurate target detection results.

2. The target detection method based on the image feature enhancement model of the RTDETR network according to claim 1, characterized in that: The backbone network constructed based on the ResNet residual network includes multiple convolutional normalization layers (ConvNorm), max pooling layers (MaxPool), a first orthogonal attention residual module, a second orthogonal attention residual module, a third orthogonal attention residual module, and a fourth orthogonal attention residual module, connected in series. The object surface image is input to these multiple convolutional normalization layers for multiple convolutional normalization operations to obtain convolutional output features. These convolutional output features are then input to the MaxPool for pooling operations to obtain a sub-feature map (S1). The S1 sub-feature map is then input to the first orthogonal attention residual module for feature extraction to obtain a sub-feature map (S2). The S2 sub-feature map is then input to the second orthogonal attention residual module for feature extraction to obtain a sub-feature map (S3). The S3 sub-feature map is then input to the third orthogonal attention residual module for feature extraction to obtain a sub-feature map (S4). Finally, the S4 sub-feature map is input to the fourth orthogonal attention residual module for feature extraction to obtain a sub-feature map (S5).

3. The target detection method based on the image feature enhancement model of the RTDETR network according to claim 1, characterized in that: The high-efficiency hybrid encoder includes an SP-PEU spatial position awareness enhancement unit and a CCFF cross-scale feature fusion module. The SP-PEU spatial position awareness enhancement unit is constructed by introducing position awareness attention and SEFN spatial enhancement feedforward network into the AIFI attention-based intra-scale feature interaction module. The CCFF cross-scale feature fusion module is constructed based on CNN convolutional neural network and introduces IELC3 brightness enhancement convolution module. The S5 sub-feature map is input to the SP-PEU spatial position awareness enhancement unit after convolution operation to perform feature enhancement operation, and the unit output features are obtained. The unit output features, S3 sub-feature map, and S4 sub-feature map are input into the CCFF cross-scale feature fusion module for feature enhancement and fusion operations to obtain multiple unified feature maps.

4. The target detection method based on the image feature enhancement model of the RTDETR network according to claim 3, characterized in that: The SP-PEU spatial location awareness enhancement unit includes a location awareness attention module, a first Dropout module, a first-layer normalization module, a SEFN spatial enhancement feedforward network module, a second Dropout module, and a second-layer normalization module. The unit input features of the SP-PEU spatial location awareness enhancement unit are input to the location awareness attention module for attention weight calculation to obtain attention enhancement features. These attention enhancement features are then input to the first Dropout module for processing to obtain its output. The output of the first Dropout module is added to and fused with the unit input features to obtain the input of the first-layer normalization module. The input of the first-layer normalization module is then processed... The output of the first-layer normalization module is obtained through normalization operations. This output is then fed into the SEFN spatial augmentation feedforward network module for further processing. The output of the SEFN module is then fed into the second Dropout module for further processing. The output of the second Dropout module is then added to the output of the first-layer normalization module, and the resulting input is used to obtain the second-layer normalization module's output. This input is then normalized by the second-layer normalization module, and the output of the second-layer normalization module is used as the unit's output feature.

5. The target detection method based on the image feature enhancement model of the RTDETR network according to claim 4, characterized in that: The position-aware attention module includes a linear transformation module, a splitting module, a ReLU activation function, a power function mapping module, and a polarity-aware linear attention mechanism module. The unit input features are input to the linear transformation module for linear transformation to obtain a query matrix, a key matrix, and a value matrix. The query matrix and key matrix are then input to the ReLU activation function for decomposition to obtain a positive polarity fraction matrix and a negative polarity fraction matrix. These matrices are then input to the power function mapping module for power function operation to obtain a sharpened positive polarity map and a sharpened negative polarity map, which are then input to the polarity-aware linear attention mechanism module. The value matrix is ​​input to the splitting module to split it into v values ​​along the channel dimension. s Value matrix and v o The value matrix is ​​input into the polarity-aware linear attention mechanism module; the polarity-aware linear attention mechanism module will then input v... s Value matrix and v o The value matrix is ​​multiplied by the sharpened positive polarity map and the sharpened negative polarity map respectively, and the results are concatenated and fused to obtain the attention-enhanced features.

6. The target detection method based on the image feature enhancement model of the RTDETR network according to claim 4, characterized in that: The SEFN spatial enhancement feedforward network module is constructed by introducing spatial modeling and gating fusion mechanisms based on the traditional FFN feedforward network. In the SEFN spatial enhancement feedforward network module, the unit input features are extracted through average pooling and convolution to extract multi-scale spatial features, and spatially aware weights γ are generated through upsampling. The calculation process is as follows: In the formula, Up represents the upsampling operation, f represents the convolution operation between two convolutional blocks, AvgPool represents the average pooling operation, and S... before Represented as unit input features; Attention-enhancing feature S after Divided by channel dimension Some features and Some features, among which After concatenating and fusing some features with spatially perceived weights γ, the input is fed into a gating mechanism consisting of a linear transformation and a GELU activation function to generate a modulated signal gate; the modulated signal gate is then combined with... Partial feature multiplication is performed to obtain the output of the SEFN spatial augmentation feedforward network module; the calculation process is shown below: In the formula, GELU represents the GELU activation function, W1 represents a 1×1 convolution operation, and W... d3 This is represented as a 3×3 convolution operation, and output represents the output of the SEFN spatial enhancement feedforward network module.

7. The target detection method based on the image feature enhancement model of the RTDETR network according to claim 3, characterized in that: The IELC3 brightness enhancement convolutional module is constructed by introducing the IEL intensity enhancement layer into the RTDETR framework. The IELC3 brightness enhancement convolutional module includes a first convolutional layer, a second convolutional layer, an intensity enhancement layer module, a fusion layer, and a third convolutional layer. The input features of the IELC3 brightness enhancement convolutional module are input to the first convolutional layer for convolution to obtain the output of the first convolutional layer. The output of the first convolutional layer is input to the intensity enhancement layer module for processing to obtain a first feature, which is then input to the fusion layer. The input features of the intensity enhancement layer module are input to the second convolutional layer for convolution to obtain a second feature, which is then input to the fusion layer. The fusion layer concatenates and merges the first and second features to obtain the output of the fusion layer. The output of the fusion layer is input to the third convolutional layer for convolution to obtain the output of the IELC3 brightness enhancement convolutional module.

8. The target detection method based on the image feature enhancement model of the RTDETR network according to claim 7, characterized in that: The intensity enhancement layer module consists of multiple IEL intensity enhancement layers. In each IEL intensity enhancement layer, the input features of the IEL intensity enhancement layer are channel-expanded to obtain initial features. These initial features are then input to the illumination branch and the reflection branch, respectively, and depth convolution operations are performed to obtain the illumination component and the reflection component. The illumination perturbation of the illumination component and the reflection perturbation of the reflection component are calculated using activation functions. The illumination component is enhanced by the illumination perturbation, and the reflection component is enhanced by the reflection perturbation. The enhanced illumination component and the enhanced reflection component are multiplied element-wise to obtain a fused feature map; the fused feature map is then subjected to pointwise convolution and channel compression to obtain an enhanced feature map, which serves as the output feature of the IEL intensity enhancement layer. The calculation process is as follows: In the formula, W I This represents the deep convolution operation in the depthwise convolutional layer of the illumination branch, W. R This represents a deep convolution operation in a deep convolutional layer within the reflection branch; Y Y Y represents the input feature of the IEL intensity enhancement layer. I Represented as the illumination component, Y R Let W represent the reflection component, tanh represent the tanh activation function, and W represent the reflection component. S Y represents the convolution operation of a depthwise separable convolutional layer; Y represents the enhanced feature map.

Citation Information

Patent Citations

  • Unmanned aerial vehicle aerial image small target detection method based on RT-DETR

    CN120032273A

  • Map detection method and system based on gradient feature extraction and multi-stage fusion

    CN120526448A