Construction method of remote sensing target detection backbone network based on hierarchical perception
By building a hierarchical perceptual feature attention module in the remote sensing object detection backbone network to balance local and global feature expressions, the problems of feature confusion and fuzziness in dense scenarios are solved, and the detection accuracy and feature extraction capabilities are improved.
Patent Information
- Application Number
- CN202411066135.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-27
AI Technical Summary
In dense scenarios, existing remote sensing object detection technology is difficult to balance the expression of local and global features, resulting in the inability to effectively transmit detailed features, resulting in confusion and blurring of features, and reducing detection accuracy.
A remote sensing object detection backbone network based on hierarchical perception is proposed. By constructing a hierarchical perception feature attention module, the backbone network is strengthened to pay attention to local details in the shallow layer, suppress global features, and enhance attention to global features in the deep layer, suppress local features , use network depth information to evaluate and redistribute weights to balance the feature processing process.
The detection performance of the model in dense scenarios is improved, feature extraction and detection capabilities are enhanced, feature confusion and local feature blurring are alleviated, and the number of model parameters is not increased too much.
Smart Images

Figure CN119206472A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and in particular to a backbone network for remote sensing target detection feature extraction based on hierarchical perception in dense scenes and a construction method thereof. Background Art
[0002] Remote sensing target detection in dense scenes is of great significance in the fields of military, disaster response, traffic management, urban planning, environmental monitoring and agricultural management. It can improve the efficiency and accuracy of intelligence acquisition, optimize resource allocation and decision-making processes, and provide strong support for emergency response and long-term planning. In the field of remote sensing target detection, parking lots, ports, etc. in dense scenes often contain a large number of densely distributed vehicles, ships and other objects, and their spatial distribution may be very close or partially overlapped. In addition, due to the observation angle and different lighting conditions, the visual features of the target object may be seriously affected, further increasing the difficulty of detection. Technically, target detection in dense scenes involves many technical challenges, including but not limited to the small size of the target, the high density between targets, and target recognition in complex backgrounds. This requires the development of algorithms that can effectively distinguish multiple targets close to each other. Traditional remote sensing target detection techniques, such as sliding windows and feature-based classification methods, often do not work well in such scenes because they have difficulty dealing with the problems of mutual occlusion and dense distribution between targets.
[0003] In recent years, the introduction of deep learning technology has provided a new approach to solving this problem. By using convolutional neural networks (CNN) and other advanced machine learning models, researchers are able to more accurately extract target features from complex remote sensing images and improve the accuracy of target detection. In particular, some region-based convolutional network methods (such as FasterR-CNN) and YOLO (You Only Look Once) series algorithms have been proven to be more effective in dealing with target detection in dense scenes.
[0004] In fact, the current technical methods based on CNN and ViTs often only focus on local features or global features throughout the feature extraction stage, making it difficult to achieve balanced interaction of context perception. Some recent studies, such as LSKNet (Large selective kernel network for remote sensing object detection) and SKNet (Selective kernel networks) in 2023, proposed using branch structures to capture local and global features at the same time, and then using attention mechanisms for dynamic feature selection, allowing neural networks to automatically select features at different levels. However, this type of adaptive feature selection behavior is completely black-box, resulting in premature exposure of global features in the shallow layers of the backbone network, causing detailed features to be blocked from propagating backward. At the same time, for scenes with densely distributed objects, this type of method easily causes the features of other irrelevant objects around to be mixed into the recognition process of the current object during feature encoding, causing feature confusion and fuzziness, resulting in reduced detection accuracy.
[0005] Therefore, in order to balance the expression of local and global features in the backbone network and accurately identify objects in remote sensing images with densely distributed objects, the applicant proposed a remote sensing target detection backbone network based on hierarchical perception and its construction method. Summary of the invention
[0006] The purpose of the present invention is to solve the technical problem that the existing adaptive feature selection mechanism emphasizes the features under the large receptive field too early in the early stage of the network, which leads to the inability to effectively transmit the detailed features to the subsequent stage, and mixes other surrounding objects into the current recognition in dense scenes, causing feature confusion, and ultimately leading to limited accuracy of remote sensing target detection and recognition in dense scenes. A remote sensing target detection backbone network based on hierarchical perception and its construction method are proposed.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A method for constructing a remote sensing target detection backbone network based on hierarchical perception includes the following steps:
[0009] Step 1: Prepare remote sensing target detection dataset;
[0010] Step 2: Construct a hierarchical perception feature attention module to capture multi-scale features, enhance the backbone network’s shallow attention to local detail features, suppress global features, and enhance the backbone network’s deep attention to global features and suppress local features;
[0011] Step 3: Build a feature extraction backbone network. The backbone network is divided into four stages. Each stage includes a downsampling of the input feature map and several hierarchical perception feature attention modules in step 1.
[0012] Step 4: Embed the hierarchical perception feature extraction backbone network into the existing target detection algorithm for training and testing;
[0013] The above steps complete the construction and training of the hierarchical perception feature extraction backbone network.
[0014] like Figure 1 As shown, in step 2, when constructing the hierarchical-aware feature attention module, the following sub-steps are adopted:
[0015] Construct two parallel feature extraction branches, the first branch consists of the first depth convolution, and the second branch consists of the second depth convolution;
[0016] The input features are encoded by the first branch and the second branch to generate feature maps F1 and F2 respectively. Feature maps F1 and F2 are added pixel by pixel to obtain feature map F3. Then the first dilated convolution is used to construct the third branch. Feature map F3 is encoded by the third branch to obtain feature map F4.
[0017] In step 2, the obtained feature map is weighted and evaluated using the following sub-steps:
[0018] Channel compression, in order to reduce the amount of calculation, the first standard convolution, the second standard convolution, and the third standard convolution are used to compress the number of channels by half for feature maps F1, feature map F2, and feature map F4, respectively, to obtain feature maps F5, feature maps F6, and feature maps F7;
[0019] Channel feature enhancement: concatenate the obtained feature maps F5, F6, and F7 in the channel dimension to obtain feature map F8, then perform global average pooling, forward propagation, and sigmoid activation on feature map F8 to obtain its corresponding channel weight W1, and finally multiply the channel weight W1 by the feature map F8 to complete the channel feature enhancement operation and obtain feature map F9;
[0020] Spatial weight evaluation: construct the fourth standard convolution to map the number of channels of feature map F9 to be consistent with the number of branches, and obtain feature map F10. Then perform softmax activation on the channel dimension of feature map F10 to obtain the spatial weight W2 of the first branch, the spatial weight W3 of the second branch, and the spatial weight W4 of the third branch.
[0021] In step 2, when intervening on the obtained spatial weights, the following sub-steps are used:
[0022] The standard deviation of the channel dimension is calculated for the spatial weights W2, W3, and W4 in step 2. The calculation formula is as follows:
[0023]
[0024] Where σ represents the standard deviation, x i represents the weight of the i-th branch at a certain spatial position, μ represents the average weight of the first branch, the second branch, and the third branch at a certain spatial position, and N represents the number of branches;
[0025] Calculate the hierarchical perception factor of the first branch. Use the following formula to calculate the hierarchical perception factor:
[0026]
[0027] where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i Indicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0028] Adjust the spatial weight W2 of the first branch so that the pth i The spatial weight W2 of the first branch of the layer-wise perceptual feature attention module plus the weight correction value V wc Then we get the spatial weight W5, and the weight correction value is calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0029] V wc =σ·F ha
[0030] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are 5α, 4α, 3α..., -4α, V wc After adding the spatial weight W2, the spatial weight W2 of the first branch can be enhanced in the shallow layer of the backbone network, but suppressed in the later stage of the backbone network;
[0031] Calculate the hierarchical perception factors of the second branch and the third branch. The first branch and the second branch share the same hierarchical perception factor. Use the following formula to calculate the hierarchical perception factor:
[0032]
[0033] where F harepresents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i Indicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0034] Adjust the spatial weights W3 and W4 of the second and third branches so that the pth i The spatial weights W3 and W4 of the second and third branches of the hierarchical perceptual feature attention module plus the weight correction value V wc Then we get the spatial weights W6 and W7 respectively, and the weight correction values are calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0035] V wc =σ·F ha
[0036] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are -5α, -4α, -3α..., 4α, V wc After adding the spatial weights W3 and W4, the spatial weights W3 and W4 of the second and third branches can be suppressed in the shallow layer of the backbone network, but enhanced in the later stage of the backbone network;
[0037] In step 2, feature fusion and weighting are performed, using the following sub-steps:
[0038] Multiply the feature map F1 by the spatial weight W5 to obtain the feature map F11;
[0039] Multiply the feature map F2 by the spatial weight W6 to obtain the feature map F12;
[0040] Multiply the feature map F4 by the spatial weight W7 to obtain the feature map F13;
[0041] Add the pixels of feature maps F11, F12, and F13 to complete feature fusion and obtain the weight W8 with the same shape as the input feature;
[0042] Multiply the input feature by the weight W8 to complete the spatial weighting operation and obtain the output feature;
[0043] like Figure 2 As shown, in step 3, the hierarchical perception feature extraction backbone network is constructed. The construction process is divided into four stages, using the following sub-steps:
[0044] In the first stage, for any RGB three-channel remote sensing image, a downsampling block is first constructed to downsample the input image to obtain a feature map F14. Then, the feature map F14 is used as input, and two hierarchical perceptual feature attention modules are stacked to obtain an output feature map F15 and pass it to the second stage. The specific network architecture of this stage is as follows:
[0045] Input image → downsampling block → feature map F14;
[0046] Feature map F14 → Hierarchical perception feature attention module;
[0047] Hierarchical perception feature attention module → Hierarchical perception feature attention module;
[0048] Hierarchical perception feature attention module → feature map F15;
[0049] In the second stage, a downsampling block is constructed to downsample the input feature map F15 to obtain the feature map F16. Then, the feature map F16 is used as input, and two hierarchical perceptual feature attention modules are stacked to obtain the output feature map F17 and pass it to the third stage. The specific network architecture of this stage is as follows:
[0050] Feature map F15 → downsampling block → feature map F16;
[0051] Feature map F16 → Hierarchical perception feature attention module;
[0052] Hierarchical perception feature attention module → Hierarchical perception feature attention module;
[0053] Hierarchical perception feature attention module → feature map F17;
[0054] In the third stage, a downsampling block is constructed to downsample the input feature map F17 to obtain the feature map F18. Then, the feature map F18 is used as input to stack four hierarchical perceptual feature attention modules to obtain the output feature map F19 and pass it to the third stage. The specific network architecture of this stage is as follows:
[0055] Feature map F17 → downsampling block → feature map F18;
[0056] Feature map F18 → Hierarchical perception feature attention module;
[0057] Hierarchical perception feature attention module → Hierarchical perception feature attention module;
[0058] Hierarchical perception feature attention module → Hierarchical perception feature attention module;
[0059] Hierarchical perception feature attention module → Hierarchical perception feature attention module;
[0060] Hierarchical perception feature attention module → feature map F19;
[0061] In the fourth stage, a downsampling block is constructed to downsample the input feature map F19 to obtain the feature map F20. Then, the feature map F20 is used as input to stack four levels of perceptual feature attention modules to obtain the output feature map F21. The specific network architecture of this stage is as follows:
[0062] Feature map F19 → downsampling block → feature map F20;
[0063] Feature map F20 → hierarchical perception feature attention module;
[0064] Hierarchical perception feature attention module → Hierarchical perception feature attention module;
[0065] Hierarchical perception feature attention module → feature map F21;
[0066] The feature maps F15, F17, F19 and F21 outputted at the end of the four stages are outputted for subsequent processing flow.
[0067] The present invention also includes a network model for remote sensing target detection in dense scenes, and the network model is specifically:
[0068] Input image → downsampling block → feature map F14;
[0069] Feature map F14 → Hierarchical perception feature attention module;
[0070] First-level perception feature attention module → second-level perception feature attention module;
[0071] Second level perception feature attention module → feature map F15;
[0072] Feature map F15 → downsampling block → feature map F16;
[0073] Feature map F16 → third level perception feature attention module;
[0074] The third level perception feature attention module → the fourth level perception feature attention module;
[0075] The fourth level perception feature attention module → feature map F17;
[0076] Feature map F17 → downsampling block → feature map F18;
[0077] Feature map F18 → fifth level perception feature attention module;
[0078] Fifth level perception feature attention module → sixth level perception feature attention module;
[0079] The sixth level perception feature attention module → the seventh level perception feature attention module;
[0080] The seventh level perception feature attention module → the eighth level perception feature attention module;
[0081] The eighth level of perceptual feature attention module → feature map F19;
[0082] Feature map F19 → downsampling block → feature map F20;
[0083] Feature map F20 → hierarchical perception feature attention module;
[0084] Ninth level perception feature attention module → tenth level perception feature attention module;
[0085] Tenth level perception feature attention module → feature map F21;
[0086] The feature maps F15, F17, F19 and F21 outputted at the end of the four stages are outputted for subsequent processing flow.
[0087] The hierarchical perception feature attention module is specifically:
[0088] The input features are encoded by the first branch and the second branch to generate feature maps F1 and F2 respectively. Feature maps F1 and F2 are added pixel by pixel to obtain feature map F3. Then, the third branch is constructed using the first dilated convolution. Feature map F3 is encoded by the third branch to obtain feature map F4.
[0089] The first standard convolution, the second standard convolution, and the third standard convolution are used to compress the number of channels by half for feature maps F1, feature map F2, and feature map F4, respectively, to obtain feature maps F5, feature maps F6, and feature maps F7;
[0090] The obtained feature maps F5, F6, and F7 are concatenated in the channel dimension to obtain the feature map F8, and then the feature map F8 is subjected to global average pooling, forward propagation, and sigmoid activation in sequence to obtain its corresponding channel weight W1, and finally the channel weight W1 is multiplied by the feature map F8 to complete the channel feature enhancement operation and obtain the feature map F9;
[0091] The number of channels of feature map F9 is mapped to be consistent with the number of branches to obtain feature map F10, and then softmax activation is performed on feature map F10 in the channel dimension to obtain the spatial weight W2 of the first branch, the spatial weight W3 of the second branch, and the spatial weight W4 of the third branch.
[0092] The standard deviation of the channel dimension is calculated for the spatial weights W2, W3, and W4. The calculation formula is as follows:
[0093]
[0094] Where σ represents the standard deviation, x i represents the weight of the i-th branch at a certain spatial position, μ represents the average weight of the first branch, the second branch, and the third branch at a certain spatial position, and N represents the number of branches;
[0095] Calculate the hierarchical perception factor of the first branch. Use the following formula to calculate the hierarchical perception factor:
[0096]
[0097] where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i Indicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0098] Adjust the spatial weight W2 of the first branch so that the pth i The spatial weight W2 of the first branch of the layer-wise perceptual feature attention module plus the weight correction value V wc Then we get the spatial weight W5, and the weight correction value is calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0099] V wc =σ·F ha
[0100] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are 5α, 4α, 3α..., -4α, V wc After adding the spatial weight W2, the spatial weight W2 of the first branch can be enhanced in the shallow layer of the backbone network, but suppressed in the later stage of the backbone network;
[0101] Calculate the hierarchical perception factors of the second branch and the third branch. The first branch and the second branch share the same hierarchical perception factor. Use the following formula to calculate the hierarchical perception factor:
[0102]
[0103] where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p iIndicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0104] Adjust the spatial weights W3 and W4 of the second and third branches so that the pth i The spatial weights W3 and W4 of the second and third branches of the hierarchical perceptual feature attention module plus the weight correction value V wc Then we get the spatial weights W6 and W7 respectively, and the weight correction values are calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0105] V wc =σ·F ha
[0106] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are -5α, -4α, -3α..., 4α, V wc After adding the spatial weights W3 and W4, the branches and their spatial weights W3 and W4 can be suppressed in the shallow layer of the backbone network, but enhanced in the later stage of the backbone network.
[0107] Multiply the feature map F1 by the spatial weight W5 to obtain the feature map F11;
[0108] Multiply the feature map F2 by the spatial weight W6 to obtain the feature map F12;
[0109] Multiply the feature map F4 by the spatial weight W7 to obtain the feature map F13;
[0110] Add the pixels of feature maps F11, F12, and F13 to complete feature fusion and obtain the weight W8 with the same shape as the input feature;
[0111] Multiply the input feature by the weight W8 to complete the spatial weighted operation and obtain the output feature.
[0112] Compared with the prior art, the present invention has the following technical effects:
[0113] 1) This paper proposes a method for constructing a remote sensing target detection backbone network based on hierarchical perception. Multi-scale feature extraction is introduced to fit the features of objects with obvious scale changes in remote sensing images, and a hierarchical perception feature attention module is proposed to balance the processing of local and global features at different depths of the backbone network.
[0114] 2) Through the hierarchical perception feature attention module, the weights obtained by adaptive evaluation can be redistributed using network depth information, and the features under small-scale receptive fields are enhanced in the shallow layer of the backbone network, suppressing the expression of global features. As the network deepens, the global features under large-scale receptive fields are enhanced, suppressing the expression of local features, and enhancing the effective representation ability of local details, thereby improving the detection performance of the model in dense scenes;
[0115] 3) The hierarchical perception feature extraction backbone network proposed in the present invention can help existing methods obtain stronger feature extraction capabilities and better detection capabilities in densely distributed objects and complex backgrounds without increasing the number of model parameters too much. BRIEF DESCRIPTION OF THE DRAWINGS
[0116] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0117] Figure 1 The hierarchical perception feature attention module of the present invention;
[0118] Figure 2 It is the backbone network for extracting hierarchical features in the present invention. DETAILED DESCRIPTION
[0119] A method for constructing a remote sensing target detection backbone network based on hierarchical perception includes the following steps:
[0120] Step 1: Prepare the DOTA-v1.0 remote sensing target detection dataset. The DOTA-v1.0 dataset is a large remote sensing target detection dataset, containing more than 180,000 valid instances such as vehicles and ships.
[0121] Step 2: Construct a hierarchical perception feature attention module to capture multi-scale features, enhance the backbone network’s shallow attention to local detail features, suppress global features, and enhance the backbone network’s deep attention to global features and suppress local features;
[0122] Step 3: Build a feature extraction backbone network. The backbone network is divided into four stages. Each stage includes a downsampling of the input feature map and several hierarchical perception feature attention modules in step 1.
[0123] Step 4: Embed the hierarchical perceptual feature extraction backbone network into the existing object detection algorithm and train and test it on DOTA-v1.0;
[0124] The above steps complete the construction and training of the hierarchical perception feature extraction backbone network.
[0125] like Figure 1 As shown, in step 2, when constructing the hierarchical-aware feature attention module, the following sub-steps are adopted:
[0126] Construct two parallel feature extraction branches, the first branch 1 is set to the first depth convolution 4 with a convolution kernel size of 3, and the second branch 2 is set to the second depth convolution 5 with a convolution kernel size of 5;
[0127] The input feature 100 is encoded by the first branch 1 and the second branch 2 to generate two feature maps respectively. The feature maps F1 and F2 are added pixel-wise to obtain the feature map F3. Then the third branch 3 is constructed. The third branch 3 is the first dilated convolution 6 with a convolution kernel size of 7 and a dilation rate of 3. The feature map F3 is encoded by the third branch 3 to obtain the feature map F4.
[0128] The weights of the obtained feature maps are evaluated using the following sub-steps:
[0129] Channel compression, in order to reduce the amount of calculation, the first standard convolution 7, the second standard convolution 8, and the third standard convolution 9 with the convolution kernel size set to 1 are used for feature maps F1, F2, and F4 respectively to compress the number of channels by half, and feature maps F5, feature map F6, and feature map F7 are obtained respectively;
[0130] Channel feature enhancement: concatenate the obtained feature maps F5, F6, and F7 in the channel dimension to obtain feature map F8, then perform global average pooling 10, forward propagation 11, and sigmoid 12 activation on feature map F8 to obtain its corresponding channel weight W1, and finally multiply the channel weight W1 by the feature map F8 to complete the channel feature enhancement operation and obtain feature map F9;
[0131] Spatial weight evaluation: construct a fourth standard convolution 13 with a convolution kernel size of 3 to map the number of channels of feature map F9 to be consistent with the number of branches, and obtain feature map F10. Then, perform softmax 14 activation on the channel dimension of feature map F10 to obtain the spatial weight W2 of the first branch 1, the spatial weight W3 of the second branch 2, and the spatial weight W4 of the third branch 3.
[0132] When intervening on the obtained spatial weights, the following sub-steps are used:
[0133] The standard deviation of the channel dimension is calculated for the spatial weights W2, W3, and W4 in step 2. The calculation formula is as follows:
[0134]
[0135] Where σ represents the standard deviation, x i represents the weight of the i-th branch at a certain spatial position, μ represents the average weight of the first branch 1, the second branch 2, and the third branch 3 at a certain spatial position, and N represents the number of branches;
[0136] Calculate the hierarchical perception factor 15 of the first branch 1 using the following formula:
[0137]
[0138] where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i Indicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0139] Adjust the spatial weight W2 of the first branch 1 so that the pth i The spatial weight W2 of the first branch 1 of the layer-wise perceptual feature attention module plus the weight correction value V wc Then we get the spatial weight W5, and the weight correction value is calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0140] V wc =σ·Fh a
[0141] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are 5α, 4α, 3α..., -4α, V wc After adding the spatial weight W2, the spatial weight W2 of the first branch 1 can be enhanced in the shallow layer of the backbone network, but suppressed in the later stage of the backbone network;
[0142] Calculate the hierarchical perception factor 16 of the second branch 2 and the third branch 3. The first branch 2 and the second branch 3 share the same hierarchical perception factor 16, and use the following formula to calculate:
[0143]
[0144] where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i Indicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0145] Adjust the spatial weights W3 and W4 of the second branch 2 and the third branch 3 so that the pth iThe spatial weight W3 and the spatial weight W4 of the second branch 2 and the third branch 3 of the level perception feature attention module plus the weight correction value V wc Then we get the spatial weights W6 and W7 respectively, and the weight correction values are calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0146] V wc =σ·F ha
[0147] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are -5α, -4α, -3α, ..., 4α, V wc After adding the spatial weights W3 and W4, the spatial weights W3 and W4 of the second branch 2 and the third branch 3 can be suppressed in the shallow layer of the backbone network, but enhanced in the later stage of the backbone network;
[0148] In step 2, feature fusion and weighting are performed, using the following sub-steps:
[0149] Multiply the feature map F1 by the spatial weight W5 to obtain the feature map F11;
[0150] Multiply the feature map F2 by the spatial weight W6 to obtain the feature map F12;
[0151] Multiply the feature map F4 by the spatial weight W7 to obtain the feature map F13;
[0152] Add the pixels of feature maps F11, F12, and F13 to complete feature fusion and obtain the weight W8 whose shape is consistent with the input feature 100;
[0153] Multiply the input feature 100 by the weight W8 to complete the spatial weighting operation and obtain the output feature 122;
[0154] like Figure 2 As shown, in step 3, the hierarchical perception feature extraction backbone network is constructed. The construction process is divided into four stages, using the following sub-steps:
[0155] Construct a downsampling block to downsample the input features. The downsampling block contains a standard convolution with a kernel size of 7 and a stride of 2;
[0156] In the first stage, for any RGB three-channel remote sensing image 200, a standard convolution with a step size of 2 and a convolution kernel size of 7 is first used to construct a downsampling block 201, and the input image 200 is downsampled to obtain a feature map F14. Then, the feature map F14 is used as input, and two hierarchical perceptual feature attention modules are stacked to obtain an output feature map F15 and pass it to the second stage. The specific network architecture of this stage is as follows:
[0157] Input image 200 → downsampling block 201 → feature map F14;
[0158] Feature map F14 → hierarchical perceptual feature attention module 204;
[0159] Hierarchical perception feature attention module 204 → Hierarchical perception feature attention module 205;
[0160] Hierarchical perception feature attention module 205 → feature map F15;
[0161] In the second stage, a standard convolution with a step size of 2 and a convolution kernel size of 7 is used to construct a downsampling block 207, and the input feature map F15 is downsampled to obtain a feature map F16. Then, the feature map F16 is used as input, and two hierarchical perceptual feature attention modules are stacked to obtain an output feature map F17 and pass it to the third stage. The specific network architecture of this stage is as follows:
[0162] Feature map F15 → downsampling block 207 → feature map F16;
[0163] Feature map F16 → hierarchical perception feature attention module 209;
[0164] Hierarchical perception feature attention module 209 → hierarchical perception feature attention module 210;
[0165] Hierarchical perception feature attention module 210 → feature map F17;
[0166] In the third stage, a standard convolution with a step size of 2 and a convolution kernel size of 7 is used to construct a downsampling block 212, and the input feature map F17 is downsampled to obtain a feature map F18. Then, the feature map F18 is used as input, and four hierarchical perceptual feature attention modules are stacked to obtain an output feature map F19 and pass it to the third stage. The specific network architecture of this stage is as follows:
[0167] Feature map F17 → downsampling block 212 → feature map F18;
[0168] Feature map F18 → hierarchical perceptual feature attention module 214;
[0169] Hierarchical perception feature attention module 214→hierarchical perception feature attention module 215;
[0170] Hierarchical perception feature attention module 215 → hierarchical perception feature attention module 216;
[0171] Hierarchical perception feature attention module 216 → hierarchical perception feature attention module 217;
[0172] Hierarchical perception feature attention module 217 → feature map F19;
[0173] In the fourth stage, a standard convolution with a step size of 2 and a convolution kernel size of 7 is used to construct a downsampling block 219, and the input feature map F19 is downsampled to obtain a feature map F20. Then, the feature map F20 is used as input, and four hierarchical perceptual feature attention modules are stacked to obtain an output feature map F21. The specific network architecture of this stage is as follows:
[0174] Feature map F19 → downsampling block 219 → feature map F20;
[0175] Feature map F20→hierarchical perception feature attention module 221;
[0176] Hierarchical perception feature attention module 221→hierarchical perception feature attention module 222;
[0177] Hierarchical perception feature attention module 222 → feature map F21;
[0178] The feature maps F15, F17, F19 and F21 outputted at the end of the four stages are outputted for subsequent processing;
[0179] By adopting the above process and using a hierarchical perceptual feature extraction backbone network, it is possible to capture more accurate and effective local detail features in remote sensing images with densely distributed objects, which is beneficial for object classification and positioning in complex backgrounds and dense scenes, and alleviates the problem of feature confusion and local feature ambiguity caused by the adaptive feature selection mechanism in existing methods.
[0180] The present invention also includes a network model for remote sensing target detection in dense scenes, and the network model is specifically:
[0181] Input image 200 → downsampling block 201 → feature map F14;
[0182] Feature map F14 → hierarchical perceptual feature attention module 204;
[0183] First level perceptual feature attention module 204 → second level perceptual feature attention module 205;
[0184] Second level perceptual feature attention module 205 → feature map F15;
[0185] Feature map F15 → downsampling block 207 → feature map F16;
[0186] Feature map F16 → third level perceptual feature attention module 209;
[0187] Third level perception feature attention module 209 → fourth level perception feature attention module 210;
[0188] Fourth level perceptual feature attention module 210 → feature map F17;
[0189] Feature map F17 → downsampling block 212 → feature map F18;
[0190] Feature map F18→fifth level perceptual feature attention module 214;
[0191] Fifth level perception feature attention module 214→sixth level perception feature attention module 215;
[0192] Sixth level perception feature attention module 215→seventh level perception feature attention module 216;
[0193] Seventh level perception feature attention module 216 →eighth level perception feature attention module 217;
[0194] Eighth level perceptual feature attention module 217 → feature map F19;
[0195] Feature map F19 → downsampling block 219 → feature map F20;
[0196] Feature map F20→hierarchical perception feature attention module 221;
[0197] Ninth level perception feature attention module 221→tenth level perception feature attention module 222;
[0198] Tenth level perceptual feature attention module 222 → feature map F21;
[0199] The feature maps F15, F17, F19 and F21 outputted at the end of the four stages are outputted for subsequent processing flow.
[0200] The hierarchical perception feature attention module is specifically:
[0201] The input feature 100 is encoded by the first branch 1 and the second branch 2 to generate feature maps F1 and F2 respectively. Feature maps F1 and F2 are added pixel by pixel to obtain feature map F3. Then, the third branch 3 is constructed using the first dilated convolution 6. Feature map F3 is encoded by the third branch 3 to obtain feature map F4.
[0202] The first standard convolution 7, the second standard convolution 8, and the third standard convolution 9 are used to compress the number of channels by half for the feature map F1, the feature map F2, and the feature map F4, respectively, to obtain the feature map F5, the feature map F6, and the feature map F7;
[0203] The obtained feature maps F5, F6, and F7 are concatenated in the channel dimension to obtain the feature map F8, and then the feature map F8 is subjected to global average pooling 10, forward propagation 11, and sigmoid activation in sequence to obtain its corresponding channel weight W1, and finally the channel weight W1 is multiplied by the feature map F8 to complete the channel feature enhancement operation and obtain the feature map F9;
[0204] The number of channels of feature map F9 is mapped to be consistent with the number of branches to obtain feature map F10, and then softmax activation is performed on feature map F10 in the channel dimension to obtain the spatial weight W2 of the first branch 1, the spatial weight W3 of the second branch 2, and the spatial weight W4 of the third branch 3.
[0205] The standard deviation of the channel dimension is calculated for the spatial weights W2, W3, and W4. The calculation formula is as follows:
[0206]
[0207] Where σ represents the standard deviation, x i represents the weight of the i-th branch at a certain spatial position, μ represents the average weight of the first branch 1, the second branch 2, and the third branch 3 at a certain spatial position, and N represents the number of branches;
[0208] Calculate the hierarchical perception factor 15 of the first branch 1. Use the following formula to calculate the hierarchical perception factor:
[0209]
[0210] where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i Indicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0211] Adjust the spatial weight W2 of the first branch 1 so that the pth i The spatial weight W2 of the first branch 1 of the layer-wise perceptual feature attention module plus the weight correction value V wc Then we get the spatial weight W5, and the weight correction value is calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0212] V wc =σ·F ha
[0213] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are 5α, 4α, 3α..., -4α, V wc After adding the spatial weight W2, the spatial weight W2 of the first branch 1 can be enhanced in the shallow layer of the backbone network, but suppressed in the later stage of the backbone network;
[0214] Calculate the hierarchical perception factor 16 of the second branch 2 and the third branch 3. The first branch 2 and the second branch 3 share the same hierarchical perception factor 16. The hierarchical perception factor 16 is calculated using the following formula:
[0215]
[0216] where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i Indicates the position of the current hierarchical perception feature attention module in the backbone network. α is a learnable parameter used to refine the feature expression strength and is initialized to 1.
[0217] Adjust the spatial weights W3 and W4 of the second branch 2 and the third branch 3 so that the pth i The spatial weight W3 and the spatial weight W4 of the second branch 2 and the third branch 3 of the level perception feature attention module plus the weight correction value V wc Then we get the spatial weights W6 and W7 respectively, and the weight correction values are calculated by σ and F ha Multiply them together and the calculation formula is as follows:
[0218] V wc =σ·F ha
[0219] When the backbone network stacks the hierarchical perception feature attention modules in sequence, taking P = 10, n = 2 as an example, V wc The values at different levels are -5α, -4α, -3α..., 4α, V wc After being added with the spatial weights W3 and W4, the spatial weights W3 and W4 of branches 2 and 3 can be suppressed in the shallow layer of the backbone network, but enhanced in the later stage of the backbone network.
[0220] Multiply the feature map F1 by the spatial weight W5 to obtain the feature map F11;
[0221] Multiply the feature map F2 by the spatial weight W6 to obtain the feature map F12;
[0222] Multiply the feature map F4 by the spatial weight W7 to obtain the feature map F13;
[0223] Add the pixels of feature maps F11, F12, and F13 to complete feature fusion and obtain the weight W8 whose shape is consistent with the input feature 100;
[0224] Multiply the input feature 100 by the weight W8 to complete the spatial weighting operation and obtain the output feature 122.
[0225] Example:
[0226] 1) Parameter settings
[0227] The code of the present invention is implemented based on the Pytorch framework, and 6 NVIDIA 3090TiGPUs are used to train the network model in the Ubuntu environment. The AdamW optimizer is used for optimization. The network momentum is 0.9, the weight decay factor is 0.05, the batch-size is 2, the learning rate is initially set to 0.00005, the warm-up method is used for preheating, and the cosine annealing is used to update the learning rate. During training, the input image is set to 1024×1024, and data enhancement strategies such as random rotation are used. The experiment uses the public data set DOTA-v1.0, which contains more than 2806 large remote sensing images and 180,000 valid instances. In addition, in order to evaluate the performance of the present invention in dense scenes, we selected 1468 remote sensing images in dense scenes from DOTA-v1.0 for separate testing. These scenes mainly include remote sensing images of parking lots, ports, and residential areas. The hierarchical-aware feature extraction backbone network proposed in the present invention is first pre-trained on ImageNet for 300 epochs. Then, when evaluating the performance of the hierarchical-aware feature extraction backbone network, we embed the hierarchical-aware feature extraction backbone network into multiple existing target detectors to evaluate its experimental performance improvement for remote sensing target detection, especially in dense scenarios. The performance evaluation indicator is the mean average precision (mAP).
[0228] 2) Experimental results
[0229] In order to evaluate the performance of various methods, the present invention uses mean average precision (mAP) as the evaluation index, which is usually used to evaluate the detection performance of the model in the target detection algorithm. Taking the O-RCNN algorithm as the baseline, the evaluation index of the hierarchical perceptual feature extraction backbone network proposed in the present invention in DOTA-v1.0 is shown in Table 1. In dense scenes, taking O-RCNN as the baseline, the evaluation index of the hierarchical perceptual feature extraction backbone network proposed in the present invention is shown in Table 3.
[0230] Experimental results show that the proposed method achieves excellent performance on the DOTA-v1.0 dataset, also achieves the best performance in dense scenes, and achieves the best results in terms of average precision.
[0231] Table 1 Quantitative evaluation with the most advanced methods on DOTA-v1.0
[0232]
[0233]
[0234] Table 2 Performance of the hierarchical perceptual feature extraction backbone network in dense scenes
[0235]
[0236] 3) Ablation analysis
[0237] In order to verify the effectiveness of the proposed hierarchical-aware feature extraction backbone network, the present invention conducted an ablation experiment, replaced multiple existing mainstream algorithms with the hierarchical-aware feature extraction backbone network constructed by the present invention, and conducted experiments on DOTA-v1.0. The experimental results are shown in Table 3.
[0238] Table 3 Performance evaluation results of existing methods for embedding hierarchical perceptual feature extraction backbone networks
[0239]
[0240] The results of ablation experiments prove that the method proposed in the present invention can effectively improve the detection accuracy of the model. By hierarchically adjusting the focus area of the algorithm at different stages of the backbone network, the local details of the input features at the shallow layer are effectively retained. At the same time, the global semantic features of the algorithm are enhanced in the deep layer of the backbone network, thereby enhancing the ability of various algorithms to extract detailed features of various objects in processing remote sensing images, especially in dense scenes.
[0241] The present invention provides a method for constructing a remote sensing target detection backbone network based on hierarchical perception. Different from various existing backbone networks for feature extraction, the present invention uses network depth information to guide the redistribution of weights after dynamically evaluating the weights of multi-scale features, enhances the features under the small-scale receptive field in the shallow layer of the backbone network, suppresses the global feature expression, and enhances the global features under the large-scale receptive field and suppresses the local feature expression as the network deepens, thereby alleviating the problem of feature confusion and local feature fuzziness caused by the adaptive feature selection mechanism in the existing method.
[0242] At the same time, the present invention can significantly enhance the model performance without a large increase in the number of model parameters, and balance the model's ability to learn fine-grained features while enhancing the model's ability to distinguish objects when the objects are densely distributed and the background is complex, thereby improving the detection performance of the network, effectively improving the detection effect, and accurately detecting objects of interest in remote sensing images.
Claims
1. A method for constructing a remote sensing target detection backbone network based on hierarchical perception, characterized in that: It includes the following steps: Step 1: Prepare remote sensing target detection dataset; Step 2: Construct a hierarchical perception feature attention module to capture multi-scale features, enhance the backbone network’s shallow attention to local detail features, suppress global features, and enhance the backbone network’s deep attention to global features and suppress local features; Step 3: Build a feature extraction backbone network. The backbone network is divided into four stages. Each stage includes a downsampling of the input feature map and several hierarchical perception feature attention modules in step 1. Step 4: Embed the hierarchical perception feature extraction backbone network into the existing target detection algorithm for training and testing; The above steps complete the construction and training of the hierarchical perception feature extraction backbone network.
2. The method according to claim 1, characterized in that In step 2, when constructing the hierarchical-aware feature attention module, the details are as follows: Construct two parallel feature extraction branches, the first branch (1) consists of the first depth convolution (4), and the second branch (2) consists of the second depth convolution (5); The input feature (100) is encoded by the first branch (1) and the second branch (2) to generate a feature map F1 (101) and a feature map F2 (102) respectively. The feature map F1 (101) and the feature map F2 (102) are added pixel by pixel to obtain a feature map F3 (103). Subsequently, the third branch (3) is constructed using the first dilated convolution (6). The feature map F3 (103) is encoded by the third branch (3) to obtain a feature map F4 (104).
3. The method according to claim 2, characterized in that In step 2, the obtained feature map is weighted and evaluated as follows: Channel compression: In order to reduce the amount of calculation, the first standard convolution (7), the second standard convolution (8), and the third standard convolution (9) are used to compress the number of channels by half for the feature map F1 (101), the feature map F2 (102), and the feature map F4 (104), respectively, to obtain the feature map F5 (105), the feature map F6 (106), and the feature map F7 (107), respectively; Channel feature enhancement: The obtained feature maps F5 (105), F6 (106), and F7 (107) are concatenated in the channel dimension to obtain the feature map F8 (108). The feature map F8 (108) is then subjected to global average pooling (10), forward propagation (11), and sigmoid activation (12) to obtain its corresponding channel weight W1 (109). Finally, the channel weight W1 (109) is multiplied by the feature map F8 (108) to complete the channel feature enhancement operation and obtain the feature map F9 (110). Spatial weight evaluation: Construct the fourth standard convolution (13) to map the number of channels of the feature map F9 (110) to be consistent with the number of branches, and obtain the feature map F10 (111). Then, perform softmax activation (14) on the channel dimension on the feature map F10 (111) to obtain the spatial weight W2 (112) of the first branch (1), the spatial weight W3 (113) of the second branch (2), and the spatial weight W4 (114) of the third branch (3).
4. The method according to claim 3, characterized in that In step 2, the obtained spatial weights are intervened as follows: The standard deviation of the channel dimension is calculated for the spatial weights W2 (112), W3 (113), and W4 (114) in step 2. The calculation formula is as follows: Where σ represents the standard deviation, x i represents the weight of the i-th branch at a certain spatial position, μ represents the average weight of the first branch (1), the second branch (2), and the third branch (3) at a certain spatial position, and N represents the number of branches; Calculate the hierarchical perception factor (15) of the first branch (1) using the following formula: where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i represents the position of the current hierarchical perception feature attention module in the backbone network, and α is a learnable parameter used to refine the feature expression strength; The spatial weight W2(112) of the first branch (1) is adjusted so that the pth i The spatial weight W2(112) of the first branch (1) of the hierarchical perceptual feature attention module plus the weight correction value V wc Then we get the spatial weight W5(115), and the weight correction value is calculated by σ and F ha Multiply them together and the calculation formula is as follows: 5 wc =σ·F ha When the backbone network stacks the hierarchical perception feature attention modules in sequence, V wc After adding the spatial weight W2(112), the spatial weight W2(112) of the first branch (1) can be enhanced in the shallow layer of the backbone network, but suppressed in the later layer of the backbone network; Calculate the hierarchical perception factor (16) of the second branch (2) and the third branch (3). The first branch (2) and the second branch (3) share the same hierarchical perception factor (16). The hierarchical perception factor (16) is calculated using the following formula: where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i represents the position of the current hierarchical perception feature attention module in the backbone network, and α is a learnable parameter used to refine the feature expression strength; The spatial weights W3(113) and W4(114) of the second branch (2) and the third branch (3) are adjusted so that the pth i The spatial weights W3(113) and W4(114) of the second branch (2) and the third branch (3) of the hierarchical perceptual feature attention module plus the weight correction value V wc Then we get the spatial weights W6(116) and W7(117), and the weight correction values are calculated by σ and F ha Multiply them together and the calculation formula is as follows: 5 wc =σ·F ha When the backbone network stacks the hierarchical perception feature attention modules in sequence, V wc After being added with the spatial weight W3(113) and the spatial weight W4(114), the spatial weight W3(113) and the spatial weight W4(114) of branches (2) and (3) can be suppressed in the shallow layer of the backbone network, and enhanced in the later stage of the backbone network.
5. The method according to claim 4, characterized in that In step 2, feature fusion and weighting are performed, using the following sub-steps: The feature map F1 (101) is multiplied by the spatial weight W5 (115) to obtain the feature map F11 (118); The feature map F2 (102) is multiplied by the spatial weight W6 (116) to obtain the feature map F12 (119); The feature map F4 (104) is multiplied by the spatial weight W7 (117) to obtain the feature map F13 (120); Add pixels of the feature map F11 (118), the feature map F12 (119), and the feature map F13 (120) to complete feature fusion and obtain a weight W8 (121) having a shape consistent with the input feature (100); The input feature (100) is multiplied by the weight W8 (121) to complete the spatial weighting operation and obtain the output feature (122).
6. The method according to claim 1, characterized in that In step 3, the hierarchical perception feature extraction backbone network is constructed. The construction process is divided into four stages, as follows: In the first stage, for any RGB three-channel remote sensing image (200), a downsampling block (201) is first constructed to downsample the input image (200) to obtain a feature map F14 (203). Then, the feature map F14 (203) is used as input, and two hierarchical perceptual feature attention modules are stacked to obtain an output feature map F15 (206) and pass it to the second stage. The specific network architecture of this stage is as follows: Input image (200) → downsampling block (201) → feature map F14 (203); Feature map F14 (203) → Hierarchical perception feature attention module (204); First level perception feature attention module (204) → second level perception feature attention module (205); Second level perception feature attention module (205) → feature map F15 (206); In the second stage, a downsampling block (207) is constructed to downsample the input feature map F15 (206) to obtain a feature map F16 (208). The feature map F16 (208) is then used as input to stack two hierarchical perceptual feature attention modules to obtain an output feature map F17 (211) and pass it to the third stage. The specific network architecture of this stage is as follows: Feature map F15 (206) → downsampling block (207) → feature map F16 (208); Feature map F16 (208) → third level perception feature attention module (209); Third level perception feature attention module (209) → fourth level perception feature attention module (210); Fourth level perception feature attention module (210) → feature map F17 (211); In the third stage, a downsampling block (212) is constructed to downsample the input feature map F17 (211) to obtain a feature map F18 (213). The feature map F18 (213) is then used as input to stack four hierarchical perceptual feature attention modules to obtain an output feature map F19 (218) and pass it to the third stage. The specific network architecture of this stage is as follows: Feature map F17 (211) → downsampling block (212) → feature map F18 (213); Feature map F18 (213) → fifth level perceptual feature attention module (214); Fifth level perception feature attention module (214) →sixth level perception feature attention module (215); Sixth level perception feature attention module (215) →seventh level perception feature attention module (216); Seventh level perception feature attention module (216) → eighth level perception feature attention module (217); Eighth level perceptual feature attention module (217) → feature map F19 (218); In the fourth stage, a downsampling block (219) is constructed to downsample the input feature map F19 (218) to obtain a feature map F20 (220). The feature map F20 (220) is then used as input to stack four levels of perceptual feature attention modules to obtain an output feature map F21 (223). The specific network architecture of this stage is as follows: Feature map F19 (218) → downsampling block (219) → feature map F20 (220); Feature map F20 (220) → hierarchical perception feature attention module (221); Ninth level perception feature attention module (221)→tenth level perception feature attention module (222); Tenth level perceptual feature attention module (222) → feature map F21 (223); The feature maps F15 (206), F17 (211), F19 (218), and F21 (223) output at the end of the four stages are output for subsequent processing.
7. A network model for remote sensing target detection in dense scenes, characterized in that: The network model is as follows: Input image (200) → downsampling block (201) → feature map F14 (203); Feature map F14 (203) → Hierarchical perception feature attention module (204); First level perception feature attention module (204) → second level perception feature attention module (205); Second level perception feature attention module (205) → feature map F15 (206); Feature map F15 (206) → downsampling block (207) → feature map F16 (208); Feature map F16 (208) → third level perception feature attention module (209); Third level perception feature attention module (209) → fourth level perception feature attention module (210); Fourth level perception feature attention module (210) → feature map F17 (211); Feature map F17 (211) → downsampling block (212) → feature map F18 (213); Feature map F18 (213) → fifth level perceptual feature attention module (214); Fifth level perception feature attention module (214) →sixth level perception feature attention module (215); Sixth level perception feature attention module (215) →seventh level perception feature attention module (216); Seventh level perception feature attention module (216) → eighth level perception feature attention module (217); Eighth level perceptual feature attention module (217) → feature map F19 (218); Feature map F19 (218) → downsampling block (219) → feature map F20 (220); Feature map F20 (220) → hierarchical perception feature attention module (221); Ninth level perception feature attention module (221)→tenth level perception feature attention module (222); Tenth level perceptual feature attention module (222) → feature map F21 (223); The feature maps F15 (206), F17 (211), F19 (218), and F21 (223) output at the end of the four stages are output for subsequent processing.
8. The model according to claim 7, characterized in that The hierarchical perception feature attention module is specifically: The input feature (100) is encoded by the first branch (1) and the second branch (2) to generate a feature map F1 (101) and a feature map F2 (102) respectively. The feature map F1 (101) and the feature map F2 (102) are added pixel by pixel to obtain a feature map F3 (103). Then, the first dilated convolution (6) is used to construct the third branch (3). The feature map F3 (103) is encoded by the third branch (3) to obtain a feature map F4 (104). The first standard convolution (7), the second standard convolution (8), and the third standard convolution (9) are used to compress the number of channels of the feature map F1 (101), the feature map F2 (102), and the feature map F4 (104) by half, respectively, to obtain the feature map F5 (105), the feature map F6 (106), and the feature map F7 (107); The obtained feature maps F5 (105), F6 (106), and F7 (107) are concatenated in the channel dimension to obtain the feature map F8 (108). The feature map F8 (108) is then subjected to global average pooling (10), forward propagation (11), and sigmoid activation (12) to obtain its corresponding channel weight W1 (109). Finally, the channel weight W1 (109) is multiplied by the feature map F8 (108) to complete the channel feature enhancement operation and obtain the feature map F9 (110). The number of channels of the feature map F9 (110) is mapped to be consistent with the number of branches to obtain the feature map F10 (111), and then the feature map F10 (111) is activated with softmax (14) in the channel dimension to obtain the spatial weight W2 (112) of the first branch (1), the spatial weight W3 (113) of the second branch (2), and the spatial weight W4 (114) of the third branch (3).
9. The method according to claim 8, characterized in that The standard deviation of the channel dimension is calculated for the spatial weights W2(112), W3(113), and W4(114). The calculation formula is as follows: Where σ represents the standard deviation, x i represents the weight of the i-th branch at a certain spatial position, μ represents the average weight of the first branch (1), the second branch (2), and the third branch (3) at a certain spatial position, and N represents the number of branches; Calculate the hierarchical perception factor (15) of the first branch (1) using the following formula: where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i represents the position of the current hierarchical perception feature attention module in the backbone network, and α is a learnable parameter used to refine the feature expression strength; The spatial weight W2(112) of the first branch (1) is adjusted so that the pth i The spatial weight W2(112) of the first branch (1) of the hierarchical perceptual feature attention module plus the weight correction value V wc Then we get the spatial weight W5(115), and the weight correction value is calculated by σ and F ha Multiply them together and the calculation formula is as follows: 5 wc =σ·F ha When the backbone network stacks the hierarchical perception feature attention modules in sequence, V wc After adding the spatial weight W2(112), the spatial weight W2(112) of the first branch (1) can be enhanced in the shallow layer of the backbone network, but suppressed in the later layer of the backbone network; Calculate the hierarchical perception factor (16) of the second branch (2) and the third branch (3). The first branch (2) and the second branch (3) share the same hierarchical perception factor (16). The hierarchical perception factor (16) is calculated using the following formula: where F ha represents the hierarchical perception factor, P represents the total number of hierarchical perception feature attention modules in the backbone network, n is a learnable parameter used to determine the conversion node of branch attention, and p i represents the position of the current hierarchical perception feature attention module in the backbone network, and α is a learnable parameter used to refine the feature expression strength; The spatial weights W3(113) and W4(114) of the second branch (2) and the third branch (3) are adjusted so that the pth i The spatial weights W3(113) and W4(114) of the second branch (2) and the third branch (3) of the hierarchical perceptual feature attention module plus the weight correction value V wc Then we get the spatial weights W6(116) and W7(117), and the weight correction values are calculated by σ and F ha Multiply them together and the calculation formula is as follows: 5 wc =σ·F ha When the backbone network stacks the hierarchical perception feature attention modules in sequence, V wc After being added with the spatial weight W3(113) and the spatial weight W4(114), the spatial weight W3(113) and the spatial weight W4(114) of branches (2) and (3) can be suppressed in the shallow layer of the backbone network, and enhanced in the later stage of the backbone network.
10. The method according to claim 9, characterized in that The feature map F1 (101) is multiplied by the spatial weight W5 (115) to obtain the feature map F11 (118); The feature map F2 (102) is multiplied by the spatial weight W6 (116) to obtain the feature map F12 (119); The feature map F4 (104) is multiplied by the spatial weight W7 (117) to obtain the feature map F13 (120); Add pixels of the feature map F11 (118), the feature map F12 (119), and the feature map F13 (120) to complete feature fusion and obtain a weight W8 (121) having a shape consistent with the input feature (100); The input feature (100) is multiplied by the weight W8 (121) to complete the spatial weighting operation and obtain the output feature (122).
