Method and device for target detection in remote sensing images
By performing non-local graph convolution and dynamic fusion processing on the candidate area feature maps of remote sensing images, the problem of insufficient discrimination and generalization capabilities in small sample target detection is solved, and the accuracy and wide applicability of target detection in remote sensing images are significantly improved. sex.
Patent Information
- Application Number
- CN202210308254.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-26
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-03-26
AI Technical Summary
The existing small-sample target detection methods in remote sensing images have deficiencies in discrimination and generalization capabilities, resulting in poor performance in new small-sample target detection tasks.
By performing non-local graph convolution processing on the feature map of the candidate region and dynamically fusing the convolution result with the original feature map, the semantic information aggregation ability of the candidate region features is enhanced, thereby improving the discrimination ability and generalization ability of detection.
It effectively improves the discrimination ability and generalization ability of small sample target detection in remote sensing images, and can more accurately identify target categories and locations in images.
Smart Images

Figure CN114842350B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing image processing, and in particular to a method, device, electronic equipment and computer-readable storage medium for detecting a target in a remote sensing image. Background Art
[0002] Object detection in remote sensing images aims to identify the category and location of each object in the image, and plays a fundamental role in remote sensing application fields such as border control, ecological protection, and urban planning. Deep neural networks provide a promising method for object detection in remote sensing images due to their powerful expressive power, and can achieve good accuracy when a large number of labeled samples are used to train the model. However, in practical applications, due to the high cost of labeling, only a few labeled samples are often available, which often leads to overfitting of deep neural networks. Therefore, improving the generalization ability of deep neural networks to cope with the problem of small sample object detection in remote sensing images has attracted more and more attention.
[0003] According to the training process, existing deep small-shot object detection methods can be roughly divided into two categories. One is the transfer learning method, which attempts to transfer knowledge from some known classes with a large number of labeled samples to new classes with only a small number of labeled samples to alleviate the overfitting problem. For example, the paper "Zhao, Zhitao, et al." Few-Shot Object Detection of Remote Sensing Images via Two-Stage Fine-Tuning." IEEE Geoscience and Remote Sensing Letters, 2021." proposed a new module to build a feature pyramid for predicting multi-scale objects. Another research direction is the meta-learning-based method, which mainly focuses on meta-learning the small-shot object detection task constructed from some known classes with a large number of labeled samples, so that the model can learn to handle new small-shot object detection tasks. For example, the paper "Li, Xiang, Jingyu Deng, and Yi Fang." Few-Shot Object Detection on Remote Sensing Images." IEEE Transactions on Geoscience and Remote Sensing, 2021." builds a new small-shot object detection module with a meta-feature extractor that learns to extract feature representations from the input image, a reweighting module that learns to adaptively assign different weights to each feature representation from the support image, and a bounding box prediction module that performs object detection on the reweighted feature map. The paper "Zhang, Zhenwei, et al." Oriented Feature Augmentation for Few-Shot Object Detection in Remote Sensing Images." Electronic Information Engineering and Intelligent Control Technology, 2021." proposes a rotation feature enhancement method to reduce intra-class distances. In recent years, great progress has been made in both areas of research. Moreover, the most commonly used network architecture is the Faster Regional Convolutional Neural Network (Faster-RCNN) or its variants, which infers the object category and bounding box based on the features of each candidate region. However, due to the lack of sufficient annotated samples for fitting the training model, the features of each candidate region obtained by these methods are not discriminative and informative enough for accurate reasoning, which limits their generalization ability in new small-sample object detection tasks. Summary of the invention
[0004] Embodiments of the present invention provide a method, device, electronic device and computer-readable storage medium for detecting targets in remote sensing images, so as to at least solve the technical problem of insufficient identification and generalization capabilities of small sample target detection in related technologies.
[0005] According to one aspect of an embodiment of the present invention, a method for detecting a target in a remote sensing image is provided, comprising: performing non-local graph convolution processing on a candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size; fusing the convolution result with the candidate region feature map to obtain a target candidate region feature map; and identifying target information from the target candidate region feature map.
[0006] Optionally, before performing non-local graph convolution processing on the candidate region feature map to obtain the convolution result, the method further includes: adjusting the current network by the following formulas (1) to (3):
[0007]
[0008] in, is the gradient decoupling layer, formula (1) is the forward propagation process, is an affine transformation layer, formula (2) is the back propagation process, λ∈[0,1] is the decoupling coefficient, is the Jacobian matrix of the affine transformation layer, formula (3) is the prototype calibration module, s i is the bounding box confidence of the current network output, is the bounding box confidence obtained by calculating the cosine similarity of the prototype, α is a hyperparameter used for balancing, is the final confidence of the calibrated bounding box.
[0009] Optionally, the non-local graph convolution processing is performed on the candidate region feature map to obtain the convolution result, including: using three different convolution operators in the following formula (4): Process the candidate region feature map P:
[0010]
[0011] The convolution operator is a two-dimensional convolution, and the convolution kernel size is k.
[0012] The similarity matrix S between all candidate regions is constructed by the following formula (5):
[0013]
[0014] in,
[0015] The feature dimension of Pg is increased to the same dimension as the candidate region feature map P by the convolution operator W in the following formula (6), thereby obtaining the convolution result P′:
[0016]
[0017] in, represents matrix multiplication, W is a two-dimensional convolution operator, and the convolution kernel size is k.
[0018] Optionally, fusing the convolution result with the candidate region feature map to obtain the target candidate region feature map includes: mapping P′ through a linear layer using a linear rectification function ReLU as an activation function according to the following formula (7), and averaging the results of the feature dimension of P′ to obtain a candidate region coefficient α:
[0019] α=mean(ReLU(FC(P″))) (7)
[0020] The P and P′ are fused by the following formula (8) to obtain the target candidate region feature map:
[0021]
[0022] Among them, FC represents the linear layer, ⊙ represents element-wise multiplication, Represents element-wise addition.
[0023] Optionally, identifying the target information from the target candidate region feature map includes: identifying the category and position of the target from the target candidate region feature map; and setting the category and position of the target as the target information.
[0024] According to another aspect of an embodiment of the present invention, a target detection device in a remote sensing image is also provided, including: a first acquisition module, used to perform non-local graph convolution processing on a candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size; a second acquisition module, used to fuse the convolution result with the candidate region feature map to obtain a target candidate region feature map; and an identification module, used to identify target information from the target candidate region feature map.
[0025] Optionally, the second acquisition module includes: a first processing unit, configured to use three different convolution operators in the following formula (4): Process the candidate region feature map P:
[0026]
[0027] The convolution operator is a two-dimensional convolution, and the convolution kernel size is k.
[0028] The second processing unit is used to construct a similarity matrix S between all candidate regions using the following formula (5):
[0029]
[0030] in,
[0031] The third processing unit is used to increase the feature dimension of the Pg to the same dimension as the candidate region feature map P through the convolution operator W in the following formula (6), thereby obtaining the convolution result P′:
[0032]
[0033] in, represents matrix multiplication, W is a two-dimensional convolution operator, and the convolution kernel size is k.
[0034] Optionally, the second acquisition module includes: a first acquisition unit, configured to map the P′ using a linear layer with a linear rectification function ReLU as an activation function according to the following formula (7), and average the results of the feature dimensions of the P to obtain a candidate region coefficient α:
[0035] α=mean(ReLU(FC(P″))) (7)
[0036] The second acquisition unit is used to fuse the P and P′ through the following formula (8) to obtain the target candidate region feature map
[0037]
[0038] Among them, FC represents the linear layer, ⊙ represents element-wise multiplication, Represents element-wise addition.
[0039] An embodiment of the present invention provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the steps of any one of the above methods.
[0040] An embodiment of the present invention provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the steps of any of the above methods are implemented.
[0041] In an embodiment of the present invention, non-local graph convolution is performed on the candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size; the convolution result is fused with the candidate region feature map to obtain a target candidate region feature map; and target information is identified from the target candidate region feature map. In other words, by performing non-local graph convolution on all candidate region features, and then dynamically fusing the convolution result with the original features for enhancement, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0043] Figure 1 A schematic diagram of a flow chart of a method for detecting a target in a remote sensing image provided by an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of a target detection device in a remote sensing image provided by an embodiment of the present invention (I);
[0045] Figure 3 A schematic diagram of a target detection device in a remote sensing image provided by an embodiment of the present invention (II);
[0046] Figure 4 A schematic diagram of a target detection device in a remote sensing image provided by an embodiment of the present invention (III). DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0048] It should be noted that the terms "first", "second" and the like in the specification, claims and drawings of the present invention are used to distinguish different objects rather than to limit a specific order.
[0049] The embodiment of the present invention provides a method for detecting a target in a remote sensing image. Figure 1 A schematic flow chart of a method for detecting a target in a remote sensing image provided by an embodiment of the present invention.
[0050] Optionally, application scenarios of the embodiments of the present invention include but are not limited to:
[0051] Scenario 1: During border control, identify the category and location of each target in the collected control-related remote sensing images. Specifically, all candidate region features are subjected to non-local graph convolution, and then the convolution results are dynamically fused with the original features for enhancement. In this way, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0052] Scenario 2: In ecological protection, identify the category and location of each target in the collected ecologically related remote sensing images (e.g., mountains, rivers, etc.). Specifically, all candidate region features are subjected to non-local graph convolution, and then the convolution results are dynamically fused with the original features for enhancement. In this way, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0053] Scenario 3: In urban management, identify the category and location of each target in the collected remote sensing images (streets, buildings, etc.). Specifically, by performing non-local graph convolution on all candidate region features, and then dynamically fusing the convolution results with the original features for enhancement, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0054] like Figure 1 As shown, the target detection method in the remote sensing image provided by the embodiment of the present application includes the following steps:
[0055] S102, performing non-local graph convolution processing on the candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size;
[0056] Optionally, before performing non-local graph convolution processing on the candidate region feature map to obtain the convolution result, the method further includes: S11, adjusting the current network by the following formulas (1) to (3):
[0057]
[0058] in, is the gradient decoupling layer, formula (1) is the forward propagation process, is an affine transformation layer, formula (2) is the back propagation process, λ∈[0,1] is the decoupling coefficient, is the Jacobian matrix of the affine transformation layer, formula (3) is the prototype calibration module, s i is the bounding box confidence of the current network output, is the bounding box confidence obtained by calculating the cosine similarity of the prototype, α is a hyperparameter used for balancing, is the final confidence of the calibrated bounding box.
[0059] Through the above S11, the network structure is adjusted so that the adjusted network shows satisfactory performance in conventional images.
[0060] Optionally, in this embodiment, the non-local graph convolution processing is performed on the candidate region feature map to obtain the convolution result including:
[0061] S21, through the following three different convolution operators in formula (4) Process the candidate region feature map P:
[0062]
[0063] Among them, the convolution operator is a two-dimensional convolution, the convolution kernel size is k,
[0064] S22, construct the similarity matrix S between all candidate regions using the following formula (5):
[0065]
[0066] in,
[0067] S23, the feature dimension of Pg is increased to the same dimension as the candidate region feature map P by the convolution operator W in the following formula (6), thereby obtaining the convolution result P′:
[0068]
[0069] in, represents matrix multiplication, W is a two-dimensional convolution operator, and the convolution kernel size is k.
[0070] Through the above S21 to S23, non-local graph convolution is used to dynamically integrate all relevant semantic information in the entire image for enhancement.
[0071] S104, fusing the convolution result with the candidate region feature map to obtain a target candidate region feature map;
[0072] Optionally, fusing the convolution result with the candidate region feature map to obtain a target candidate region feature map includes:
[0073] S31, the linear layer using the linear rectification function ReLU as the activation function maps the P′ through the following formula (7), and the results of the feature dimension of the P′ are averaged to obtain the candidate region coefficient α:
[0074] α=mean(ReLU(FC(P″))) (7);
[0075] S32, by using the following formula (8), the P and the P′ are fused to obtain the feature map of the target candidate region:
[0076]
[0077] Among them, FC represents the linear layer, ⊙ represents element-wise multiplication, Represents element-wise addition.
[0078] Through the above S31 to S32, the convolution result is fused with the candidate region feature map, further achieving the technical effect of improving the discrimination ability and generalization ability of small sample target detection in remote sensing images.
[0079] S106, identifying target information from the target candidate region feature map.
[0080] Optionally, identifying target information from the target candidate region feature map includes:
[0081] S41, identifying the category and position of the target from the target candidate region feature map;
[0082] S42, setting the category and location of the target as the target information.
[0083] In an embodiment of the present invention, non-local graph convolution is performed on the candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size; the convolution result is fused with the candidate region feature map to obtain a target candidate region feature map; and target information is identified from the target candidate region feature map. In other words, by performing non-local graph convolution on all candidate region features, and then dynamically fusing the convolution result with the original features for enhancement, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0084] The present embodiment is described below with reference to specific examples.
[0085] This example proposes a non-local candidate region dynamic enhancement learning method for small-sample target detection in remote sensing images. It contains a new non-local dynamic enhancement module and uses it to enhance candidate region features before inference. Through this module, the candidate region features are recalculated with themselves using non-local graph convolution, and then the features dynamically generated based on the corresponding candidate region features are linearly fused with the convolution results at a specific ratio. In this way, the enhanced candidate region features can adaptively aggregate relevant semantic information in the entire image, thereby improving its discrimination and generalization capabilities for small-sample target detection.
[0086] The specific process is as follows:
[0087] 1. Data preprocessing
[0088] For a given training set It can be divided into base classes The data set is represented as and new class The data set is represented as in For the data in the dataset in is the input image, y={(c i ,b i ), i = 1…N} means that the input image x contains N objects, and for the i-th object, its category is c i , the bounding box coordinates are b i .
[0089] In addition, the input image x is subjected to random horizontal flipping and random cropping to enhance the generalization ability of the model.
[0090] 2. Model structure and initialization
[0091] The present invention adopts the standard two-stage Faster-R-CNN target detection architecture. In order to improve the generalization ability of the present invention, the gradient decoupling layer is used to decouple the region candidate network (RPN) and the region convolutional neural network (RCNN), and the prototype calibration module is used to decouple the optimization strategy of classification and regression tasks to adjust the network structure:
[0092]
[0093] in, is the gradient decoupling layer, and formula 1 is its forward propagation process. is an affine transformation layer. Formula 2 is its back propagation process, λ∈[0,1] is the decoupling coefficient, is the Jacobian matrix of the affine transformation layer. Formula 3 is the prototype calibration module, s i is the bounding box confidence output by the network, s is the bounding box confidence obtained by calculating the cosine similarity of the prototype, α is a hyperparameter used for balancing, is the final confidence of the calibrated bounding box. This strategy shows satisfactory performance in regular images.
[0094] In addition, in the standard Faster-R-CNN, we use the cosine similarity classifier instead of the original linear classifier. And use the weights obtained from the dataset training proposed in the literature "Lin, Tsung-Yi, et al." Microsoft coco: Common objects incontext." European conference on computer vision. 2014." to initialize the model parameters.
[0095] 3. Model Pre-training
[0096] Since there are only a few labeled data in the new class, directly using it to train the network will lead to overfitting of the model. The base class contains a large amount of labeled data, and the background of the base class has a high similarity with the new class, so the base class dataset is used first. Pre-train the model to better detect new classes. That is, pre-training the model is to solve the following optimization problem:
[0097]
[0098] in, is the loss of the region proposal network, is the loss of the regional convolutional neural network part, is the number of base class training samples, θ b ,θ rpn ,θ rcnn ,θ nde They respectively represent the parameters of the backbone network, the region candidate network, the regional convolutional neural network and the module proposed in the present invention.
[0099] 4. Model fine-tuning
[0100] After obtaining the training parameters of the base class, keep other parameters unchanged, randomly initialize the parameters of the classifier and regressor, and use them as the initialization parameters of the model for fine-tuning, and fix the parameters of the RCNN part during fine-tuning. When fine-tuning, create a and new class The training set is balanced in categories, that is, the number of targets in each category in the training set is the same. This data set is used to train the model, thereby improving the detection effect of new categories and achieving the purpose of small sample target detection. That is, model fine-tuning is to solve the following optimization problem:
[0101]
[0102] in, The number of training samples to create a class-balanced dataset.
[0103] 5. Training process
[0104] In the model pre-training and fine-tuning stage, the small sample target detection method of remote sensing images based on non-local candidate region dynamic reinforcement learning proposed in this invention is used for training. For the input image data, after each region of interest is pooled into a feature map of a fixed size through region of interest pooling (RoI pooling), the pooled candidate region feature map can be obtained. Where m, n represent the number and dimensions of the feature maps of the candidate regions in a given image, and a represents the spatial size of the feature map.
[0105] Since the original candidate region features have insufficient distinguishing and generalizing capabilities when the number of samples is small, the present invention uses non-local graph convolution to enhance all relevant semantic information in the entire image.
[0106] First, three different convolution operators ξ are used, g processes P:
[0107]
[0108] Among them, the convolution operator is a two-dimensional convolution, the convolution kernel size is k,
[0109] Then, use P ξ and These two feature maps construct the similarity matrix between all candidate regions Next, use S to perform matrix multiplication on the feature map P g To restore the dimension of the enhanced candidate region feature to the previous dimension, another convolution operator W is used to increase the feature dimension to the same dimension as P, thus obtaining P′:
[0110]
[0111] in represents matrix multiplication, W is also a two-dimensional convolution operator with a convolution kernel size of k.
[0112] By fusing the relevant semantic information of the entire image, all other candidate regions can be integrated into the processed candidate region features to enhance the discriminative power of the candidate region features for the target.
[0113] In order to obtain better performance, the enhanced features P′ are linearly fused dynamically using the candidate region-related coefficients obtained based on the original candidate region features P.
[0114] First, a linear layer with ReLU as activation function is applied to the averaged bounding box features. Mapping is performed, and then the results of its feature dimension are averaged to obtain the coefficient α related to the candidate region. Through this coefficient, the original candidate region feature P is further used to linearly fuse the enhanced candidate region feature P′, which can be expressed as:
[0115]
[0116] Where FC represents a linear layer, ⊙ represents element-wise multiplication, Represents element-wise addition. It is the final enhanced candidate region feature map, which will be input into the classifier and regressor for reasoning after pooling to obtain the final detection result.
[0117] In summary, since the original candidate region features have insufficient distinguishing and generalizing capabilities when the number of samples is small, all candidate region features are enhanced by performing non-local graph convolution and then dynamically fusing the convolution results with the original features. In this way, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby improving their distinguishability and generalization capabilities, and further improving the effect of small sample target detection in remote sensing images.
[0118] The embodiment of the present invention also provides a device for detecting a target in a remote sensing image. Figure 2 A schematic diagram of a target detection device in a remote sensing image provided by an embodiment of the present invention.
[0119] Optionally, application scenarios of the embodiments of the present invention include but are not limited to:
[0120] Scenario 1: During border control, identify the category and location of each target in the collected control-related remote sensing images. Specifically, all candidate region features are subjected to non-local graph convolution, and then the convolution results are dynamically fused with the original features for enhancement. In this way, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0121] Scenario 2: In ecological protection, identify the category and location of each target in the collected ecologically related remote sensing images (e.g., mountains, rivers, etc.). Specifically, all candidate region features are subjected to non-local graph convolution, and then the convolution results are dynamically fused with the original features for enhancement. In this way, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0122] Scenario 3: In urban management, identify the category and location of each target in the collected remote sensing images (streets, buildings, etc.). Specifically, by performing non-local graph convolution on all candidate region features, and then dynamically fusing the convolution results with the original features for enhancement, the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0123] like Figure 2 As shown, the device comprises:
[0124] A first acquisition module 22 is used to perform non-local graph convolution processing on the candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size;
[0125] A second acquisition module 24 is used to fuse the convolution result with the candidate region feature map to obtain a target candidate region feature map;
[0126] The identification module 26 is used to identify target information from the target candidate region feature map.
[0127] Alternatively, if Figure 3 As shown, the first acquisition module 22 includes:
[0128] The first processing unit 222 is used to use three different convolution operators in the following formula (4): Process the candidate region feature map P:
[0129]
[0130] Among them, the convolution operator is a two-dimensional convolution, the convolution kernel size is k,
[0131] The second processing unit 224 is used to construct a similarity matrix S between all candidate regions using the following formula (5):
[0132]
[0133] in,
[0134] The third processing unit 226 is used to increase the feature dimension of Pg to the same dimension as the candidate region feature map P through the convolution operator W in the following formula (6), thereby obtaining the convolution result P′:
[0135]
[0136] in, represents matrix multiplication, W is a two-dimensional convolution operator, and the convolution kernel size is k.
[0137] Through the above device, all relevant semantic information in the entire image is dynamically integrated using non-local graph convolution for enhancement.
[0138] Alternatively, if Figure 4 As shown, the second acquisition module 24 includes:
[0139] The first acquisition unit 242 is used to map the P′ through the linear layer using the linear rectification function ReLU as the activation function through the following formula (7), and average the results of the feature dimension of the P′ to obtain the candidate region coefficient α:
[0140]
[0141] The second acquisition unit 244 is used to fuse the P and the P′ through the following formula (8) to obtain the target candidate region feature map
[0142]
[0143] Among them, FC represents the linear layer, ⊙ represents element-wise multiplication, Represents element-wise addition.
[0144] Through the above device, the convolution result is fused with the candidate region feature map, further achieving the technical effect of improving the identification and generalization capabilities of small sample target detection in remote sensing images.
[0145] Optionally, the above device is further used to adjust the current network through the following formulas (1) to (3):
[0146]
[0147] in, is the gradient decoupling layer, formula (1) is the forward propagation process, is an affine transformation layer, formula (2) is the back propagation process, λ∈[0,1] is the decoupling coefficient, is the Jacobian matrix of the affine transformation layer, formula (3) is the prototype calibration module, s i is the bounding box confidence of the current network output, is the bounding box confidence obtained by calculating the cosine similarity of the prototype, α is a hyperparameter used for balancing, is the final confidence of the calibrated bounding box.
[0148] By adjusting the network structure as described above, the adjusted network shows satisfactory performance in conventional images.
[0149] Optionally, the above-mentioned device is also used to identify the category and position of the target from the target candidate area feature map; and set the category and position of the target as the target information.
[0150] In summary, non-local graph convolution is performed on the candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size; the convolution result is fused with the candidate region feature map to obtain a target candidate region feature map; and the target information is identified from the target candidate region feature map. In other words, non-local graph convolution is performed on all candidate region features, and then the convolution result is dynamically fused with the original feature for enhancement, so that the enhanced candidate region features can adaptively aggregate relevant semantic information from the entire image, thereby solving the technical problem of insufficient discrimination and generalization capabilities of small sample target detection in related technologies, and achieving the technical effect of improving the discrimination and generalization capabilities of small sample target detection in remote sensing images.
[0151] An embodiment of the present invention further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the steps of any one of the above methods.
[0152] An embodiment of the present invention further provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the steps of any of the above methods are implemented.
[0153] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.
Claims
1. A method for detecting a target in a remote sensing image, characterized in that: include: Performing non-local graph convolution processing on the candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size; including: By using three different convolution operators ξ in the following formula (4), g Process the candidate region feature map P: The convolution operator is a two-dimensional convolution, and the convolution kernel size is k. The similarity matrix S between all candidate regions is constructed by the following formula (5): in, The feature dimension of Pg is increased to the same dimension as the candidate region feature map P by the convolution operator W in the following formula (6), thereby obtaining the convolution result P′: in, represents matrix multiplication, W is a two-dimensional convolution operator, and the convolution kernel size is k; The convolution result is fused with the candidate region feature map to obtain a target candidate region feature map; comprising: The P′ is mapped by a linear layer using a linear rectification function ReLU as an activation function through the following formula (7), and the results of the feature dimensions of the P′ are averaged to obtain the candidate region coefficient α: α=mean(ReLU(FC(P″))) (7); The P and P′ are fused by the following formula (8) to obtain the target candidate region feature map: Among them, FC represents the linear layer, ⊙ represents element-wise multiplication, It means element-wise addition; Target information is identified from the target candidate region feature map.
2. The method according to claim 1, characterized in that Before performing non-local graph convolution processing on the candidate region feature map to obtain the convolution result, the method further includes: The current network is adjusted by the following formulas (1) to (3): in, is the gradient decoupling layer, formula (1) is the forward propagation process, is an affine transformation layer, formula (2) is the back propagation process, λ∈[0,1] is the decoupling coefficient, is the Jacobian matrix of the affine transformation layer, formula (3) is the prototype calibration module, s i is the bounding box confidence of the current network output, is the bounding box confidence obtained by calculating the cosine similarity of the prototype, α is a hyperparameter used for balancing, is the final confidence of the calibrated bounding box.
3. The method according to claim 1, characterized in that The identifying target information from the target candidate region feature map comprises: Identifying the category and location of the target from the target candidate region feature map; The category and location of the target are set as the target information.
4. A target detection device in a remote sensing image, characterized in that: include: The first acquisition module is used to perform non-local graph convolution processing on the candidate region feature map to obtain a convolution result, wherein the candidate region feature map is obtained after the current network pools multiple target regions in the remote sensing image into a feature map of a fixed size; including: By using three different convolution operators ξ in the following formula (4), g Process the candidate region feature map P: The convolution operator is a two-dimensional convolution, and the convolution kernel size is k. The similarity matrix S between all candidate regions is constructed by the following formula (5): in, The feature dimension of Pg is increased to the same dimension as the candidate region feature map P by the convolution operator W in the following formula (6), thereby obtaining the convolution result P′: in, represents matrix multiplication, W is a two-dimensional convolution operator, and the convolution kernel size is k; The second acquisition module is used to fuse the convolution result with the candidate region feature map to obtain a target candidate region feature map; including: The P′ is mapped by a linear layer using a linear rectification function ReLU as an activation function through the following formula (7), and the results of the feature dimensions of the P′ are averaged to obtain the candidate region coefficient α: α=mean(ReLU(FC(P″))) (7); The P and P′ are fused by the following formula (8) to obtain the target candidate region feature map: Among them, FC represents the linear layer, ⊙ represents element-wise multiplication, It means element-wise addition; The recognition module is used to recognize target information from the target candidate region feature map.
5. The device according to claim 4, characterized in that The second acquisition module includes: The first processing unit is used to use three different convolution operators ξ in the following formula (4): g Process the candidate region feature map P: The convolution operator is a two-dimensional convolution, and the convolution kernel size is k. The second processing unit is used to construct a similarity matrix S between all candidate regions using the following formula (5): in, The third processing unit is used to increase the feature dimension of the Pg to the same dimension as the candidate region feature map P through the convolution operator W in the following formula (6), thereby obtaining the convolution result P′: in, represents matrix multiplication, W is a two-dimensional convolution operator, and the convolution kernel size is k.
6. The device according to claim 5, characterized in that The second acquisition module includes: The first acquisition unit is used to map the P′ through the linear layer using the linear rectification function ReLU as the activation function through the following formula (7), and average the results of the feature dimension of the P′ to obtain the candidate region coefficient α: α=mean(ReLU(FC(P″))) (7); The second acquisition unit is used to fuse the P and P′ through the following formula (8) to obtain the target candidate region feature map Among them, FC represents the linear layer, ⊙ represents element-wise multiplication, Represents element-wise addition.
7. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the steps of any one of the methods described in claims 1-3.
8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of any one of the methods described in claims 1 to 3 are implemented.
