Space target detection and recognition method and device based on adaptive feature fusion
Through the adaptive feature fusion method, linear interpolation and attention mechanisms are used to process spatial target data, which solves the problem of low precision and accuracy of deep learning in spatial target detection, improves the accuracy and efficiency of recognition, and adapts to light and scale. change.
Patent Information
- Application Number
- CN202411026149.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing deep learning methods have low precision and accuracy in spatial target detection and recognition, mainly due to the reflection, blur, and excessive scale changes of imaging data caused by unstable lighting, fluctuations in sensor performance, and scarcity of samples, making it difficult to effectively classify and identify.
The adaptive feature fusion method is used to generate training sample images by performing linear interpolation processing on the preset image training set. It combines the convolution kernel, attention module and path aggregation network to perform convolution processing, attention weighting and feature fusion to generate an automatic Adapt the fused feature map to improve the robustness and generalization ability of the model.
It improves the accuracy and efficiency of spatial target detection and recognition, can better capture the multi-level characteristics of targets, enhances the adaptability to targets with uneven light and dark and large scale changes, and reduces missed detections.
Smart Images

Figure CN118552864B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for detecting and identifying space targets using adaptive feature fusion. Background Art
[0002] Space target detection and identification is an important prerequisite and technical guarantee for conducting space experiments and performing on-orbit services.
[0003] Space target data is difficult to classify and identify because it is affected by many factors. Instability of lighting conditions in space and fluctuations in sensor performance lead to reflections, dark light, and blur in the imaging data of space targets. The uncertainty of imaging distance further leads to large scale changes in space targets. In addition, due to the protection of data, space target data is not easy to obtain and samples are scarce.
[0004] Deep learning-based methods have good performance in terms of efficiency and accuracy, but most deep learning methods are only applicable to natural images and natural targets with sufficient data volume and good imaging conditions. The unique characteristics of space target data lead to the low accuracy and precision of deep learning methods in related technologies for the classification and identification of space targets. Summary of the invention
[0005] The present invention provides a method and device for space target detection and recognition with adaptive feature fusion, which are used to solve the defects of low precision and accuracy in classification and recognition of space targets by deep learning methods in the prior art, and to improve the accuracy of space target detection and recognition.
[0006] The present invention provides a spatial target detection and recognition method with adaptive feature fusion, comprising the following steps. Linear interpolation processing is performed on two training images in a preset image training set to obtain a training sample image; the training sample image is input into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network; wherein the inputting the training sample image into the preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network comprises: based on the convolution kernel of the preset deep learning neural network, convolution processing is performed on the training sample image to obtain a convolution output result; based on the convolution block attention module of the preset deep learning neural network, attention weighted processing is performed on the convolution output result to obtain an attention weighted feature image; based on the path aggregation network of the preset deep learning neural network, segmentation processing is performed on the attention weighted feature image to obtain feature images of different scales; based on the adaptive feature fusion network of the preset deep learning neural network, fusion processing is performed on the feature images of different scales to obtain an adaptive fusion feature image.
[0007] According to a method for space target detection and recognition with adaptive feature fusion provided by the present invention, linear interpolation processing is performed on two training images in a preset image training set to obtain a training sample image, including: acquiring a first training image and a second training image in the preset image training set; multiplying a preset interpolation coefficient by the image data of the first training image to obtain first sample image data; multiplying the difference between a constant 1 and the preset interpolation coefficient by the image data of the second training image to obtain second sample image data; and adding the first sample image data and the second sample image data to obtain image data of an enhanced training sample image.
[0008] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, the convolution output result is subjected to attention weighted processing to obtain an attention weighted feature map, including: performing channel attention processing on the convolution output result to obtain a channel attention feature map; performing spatial attention processing on the channel attention feature map to obtain a spatial attention feature map; multiplying the spatial attention feature map with the training sample map to obtain an attention weighted feature map, wherein the dimension of the attention weighted feature map is consistent with the dimension of the training sample map.
[0009] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, the channel attention processing is performed on the convolution output result to obtain a channel attention feature map, including: performing maximum pooling processing and average pooling processing based on the convolution output result to obtain a first channel feature map with a height and width of 1; performing channel scaling and restoration processing on the first channel feature map to obtain a second channel feature map; adding the first channel feature map and the second channel feature map element by element, and activating the result of the addition of the second channel feature map based on a preset activation function to obtain a third channel feature map; multiplying the third channel feature map with the training sample map to obtain a fourth channel feature map with the same dimension as the training sample map; and performing weighted summation on the fourth channel feature map and a preset channel weight to obtain a channel attention feature map.
[0010] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, the channel attention feature map is subjected to spatial attention processing to obtain a spatial attention feature map, including: activating the channel attention feature map based on a preset activation function to obtain a first spatial feature map; performing scaling processing based on the first spatial feature map to obtain a second spatial feature map; performing maximum pooling and average pooling processing based on the second spatial feature map to obtain two feature maps with a channel number of 1; concatenating and convolving the two feature maps with a channel number of 1 to obtain a third spatial feature map with a channel number of 1; and activating the third spatial feature map based on a preset activation function to obtain a spatial attention feature map.
[0011] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, the loss function of the preset deep learning neural network is a focal loss function.
[0012] The present invention also provides a spatial target detection and recognition device with adaptive feature fusion, comprising the following modules: a preprocessing module, used to perform linear interpolation processing on two training images in a preset image training set to obtain a training sample image; a neural network module, used to input the training sample image into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network; wherein, the inputting the training sample image into the preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network comprises: based on the convolution kernel of the preset deep learning neural network, performing convolution processing on the training sample image to obtain a convolution output result; based on the convolution block attention module of the preset deep learning neural network, performing attention weighted processing on the convolution output result to obtain an attention weighted feature image; based on the path aggregation network of the preset deep learning neural network, performing segmentation processing on the attention weighted feature image to obtain feature images of different scales; based on the adaptive feature fusion network of the preset deep learning neural network, performing fusion processing on the feature images of different scales to obtain an adaptive fusion feature image.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a spatial target detection and recognition method using adaptive feature fusion as described in any one of the above is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for adaptive feature fusion in detecting and identifying space targets.
[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for detecting and identifying space targets using adaptive feature fusion.
[0016] The spatial target detection and recognition method with adaptive feature fusion provided by the present invention obtains a training sample graph by performing linear interpolation processing on two random training images in a preset image training set, thereby being able to add more training samples to the model by means of linear interpolation of feature vectors, thereby improving the robustness and generalization ability of the model; inputting the training sample graph into a preset deep learning neural network to obtain an adaptive fusion feature graph output by the preset deep learning neural network, which includes: based on the convolution kernel of the preset deep learning neural network, convolution processing is performed on the training sample graph to obtain a convolution output result; based on the convolution kernel of the preset deep learning neural network The block attention module performs attention weighting processing on the convolution output results to obtain an attention weighted feature map. Therefore, the introduction of the attention mechanism can make the model pay more attention to the characteristics of the target and suppress the background and other interference factors, thereby improving the accuracy of detection; based on the preset path aggregation network of the deep learning neural network, the attention weighted feature map is segmented to obtain feature maps of different scales; based on the preset adaptive feature fusion network of the deep learning neural network, the feature maps of different scales are fused to obtain an adaptive fused feature map. Therefore, by effectively fusing the multi-scale feature maps, the model can better capture the multi-level features of the target. This solves the defect of low precision and accuracy of the deep learning method in the related technology for the classification and recognition of spatial targets. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flow chart of the space target detection and recognition method with adaptive feature fusion provided by the present invention.
[0019] Figure 2 It is a structural schematic diagram of the adaptive feature fusion network provided by the present invention.
[0020] Figure 3 It is a schematic diagram of the channel attention structure provided by the present invention.
[0021] Figure 4 It is a schematic diagram of the spatial attention structure provided by the present invention.
[0022] Figure 5 It is a structural schematic diagram of the space target detection and recognition device with adaptive feature fusion provided by the present invention.
[0023] Figure 6 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0025] In recent years, the world has carried out many space launches, successfully sending thousands of spacecraft and dozens of astronauts into the predetermined orbit. As competition in the space field continues to intensify, outer space is gradually becoming a new strategic high ground for competition. Human exploration of outer space has evolved from simple observation of space targets to all-round space information perception. Space target detection and recognition is an important prerequisite and technical guarantee for conducting space experiments and performing on-orbit services.
[0026] Since space target data is affected by many factors, it is difficult to classify and identify. The imaging of space targets is easily disturbed by complex imaging conditions such as illumination, deformation, space target posture, and imaging distance. The unstable illumination conditions in space and the fluctuation of sensor performance lead to reflection, dark light, and blur in the imaging data of space targets. The uncertainty of imaging distance further leads to excessive scale changes of space targets. In addition, due to the protection of data, space target data is not easy to obtain and samples are scarce. The unique characteristics of such space target data seriously affect the accuracy and precision of its classification and identification.
[0027] At present, there are two methods for detecting and identifying space satellite targets: one is based on traditional image processing or manual interpretation, using the Sobel edge detection algorithm (Sobel), Canny edge detection algorithm (Canny), Hough line detection operator, etc. in the visual library to extract the geometric characteristics of space satellite targets such as contours, rectangles, ellipses, and polygons. The other is a target detection and recognition algorithm based on deep learning, which sends the labeled data to the convolutional neural network for training, and obtains the optimal weight by continuously reducing the loss function value.
[0028] Traditional image processing methods bring manpower burden, reduce work efficiency and increase time consumption. The ability to process data and utilize information is far from enough compared to the massive amount of data; deep learning-based methods have good performance in efficiency and accuracy, but most deep learning methods are only applicable to natural images and natural targets with sufficient data and good imaging conditions, and lack in-depth understanding and exploration of problems such as uneven light brightness, large scale changes and scarce samples in spatial data.
[0029] Figure 1 FIG. 1 is a flow chart of the method for detecting and identifying space targets by adaptive feature fusion provided by the present invention. Figure 1 As shown, the method includes the following steps.
[0030] Step 101: Perform linear interpolation processing on two training images in a preset image training set to obtain a training sample image.
[0031] In an embodiment of the present invention, the input image is preprocessed to increase the diversity of the data set and prevent overfitting.
[0032] For example, linear interpolation processing is performed on any two training images in the preset image training set to obtain an enhanced training sample image.
[0033] Improve the robustness and generalization of the model by adding random transformations to the training data. For example, generate new images by linear interpolation. First, randomly select two images from the training set. Then, linear interpolation is performed on the images and then merged to get a new image.
[0034] For example, the input image is preprocessed by the Mixup operation, which is a data enhancement technique based on linear interpolation. It creates a new sample by linearly interpolating two different training samples, and the corresponding labels are also linearly interpolated.
[0035] According to the embodiment of the present invention, more training samples can be added to the model by means of linear interpolation of feature vectors, thereby improving the robustness and generalization ability of the model. At the same time, this method also reduces the occurrence of overfitting.
[0036] Step 102: input the training sample graph into a preset deep learning neural network to obtain an adaptive fusion feature graph output by the preset deep learning neural network.
[0037] Among them, the training sample graph is input into a preset deep learning neural network to obtain an adaptive fusion feature graph output by the preset deep learning neural network, which specifically includes the following steps.
[0038] Step 1021, based on the convolution kernel of the preset deep learning neural network, convolution processing is performed on the training sample image to obtain the convolution output result.
[0039] In the preset deep learning neural network, the convolution layer is the core part, which performs convolution operations on the input image through a set of trainable convolution kernels to obtain a set of feature maps. Each convolution kernel slides on the image, multiplies the pixel value of the covered area by the weight of the convolution kernel and sums them, and finally obtains a scalar as the response value of the convolution kernel at the current position, that is, the value of the corresponding pixel on the feature map.
[0040] In an embodiment of the present invention, the size of the convolution kernel can be adjusted according to the requirements of the task. A smaller convolution kernel (smaller than a preset convolution kernel threshold) can extract more local features, while a larger convolution kernel (larger than a preset convolution kernel threshold) can extract more global features. Generally, using multiple convolution kernels of different sizes can improve the performance of the network.
[0041] In an embodiment of the present invention, different levels of a preset deep learning neural network have different convolution kernels, and the spatial information is fused by performing a convolution operation on the original feature map (i.e., the training sample map) through the convolution kernel, and the channel information is fused by weighted summation of feature maps of different channels.
[0042] Step 1022, based on the convolution block attention module of the preset deep learning neural network, perform attention weighted processing on the convolution output result to obtain an attention weighted feature map.
[0043] In an embodiment of the present invention, an attention mechanism is introduced to improve the feature extraction expression capability. The attention module (convolutional block attention module) helps to extract more target information in the image and suppress irrelevant background information. By adding the attention module, the model can pay more attention to the target-related information in the data set and reduce the attention to other irrelevant information, thereby improving its detection capability and accuracy.
[0044] In an embodiment of the present invention, a convolutional block attention module (CBAM) can be used to improve the feature expression capability of the model. The CBAM mechanism is implemented through two modules, one is a channel attention module (CAM) and the other is a spatial attention module (SAM).
[0045] Different levels of deep learning neural networks have different convolution kernels. The convolution kernel is used to perform convolution operations on the original feature map to fuse spatial information, and the channel information is fused by weighted summation of feature maps of different channels. In order to retain more feature information during the information extraction process, the output results of the convolution layer in the network model are learned in sequence along the channel dimension and the spatial dimension. First, a weighted result is obtained through the channel attention module, and then this weighted result is input into the spatial attention module to obtain the final weighted result.
[0046] Step 1023, based on the path aggregation network of the preset deep learning neural network, the attention weighted feature map is segmented to obtain feature maps of different scales.
[0047] In an embodiment of the present invention, a path aggregation network (PANet) of a preset deep learning neural network is used to output feature maps of three fixed scales (sizes) of 20×20, 40×40, and 80×80, which are used to detect targets of different scales respectively.
[0048] Step 1024, based on the preset adaptive feature fusion network of the deep learning neural network, feature maps of different scales are fused to obtain an adaptive fused feature map.
[0049] In an embodiment of the present invention, the feature fusion network structure is a key component of the preset deep learning neural network, which determines the detection effect of the preset deep learning neural network. Its feature fusion is integrated into the feature pyramid structure, which effectively combines the semantic information of the deep network feature map and the position information of the shallow network feature map. In the feature pyramid structure, the deep network feature map with a small receptive field (less than the preset receptive field threshold) is suitable for detecting smaller targets, and the shallow network feature map with a large receptive field (greater than the preset receptive field threshold) is suitable for detecting larger targets.
[0050] It should be noted that the use of fixed-scale feature maps for detection has certain limitations. In the embodiment of the present invention, the feature maps of different network depths are used as input to adaptively learn feature maps of three scales (i.e., feature maps of different scales, for example, the three fixed-scale feature maps of 20×20, 40×40, and 80×80 mentioned above) through an adaptive feature fusion network (ASFF). The importance of the weight ratio in the process is adjusted by using a pooling strategy, and the feature layer with a lower weight ratio is directly filtered. Then, the feature layer with a higher weight ratio is averagely pooled and fused. The fused features are convolutionally enhanced and finally classified and output.
[0051] refer to Figure 2 , Figure 2It is a structural schematic diagram of the adaptive feature fusion network provided by the present invention. As shown in the figure, level 1 (Level1), level 2 (Level2), level 3 (Level3) and adaptive feature fusion network 1 (ASFF-1), adaptive feature fusion network 2 (ASFF-2), and adaptive feature fusion network 3 (ASFF-3) are fully connected. During fusion, the feature map is scaled to keep the scale (size) consistent, thereby outputting three yolo heads respectively, wherein the yolo head is used for feature extraction and prediction in object detection tasks, including extracting high-level features on the input image, and using these features to predict the position and category of objects appearing in the image.
[0052] In the embodiment of the present invention, the feature maps of three different scales are the outputs when the stride is 32, 16, and 8, respectively. When fused, they need to be scaled to keep the size and number of channels of the feature maps consistent. A 1×1 convolution kernel is used to increase the number of channels, and an interpolation method is used to improve the resolution. A 3×3 convolution kernel and maximum pooling are used to reduce the number of channels and resolution.
[0053] In the embodiment of the present invention, by They represent weight maps of the same size as the three feature maps. Each weight map is multiplied point by point with its input to determine the activation and inhibition of each pixel in the input feature map. After point-by-point multiplication, the three input values are added to obtain ASFF-L, which is convolved with 1×1 to obtain ASFF-1, ASFF-2, and ASFF-3 results, which are input to the next detection module. The adaptive feature fusion formula can refer to the following formula (1):
[0054] (1)
[0055] in, Indicates The adaptive fusion feature map of the layer, From the 1st layer to the The training sample graph of the layer (by training images and training images by linear interpolation), Indicates that from the 2nd layer to the The training sample graph of the layer, Indicates that from the 3rd layer to the The training sample graph of the layer, , They respectively represent weight graphs with the same size as the above three training sample graphs.
[0056] Through the above steps of the embodiment of the present invention, two training images in the preset image training set are subjected to linear interpolation processing to obtain a training sample image; the training sample image is input into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network; wherein, the training sample image is input into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network, including: based on the convolution kernel of the preset deep learning neural network, the training sample image is subjected to convolution processing to obtain a convolution output result; based on the convolution block attention module of the preset deep learning neural network, the convolution output result is subjected to attention weighting processing to obtain an attention weighted feature image; based on the path aggregation network of the preset deep learning neural network, the attention weighted feature image is subjected to segmentation processing to obtain feature images of different scales; based on the adaptive feature fusion network of the preset deep learning neural network, the feature images of different scales are subjected to fusion processing to obtain an adaptive fusion feature image. The model can better capture the multi-level features of the target. Thus, the defects of low precision and accuracy of the deep learning method in the prior art for the classification and recognition of spatial targets are solved.
[0057] According to a method for space target detection and recognition with adaptive feature fusion provided by the present invention, linear interpolation processing is performed on two training images in a preset image training set to obtain a training sample image, which specifically includes the following steps.
[0058] Step 201: Acquire a first training image and a second training image in a preset image training set.
[0059] Step 202: multiply the preset interpolation coefficient by the image data of the first training image to obtain first sample image data.
[0060] Step 203: multiply the difference between the constant 1 and the preset interpolation coefficient by the image data of the second training image to obtain second sample image data.
[0061] Step 204: Add the first sample image data and the second sample image data to obtain enhanced image data of the training sample image.
[0062] In the embodiment of the present invention, first, two images are randomly (arbitrarily) selected from the training set. Then, the images are linearly interpolated and merged to obtain a new image (image data of the enhanced training sample image), which can be referred to in the following formula (2).
[0063] (2)
[0064] in, represents the image data of the enhanced training sample graph, Represents the preset interpolation coefficient, image data representing a first training image, Represents the difference between the constant 1 and the preset interpolation coefficient. Image data representing a second training image.
[0065] In the embodiment of the present invention, μ represents the interpolation coefficient, wherein the interpolation coefficient can be randomly generated by Beta distribution. The larger the μ is, the closer the new image (enhanced training sample image) is to the first image, and vice versa. The new image is used as a training sample and sent to the network for training. MixUp can make the model more generalized, because model learning needs to make a smooth transition between the two image features, and more accurately locate the target appearing in the new image.
[0066] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, attention weighted processing is performed on the convolution output result to obtain an attention weighted feature map, which specifically includes the following steps.
[0067] Step 301, perform channel attention processing on the convolution output result to obtain a channel attention feature map.
[0068] Step 302, perform spatial attention processing on the channel attention feature map to obtain a spatial attention feature map.
[0069] Step 303, multiplying the spatial attention feature map with the training sample map to obtain an attention weighted feature map, wherein the dimension of the attention weighted feature map is consistent with the dimension of the training sample map.
[0070] In an embodiment of the present invention, the convolution block attention module (used to improve the feature expression ability of the model) of the preset deep learning neural network includes a channel attention module and a spatial attention module; different levels of the preset deep learning neural network have different convolution kernels, and the original feature map is convolved by the convolution kernel to fuse the spatial information, and the channel information is fused by weighted summation of the feature maps of different channels. In order to retain more feature information during the information extraction process, the output results of the convolution layer in the network model are learned in sequence along the channel dimension and the spatial dimension. First, a weighted result is obtained by the channel attention module, and then the weighted result is input into the spatial attention module to obtain the final weighted result. Finally, the output final weighted result is multiplied by the original input feature map (training sample map) to obtain an attention weighted feature map consistent with the dimension of the training sample map.
[0071] Through the embodiments of the present invention, the convolution block attention module helps to extract more target information in the image and suppress irrelevant background information. By adding the attention module, the model can pay more attention to the target-related information in the data set and reduce the attention to other irrelevant information, thereby improving its detection capability and accuracy.
[0072] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, channel attention processing is performed on the convolution output result to obtain a channel attention feature map, which specifically includes the following steps.
[0073] Step 401, performing maximum pooling processing and average pooling processing based on the convolution output result to obtain a first channel feature map with a height and width of 1.
[0074] Step 402: Perform channel scaling and restoration processing on the first channel feature map to obtain a second channel feature map.
[0075] Step 403, adding the first channel feature map and the second channel feature map element by element, and activating the addition result based on a preset activation function to obtain a third channel feature map.
[0076] Step 404: multiply the third channel feature map by the training sample map to obtain a fourth channel feature map having the same dimension as the training sample map.
[0077] Step 405, performing weighted summation on the fourth channel feature map and the preset channel weight to obtain a channel attention feature map.
[0078] In an embodiment of the present invention, a convolutional block attention module (CBAM) is added after each depthwise separable convolution (DW Conv) in the backbone part of a preset deep neural network model (a pre-trained neural network structure, which is used to extract features from input data).
[0079] For each added CBAM module, channel attention processing is performed first. The input feature map first passes through two parallel maximum pooling layers and average pooling layers to change the dimension of the feature map from C×H×W to C×1×1, and then passes through the MLP module to compress the number of channels to 1 / γ times the original (γ is used to indicate the compression rate or reduction rate), and then expands to the original number of channels through the ReLU activation function. The two output results are added element by element, and then a sigmoid activation function is used to obtain the output result of the attention channel (Channel Attention), and then this output result is multiplied by the original image to return to the size of C×H×W. That is, for each channel of this layer, a weight is calculated. The larger the weight, the greater the contribution of the channel to the target information on the feature map at that position. Here, two fully connected layers can be used to learn the weight corresponding to each channel, and then the feature map is subjected to dot multiplication and weighted summation to obtain the weighted feature map. The calculation formula is as follows:
[0080]
[0081] in, represents the weighted feature map (channel attention feature map), represents the activation function (for example, Sigmoid function or ReLU function, etc.), represents a multi-layer perceptron, represents average pooling, represents the maximum pooling, represents the input feature map, , represents the preset weight, represents the average pooled feature map of the output, Represents the output maximum pooled feature map.
[0082] refer to Figure 3 , Figure 3 It is a schematic diagram of the channel attention structure provided by the present invention, which includes an input feature (Input Feature) with a dimension of C×H×W, a parallel maximum pooling layer (Max Pool) and an average pooling layer (Avg Pool), a multi-layer perceptron (MLP), a parallel maximum pooling layer and an average pooling layer, an activation function (Sigmoid), and an output feature (Mc) with a dimension of C×1×1.
[0083] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, spatial attention processing is performed on a channel attention feature map to obtain a spatial attention feature map, which specifically includes the following steps.
[0084] Step 501, activate the channel attention feature map based on a preset activation function to obtain a first spatial feature map.
[0085] Step 502: Perform scaling processing based on the first spatial feature map to obtain a second spatial feature map.
[0086] Step 503: Perform maximum pooling and average pooling processing based on the second spatial feature map to obtain two feature maps with a channel number of 1.
[0087] Step 504, concatenate and convolve the two feature maps with a channel number of 1 to obtain a third spatial feature map with a channel number of 1.
[0088] Step 505: Activate the third spatial feature map based on a preset activation function to obtain a spatial attention feature map.
[0089] In an embodiment of the present invention, spatial attention processing is then performed on the channel attention feature map, and spatial attention is enhanced on the channel attention feature map (weighted feature map) through a spatial attention module.
[0090] In an embodiment of the present invention, the spatial attention module (structure) is usually composed of a convolution layer and an activation function (for example, a Sigmoid function), and the input feature map is scaled proportionally according to the output of the sigmoid function. Finally, the weighted and scaled feature map is sent to the next layer of the network for further processing. The output result of the attention channel (ChannelAttention) is subjected to maximum pooling and average pooling to obtain two 1×H×W feature maps, and then the two feature maps are concatenated through a Concat operation, and the number of channels of the feature map is changed to 1 through a 7×7 convolution, and then an activation function (sigmoid) is used to obtain a spatial attention (Spatial Attention) feature map, and finally the output result is multiplied by the original input feature map to return to the size of C×H×W. For details, please refer to the following formula (4):
[0091]
[0092] in, represents the spatial attention feature map, represents the activation function (for example, Sigmoid function or ReLU function, etc.), Indicates that the 7×7 convolution kernel is used to further extract and fuse features. represents average pooling, represents the maximum pooling, represents the input feature map, represents the average pooled feature map of the output, Represents the output maximum pooled feature map.
[0093] refer to Figure 4 , Figure 4 It is a schematic diagram of the spatial attention structure provided by the present invention, which includes an input feature (Input Feature) with a dimension of C×H×W, a maximum pooling layer (Max Pool), a convolutional layer (Conv), a minimum pooling layer (AvgPool), an activation function (Sigmoid), and an output feature (Ms) with a dimension of 1×H×W.
[0094] According to a spatial target detection and recognition method with adaptive feature fusion provided by the present invention, a preset loss function of the deep learning neural network is a focal loss function.
[0095] The loss function of the mainstream model mainly includes three parts: the border loss function, the category loss function, and the confidence loss function. In order to solve the problem of sample imbalance, the present invention introduces the focal loss function. In spatial object detection, missed detection is a very serious matter because it may lead to misjudgment of the spatial situation. In the embodiment of the present invention, the focal loss function is used to reduce the occurrence of missed detection.
[0096] Focal Loss is a loss function used to deal with class imbalance, generally used in target detection or classification tasks. Based on the original cross entropy loss function, Focal Loss dynamically adjusts the weight of the standard cross entropy loss function to make the model pay more attention to samples that are difficult to classify. For each predicted box, calculate its Focal Loss. The formula is as follows:
[0097]
[0098] in, represents the focal loss function, Indicates that the balance factor is used to solve the problem of class imbalance. represents the predicted probability of the sample, Represents the focusing parameter used to adjust the weights of difficult and easy samples.
[0099] By using the Focal Loss loss function, the model can pay more attention to samples that are difficult to classify, improve the model's ability to identify complex or rare targets, and reduce missed detections. In addition, Focal Loss also has a certain degree of anti-interference. In the presence of noise or occlusion, the penalty for samples that are easy to detect is small, thereby improving the robustness of the model.
[0100] In the embodiment of the present invention, the feature extraction network in the preset deep neural network model may adopt CSPResNet-50 feature extraction network, CSPDarknet53 feature extraction network, etc. Other feature fusion networks such as PANet structure may also be used to replace the ASFF adaptive feature fusion network.
[0101] In actual application scenarios, space target detection and recognition is a key technology for conducting space experiments and performing on-orbit services in the aerospace field. Accurately identifying and locating the types of space targets and their components (such as solar panels, antennas, star sensors, and spacecraft bodies) is crucial for the successful execution of space docking, space teleoperation, and other tasks, and is an important prerequisite and technical guarantee for conducting space experiments and performing on-orbit services.
[0102] The method of the present invention can be widely used in the field of detection and identification of space targets and their components, such as on-orbit service, space target observation, etc., and is of great significance for improving the accuracy and effect of space data application.
[0103] This invention combines the in-depth understanding of space target data and the excellent performance of deep learning methods in target detection tasks, aiming to explore new methods for space target detection tasks. In view of the problems of uneven light, large scale changes and scarce samples shown by space targets, this paper adopts MixUp data enhancement technology to effectively increase training samples to solve the problem of scarce space target samples, and proposes an improved adaptive feature fusion technology to fuse the multi-scale information of space targets to improve the model's adaptability to targets with large scale changes. At the same time, in view of the problem of uneven light of space targets, this paper uses the improved CBAM attention mechanism to enhance the space target features from the level of semantic information, learns space target features with richer semantic information, and thus improves the recognition ability of fuzzy space targets. This invention optimizes the attention mechanism, adaptive feature fusion network, and loss function modules, and uses the satellite model simulation image data set to be divided into training set, verification set and test set according to a certain ratio for training and detection, which can well complete the accurate detection and recognition of space targets and their components.
[0104] Through the embodiments of the present invention, the introduction of the attention mechanism can effectively improve the attention of the target component, so that the model pays more attention to the characteristics of the target component and suppresses the background and other interference factors, thereby improving the accuracy of detection; through the adaptive feature fusion strategy, the multi-scale feature maps are effectively fused to extract richer target component expression capabilities, so that the model can better capture the multi-level features of the target component, thereby enhancing the feature expression capabilities; the optimized feature extraction and fusion strategy can improve the efficiency of the algorithm, reduce redundant calculations and parameter amounts, and improve the speed and efficiency of detection.
[0105] The space target detection and recognition device with adaptive feature fusion provided by the present invention is described below. The space target detection and recognition device with adaptive feature fusion described below and the space target detection and recognition method with adaptive feature fusion described above can be referred to each other.
[0106] refer to Figure 5 , Figure 5 It is a structural schematic diagram of a spatial target detection and recognition device with adaptive feature fusion provided by the present invention, including a preprocessing module 501 and a neural network module 502, wherein the preprocessing module 501 is used to perform linear interpolation processing on two training images in a preset image training set to obtain a training sample image; the neural network module 502 is used to input the training sample image into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network; wherein the training sample image is input into the preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network, including: based on the convolution kernel of the preset deep learning neural network, convolution processing is performed on the training sample image to obtain a convolution output result; based on the convolution block attention module of the preset deep learning neural network, attention weighted processing is performed on the convolution output result to obtain an attention weighted feature image; based on the path aggregation network of the preset deep learning neural network, the attention weighted feature image is segmented to obtain feature images of different scales; based on the adaptive feature fusion network of the preset deep learning neural network, feature images of different scales are fused to obtain an adaptive fusion feature image.
[0107] Specifically, the above-mentioned adaptive feature fusion space target detection and recognition device provided by the present invention can implement all the method steps implemented by the above-mentioned adaptive feature fusion space target detection and recognition method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0108] Figure 6 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 6As shown, the electronic device may include: a processor (processor) 610 , a communication interface (Communications Interface) 620 , a memory (memory) 630 and a communication bus 640 , wherein the processor 610 , the communication interface 620 , and the memory 630 communicate with each other through the communication bus 640 . The processor 610 can call the logic instructions in the memory 630 to execute the spatial target detection and recognition method with adaptive feature fusion, which includes: performing linear interpolation processing on two training images in a preset image training set to obtain a training sample image; inputting the training sample image into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network; wherein, inputting the training sample image into the preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network includes: based on the convolution kernel of the preset deep learning neural network, performing convolution processing on the training sample image to obtain a convolution output result; based on the convolution block attention module of the preset deep learning neural network, performing attention weighted processing on the convolution output result to obtain an attention weighted feature image; based on the path aggregation network of the preset deep learning neural network, performing segmentation processing on the attention weighted feature image to obtain feature images of different scales; based on the adaptive feature fusion network of the preset deep learning neural network, performing fusion processing on feature images of different scales to obtain an adaptive fusion feature image.
[0109] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0110] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the spatial target detection and recognition method with adaptive feature fusion provided by the above methods, which method includes: performing linear interpolation processing on two training images in a preset image training set to obtain a training sample image; inputting the training sample image into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network; wherein, inputting the training sample image into the preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network includes: based on the convolution kernel of the preset deep learning neural network, convolution processing is performed on the training sample image to obtain a convolution output result; based on the convolution block attention module of the preset deep learning neural network, attention weighted processing is performed on the convolution output result to obtain an attention weighted feature image; based on the path aggregation network of the preset deep learning neural network, the attention weighted feature image is segmented to obtain feature images of different scales; based on the adaptive feature fusion network of the preset deep learning neural network, feature images of different scales are fused to obtain an adaptive fusion feature image.
[0111] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the spatial target detection and recognition method with adaptive feature fusion provided by the above-mentioned methods, the method comprising: performing linear interpolation processing on two training images in a preset image training set to obtain a training sample image; inputting the training sample image into a preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network; wherein, inputting the training sample image into the preset deep learning neural network to obtain an adaptive fusion feature image output by the preset deep learning neural network comprises: performing convolution processing on the training sample image based on the convolution kernel of the preset deep learning neural network to obtain a convolution output result; performing attention weighted processing on the convolution output result based on the convolution block attention module of the preset deep learning neural network to obtain an attention weighted feature image; performing segmentation processing on the attention weighted feature image based on the path aggregation network of the preset deep learning neural network to obtain feature images of different scales; performing fusion processing on feature images of different scales based on the adaptive feature fusion network of the preset deep learning neural network to obtain an adaptive fusion feature image.
[0112] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A space target detection and recognition method based on adaptive feature fusion, characterized in that: include: Perform linear interpolation processing on two training images in the preset image training set to obtain a training sample image; Inputting the training sample graph into a preset deep learning neural network to obtain an adaptive fusion feature graph output by the preset deep learning neural network; The step of inputting the training sample graph into a preset deep learning neural network to obtain an adaptive fusion feature graph output by the preset deep learning neural network includes: Based on the convolution kernel of the preset deep learning neural network, the training sample graph is convolved to obtain a convolution output result; Based on the convolution block attention module of the preset deep learning neural network, the convolution output result is subjected to attention weighting processing to obtain an attention weighted feature map; Based on the path aggregation network of the preset deep learning neural network, the attention weighted feature map is segmented to obtain feature maps of different scales; Based on the adaptive feature fusion network of the preset deep learning neural network, the feature maps of different scales are fused to obtain an adaptive fused feature map.
2. The method for space target detection and recognition based on adaptive feature fusion according to claim 1, characterized in that: The linear interpolation process is performed on two training images in the preset image training set to obtain a training sample image, including: Acquire a first training image and a second training image in a preset image training set; Multiplying a preset interpolation coefficient by the image data of the first training image to obtain first sample image data; Multiplying the difference between the constant 1 and the preset interpolation coefficient by the image data of the second training image to obtain second sample image data; The first sample image data and the second sample image data are added to obtain enhanced image data of the training sample image.
3. The method for space target detection and recognition based on adaptive feature fusion according to claim 1, characterized in that: The step of performing attention weighted processing on the convolution output result to obtain an attention weighted feature map includes: Performing channel attention processing on the convolution output result to obtain a channel attention feature map; Performing spatial attention processing on the channel attention feature map to obtain a spatial attention feature map; The spatial attention feature map is multiplied by the training sample map to obtain an attention weighted feature map, wherein the dimension of the attention weighted feature map is consistent with the dimension of the training sample map.
4. The method for space target detection and recognition based on adaptive feature fusion according to claim 3, characterized in that: The performing channel attention processing on the convolution output result to obtain a channel attention feature map includes: Based on the convolution output result, maximum pooling processing and average pooling processing are performed to obtain a first channel feature map with a height and a width of 1; Performing channel scaling and restoration processing on the first channel feature map to obtain a second channel feature map; Adding the first channel feature map and the second channel feature map element by element, and performing activation processing on the addition result based on a preset activation function to obtain a third channel feature map; Multiplying the third channel feature map by the training sample map to obtain a fourth channel feature map having the same dimension as the training sample map; The fourth channel feature map is weighted and summed with the preset channel weight to obtain a channel attention feature map.
5. The method for space target detection and recognition based on adaptive feature fusion according to claim 3, characterized in that: The performing spatial attention processing on the channel attention feature map to obtain the spatial attention feature map includes: Activate the channel attention feature map based on a preset activation function to obtain a first spatial feature map; Performing scaling processing based on the first spatial feature map to obtain a second spatial feature map; Performing maximum pooling and average pooling processing based on the second spatial feature map to obtain two feature maps with a channel number of 1; The two feature maps with a channel number of 1 are concatenated and convolved to obtain a third spatial feature map with a channel number of 1; The third spatial feature map is activated based on a preset activation function to obtain a spatial attention feature map.
6. The method for space target detection and recognition based on adaptive feature fusion according to claim 1, characterized in that: The loss function of the preset deep learning neural network is a focal loss function.
7. A space target detection and recognition device with adaptive feature fusion, characterized in that: Included: A preprocessing module is used to perform linear interpolation processing on two training images in a preset image training set to obtain a training sample image; A neural network module is used to input the training sample graph into a preset deep learning neural network to obtain an adaptive fusion feature graph output by the preset deep learning neural network; wherein, the inputting the training sample graph into the preset deep learning neural network to obtain an adaptive fusion feature graph output by the preset deep learning neural network includes: based on the convolution kernel of the preset deep learning neural network, convolution processing is performed on the training sample graph to obtain a convolution output result; based on the convolution block attention module of the preset deep learning neural network, attention weighted processing is performed on the convolution output result to obtain an attention weighted feature graph; based on the path aggregation network of the preset deep learning neural network, segmentation processing is performed on the attention weighted feature graph to obtain feature graphs of different scales; based on the adaptive feature fusion network of the preset deep learning neural network, fusion processing is performed on the feature graphs of different scales to obtain an adaptive fusion feature graph.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the space target detection and recognition method with adaptive feature fusion as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the space target detection and recognition method with adaptive feature fusion as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the space target detection and recognition method with adaptive feature fusion as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
A lightweight object detection method based on multiple receptive fields and attention feature pyramids
CN114937151A
Multi-scale remote sensing image target detection method based on enhanced small target feature extraction
CN117809200A
