Small target detection method and device, equipment and storage medium
By introducing the large convolution kernel hybrid domain attention mechanism module based on LSKNet and the MLLA attention mechanism module in the YOLOv8 model, the remote sensing image is extracted in multi-scale spatial context features, solving the problem of low efficiency and accuracy of small object detection in remote sensing images, and achieving efficient and accurate small object detection.
Patent Information
- Application Number
- CN202411839259.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-13
AI Technical Summary
When detecting small objects in remote sensing images, the prior art has problems such as low detection efficiency and low detection accuracy.
Using a small object detection model based on YOLOv8, multiple large convolution kernel hybrid domain attention mechanism modules based on LSKNet are introduced to extract multi-scale spatial context features of remote sensing images, and the initial detection model parameters are updated to improve detection performance through feature fusion and MLLA attention mechanism modules.
It effectively improves the detection efficiency and detection accuracy of small objects in remote sensing images, and can better capture and utilize the spatial context information of remote sensing images, and is suitable for the detection of complex scenes and rotating small objects.
Smart Images

Figure CN119851149A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of target detection technology, and in particular to a small target detection method, device, equipment and storage medium. Background Art
[0002] With the rapid development of remote sensing technology, high-resolution remote sensing images have shown great application potential in many fields such as environmental monitoring, urban planning, disaster assessment, etc. Given that small targets in remote sensing images, especially rotating small targets, usually have characteristics such as variable scales, complex shapes, dense distribution, and strong background interference, small target detection in remote sensing images is still a major challenge in the field of computer vision.
[0003] However, considering that traditional target detection algorithms often have problems such as low detection efficiency and low detection accuracy when detecting small targets in remote sensing images, how to efficiently and accurately detect small targets in remote sensing images is a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0004] The present application provides a small target detection method, device, equipment and storage medium to solve the defects in the prior art of how to efficiently and accurately detect small targets in remote sensing images, thereby improving the detection efficiency and detection accuracy of small targets in remote sensing images.
[0005] The present application provides a small target detection method, comprising: Acquire a target remote sensing image to be processed, wherein the target remote sensing image includes a small target to be detected; Inputting the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; Among them, the small target detection model is based on YOLOv8, which introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features of remote sensing images in the training data set, and trains the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
[0006] According to a small target detection method provided by the present application, the initial small target detection model includes an initial feature extraction module and three LSKNet-based large convolution kernel mixed domain attention mechanism modules connected in series, a feature fusion module connected to the three LSKNet-based large convolution kernel mixed domain attention mechanism modules, and a first MLLA attention mechanism module, a second MLLA attention mechanism module and a third MLLA attention mechanism module connected to the feature fusion module; The small target detection model is trained based on the following method: Inputting the remote sensing image into the initial feature extraction module, and extracting initial features of the remote sensing image through the initial feature extraction module; Inputting the initial features into a first LSKNet-based large convolution kernel mixed domain attention mechanism module, and obtaining a first scale space context feature through the first LSKNet-based large convolution kernel mixed domain attention mechanism module; Based on the first scale space context feature and the second LSKNet-based large convolution kernel mixed domain attention mechanism module, a second scale space context feature is obtained; Based on the second scale space context feature and the third LSKNet-based large convolution kernel mixed domain attention mechanism module, a third scale space context feature is obtained; Inputting the first scale space context feature, the second scale space context feature and the third scale space context feature into the feature fusion module, and obtaining the corresponding first scale splicing feature, second scale splicing feature and third scale splicing feature through the feature fusion module; Inputting the first-scale splicing feature into the first MLLA attention mechanism module to obtain a first-scale key feature, inputting the second-scale splicing feature into the second MLLA attention mechanism module to obtain a second-scale key feature, and inputting the third-scale splicing feature into the third MLLA attention mechanism module to obtain a third-scale key feature; Based on the first scale key feature, the second scale key feature, the third scale key feature and the detection result label, the model parameters of the initial small target detection model are updated to obtain the small target detection model.
[0007] According to a small target detection method provided by the present application, the first LSKNet-based large convolution kernel mixed domain attention mechanism module is sequentially connected with a convolution layer and a conversion layer; The second scale space context feature is obtained based on the first scale space context feature and the second large convolution kernel mixed domain attention mechanism module based on LSKNet, including: Inputting the first scale-space context feature into the convolution layer, and outputting the convolution scale-space context feature through the convolution layer; Inputting the convolutional scale-space context feature into the conversion layer, and outputting the conversion scale-space context feature through the conversion layer; The converted scale-space context feature is input into the second LSKNet-based large convolution kernel mixed-domain attention mechanism module, and the second scale-space context feature is obtained through the second LSKNet-based large convolution kernel mixed-domain attention mechanism module.
[0008] According to a small target detection method provided by the present application, the first LSKNet-based large convolution kernel mixed domain attention mechanism module includes a plurality of depth-separable convolution layers connected in series and a spatial selection layer connected to the plurality of depth-separable convolution layers; The step of inputting the initial features into a first LSKNet-based large convolution kernel mixed domain attention mechanism module, and obtaining a first scale space context feature through the first LSKNet-based large convolution kernel mixed domain attention mechanism module, includes: Inputting the initial features into a plurality of depth-wise separable convolutional layers in sequence, and outputting corresponding depth-wise separable convolutional features through the plurality of depth-wise separable convolutional layers respectively; A plurality of depth-wise convolutionally separable features are input into the spatial selection layer, and the first-scale spatial context feature is output through the spatial selection layer.
[0009] According to a small target detection method provided by the present application, the multiple depth-convolutionally separable features are input into the space selection layer, and the first-scale space context feature is output through the space selection layer, including: Inputting a plurality of depth-wise convolutional separable features into the spatial selection layer, and performing splicing processing on the plurality of depth-wise convolutional separable features through the spatial selection layer to obtain a depth-wise convolutional separable splicing feature; Based on the average pooling and the maximum pooling of the channel, the depth-convolutional separable splicing features are respectively pooled to obtain the average pooling spatial feature description and the maximum pooling spatial feature description; Converting the concatenated features of the average pooling spatial feature description and the maximum pooling spatial feature description to obtain multiple spatial attention maps; Based on the spatial selection mask corresponding to each of the spatial attention maps, the multiple spatial attention maps are weightedly fused to obtain an attention feature; wherein the spatial selection mask corresponding to the spatial attention map is used to characterize the importance of the spatial area corresponding to the spatial attention map in the remote sensing image; The attention feature is multiplied element-wise by the initial feature to obtain the first scale-space context feature.
[0010] According to a small target detection method provided by the present application, the updating of the model parameters of the initial small target detection model based on the first scale key feature, the second scale key feature, the third scale key feature and the detection result label includes: Determining a first detection result of the initial small target detection model for the remote sensing image based on the first scale key feature, the second scale key feature, and the third scale key feature; Obtaining a second detection result of the teacher model for the remote sensing image; Determine a first KL divergence corresponding to the first activation map based on a first activation map of a specific channel of the second detection result of the teacher model, and determine a second KL divergence corresponding to the second activation map based on a second activation map of the specific channel of the first detection result of the initial small target detection model; Based on the difference between the first detection result and the detection result label, the first KL divergence, and the second KL divergence, the model parameters of the initial small target detection model are updated.
[0011] The present application also provides a small target detection device, including: An acquisition unit, used for acquiring a target remote sensing image to be processed, wherein the target remote sensing image includes a small target to be detected; A detection unit, used for inputting the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; Among them, the small target detection model is based on YOLOv8, which introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features of remote sensing images in the training data set, and trains the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
[0012] The present application 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 computer program, a small target detection method as described above is implemented.
[0013] The present application also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the small target detection method as described in any one of the above is implemented.
[0014] The present application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the small target detection method as described above is implemented.
[0015] The small target detection method, apparatus, equipment and storage medium provided in the present application can first obtain a target remote sensing image to be processed when performing small target detection, wherein the target remote sensing image includes a small target to be detected; the target remote sensing image is input into a small target detection model to obtain a detection result of the small target output by the small target detection model; wherein the small target detection model is based on YOLOv8 and introduces multiple LSKNet-based large convolution kernel mixed domain attention mechanism modules to extract multi-scale spatial context features from the remote sensing images in the training data set, and trains the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images. Given that the small target detection model has good multi-scale spatial context feature extraction capabilities, it can effectively capture and utilize the spatial context information of remote sensing images. Therefore, when the target remote sensing image to be processed is input into the small target detection model and the small target detection model is used to detect small targets in the target remote sensing image, the spatial context information of the target remote sensing image to be processed can be effectively captured and utilized. In this way, combined with the spatial context information of the target remote sensing image, small targets in the remote sensing image can be detected efficiently and accurately, thereby improving the detection efficiency and detection accuracy of small targets in remote sensing images. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 A flowchart of a small target detection method provided in an embodiment of the present application.
[0018] Figure 2 A schematic diagram of the structure of an initial small target detection model provided in an embodiment of the present application.
[0019] Figure 3 A flowchart of a method for training a small target detection model provided in an embodiment of the present application.
[0020] Figure 4 A schematic diagram of the structure of a large convolution kernel mixed domain attention mechanism unit provided in an embodiment of the present application.
[0021] Figure 5 A schematic diagram of the structure of a small target detection device provided in an embodiment of the present application.
[0022] Figure 6 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] In the embodiments of the present application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of the present application, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0025] The technical solution provided in the embodiments of the present application can be applied to scenes such as target detection. Since small targets in remote sensing images, especially rotating small targets, usually have characteristics such as variable scales, complex shapes, dense distribution and strong background interference, small target detection in remote sensing images is still a major challenge in the field of computer vision.
[0026] In order to efficiently and accurately detect small targets in remote sensing images, an embodiment of the present application provides a small target detection method, which preliminarily introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet (Large Selective Kernel Network) based on YOLOv8 to extract multi-scale spatial context features of remote sensing images in a training data set, and trains an initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images to obtain a small target detection model. In view of the fact that the small target detection model has a good multi-scale spatial context feature extraction capability, it can effectively capture and utilize the spatial context information of the remote sensing image. Therefore, when the target remote sensing image to be processed is input into the small target detection model, the small target detection model can effectively capture and utilize the spatial context information of the target remote sensing image to be processed when detecting the small target in the target remote sensing image. In this way, combined with the spatial context information of the target remote sensing image, small targets in the remote sensing image can be efficiently and accurately detected, thereby improving the detection efficiency and detection accuracy of small targets in the remote sensing image.
[0027] It can be understood that the executor of the present method can be an electronic device such as a small target detection device, a computer or a server, or a small target detection device arranged in the electronic device. The small target detection device can be implemented by software, hardware or a combination of both, and can be specifically set according to actual needs.
[0028] The small target detection method provided by the present application will be described in detail below through the following specific embodiments. It is understandable that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0029] Figure 1 A flowchart of a small target detection method provided in an embodiment of the present application is provided. For example, see Figure 1 As shown, the small target detection method may include: S101, obtaining a target remote sensing image to be processed, wherein the target remote sensing image includes a small target to be detected.
[0030] Among them, small targets usually refer to those target objects that occupy a small area or have a small size in the remote sensing image. It is understandable that the definition of these objects can vary according to different standards and data sets, and can be set according to actual needs. For example, small targets can be vehicles, pedestrians, buildings, aircraft, ships, etc.
[0031] For example, the target remote sensing image can be a remote sensing image collected by a satellite or a remote sensing image collected by a drone; of course, satellite images and drone images can also be collected by satellites and drones respectively, and the collected satellite images and drone images can be fused to obtain a remote sensing image, which can be set according to actual needs.
[0032] For example, the target remote sensing image to be processed can be obtained by on-site shooting, can be obtained from a network media library, or by other methods, such as obtaining the target remote sensing image to be processed from a public database, etc., which can be set according to actual needs.
[0033] Normally, after obtaining the target remote sensing image to be processed, if the image quality of the target remote sensing image is good, the target remote sensing image can be directly input into the small target detection model, that is, the following S102 is executed; on the contrary, if the image quality of the target remote sensing image is poor, the target remote sensing image can be preprocessed first, such as denoising, radiation correction, geometric correction, atmospheric correction, etc., and the preprocessed target remote sensing image is input into the small target detection model, that is, the following S102 is executed.
[0034] S102: Input the target remote sensing image into the small target detection model to obtain the small target detection result output by the small target detection model.
[0035] Among them, the small target detection model is based on YOLOv8, which introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features of remote sensing images in the training data set, and trains the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
[0036] It can be understood that in the embodiment of the present application, the large convolution kernel mixed domain attention mechanism module based on LSKNet aims to construct a convolution operation with a large receptive field through explicit decomposition, and the large kernel convolution can be decomposed into a series of depth-separable convolutions, and the kernel size and expansion rate of these convolutions gradually increase, thereby ensuring the rapid expansion of the receptive field.
[0037] Among them, the decomposition process defines the kernel size k, dilation rate d and expansion method of the receptive field RF for the i-th depth-separable convolution in the sequence, as shown in the following formulas 1 and 2. By gradually increasing the kernel size and dilation rate, it can be ensured that the receptive field grows at a sufficient speed to capture a wider range of spatial contextual information; at the same time, in order to avoid unnecessary gaps (i.e., holes) between feature maps, an upper limit can be set for the dilation rate.
[0038] Formula 1 Formula 2 in, represents the kernel size of the i-th depthwise separable convolution, represents the dilation rate of the i-th depthwise separable convolution, represents the receptive field of the i-th depthwise separable convolution.
[0039] In order to extract different range features with rich spatial context information from the input target remote sensing image, a series of decomposed depthwise separable convolutions with different receptive fields can be used. Each convolution kernel and expansion rate The combination of corresponds to a depth-wise separable convolution operation, and each large convolution kernel mixed domain attention mechanism unit in the large convolution kernel mixed domain attention mechanism module will be processed by a 1×1 convolution layer to achieve cross-channel information mixing.
[0040] In this way, multiple large convolution kernels based on LSKNet are introduced based on YOLOv8 to extract multi-scale spatial contextual features, and the spatial contextual information of remote sensing images is automatically captured and utilized through the attention mechanism. It can not only explicitly generate multiple features with different large receptive fields, but also provide a rich candidate set for subsequent kernel selection; it can also enable the trained small target detection model to respond to input data of different ranges more flexibly, effectively enhancing the feature representation ability of the small target detection model for complex scenes and rotating small targets, thereby improving the detection accuracy. In addition, compared with the single-scale spatial contextual feature extraction, under the condition of achieving the same theoretical receptive field, the large kernel convolution decomposition method provided in the embodiment of the present application significantly reduces the number of parameters and reduces the computational cost.
[0041] It can be seen that in an embodiment of the present application, when performing small target detection, a target remote sensing image to be processed can be obtained first, and the target remote sensing image includes a small target to be detected; the target remote sensing image is input into a small target detection model to obtain a detection result of the small target output by the small target detection model; wherein the small target detection model is based on YOLOv8 and introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to perform multi-scale spatial context feature extraction on the remote sensing images in the training data set, and the initial small target detection model is trained based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images. Given that the small target detection model has good multi-scale spatial context feature extraction capabilities, it can effectively capture and utilize the spatial context information of remote sensing images. Therefore, when the target remote sensing image to be processed is input into the small target detection model and the small target detection model is used to detect small targets in the target remote sensing image, the spatial context information of the target remote sensing image to be processed can be effectively captured and utilized. In this way, combined with the spatial context information of the target remote sensing image, small targets in the remote sensing image can be detected efficiently and accurately, thereby improving the detection efficiency and detection accuracy of small targets in remote sensing images.
[0042] For example, the above initial small target detection model can be improved with the rotation target detection network of YOLOv8. Three LSKNet-based large convolution kernel mixed domain attention mechanism modules can be introduced in the YOLOv8 backbone network, and three MLLA attention mechanism modules can be introduced in the Neck part. For example, see Figure 2 As shown, Figure 2A schematic diagram of the structure of an initial small target detection model provided in an embodiment of the present application, the initial small target detection model may include an initial feature extraction module and three LSKNet-based large convolution kernel mixed domain attention mechanism modules connected in series, a feature fusion module connected to the three LSKNet-based large convolution kernel mixed domain attention mechanism modules, and a first MLLA attention mechanism module, a second MLLA attention mechanism module, and a third MLLA attention mechanism module connected to the feature fusion module. In order to facilitate understanding of how to train the initial small target detection model in the embodiment of the present application to obtain the small target detection model, the following will be described. Figure 3 The illustrated embodiment describes a training method for a small target detection model.
[0043] It is understandable that in the embodiment of the present application, the MLLA attention mechanism module is adopted, and its purpose is: first, the forget gate in the MLLA attention mechanism module provides local deviation and position information. All forget gate elements are strictly limited between 0 and 1, which means that the model will continue to decay the previous hidden state after receiving the current input. This feature ensures that the initial small target detection model is sensitive to the order of inputs, which helps to process local deviations and position information. Secondly, the linear attention is redesigned in the MLLA attention mechanism module to integrate the forget gate and design module, so that it has good performance in remote sensing image classification and high-resolution dense prediction tasks such as dense small target detection tasks. Furthermore, the MLLA attention mechanism module has parallel computing capabilities and fast reasoning capabilities. In the embodiment of the present application, the forget gate is replaced by position encoding, thereby maintaining parallel computing and fast reasoning speed while providing the necessary position information, making the MLLA attention mechanism module more effective in processing non-autoregressive visual tasks. In this way, not only the trained small target detection model’s ability to capture target location information is improved, but also more accurate position perception visual understanding is promoted. In addition, some of its limitations in parallel computing are solved, making it suitable for small target detection tasks, thereby improving the detection accuracy of small targets.
[0044] Figure 3 A flowchart of a training method for a small target detection model provided in an embodiment of the present application is provided. For example, see Figure 3 As shown, the training method of the small target detection model may include: S301, inputting the remote sensing image into an initial feature extraction module, and extracting initial features of the remote sensing image through the initial feature extraction module.
[0045] For example, the remote sensing image may be a FAIR1M image sample.
[0046] For example, the remote sensing images may be acquired by on-site photography, from a network media library, or by other methods, such as from a public database, etc., and specific settings may be made according to actual needs.
[0047] Generally, after acquiring a remote sensing image, if the image quality of the remote sensing image is good, only its resolution can be adjusted to meet the input requirements of the initial feature extraction module, and the processed remote sensing image can be input into the initial feature extraction module to extract the initial features of the remote sensing image through the initial feature extraction module; on the contrary, if the image quality of the remote sensing image is poor, the remote sensing image can be preprocessed first, such as denoising, radiation correction, geometric correction, atmospheric correction, etc., and the resolution of the preprocessed remote sensing image can be adjusted to meet the input requirements of the initial feature extraction module, and the processed remote sensing image can be input into the initial feature extraction module to extract the initial features of the remote sensing image through the initial feature extraction module.
[0048] For example, see Figure 2 As shown, in an embodiment of the present application, the initial feature extraction module may include two convolutional layers Conv, a conversion layer C2f, a convolutional layer Conv and a conversion layer C2f connected in series in sequence.
[0049] S302. Input the initial features into the first LSKNet-based large convolution kernel mixed domain attention mechanism module, and obtain the first scale space context features through the first LSKNet-based large convolution kernel mixed domain attention mechanism module.
[0050] For example, in the embodiments of the present application, see Figure 4 As shown, Figure 4 The first large convolution kernel mixed domain attention mechanism module based on LSKNet provided in the embodiment of the present application is a schematic diagram of the structure of the first large convolution kernel mixed domain attention mechanism module based on LSKNet, which includes a plurality of depth-separable convolution layers connected in series and a spatial selection layer connected to the plurality of depth-separable convolution layers. Among them, the depth-separable convolution layer is Large K.
[0051] In this way, the spatial selection mechanism of LSKNet can extract spatial context features from large convolution kernels of different scales and perform spatial selection. It can capture important spatial context information at different scales and focus on key areas through the attention mechanism, thereby improving target detection accuracy and efficiency.
[0052] Combination Figure 4The first large convolution kernel mixed domain attention mechanism module based on LSKNet shown in the large convolution kernel mixed domain attention mechanism unit inputs the initial feature into the first large convolution kernel mixed domain attention mechanism module based on LSKNet. When the first scale spatial context feature is obtained through the first large convolution kernel mixed domain attention mechanism module based on LSKNet, the initial feature can be first input into multiple depthwise separable convolution layers in sequence, and the corresponding depthwise separable convolution features are output through the multiple depthwise separable convolution layers respectively; and the multiple depthwise convolution separable features are all input into the spatial selection layer, and the first scale spatial context feature is output through the spatial selection layer.
[0053] For example, in an embodiment of the present application, multiple deep convolutional separable features are input into the spatial selection layer. When the first-scale spatial context feature is output through the spatial selection layer, the multiple deep convolutional separable features can be first input into the spatial selection layer, and the multiple deep convolutional separable features are spliced through the spatial selection layer to obtain deep convolutional separable spliced features; the deep convolutional separable spliced features are pooled based on channel average pooling and maximum pooling, respectively, to obtain average pooling spatial feature description and maximum pooling spatial feature description, which capture important spatial structural information in the features and can efficiently extract the spatial relationship between these features; the average pooling spatial feature description and the maximum pooling spatial feature description are respectively pooled. The splicing features are transformed to obtain multiple spatial attention maps, where different spatial attention maps represent the importance of different spatial regions; based on the spatial selection mask corresponding to each spatial attention map, the multiple spatial attention maps are weightedly fused to obtain attention features, which can emphasize important spatial regions and suppress non-important regions; wherein the spatial selection mask corresponding to the spatial attention map is used to characterize the importance of the spatial region corresponding to the spatial attention map in the remote sensing image; the attention feature is element-wise multiplied with the initial feature to obtain the first-scale spatial context feature, which can enable the trained small target detection model to focus more on the spatial region that is beneficial to the target detection task, thereby improving the detection performance of the small target detection model.
[0054] For example, the sigmoid activation function σ(⋅) can be used to generate the spatial selection mask corresponding to the spatial attention map. Of course, other activation functions can also be used to generate the spatial selection mask corresponding to the spatial attention map, which can be set according to actual needs. Among them, the spatial selection mask represents the importance of the spatial area corresponding to the spatial attention map in the remote sensing image with a value close to 0 or 1, thereby realizing the spatial selection of the decomposed large convolution kernel features.
[0055] In combination with the above description, after obtaining the first scale-space context feature through the first LSKNet-based large convolution kernel mixed domain attention mechanism module, the first scale-space context feature can be input into the second LSKNet-based large convolution kernel mixed domain attention mechanism module, that is, the following S303 is executed.
[0056] S303, based on the first scale space context feature and the second LSKNet-based large convolution kernel mixed domain attention mechanism module, obtain the second scale space context feature.
[0057] For example, combined with Figure 2 As shown, in an embodiment of the present application, the first LSKNet-based large convolution kernel mixed domain attention mechanism module is sequentially connected to a convolution layer and a conversion layer.
[0058] When obtaining the second scale-space context feature based on the first scale-space context feature and the second large convolution kernel mixed domain attention mechanism module based on LSKNet, the first scale-space context feature can be first input into the convolution layer, and the convolution scale-space context feature is output through the convolution layer; and the convolution scale-space context feature is input into the conversion layer, and the conversion scale-space context feature is output through the conversion layer; and the conversion scale-space context feature is then input into the second large convolution kernel mixed domain attention mechanism module based on LSKNet, and the second scale-space context feature is obtained through the second large convolution kernel mixed domain attention mechanism module based on LSKNet.
[0059] It should be noted that the structure of the second large convolution kernel mixed domain attention mechanism module based on LSKNet is similar to the structure of the first large convolution kernel mixed domain attention mechanism module based on LSKNet in S302 above. Correspondingly, the relevant implementation of obtaining the second scale space context feature through the second large convolution kernel mixed domain attention mechanism module based on LSKNet is also similar to the relevant implementation of obtaining the first scale space context feature through the first large convolution kernel mixed domain attention mechanism module based on LSKNet above. For details, please refer to the above description of obtaining the first scale space context feature through the first large convolution kernel mixed domain attention mechanism module based on LSKNet. Here, the embodiments of the present application will not be repeated.
[0060] S304, based on the second-scale spatial context feature and the third LSKNet-based large convolution kernel mixed domain attention mechanism module, obtain the third-scale spatial context feature.
[0061] For example, combined with Figure 2 As shown, in an embodiment of the present application, the second LSKNet-based large convolution kernel mixed domain attention mechanism module is sequentially connected to a convolution layer and a conversion layer.
[0062] When obtaining the third-scale spatial context feature based on the second-scale spatial context feature and the third large convolution kernel mixed domain attention mechanism module based on LSKNet, the second-scale spatial context feature can be first input into the convolution layer, and the convolution scale spatial context feature is output through the convolution layer; and the convolution scale spatial context feature is input into the conversion layer, and the conversion scale spatial context feature is output through the conversion layer; and the conversion scale spatial context feature is then input into the third large convolution kernel mixed domain attention mechanism module based on LSKNet, and the third-scale spatial context feature is obtained through the third large convolution kernel mixed domain attention mechanism module based on LSKNet.
[0063] It should be noted that the structure of the third large convolution kernel mixed domain attention mechanism module based on LSKNet is similar to the structure of the first large convolution kernel mixed domain attention mechanism module based on LSKNet in S302 above. Correspondingly, the relevant implementation of obtaining the third scale space context feature through the third large convolution kernel mixed domain attention mechanism module based on LSKNet is also similar to the relevant implementation of obtaining the first scale space context feature through the first large convolution kernel mixed domain attention mechanism module based on LSKNet above. For details, please refer to the above description of obtaining the first scale space context feature through the first large convolution kernel mixed domain attention mechanism module based on LSKNet. Here, the embodiments of the present application will not be repeated.
[0064] Considering that the remote sensing image is used as the input of the initial feature extraction module, and then passes through the first LSKNet-based large convolution kernel mixed domain attention mechanism module, the second LSKNet-based large convolution kernel mixed domain attention module, and the third LSKNet-based large convolution kernel mixed domain attention module in sequence, the process is a downsampling process. Therefore, the first scale of the first-scale spatial context feature output by the first LSKNet-based large convolution kernel mixed domain attention mechanism module is smaller than the second scale of the second-scale spatial context feature output by the second LSKNet-based large convolution kernel mixed domain attention mechanism module. The second scale of the second-scale spatial context feature output by the second LSKNet-based large convolution kernel mixed domain attention mechanism module is smaller than the third scale of the third-scale spatial context feature output by the third LSKNet-based large convolution kernel mixed domain attention mechanism module.
[0065] After the first scale space context feature, the second scale space context feature and the third scale space context feature are respectively acquired, the following S305 may be executed.
[0066] S305 , inputting the first scale space context feature, the second scale space context feature and the third scale space context feature into a feature fusion module, and obtaining corresponding first scale splicing feature, second scale splicing feature and third scale splicing feature through the feature fusion module.
[0067] Through the feature fusion module, the trained small target inspection model can effectively enhance its ability to understand complex scenes in remote sensing images.
[0068] S306. Input the first-scale splicing feature into the first MLLA attention mechanism module to obtain the first-scale key feature, input the second-scale splicing feature into the second MLLA attention mechanism module to obtain the second-scale key feature, and input the third-scale splicing feature into the third MLLA attention mechanism module to obtain the third-scale key feature.
[0069] S307: Based on the first scale key features, the second scale key features, the third scale key features and the detection result labels, update the model parameters of the initial small target detection model to obtain a small target detection model.
[0070] By way of example, in an embodiment of the present application, when updating the model parameters of the initial small target detection model based on the first-scale key features, the second-scale key features, the third-scale key features and the detection result label, the first detection result of the initial small target detection model for the remote sensing image can be determined based on the first-scale key features, the second-scale key features and the third-scale key features; and the second detection result of the teacher model for the remote sensing image is obtained; based on the first activation map of the second detection result of the teacher model in a specific channel, the first KL divergence corresponding to the first activation map is determined, and based on the second activation map of the first detection result of the initial small target detection model in a specific channel, the second KL divergence corresponding to the second activation map is determined; based on the difference between the first detection result and the detection result label, the first KL divergence, and the second KL divergence, the model parameters of the initial small target detection model are updated, so that the channel-based knowledge distillation Cwd of dense prediction is used for dense prediction tasks. During the distillation process, by minimizing the Kullback-Leibler (KL) divergence between the channel probability maps of the teacher model and the student model, that is, the initial small target detection model in this application, the category-specific knowledge of the teacher model at the channel level can be more effectively utilized to guide the student model to learn more accurately, while maintaining high performance while achieving faster inference speed and lower resource consumption. This not only helps to improve the performance of the student model, but also deepens the understanding of the channel action mechanism in the deep learning model, thereby reducing computational complexity and improving computational efficiency while ensuring detection accuracy.
[0071] Among them, Knowledge Distillation (KD) is a simple and effective tool for training compact and dense prediction models. It aims to improve the performance of the student model by transferring knowledge from a complex and high-performance teacher model to a simpler and lighter student model.
[0072] For example, in the embodiment of the present application, based on the first scale key feature, the second scale key feature, and the third scale key feature, the first detection result of the initial small target detection model for the remote sensing image can be recorded as , the second detection result of the teacher model for the remote sensing image can be recorded as , then in determining any KL divergence of the first KL divergence corresponding to the first activation map of the specific channel of the second detection result of the teacher model, and the second KL divergence corresponding to the second activation map of the specific channel of the first detection result, the calculation method can be shown in the following formula 3.
[0073] Formula 3 in, represents the KL divergence of the activation map of the detection result in a specific channel c, c = 1, 2, ..., C, C represents the channel index, i represents the index of the spatial position in the channel, Represents the data of channel c, spatial position index i, W and H represent the width and height of the activation map respectively, and T is a hyperparameter (called temperature) used to control the "softness" of the probability distribution. This is the principle of converting channel-level activation values into probability distributions, and using KL divergence to evaluate the activation difference between the teacher model and the student model on a specific channel c.
[0074] Generally speaking, the larger T is, the smoother the corresponding probability distribution becomes, and a wider spatial area can be considered for each channel; the smaller T is, the corresponding probability distribution is sharper, focusing on areas with higher activation values.
[0075] For example, the first KL divergence of the second detection result of the teacher model corresponding to the first activation map of a specific channel can be recorded as , the second KL divergence corresponding to the second activation map of the first detection result in a specific channel can be recorded as .
[0076] It can be understood that in the embodiment of the present application, the spatial knowledge distillation method can realize the knowledge transfer between spatial positions through point-to-point alignment or alignment of structured information. Therefore, after respectively determining the first KL divergence and the second KL divergence, the method for updating the model parameters of the initial small target detection model based on the difference between the first detection result and the detection result label, the first KL divergence, and the second KL divergence can be shown in the following formula 4.
[0077] Formula 4 in, is the task loss, used to characterize the first detection result The difference between the detection result label y, for example, the task loss can be a cross entropy loss; represents a hyperparameter used to balance the importance of different loss terms; , i.e., the channel-level knowledge distillation paradigm, guides the student model to learn these category-specific knowledge from the well-trained teacher model, Represents the feature extraction function, which is used to extract the features that need to be distilled from the activation map. represents the loss calculation function, which is used to evaluate the difference in probability distribution between the teacher model and the student model on a specific channel c. represents the first activation map of the second detection result of the teacher model at a specific channel c, Represents the second activation map of the first detection result of the initial small target detection model at a specific channel c.
[0078] Combined with the above description, given that the KL divergence can effectively measure the difference between two probability distributions, the KL divergence is used as an evaluation indicator to update the model parameters of the initial small target detection model. The smaller the KL divergence, the more similar the first activation map corresponding to the initial small target detection model and the second activation map corresponding to the teacher model are on the specific channel c, indicating that the student model has learned more useful knowledge from the teacher model, so that the model parameters of the initial small target detection model can be better initialized to train the small target detection model.
[0079] It can be seen that in the embodiments of the present application, in order to effectively improve the detection efficiency and detection accuracy of small targets in remote sensing images, when training the small target detection model, through three large convolution kernel mixed domain attention mechanism modules based on LSKNet, position-aware enhanced MLLA attention mechanism modules (i.e., the first MLLA attention mechanism module, the second MLLA attention mechanism module and the third MLLA attention mechanism module) and an efficient knowledge distillation strategy, the trained small target model can effectively improve the detection efficiency and detection accuracy of rotated small targets, thereby achieving accurate and efficient detection of small targets, which not only improves the detection performance, but also enhances the versatility and robustness of the small target model in practical applications.
[0080] The small target detection device provided in the present application is described below. The small target detection device described below and the small target detection method described above can be referenced to each other.
[0081] Figure 5 A schematic diagram of a small target detection device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the small target detection device 50 may include: An acquisition unit 501 is used to acquire a target remote sensing image to be processed, wherein the target remote sensing image includes a small target to be detected; A detection unit 502 is used to input the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; Among them, the small target detection model is based on YOLOv8, which introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features of remote sensing images in the training data set, and trains the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
[0082] For example, in an embodiment of the present application, the initial small target detection model includes an initial feature extraction module and three LSKNet-based large convolution kernel mixed domain attention mechanism modules connected in series, a feature fusion module connected to the three LSKNet-based large convolution kernel mixed domain attention mechanism modules, and a first MLLA attention mechanism module, a second MLLA attention mechanism module, and a third MLLA attention mechanism module connected to the feature fusion module; The small target detection model is trained based on the following method: Inputting the remote sensing image into the initial feature extraction module, and extracting initial features of the remote sensing image through the initial feature extraction module; Inputting the initial features into a first LSKNet-based large convolution kernel mixed domain attention mechanism module, and obtaining a first scale space context feature through the first LSKNet-based large convolution kernel mixed domain attention mechanism module; Based on the first scale space context feature and the second LSKNet-based large convolution kernel mixed domain attention mechanism module, a second scale space context feature is obtained; Based on the second scale space context feature and the third LSKNet-based large convolution kernel mixed domain attention mechanism module, a third scale space context feature is obtained; Inputting the first scale space context feature, the second scale space context feature and the third scale space context feature into the feature fusion module, and obtaining the corresponding first scale splicing feature, second scale splicing feature and third scale splicing feature through the feature fusion module; Inputting the first-scale splicing feature into the first MLLA attention mechanism module to obtain a first-scale key feature, inputting the second-scale splicing feature into the second MLLA attention mechanism module to obtain a second-scale key feature, and inputting the third-scale splicing feature into the third MLLA attention mechanism module to obtain a third-scale key feature; Based on the first scale key feature, the second scale key feature, the third scale key feature and the detection result label, the model parameters of the initial small target detection model are updated to obtain the small target detection model.
[0083] For example, in an embodiment of the present application, the first LSKNet-based large convolution kernel mixed domain attention mechanism module is sequentially connected with a convolution layer and a conversion layer; The second scale space context feature is obtained based on the first scale space context feature and the second large convolution kernel mixed domain attention mechanism module based on LSKNet, including: Inputting the first scale-space context feature into the convolution layer, and outputting the convolution scale-space context feature through the convolution layer; Inputting the convolutional scale-space context feature into the conversion layer, and outputting the conversion scale-space context feature through the conversion layer; The converted scale-space context feature is input into the second LSKNet-based large convolution kernel mixed-domain attention mechanism module, and the second scale-space context feature is obtained through the second LSKNet-based large convolution kernel mixed-domain attention mechanism module.
[0084] For example, in an embodiment of the present application, the first LSKNet-based large convolution kernel mixed domain attention mechanism module includes a plurality of depth-separable convolution layers connected in series, and a spatial selection layer connected to the plurality of depth-separable convolution layers; The step of inputting the initial features into a first LSKNet-based large convolution kernel mixed domain attention mechanism module, and obtaining a first scale space context feature through the first LSKNet-based large convolution kernel mixed domain attention mechanism module, includes: Inputting the initial features into a plurality of depth-wise separable convolutional layers in sequence, and outputting corresponding depth-wise separable convolutional features through the plurality of depth-wise separable convolutional layers respectively; A plurality of depth-wise convolutionally separable features are input into the spatial selection layer, and the first-scale spatial context feature is output through the spatial selection layer.
[0085] For example, in an embodiment of the present application, the inputting of multiple depth-wise convolutional separable features into the spatial selection layer, and outputting the first-scale spatial context feature through the spatial selection layer, includes: Inputting a plurality of depth-wise convolutional separable features into the spatial selection layer, and performing splicing processing on the plurality of depth-wise convolutional separable features through the spatial selection layer to obtain a depth-wise convolutional separable splicing feature; Based on the average pooling and the maximum pooling of the channel, the depth-convolutional separable splicing features are respectively pooled to obtain the average pooling spatial feature description and the maximum pooling spatial feature description; Converting the concatenated features of the average pooling spatial feature description and the maximum pooling spatial feature description to obtain multiple spatial attention maps; Based on the spatial selection mask corresponding to each of the spatial attention maps, the multiple spatial attention maps are weightedly fused to obtain an attention feature; wherein the spatial selection mask corresponding to the spatial attention map is used to characterize the importance of the spatial area corresponding to the spatial attention map in the remote sensing image; The attention feature is multiplied element-wise by the initial feature to obtain the first scale-space context feature.
[0086] For example, in an embodiment of the present application, updating the model parameters of the initial small target detection model based on the first scale key feature, the second scale key feature, the third scale key feature and the detection result label includes: Determining a first detection result of the initial small target detection model for the remote sensing image based on the first scale key feature, the second scale key feature, and the third scale key feature; Obtaining a second detection result of the teacher model for the remote sensing image; Determine a first KL divergence corresponding to the first activation map based on a first activation map of a specific channel of the second detection result of the teacher model, and determine a second KL divergence corresponding to the second activation map based on a second activation map of the specific channel of the first detection result of the initial small target detection model; Based on the difference between the first detection result and the detection result label, the first KL divergence, and the second KL divergence, the model parameters of the initial small target detection model are updated.
[0087] The small target detection device 50 provided in the embodiment of the present application can execute the technical solution of the small target detection method in any of the above-mentioned embodiments. Its implementation principle and beneficial effects are similar to the implementation principle and beneficial effects of the small target detection method. Please refer to the implementation principle and beneficial effects of the small target detection method, and no further details will be given here.
[0088] Figure 6 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a 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 may call the logic instructions in the memory 630 to execute the small target detection method, which may include: obtaining a target remote sensing image to be processed, wherein the target remote sensing image includes a small target to be detected; inputting the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; wherein the small target detection model is based on YOLOv8, introducing multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features of remote sensing images in the training data set, and training the initial small target detection model based on the multi-scale spatial context features and the detection result label corresponding to the remote sensing image.
[0089] 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 this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable 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 application. 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.
[0090] On the other hand, the present application 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 small target detection method provided by the above methods. The method may include: obtaining a remote sensing image of the target to be processed, wherein the target remote sensing image includes a small target to be detected; inputting the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; wherein the small target detection model is based on YOLOv8, introducing multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features from the remote sensing images in the training data set, and training the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
[0091] On the other hand, the present application 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 small target detection method provided by the above-mentioned methods, the method may include: obtaining a target remote sensing image to be processed, the target remote sensing image including a small target to be detected; inputting the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; wherein the small target detection model is based on YOLOv8, introducing multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features from the remote sensing images in the training data set, and training the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
[0092] 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.
[0093] 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.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application 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 application.
Claims
1. A small target detection method, characterized in that: include: Acquire a target remote sensing image to be processed, wherein the target remote sensing image includes a small target to be detected; Inputting the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; Among them, the small target detection model is based on YOLOv8, which introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features of remote sensing images in the training data set, and trains the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
2. The small target detection method according to claim 1, characterized in that: The initial small target detection model includes an initial feature extraction module and three LSKNet-based large convolution kernel mixed domain attention mechanism modules connected in series, a feature fusion module connected to the three LSKNet-based large convolution kernel mixed domain attention mechanism modules, and a first MLLA attention mechanism module, a second MLLA attention mechanism module and a third MLLA attention mechanism module connected to the feature fusion module; The small target detection model is trained based on the following method: Inputting the remote sensing image into the initial feature extraction module, and extracting initial features of the remote sensing image through the initial feature extraction module; Inputting the initial features into a first LSKNet-based large convolution kernel mixed domain attention mechanism module, and obtaining a first scale space context feature through the first LSKNet-based large convolution kernel mixed domain attention mechanism module; Based on the first scale space context feature and the second LSKNet-based large convolution kernel mixed domain attention mechanism module, a second scale space context feature is obtained; Based on the second scale space context feature and the third LSKNet-based large convolution kernel mixed domain attention mechanism module, a third scale space context feature is obtained; Inputting the first scale space context feature, the second scale space context feature and the third scale space context feature into the feature fusion module, and obtaining the corresponding first scale splicing feature, second scale splicing feature and third scale splicing feature through the feature fusion module; Inputting the first-scale splicing feature into the first MLLA attention mechanism module to obtain a first-scale key feature, inputting the second-scale splicing feature into the second MLLA attention mechanism module to obtain a second-scale key feature, and inputting the third-scale splicing feature into the third MLLA attention mechanism module to obtain a third-scale key feature; Based on the first scale key feature, the second scale key feature, the third scale key feature and the detection result label, the model parameters of the initial small target detection model are updated to obtain the small target detection model.
3. The small target detection method according to claim 2, characterized in that: The first LSKNet-based large convolution kernel mixed domain attention mechanism module is sequentially connected with a convolution layer and a conversion layer; The second scale space context feature is obtained based on the first scale space context feature and the second large convolution kernel mixed domain attention mechanism module based on LSKNet, including: Inputting the first scale-space context feature into the convolution layer, and outputting the convolution scale-space context feature through the convolution layer; Inputting the convolutional scale-space context feature into the conversion layer, and outputting the conversion scale-space context feature through the conversion layer; The converted scale-space context feature is input into the second LSKNet-based large convolution kernel mixed-domain attention mechanism module, and the second scale-space context feature is obtained through the second LSKNet-based large convolution kernel mixed-domain attention mechanism module.
4. The small target detection method according to claim 2, characterized in that: The first LSKNet-based large convolution kernel mixed domain attention mechanism module includes a plurality of depth-separable convolution layers connected in series and a spatial selection layer connected to the plurality of depth-separable convolution layers; The step of inputting the initial features into a first LSKNet-based large convolution kernel mixed domain attention mechanism module, and obtaining a first scale space context feature through the first LSKNet-based large convolution kernel mixed domain attention mechanism module, includes: Inputting the initial features into a plurality of depth-wise separable convolutional layers in sequence, and outputting corresponding depth-wise separable convolutional features through the plurality of depth-wise separable convolutional layers respectively; A plurality of depth-wise convolutionally separable features are input into the spatial selection layer, and the first-scale spatial context features are output through the spatial selection layer.
5. The small target detection method according to claim 4, characterized in that: The step of inputting a plurality of depth-wise convolutionally separable features into the space selection layer and outputting the first-scale space context feature through the space selection layer comprises: Inputting a plurality of depth-wise convolutional separable features into the spatial selection layer, and performing splicing processing on the plurality of depth-wise convolutional separable features through the spatial selection layer to obtain a depth-wise convolutional separable splicing feature; Based on the average pooling and the maximum pooling of the channel, the depth-convolutional separable splicing features are respectively pooled to obtain the average pooling spatial feature description and the maximum pooling spatial feature description; Converting the concatenated features of the average pooling spatial feature description and the maximum pooling spatial feature description to obtain multiple spatial attention maps; Based on the spatial selection mask corresponding to each of the spatial attention maps, the multiple spatial attention maps are weightedly fused to obtain an attention feature; wherein the spatial selection mask corresponding to the spatial attention map is used to characterize the importance of the spatial area corresponding to the spatial attention map in the remote sensing image; The attention feature is multiplied element-wise by the initial feature to obtain the first scale-space context feature.
6. The small target detection method according to any one of claims 2 to 5, characterized in that: The updating of the model parameters of the initial small target detection model based on the first scale key feature, the second scale key feature, the third scale key feature and the detection result label includes: Determine a first detection result of the initial small target detection model for the remote sensing image based on the first scale key feature, the second scale key feature, and the third scale key feature; Obtaining a second detection result of the teacher model for the remote sensing image; Determine a first KL divergence corresponding to the first activation map based on a first activation map of a specific channel of the second detection result of the teacher model, and determine a second KL divergence corresponding to the second activation map based on a second activation map of the specific channel of the first detection result of the initial small target detection model; Based on the difference between the first detection result and the detection result label, the first KL divergence, and the second KL divergence, the model parameters of the initial small target detection model are updated.
7. A small target detection device, characterized in that: include: An acquisition unit, used for acquiring a target remote sensing image to be processed, wherein the target remote sensing image includes a small target to be detected; A detection unit, used for inputting the target remote sensing image into a small target detection model to obtain a detection result of the small target output by the small target detection model; Among them, the small target detection model is based on YOLOv8, which introduces multiple large convolution kernel mixed domain attention mechanism modules based on LSKNet to extract multi-scale spatial context features of remote sensing images in the training data set, and trains the initial small target detection model based on the multi-scale spatial context features and the detection result labels corresponding to the remote sensing images.
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 small target detection method according to 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 small target detection method according to 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 small target detection method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Detection method for dense small targets based on remote sensing image
CN117893740A
Group target detection method based on visible light remote sensing image
CN117935075A
Lightweight crack segmentation method and device, terminal equipment and storage medium
CN118097154A
SAR image ship target detection method based on improved YOLOv8
CN118314321A
Improved pavement disease detection method and device based on YOLOv9 model
CN118379714A
Cited By
Small target image generation method and device based on diffusion model, equipment and medium
CN122067072A
Small target image generation method and device based on diffusion model, equipment and medium
CN122067072B