Remote sensing target detection method guided by explicit contours and enhanced by spatially varying context

Through explicit contour guidance and spatial change context enhancement methods, combined with the YOLOX network and the multi-scale dual attention mechanism, the multi-scale and multi-category problems in remote sensing object detection are solved, and the detection performance and positioning accuracy are improved.

CN115830449BActive Publication Date: 2025-09-02CHONGQING INNOVATION CENTER OF BEIJING INSTITUTE OF TECHNOLOGY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211530957.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-01
Publication Date
2025-09-02
Estimated Expiration
2042-12-01

AI Technical Summary

Technical Problem

There are problems of multi-scale, multi-category and complex backgrounds in remote sensing object detection. The existing methods are difficult to effectively combine object detection features and contour features. The global context weighting mechanism ignores the spatial coexistence of different categories of targets, resulting in insufficient detection performance and positioning accuracy.

Method used

Through explicit contour guidance and spatial change context enhancement methods, the YOLOX feature extraction network and spatial change context enhancement algorithm encode semantic information and spatial position information, combining the contour loss function and multi-scale dual attention mechanism to achieve explicit fusion and refinement of feature maps.

Benefits of technology

It improves the multi-category discrimination and positioning accuracy of remote sensing object detection, suppresses redundant information interference, and realizes multi-scale object detection in complex contexts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115830449B_ABST
    Figure CN115830449B_ABST
Patent Text Reader

Abstract

The present invention provides a remote sensing target detection method with explicit contour guidance and spatially varying context enhancement. A feature extraction network is used to obtain a multi-scale target feature map of the input image. A spatially varying context enhancement algorithm is used to encode the spatial position information of the deepest feature map into the global context to obtain a spatially varying context convolution kernel. Combined with a preset void ratio, a multi-scale context-aware spatially varying weighting factor is obtained, which is weighted to obtain a spatially aware context-enhanced target feature map. A feature fusion network and a contour-guided feature extraction algorithm are used to obtain a multi-scale target fusion feature map and a contour-aware feature map, respectively. Combined with the contour-guided feature fusion algorithm and a multi-scale dual attention mechanism, an explicit contour-guided target detection feature map is obtained. This map is then input into a target box detection head to obtain a target detection result. The present invention can improve the detection performance and positioning accuracy of multiple types of targets in complex backgrounds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of remote sensing target detection, and in particular to a remote sensing target detection method with explicit contour guidance and spatial variation context enhancement. Background Art

[0002] Target detection is a key task in intelligent remote sensing image processing. It aims to determine whether there are targets of interest within an area and determine the location of each target within the image. With the increasing maturity of remote sensing imaging technology, image quality and resolution have significantly improved. As a result, remote sensing target detection plays an increasingly important role in military and civilian applications, such as traffic control, urban planning, emergency rescue, and airport reconnaissance.

[0003] In recent years, the rapid development of deep learning has significantly improved object detection performance. Methods based on convolutional neural networks (CNNs) can adaptively learn high-level semantic representations of images and, through powerful training algorithms, classify and locate objects. Due to their superior feature extraction and representation capabilities, CNNs have become the mainstream algorithm for object detection. Based on their model architecture, mainstream object detection networks can be divided into two categories: single-stage detection networks, exemplified by the YOLO series, and two-stage detection networks, exemplified by Faster-RCNN. Two-stage networks prioritize detection accuracy, while single-stage networks prioritize detection efficiency.

[0004] Detecting remote sensing targets is more challenging than detecting them in natural scenes due to the scale disparity of multi-scale targets, the inter-class similarity of multi-category targets, and the noise interference of complex backgrounds. Existing methods either use multi-scale and multi-level feature fusion to effectively combine semantic and spatial features, mining richer information for distinguishing target categories; or utilize attention mechanisms to guide the model to focus on foreground areas and suppress background interference. However, these methods process features at the object level, which is a higher-level abstract feature that encodes both the semantic category and spatial location of the object, making it difficult to effectively separate these two types of information.

[0005] As a pixel-level feature, object contours simply and effectively encode low-level spatial positional details of an object, thereby decoupling semantic category and spatial position information and retaining only the fine-grained spatial cues that are most critical for object shape and location. For object detection, object contour information not only represents the spatial position of the object, but also helps improve the detector's localization precision. Furthermore, the object shape described by the object contour is strongly correlated with the object's semantic category, effectively improving the distinguishability of objects of a specific category and suppressing the influence of redundant information such as color and texture. Existing methods use contour features as additional constraints for object detection, using object detection features to suppress contour noise. However, these methods treat object detection and contour detection as two independent tasks, lacking explicit interaction between the features used for object detection and contour detection. This lack of correlation between multi-level object features and contour spatial details makes it difficult for the detector to fully utilize the fine-grained spatial position and shape cues contained in contour features, resulting in suboptimal methods.

[0006] Furthermore, some remote sensing targets of different categories share similar shapes or textures. Without global or long-range contextual information, low inter-class independence can lead to erroneous semantic category matching, resulting in false detections. Some methods incorporate global context into the top-level feature map. By capturing this global context, they estimate the importance of channel features, characterizing the degree of correlation between channels containing different semantic categories and the environment. By weighting the corresponding feature channels with per-channel weights, channels containing semantic categories closely related to the environment are automatically highlighted, while channels containing irrelevant categories are suppressed. This effectively distinguishes objects of different categories with similar appearances. However, these methods aggregate features from all spatial locations within each channel into a single global context-encoded weight, which is shared across all locations within that channel. This globally shared weighting mechanism ignores the spatial coexistence of objects of different categories, enhancing them equally. This uniform weighting approach is detrimental to contextual modeling of multi-class targets and fails to effectively exploit the advantages of global context.

[0007] In summary, existing remote sensing target detection methods face the following challenges: First, target detection in remote sensing images is challenging due to factors such as multi-scale, multi-category, and complex backgrounds. Second, existing improved methods are all at the object level and fail to decouple refined spatial position information from high-level abstract features. For pixel-level contour features, existing methods lack an explicit association between target detection features and contour spatial details, making it difficult for detectors to fully utilize the position and shape cues contained in contour features, resulting in poor detection performance. Third, the global shared weighting mechanism used in existing global context models ignores the spatial coexistence of targets of different categories and enhances them with equal weights, which is detrimental to contextual modeling of multi-category targets.

[0008] Therefore, there is an urgent need for a remote sensing target detection method that can combine display contour guidance and spatial variation context to accurately identify multiple types of targets in complex backgrounds in remote sensing images at multiple scales. Summary of the Invention

[0009] Based on this, it is necessary to provide a remote sensing target detection method with explicit contour guidance and spatial variation context enhancement to address the above technical problems.

[0010] A remote sensing target detection method with explicit contour guidance and spatial variation context enhancement, comprising the following steps: obtaining an input image, obtaining a multi-scale target feature map through a YOLOX feature extraction network; encoding the spatial position information of the deepest feature map into a global context through a spatial variation context enhancement algorithm, and obtaining a spatial variation context convolution kernel containing semantic information and spatial position information; performing a deep hole convolution calculation on the deepest feature map according to a preset hole rate and the spatial variation context convolution kernel to obtain a multi-scale context-aware spatial variation weighting factor; and weighting the deepest feature map according to the multi-scale context-aware spatial variation weighting factor to obtain a spatial perception up and down weighting kernel. The multi-scale target feature map is enhanced by the text; the multi-scale target feature map and the spatial-aware context-enhanced target feature map are fused through the YOLOX feature fusion network to obtain a multi-scale target fusion feature map; the contour-guided feature extraction algorithm is used to extract the contour-aware feature map of the multi-scale target fusion feature map, and the contour loss function is used for explicit supervision to obtain a target contour map; the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism are combined to fuse the contour-aware feature map with the multi-scale target fusion feature map to obtain an explicit contour-guided target detection feature map; the explicit contour-guided target detection feature map is input into the target box detection head to obtain a target detection result.

[0011] In one embodiment, the spatial location information of the deepest feature map is encoded into the global context by the spatial variation context enhancement algorithm to obtain the spatial variation context convolution kernel containing semantic information and spatial location information, including: obtaining the deepest feature map of the multi-scale target feature map, in which the deepest feature map is When the deepest feature map is passed through two independent 1×1 convolutions, namely T k and T q , converted into a feature map and feature maps Among them, s 2 Represents the number of neurons on each channel of the spatially varying context convolution kernel; flatten the two feature maps to obtain two two-dimensional feature matrices and The two-dimensional feature matrix Transpose and with the two-dimensional feature matrix Perform matrix multiplication to obtain in, The feature matrix Restore to 3D feature map The spatial variation context convolution kernel containing semantic information and spatial position information is obtained.

[0012] In one embodiment, the deep hole convolution calculation is performed on the deepest feature map according to the preset hole rate and the spatial variation context convolution kernel to obtain a multi-scale context-aware spatial variation weighting factor, and the deepest feature map is weighted according to the multi-scale context-aware spatial variation weighting factor to obtain a spatially aware context enhanced target feature map, including: expanding the spatially aware context convolution kernel into a hole convolution kernel with multiple preset hole rates; performing deep convolution on the hole convolution kernel with the deepest feature map respectively, and performing nonlinear processing on the deepest feature map after convolution with a Sigmoid activation function, and obtaining a multi-scale context-aware spatial variation weighting factor through superposition and fusion; weighting the deepest feature map according to the multi-scale context-aware spatial variation weighting factor to obtain a spatially aware context enhanced target feature map.

[0013] In one embodiment, the multi-scale target feature map and the spatial-aware context-enhanced target feature map are fused through the YOLOX feature fusion network to obtain a multi-scale target fusion feature map, including: inputting the multi-scale target feature map and the spatial-aware context-enhanced feature map into the YOLOX feature fusion network, and refining the position information and semantic information of the multi-scale target feature map and the spatial-aware context-enhanced feature map through bottom-up and top-down information flow to obtain a multi-scale target fusion feature map.

[0014] In one embodiment, the contour-guided feature extraction algorithm is used to extract the contour-perceived feature map of the multi-scale target fusion feature map, and the contour loss function is used for explicit supervision to obtain the target contour map, including: at each level of the multi-scale target fusion feature map, 1×1 convolution is used to unify the number of channels of the feature maps of each level, and the spatial size of the feature maps of each level is unified by upsampling; the feature maps of each level with the unified number of channels and spatial size are superimposed and fused, and the contour-perceived feature map is obtained by continuous convolution construction; 1×1 convolution and Softmax activation function are used to convert the contour-perceived feature map into a contour detection result map to obtain the target contour map.

[0015] In one embodiment, the contour loss function includes: using a balanced cross entropy loss function to supervise the contour detection result image, assuming that the contour detection result image is And the true value of the contour C∈[0,1] W×H×2 , assuming that the first channel is the contour image and the second channel is the background image, the contour balanced cross entropy loss L con for:

[0016]

[0017] in,

[0018]

[0019] Where α is the ratio between the number of contour pixels and the number of all pixels in the training data.

[0020] In one embodiment, the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism are combined to fuse the contour-perceived feature map with the multi-scale fused target feature map to obtain an explicit contour-guided target detection feature map, specifically including: scaling the contour-perceived feature map and obtaining a scale-corrected contour-perceived feature map through 1×1 convolution; generating a multi-scale dual attention feature map based on the scale-corrected contour-perceived feature map based on the multi-scale dual attention mechanism; and using multiplication-addition fusion to fuse the multi-scale target fusion feature map with the multi-scale dual attention feature map to obtain an explicit contour-guided target detection feature map.

[0021] In one embodiment, the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism are combined to fuse the contour-aware feature map with the multi-scale target fusion feature map to obtain an explicit contour-guided target detection feature map, including: the multi-scale dual attention mechanism includes a multi-scale spatial attention mechanism and a channel attention mechanism; according to the multi-scale spatial attention mechanism, multiple parallel convolution workflows with preset void rates are constructed, the scale-corrected contour-aware feature map is input into the convolution workflow to obtain a spatial attention feature map, and the convolution workflow includes two convolution kernels with a size of 3×3. Hole convolution operation; converting the spatial attention feature map into a multi-scale spatial attention feature map through channel stacking and a 1×1 convolution; based on the channel attention mechanism, obtaining the channel attention feature map by a global average pooling operation and two 1×1 convolutions on the scale-corrected contour perception feature map; adding the multi-scale spatial attention feature map and the channel attention feature map to obtain a multi-scale dual attention feature map; adopting a multiplication-then-addition method to fuse the multi-scale dual attention feature map with the multi-scale target fusion feature map to obtain a display contour guided target detection feature map.

[0022] Compared with the prior art, the advantages and beneficial effects of the present invention are: obtaining an input image, inputting it into the YOLOX feature extraction network, obtaining a multi-scale target feature map, encoding the spatial position information of the deepest feature map into the global context through the spatial variation context enhancement algorithm, obtaining a spatial variation context convolution kernel containing semantic information and spatial position information, performing deep hole convolution calculation on the spatial variation context convolution kernel and the deepest feature map according to the preset hole rate, obtaining a multi-scale context-aware spatial variation weighting factor, and using it to weight the deepest feature map to obtain a spatially aware context-enhanced target feature map, which is beneficial to improving the granularity of the global context and facilitating the adaptive enhancement of target features of different categories according to their spatial position distribution and the semantic association of the environment; through the YOLOX feature fusion network, the multi-scale target feature map and the spatially aware target map are fused together to form a spatially aware context-enhanced target feature map. The enhanced target feature map below is fused to obtain a multi-scale target fusion feature map, realizing cross-level fusion and refinement of position information and semantic information of the multi-scale target feature map and the spatial perception context enhancement feature map; the contour-guided feature extraction algorithm is used to extract the contour-aware feature map of the multi-scale target fusion feature map, and the contour loss function is used for explicit supervision to obtain the target contour map, and the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism are combined to fuse the contour-aware feature map with the multi-scale target fusion feature map to obtain the explicit contour-guided target detection feature map, which improves the distinguishability of different categories and suppresses the interference of redundant information; the explicit contour-guided target detection feature map is input into the target box detection head to obtain the target detection result, thereby realizing multi-scale target detection of multiple categories of targets under complex backgrounds, and improving the detection performance and positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic flow chart of a remote sensing target detection method with explicit contour guidance and spatial variation context enhancement in one embodiment;

[0024] Figure 2 A schematic diagram of the structure of an optimized target detection network in one embodiment;

[0025] Figure 3 is a schematic diagram of the structure of a spatial variation context module in one embodiment;

[0026] Figure 4 Schematic diagram of the structure of a contour feature guided fusion module in one embodiment. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0028] In one embodiment, Figure 1 As shown, a remote sensing target detection method with explicit contour guidance and spatial variation context enhancement is provided, comprising the following steps:

[0029] Step S101: obtain an input image and obtain a multi-scale target feature map through the YOLOX feature extraction network.

[0030] Specifically, after acquiring the remote sensing image, at least one frame of the remote sensing image is used as the input image and input into the YOLOX feature extraction network, and a multi-scale target feature map is output.

[0031] In step S102 , the spatial position information of the deepest feature map is encoded into the global context through a spatially varying context enhancement algorithm to obtain a spatially varying context convolution kernel containing semantic information and spatial position information.

[0032] Specifically, after the YOLOX feature extraction network obtains a multi-scale target feature map, it obtains the deepest feature map of the multi-scale target feature map. Through the spatially varying context enhancement algorithm, its spatial position information is encoded into the global context. After the deepest feature map of the multi-scale target feature map is input, a spatially varying context convolution kernel containing both rich semantic information and spatial clues can be obtained. Because the spatially varying context enhancement algorithm contains rich spatial semantic information, it can help target features of different categories to be adaptively enhanced based on the semantic association between their spatial position distribution and the environment, thereby refining the granularity of the global context effect, which is conducive to improving the detection performance of multiple categories of targets.

[0033] Wherein, step S102 includes: obtaining the deepest feature map of the multi-scale target feature map, when the deepest feature map is When , the deepest feature map is passed through two independent 1×1 convolutions, namely T k and T q , converted into a feature map and feature maps Among them, s 2 Represents the number of neurons on each channel of the spatially varying context convolution kernel; flatten the two feature maps to obtain two two-dimensional feature matrices and The two-dimensional feature matrix Transpose and with the two-dimensional feature matrix Perform matrix multiplication to obtain in, The feature matrix Restore to 3D feature map The spatial variation context convolution kernel containing semantic information and spatial position information is obtained.

[0034] Specifically, if Figure 2 As shown in Figure 2, the spatial variation context module is embedded into the deepest layer of the YOLOX feature extraction network, where the spatial variation context module is as follows: Figure 3 shown.

[0035] After obtaining the deepest feature map according to the multi-scale target feature map, first, the deepest feature map Through two independent 1×1 convolutions, namely T k and T q , converted into a feature map and feature maps Among them, s 2 Represents the number of neurons on each channel of the spatially varying context convolution kernel; secondly, flatten the two feature maps to obtain two two-dimensional feature matrices and Third, the feature matrix Transpose For the feature matrix Perform matrix multiplication, that is in Finally, the feature matrix Restore to 3D feature map The spatial variation context convolution kernel containing semantic information and spatial position information is obtained.

[0036] In step S103, a deep hole convolution calculation is performed on the deepest feature map according to the preset hole ratio and spatial variation context convolution kernel to obtain a multi-scale context-aware spatial variation weighting factor, and the deepest feature map is weighted according to the multi-scale context-aware spatial variation weighting factor to obtain a spatially aware context enhanced target feature map.

[0037] Specifically, according to the pre-set void ratio, the spatial variation context convolution kernel obtained in step S102 is subjected to deep void convolution calculation with the deepest feature map to obtain a multi-scale context-aware spatial variation weighting factor, and the deepest feature map is weighted and emphasized by the multi-scale context-aware spatial variation weighting factor to obtain a spatially aware context-enhanced target feature map, thereby achieving adaptive enhancement of the spatial variation of multi-category target features, which helps to improve the detection performance of multi-category targets.

[0038] Among them, step S103 includes: expanding the spatial variation context convolution kernel into a dilated convolution kernel with multiple preset dilation rates; performing deep convolution on the dilated convolution kernel with the deepest feature map respectively, and using the Sigmoid activation function to perform nonlinear processing on the deepest feature map after convolution, and obtaining a multi-scale context-aware spatial variation weighting factor through superposition and fusion; weighting the deepest feature map according to the multi-scale context-aware spatial variation weighting factor to obtain a spatially aware context enhanced target feature map.

[0039] Specifically, after obtaining the spatially varying context convolution kernel, first, the spatially varying context convolution kernel obtained in the previous step is expanded into multiple dilated convolution kernels with different dilation rates, for example, dilated convolution kernels with dilation rates of 1, 2, and 3 respectively; secondly, the multiple dilated convolution kernels are depth-convolved with the deepest feature map respectively, and the deepest feature map after convolution is nonlinearly processed using the Sigmoid activation function to obtain three weighting factors with different receptive fields; thirdly, the three weighting factors are superimposed and fused to obtain a multi-scale context-aware spatially varying weighting factor; finally, the spatially varying weighting factor is weighted on the deepest feature map by multiplication to obtain a spatially aware context-enhanced target feature map, thereby realizing spatially varying adaptive enhancement of multi-category target features.

[0040] In step S104, the multi-scale target feature map and the spatial-aware context-enhanced target feature map are fused through the YOLOX feature fusion network to obtain a multi-scale target fusion feature map.

[0041] Specifically, through the YOLOX feature fusion network, the multi-scale target feature map and the spatial perception context enhanced target feature map are fused to obtain a multi-scale target fusion feature map, so that the target's position information and semantic information are fused and refined across levels, enriching the target's feature expression.

[0042] Among them, step S104 includes: inputting the multi-scale target feature map and the spatial perception context enhancement feature map into the YOLOX feature fusion network, and through bottom-up and top-down information flow, cross-level fusing and refining the position information and semantic information of the multi-scale target feature map and the spatial perception context enhancement feature map to obtain a multi-scale target fusion feature map.

[0043] Specifically, through the YOLOX feature fusion network, bottom-up and top-down information flows are adopted to cross-level fuse and refine the position information and semantic information of the multi-scale target feature map and the spatial perception context enhancement feature map to obtain a multi-scale target fusion feature map, enrich the feature expression of the target, and help improve the target detection accuracy.

[0044] In step S105 , a contour-guided feature extraction algorithm is used to extract a contour-aware feature map of the multi-scale target fusion feature map, and a contour loss function is used for explicit supervision to obtain a target contour map.

[0045] Specifically, a contour-guided feature extraction algorithm is introduced to extract the contour-aware feature map from the multi-scale target fusion feature map output by the YOLOX feature fusion network. The extracted contour-aware feature map is explicitly supervised by the contour loss function to obtain the target contour map, thereby achieving refined extraction of the target contour.

[0046] Among them, step S105 includes: at each level of the multi-scale target fusion feature map, using 1×1 convolution to unify the number of channels of the feature maps of each level, and unifying the spatial size of the feature maps of each level by upsampling; superimposing and fusing the feature maps of each level after the number of channels and spatial size are unified, and obtaining a contour-aware feature map through continuous convolution construction; using 1×1 convolution and Softmax activation function to convert the contour-aware feature map into a contour detection result map to obtain a target contour map.

[0047] Specifically, if Figure 2 As shown in the figure, the multi-scale target feature map and the spatial-aware context-enhanced target feature map are used as input feature maps and input into the YOLOX feature fusion network to obtain three fusion feature maps at different levels, namely X3, X4 and X5. The fusion feature map is used as the input feature of the contour-guided feature extraction module to generate a multi-scale contour feature map.

[0048] At each level of the multi-scale target fusion feature map, a 1×1 convolution is used to unify the number of channels across all feature maps. To further unify the spatial dimensions of the feature maps, the feature maps X4 and X5 are upsampled by a factor of 2 and 4, respectively, so that the feature maps of the three levels have consistent channels and spatial dimensions. The three processed feature maps are then superimposed and fused, and then a contour-aware feature map is constructed through four consecutive 3×3 convolutions. Finally, a 1×1 convolution and a Softmax activation function are used to convert the contour-aware feature map into a contour detection result map, resulting in the target contour map.

[0049] Among them, the contour loss function includes: using the balanced cross entropy loss function to supervise the contour detection result graph, assuming that the contour detection result is And the true value of the contour C∈[0,1] W×H×2 ; Assuming that the first channel is the contour image and the second channel is the background image, the contour balanced cross entropy loss L con for:

[0050]

[0051] in,

[0052]

[0053] Where α is the ratio between the number of contour pixels and the number of all pixels in the training data.

[0054] Specifically, to address the imbalance problem of positive and negative examples in the contour detection graph, a balanced cross entropy loss function is used to supervise the contour detection. and the contour truth value C∈[0,1] W×H×2 , assuming that the first channel is the contour image and the second channel is the background image, the contour balanced cross entropy loss function is obtained, which is used to explicitly supervise the contour detection result image to obtain refined contour information.

[0055] In step S106, the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism are combined to fuse the contour-aware feature map with the multi-scale target fusion feature map to obtain an explicit contour-guided target detection feature map.

[0056] Specifically, after extracting the contour-aware feature map, the multi-scale dual attention mechanism is used to process the contour-aware feature map to obtain a multi-scale dual attention feature map. The multi-scale dual attention feature map and the multi-scale target fusion feature map are fused through multiplication-addition fusion to obtain an explicit contour-guided target detection feature map. This makes target detection more sensitive to the shape contours of key spatial positions and suppresses background noise interference, so that multi-category targets can be distinguished from complex backgrounds more accurately, while achieving higher positioning accuracy.

[0057] Among them, step S106 includes: scaling the contour perception feature map and obtaining a scale-corrected contour perception feature map through 1×1 convolution; generating a multi-scale dual attention feature map based on the scale-corrected contour perception feature map based on the multi-scale dual attention mechanism; using multiplication-addition fusion to fuse the multi-scale target fusion feature map with the multi-scale dual attention feature map to obtain an explicit contour-guided target detection feature map.

[0058] Specifically, if Figure 4As shown in the figure, the resulting contour-aware feature map is introduced into the contour-guided feature fusion module to achieve explicit contour guidance of the multi-scale target fusion features. During feature fusion, the contour-aware feature map is first resized through a scaling operation and a 1×1 convolution to obtain a scale-corrected contour-aware feature map, which is consistent with the size of the multi-scale fusion target feature map to be fused. Secondly, the scale-corrected contour-aware feature map is fed into the multi-scale dual attention module to generate a multi-scale dual attention feature map. Finally, the multi-scale target fusion feature map is fused with the multi-scale dual attention feature map using multiply-add fusion to obtain an explicit contour-guided target detection feature map.

[0059] Among them, the steps for obtaining the explicit contour-guided target detection feature map are as follows: the multi-scale dual attention mechanism includes a multi-scale spatial attention mechanism and a channel attention mechanism; according to the multi-scale spatial attention mechanism, multiple parallel convolution workflows with preset void rates are constructed, and the scale-corrected contour-aware feature map is input into the convolution workflow to obtain the spatial attention feature map. The convolution workflow contains two void convolution operations with a convolution kernel size of 3×3; the spatial attention feature map is converted into a multi-scale spatial attention feature map through channel stacking and a 1×1 convolution; based on the channel attention mechanism, the scale-corrected contour-aware feature map is subjected to a global average pooling operation and two 1×1 convolutions to obtain the channel attention feature map; the multi-scale spatial attention feature map is added to the channel attention feature map to obtain a multi-scale dual attention feature map; the multi-scale dual attention feature map is fused with the multi-scale target fusion feature map by a multiplication-then-addition method to obtain the explicit contour-guided target detection feature map.

[0060] Specifically, the multi-scale dual attention module consists of two parts: a multi-scale spatial attention module and a channel attention module. To capture the spatial features of multi-scale objects, three parallel convolution workflows with different dilation rates are constructed in the multi-scale spatial attention module. The three dilation rates can be set to 1, 2, and 3, respectively. Each convolution workflow includes two convolution operations with a kernel size of 3×3. The resulting spatial attention feature maps at three different scales are transformed into a multi-scale spatial attention feature map through channel stacking and a 1×1 convolution.

[0061] At the same time, the channel attention module captures channel attention from the scale-corrected contour-aware feature map through a global average pooling operation and two 1×1 convolutions to obtain a channel attention feature map; the multi-scale spatial attention feature map is added to the channel attention feature map to obtain a multi-scale dual attention feature map.

[0062] Finally, the multi-scale dual attention feature map is fused with the multi-scale target fusion feature map by using the multiplication-then-addition method to obtain the explicit contour-guided target detection feature map.

[0063] Step S107: input the explicit contour-guided target detection feature map into the target frame detection head to obtain the target detection result.

[0064] Specifically, according to the explicit contour-guided target detection feature map obtained above, it is input into the target box detection head, and the input image is detected to obtain the corresponding target detection result. It can be applied to remote sensing multi-class target detection tasks, and improves the multi-class target detection performance and positioning accuracy, which is conducive to multi-class target detection in complex backgrounds.

[0065] In this embodiment, an input image is obtained and input into the YOLOX feature extraction network to obtain a multi-scale target feature map. The spatial position information of the deepest feature map is encoded into the global context through the spatial variation context enhancement algorithm to obtain a spatial variation context convolution kernel containing semantic information and spatial position information. The deep hole convolution calculation is performed on the deepest feature map according to the preset hole rate and the spatial variation context convolution kernel to obtain a multi-scale context-aware spatial variation weighting factor, which is used to weight the deepest feature map to obtain a spatial perception context enhanced target feature map, which is conducive to refining the granularity of the global context and facilitating the adaptive enhancement of target features of different categories according to their spatial position distribution and the semantic association of the environment; the multi-scale target feature map and the spatial perception context enhanced target feature map are fused by the YOLOX feature fusion network. The contour-guided feature extraction algorithm is used to extract the contour-aware feature map of the multi-scale target fusion feature map, and the contour loss function is used for explicit supervision to obtain the target contour map. At the same time, the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism are used to fuse the contour-aware feature map with the multi-scale target fusion feature map to obtain the explicit contour-guided target detection feature map, which improves the distinguishability of different categories and suppresses the interference of redundant information. The explicit contour-guided target detection feature map is input into the target box detection head to obtain the target detection result, thereby realizing multi-scale target detection of multiple categories of targets in complex backgrounds and improving the detection performance and positioning accuracy.

[0066] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0067] Obviously, those skilled in the art should understand that the modules or steps of the present invention described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program codes executable by the computing device, so that they can be stored in a computer storage medium (ROM / RAM, magnetic disk, optical disk) and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Therefore, the present invention is not limited to any specific combination of hardware and software.

[0068] The above content is a further detailed description of the present invention in conjunction with specific embodiments, and the specific implementation of the present invention cannot be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.

Claims

1. A remote sensing target detection method with explicit contour guidance and spatial variation context enhancement, characterized in that: The following steps are involved: Get the input image and obtain the multi-scale target feature map through the YOLOX feature extraction network; Through the spatial variation context enhancement algorithm, the spatial position information of the deepest feature map is encoded into the global context, and a spatial variation context convolution kernel containing semantic information and spatial position information is obtained; Performing a deep dilated convolution calculation on the deepest feature map according to a preset dilated rate and the spatially varying context convolution kernel to obtain a multi-scale context-aware spatially varying weighting factor, and weighting the deepest feature map according to the multi-scale context-aware spatially varying weighting factor to obtain a spatially-aware context-enhanced target feature map; The multi-scale target feature map and the spatial perception context enhanced target feature map are fused through the YOLOX feature fusion network to obtain a multi-scale target fusion feature map; Extracting a contour-aware feature map of the multi-scale target fusion feature map through a contour-guided feature extraction algorithm, and performing explicit supervision using a contour loss function to obtain a target contour map; Combining the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism, the contour-aware feature map is fused with the multi-scale target fusion feature map to obtain an explicit contour-guided target detection feature map; The explicit contour-guided target detection feature map is input into a target box detection head to obtain a target detection result.

2. The remote sensing target detection method with explicit contour guidance and spatial variation context enhancement according to claim 1, characterized in that: The spatial variation context enhancement algorithm is used to encode the spatial position information of the deepest feature map into the global context, and a spatial variation context convolution kernel containing semantic information and spatial position information is obtained, including: Obtain the deepest feature map of the multi-scale target feature map, where the deepest feature map is When the deepest feature map is passed through two independent 1×1 convolutions, namely T k and T q , converted into a feature map and feature maps Among them, s 2 Indicates the number of neurons on each channel of the spatially varying context convolution kernel; Flatten the two feature maps to obtain two two-dimensional feature matrices and The two-dimensional feature matrix Transpose and with the two-dimensional feature matrix Perform matrix multiplication to obtain in, The feature matrix Restore to 3D feature map The spatial variation context convolution kernel containing semantic information and spatial position information is obtained.

3. The remote sensing target detection method with explicit contour guidance and spatial variation context enhancement according to claim 1, characterized in that: The method further comprises performing a deep hole convolution calculation on the deepest feature map according to a preset hole rate and the spatial variation context convolution kernel to obtain a multi-scale context-aware spatial variation weighting factor, and weighting the deepest feature map according to the multi-scale context-aware spatial variation weighting factor to obtain a spatially-aware context-enhanced target feature map, including: Expanding the spatially varying context convolution kernel into a dilated convolution kernel with multiple preset dilation rates; The atrous convolution kernel is respectively subjected to depth convolution with the deepest feature map, and the deepest feature map after convolution is subjected to nonlinear processing using the Sigmoid activation function. By superposition and fusion, a multi-scale context-aware spatial variation weighting factor is obtained; The deepest feature map is weighted according to the multi-scale context-aware spatial variation weighting factor to obtain a spatially aware context-enhanced target feature map.

4. The remote sensing target detection method with explicit contour guidance and spatial variation context enhancement according to claim 1, characterized in that: The multi-scale target feature map and the spatial perception context enhanced target feature map are fused through the YOLOX feature fusion network to obtain a multi-scale target fusion feature map, including: The multi-scale target feature map and the spatial-aware context-enhanced feature map are input into the YOLOX feature fusion network. Through bottom-up and top-down information flow, the multi-scale target feature map and the spatial-aware context-enhanced feature map are cross-layered and refined in terms of position information and semantic information to obtain a multi-scale target fusion feature map.

5. The remote sensing target detection method with explicit contour guidance and spatial variation context enhancement according to claim 1, characterized in that: The method extracts the contour-aware feature map of the multi-scale target fusion feature map by using a contour-guided feature extraction algorithm, and uses a contour loss function for explicit supervision to obtain a target contour map, including: At each level of the multi-scale target fusion feature map, 1×1 convolution is used to unify the number of channels of the feature maps at each level, and upsampling is used to unify the spatial size of the feature maps at each level; The feature maps of each level with unified channel number and spatial size are superimposed and fused, and the contour-aware feature map is obtained through continuous convolution construction; The contour-aware feature map is converted into a contour detection result map by using 1×1 convolution and Softmax activation function to obtain a target contour map.

6. The remote sensing target detection method with explicit contour guidance and spatial variation context enhancement according to claim 5, characterized in that: The contour loss function includes: The balanced cross entropy loss function is used to supervise the contour detection result graph. Let the contour detection result graph be And the true value of the contour C∈[0,1] W×H×2 , assuming that the first channel is the contour image and the second channel is the background image, the contour balanced cross entropy loss L con for: in, Where α is the ratio between the number of contour pixels and the number of all pixels in the training data.

7. The remote sensing target detection method with explicit contour guidance and spatial variation context enhancement according to claim 1, characterized in that: The method combines the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism to fuse the contour-aware feature map with the multi-scale fused target feature map to obtain an explicit contour-guided target detection feature map, specifically including: Scaling the contour-aware feature map and performing a 1×1 convolution on the feature map to obtain a scale-corrected contour-aware feature map; Based on a multi-scale dual attention mechanism, generating a multi-scale dual attention feature map according to the scale-corrected contour-aware feature map; The multi-scale target fusion feature map is fused with the multi-scale dual attention feature map by using multiplication-addition fusion to obtain an explicit contour-guided target detection feature map.

8. The remote sensing target detection method with explicit contour guidance and spatial variation context enhancement according to claim 7, characterized in that: The method combines the contour-guided feature fusion algorithm and the multi-scale dual attention mechanism to fuse the contour-aware feature map with the multi-scale target fusion feature map to obtain an explicit contour-guided target detection feature map, including: The multi-scale dual attention mechanism includes a multi-scale spatial attention mechanism and a channel attention mechanism; Constructing multiple parallel convolution workflows with preset dilation rates based on the multi-scale spatial attention mechanism, inputting the scale-corrected contour-aware feature map into the convolution workflow to obtain a spatial attention feature map, wherein the convolution workflow includes two dilated convolution operations with a convolution kernel size of 3×3; The spatial attention feature map is converted into a multi-scale spatial attention feature map through channel stacking and a 1×1 convolution; Based on the channel attention mechanism, the scale-corrected contour-aware feature map is subjected to a global average pooling operation and two 1×1 convolutions to obtain a channel attention feature map; Adding the multi-scale spatial attention feature map to the channel attention feature map to obtain a multi-scale dual attention feature map; The multi-scale dual attention feature map is fused with the multi-scale target fusion feature map by a multiplication-then-addition method to obtain a display contour guided target detection feature map.

Citation Information

Patent Citations

  • Remote sensing image target detection model building method based on context enhancement and application

    CN112200045A

  • Weldment contour detection algorithm based on convolutional neural network

    CN112365501A