A small target detection method based on a Gaussian angle loss

CN121616815BActive Publication Date: 2026-10-27HUAIBEI NORMAL UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511808391.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-10-27
Estimated Expiration
2045-12-03

AI Technical Summary

Technical Problem

但是,现有的损失函数设计方法仍然存在类正方形的边界不连续问题,导致旋转框小目标的检测精度较低

Benefits of technology

[0014]本发明提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述基于高斯角度损失的旋转框小目标检测方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121616815B_ABST
    Figure CN121616815B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on Gauss angle loss's rotating frame small target detection method, it is related to remote sensing target detection field.The method includes: multilevel feature focus detection model is embedded in multiscale fusion model between c2f and OBB output layer of YOLOv8OBB network model;Multiscale fusion model is enhanced to the feature expression capability of small target by cross-level feature interaction;The loss function of multilevel feature focus detection model is constructed based on Gauss angle loss;Gauss angle loss is used to solve the boundary discontinuity problem in angle regression of square-like target;By multiscale fusion model, the normalized feature of the remote sensing image to be detected is fused and enhanced, to obtain the first fusion feature map, and through the first OBB output layer, the rotating bounding box of small target is predicted, to obtain the rotating bounding box information of multiple small targets in the remote sensing image to be detected.The method improves the detection precision of rotating frame small target in remote sensing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method for detecting small targets in a rotating frame based on Gaussian angle loss. Background Technology

[0002] One of the key challenges in UAV image processing is small target detection. Small targets occupy fewer pixels in an image, and the large differences in target scale and their dense distribution in UAV images make it difficult for the fixed receptive field of general deep learning algorithms to adapt to multi-scale targets, easily leading to missed or false detections of small targets.

[0003] Furthermore, a significant bottleneck in rotated target detection is the boundary discontinuity problem and its inconsistency with the final detection metric. These bottlenecks increase the complexity of designing the regression loss function. Based on this, existing techniques propose Kullback-Leibler Divergence (KLD) as a regression loss function, which transforms the rotated bounding box into a Gaussian distribution. KLD can dynamically adjust the gradient according to target characteristics while maintaining scale invariance. Existing techniques also propose an approximate loss function, Kalman Filter-based Intersection over Union (KFIoU), which achieves trend-level alignment with SkewIoU loss by modeling the target as a Gaussian distribution and utilizing Kalman filtering to simulate the Skewed Intersection over Union (SkewIoU) mechanism. However, existing loss function design methods still suffer from square-like boundary discontinuities, leading to low detection accuracy for small targets in the rotated bounding box.

[0004] Therefore, there is an urgent need for a method to improve the detection accuracy of small targets in a rotating frame. Summary of the Invention

[0005] Therefore, it is necessary to provide a method for detecting small targets with rotating bounding boxes based on Gaussian angle loss to address the aforementioned technical problems. This method improves the detection accuracy of small targets with rotating bounding boxes in remote sensing images.

[0006] The present invention adopts the following technical solution: This invention provides a method for small target detection in a rotating bounding box based on Gaussian angle loss, comprising: A multi-level feature-focused detection model is obtained. This model is an improvement on the YOLOv8OBB network model, embedding a multi-scale fusion model between the c2f and OBB output layers of the YOLOv8OBB network model. The multi-scale fusion model enhances the feature representation capability of small targets through cross-level feature interaction. The loss function of the multi-level feature-focused detection model is constructed based on Gaussian angle loss. Gaussian angle loss is used to solve the boundary discontinuity problem of square-like targets in angle regression, thereby improving the localization accuracy of the rotated bounding box of small targets. The remote sensing image to be detected is acquired and normalized; the remote sensing image to be detected includes multiple small targets of different directions and scales. In the multi-level feature-focused detection model, the normalized remote sensing image to be detected is enhanced by feature fusion through a multi-scale fusion model to obtain a first fused feature map. Based on the first fused feature map, the rotation bounding box prediction of small targets is performed through the first OBB output layer to obtain the rotation bounding box information of multiple small targets in the remote sensing image to be detected. The rotation bounding box information of small targets includes the category of small targets and the coordinates of the rotation bounding box of small targets.

[0007] Preferably, the loss function of the multi-level feature focusing detection model is: ; in, , The Hellinger distance is calculated based on the Bach distance. For classifying losses, To pinpoint the loss, Loss to the target Gaussian angle loss; The formula for calculating Gaussian angle loss is: ; in, These represent the actual width, actual height, actual rotation angle, and predicted rotation angle of the bounding box, respectively.

[0008] Preferably, the multi-level feature focusing detection model includes a backbone, a first C2F, a second C2F, and a first multi-scale fusion model; the normalized remote sensing image to be detected is enhanced by feature fusion using the multi-scale fusion model to obtain a first fused feature map, specifically including: The remote sensing image to be detected is input into Backbone, and the first-scale feature map, second-scale feature map and third-scale feature map of the remote sensing image to be detected are extracted through the hierarchical structure of the convolutional network in Backbone. The third-scale feature map is upsampled and then concatenated with the second-scale feature map to obtain the first concatenation result. The first concatenation result is then subjected to cross-stage partial aggregation and multi-scale feature processing through the first C2F. The first C2F processing result is upsampled and then concatenated with the first scale feature map to obtain the second concatenated result. The second concatenation result is input into the second C2F, and the processing result of the second C2F is input into the first multi-scale fusion model to perform channel interaction, different scale convolution feature extraction and fusion, and enhance the expression of key regions to obtain the first fusion feature map.

[0009] Preferably, the multi-level feature-focused detection model includes a third C2F layer, a second multi-scale fusion model, a fourth C2F layer, a third multi-scale fusion model, a second OBB output layer, and a third OBB output layer. The method further includes: After obtaining the rotated bounding box information of multiple small targets, the processing result of the second C2F is processed by one-dimensional convolution, and the processing result of the one-dimensional convolution is input into the third C2F. The processing result of the third C2F is then input into the second multi-scale fusion model to obtain the second fusion feature map. The second fused feature map is input into the second multi-scale fusion model to predict the rotating bounding box of the central target, thereby obtaining the central target in the remote sensing image to be detected. The processing result of the third C2F is convolved in one dimension and then concatenated with the upsampling result of the third scale feature map. This concatenation is then fed into the fourth C2F, and the processing result of the fourth C2F is fed into the third multi-scale fusion model to obtain the third fusion feature map. The third fusion feature map is input into the third multi-scale fusion model to predict the large target rotation bounding box, thus obtaining the large target in the remote sensing image to be detected.

[0010] Preferably, the first multi-scale fusion model, the second multi-scale fusion model, and the third multi-scale fusion model all include a high-efficiency channel attention model, a multi-branch parallel structure, and a spatial attention model connected in series. The second concatenation result is input into the second C2F, and the processing result of the second C2F is input into the first multi-scale fusion model to perform channel interaction, different scale convolutional feature extraction and fusion, and enhancement of key region expression to obtain the first fused feature map, specifically including: The channel interaction feature map of the second C2F processing result is extracted using an efficient channel attention model; After channel interaction, the feature map is used to extract convolutional features of different scales through a multi-branch parallel structure, and the convolutional features of different scales are fused to obtain fused features. The fused features are input into the spatial attention model to enhance the representation of key regions, resulting in the first fused feature map.

[0011] Preferably, the channel interaction post-feature map of the remote sensing image to be detected is extracted using an efficient channel attention model, specifically including: In the efficient channel attention model, the processing result of the second c2f is subjected to average pooling to obtain a small target feature map with size H×W×C; C is the number of channels of the small target feature map; H is the height of the small target feature map; W is the width of the small target feature map; The size of the convolution kernel is calculated based on the number of channels; Based on the calculated convolution kernel size, a one-dimensional convolution is performed on the small target feature map after average pooling to achieve the interaction between local channels in the small target feature map after average pooling. Channel attention vectors are generated using the Sigmoid function; Multiply each channel of the small target feature map with the corresponding element in the channel attention vector to obtain the feature map after channel interaction.

[0012] Preferably, the multi-branch parallel structure includes six branches; the first branch includes a series of convolutional layers with kernels of 7×1, 1×7, 7×1, and 1×7; the second branch includes a series of convolutional layers with kernels of 5×1, 1×5, 5×1, and 1×5; the third branch includes a series of convolutional layers with kernels of 3×1, 1×3, 3×1, and 1×3; the fourth branch is a convolutional layer with kernels of 1×1; the fifth branch includes a convolutional layer with kernels of 3×1 and 1×3; and the sixth branch is an average pooling layer.

[0013] This invention provides a rotating frame small target detection device based on Gaussian angle loss, comprising: The first acquisition module is used to acquire a multi-level feature-focused detection model. The multi-level feature-focused detection model is an improvement on the YOLOv8OBB network model, embedding a multi-scale fusion model between the c2f and OBB output layers of the YOLOv8OBB network model. The multi-scale fusion model enhances the feature representation capability of small targets through cross-level feature interaction. The loss function of the multi-level feature-focused detection model is constructed based on Gaussian angle loss. Gaussian angle loss is used to solve the boundary discontinuity problem of square-like targets in angle regression, so as to improve the localization accuracy of the rotating bounding box of small targets. The second acquisition module is used to acquire the remote sensing image to be detected and to normalize the remote sensing image to be detected; the remote sensing image to be detected includes multiple small targets of different directions and scales; The prediction module is used in the multi-level feature-focused detection model to perform feature fusion enhancement on the normalized remote sensing image to be detected through a multi-scale fusion model to obtain a first fused feature map. Based on the first fused feature map, the module performs small target rotation bounding box prediction through the first OBB output layer to obtain the rotation bounding box information of multiple small targets in the remote sensing image to be detected. The small target rotation bounding box information includes the category of the small target and the coordinates of the small target rotation bounding box.

[0014] The present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for small target detection in a rotating frame based on Gaussian angle loss.

[0015] The present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described small target detection method based on Gaussian angle loss.

[0016] The above-mentioned technical solution adopted in this invention can achieve the following beneficial effects: The multi-level feature-focused detection model is an improvement based on the YOLOv8OBB network model, embedding a multi-scale fusion model between the c2f and OBB output layers of the YOLOv8OBB network model; the multi-scale fusion model enhances the feature representation ability of small targets through cross-level feature interaction; the loss function of the multi-level feature-focused detection model is constructed based on Gaussian angle loss; Gaussian angle loss is used to solve the boundary discontinuity problem of square-like targets in angle regression, and Gaussian angle loss constrains the regression loss of the model by combining the shape of the small target itself, improving the model's sensitivity to square-like targets, thereby enhancing the detection accuracy of small targets with rotating boxes; in the multi-level feature-focused detection model, the normalized remote sensing image to be detected is enhanced by feature fusion through the multi-scale fusion model to obtain a first fused feature map, and the small target rotation bounding box prediction is performed through the first OBB output layer based on the first fused feature map to obtain the rotation bounding box information of multiple small targets in the remote sensing image to be detected. This method improves the accuracy of detecting small targets with rotating boxes in remote sensing images. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0018] Figure 1 A schematic diagram of the process for a small target detection method with a rotating frame based on Gaussian angle loss provided by the present invention; Figure 2This is a schematic diagram of the multi-level feature focusing detection model provided by the present invention; Figure 3 This is a schematic diagram of the multi-scale fusion model provided by the present invention; Figure 4 Comparative experimental results of aspect ratios of 1:1 and 1:5 provided for this invention; Figure 5 This is a schematic diagram of the small target rotating bounding box detection results provided by the present invention; Figure 6 A schematic diagram of a rotating frame small target detection device based on Gaussian angle loss provided by the present invention; Figure 7 This is a schematic diagram of a computer device for implementing a rotating frame small target detection method based on Gaussian angle loss, as provided by the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0020] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0021] Devices such as desktop computers, servers, and laptops are capable of executing the solutions of this invention. For ease of explanation, the following description will focus on servers as the executing entity.

[0022] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0023] Figure 1 This is a schematic diagram of a small target detection method based on Gaussian angle loss in the present invention, which specifically includes the following steps: S101: Obtain the multi-level feature-focused detection model; the multi-level feature-focused detection model is an improvement based on the YOLOv8OBB network model, embedding a multi-scale fusion model between the c2f and OBB output layers of the YOLOv8OBB network model; the multi-scale fusion model enhances the feature representation capability of small targets through cross-level feature interaction; the loss function of the multi-level feature-focused detection model is constructed based on Gaussian angle loss; Gaussian angle loss is used to solve the boundary discontinuity problem of square-like targets in angle regression, so as to improve the localization accuracy of the rotating bounding box of small targets.

[0024] Specifically, the present invention provides, as follows Figure 2 The schematic diagram of the multi-level feature focusing detection model shown is as follows: Figure 2 As shown, this invention adds a multi-scale fusion model between the c2f and OBB models.

[0025] Specifically, since small targets have limited spatial dimensions and weak ability to perceive surrounding contextual information, this invention designs a multi-level feature-focused detection model to enhance the network's attention to small and medium-sized targets and improve feature extraction capabilities.

[0026] Figure 3 This is a schematic diagram of the multi-scale fusion model provided by the present invention, such as... Figure 3 As shown, the input image x Multi-scale information is extracted using an efficient channel attention model, a multi-branch parallel structure, and depthwise separable convolutions. These features are processed by a Spatial Attention Module (SAM) to enhance the representation of key regions, thereby increasing the network's attention to key spatial locations in the image.

[0027] The sample remote sensing image dataset is used as the training set to train the initial multi-level feature focus detection model, resulting in the multi-level feature focus detection module (MLFF).

[0028] Currently, Gaussian-based loss functions are widely used in rotating target detection in remote sensing images. These loss functions can effectively avoid boundary problems. However, when the target bounding box is square (i.e., width equals height), its two-dimensional Gaussian distribution degenerates into a circle, making it impossible to accurately predict the bounding box's rotation angle.

[0029] The loss function of the multi-level feature-focused detection model is given by formula (1): (1); in, , The Hellinger distance is calculated based on the Bach distance. For classifying losses, To pinpoint the loss, Loss to the target The loss is Gaussian angle.

[0030] The formula for calculating the Gaussian angle loss is formula (2): (2); in, These represent the actual width, actual height, actual rotation angle, and predicted rotation angle of the bounding box, respectively.

[0031] Through the Taking the derivative, we get formula (3): (3).

[0032] According to formula (3), when We obtain formula (4): (4).

[0033] That is, when the aspect ratio of the true bounding box is 1, the angle gradient exhibits a periodic change of 90°, which is consistent with the periodicity of the angles of a square. As the aspect ratio increases, the angle gradient... Approaching 0, at this point Invalid.

[0034] S102: Acquire the remote sensing image to be detected and normalize it; the remote sensing image to be detected includes multiple small targets of different directions and scales.

[0035] Specifically, the purpose of normalization is to adapt to the input size of the multi-level feature focusing detection model.

[0036] S103: In the multi-level feature-focused detection model, the normalized remote sensing image to be detected is enhanced by feature fusion through a multi-scale fusion model to obtain a first fused feature map. Based on the first fused feature map, the rotation bounding box prediction of small targets is performed through the first OBB output layer to obtain the rotation bounding box information of multiple small targets in the remote sensing image to be detected. The rotation bounding box information of small targets includes the category of small targets and the coordinates of the rotation bounding box of small targets.

[0037] In an exemplary embodiment, the multi-level feature-focused detection model includes a Backbone, a first C2F, a second C2F, and a first multi-scale fusion model. The multi-scale fusion model enhances the normalized remote sensing image to be detected by feature fusion to obtain a first fused feature map. Specifically, this includes: inputting the remote sensing image to be detected into the Backbone; extracting a first-scale feature map, a second-scale feature map, and a third-scale feature map from the remote sensing image through the hierarchical structure of the convolutional network in the Backbone; upsampling the third-scale feature map and concatenating it with the second-scale feature map to obtain a first concatenation result; performing cross-stage partial aggregation and multi-scale feature processing on the first C2F; upsampling the processing result of the first C2F and concatenating it with the first-scale feature map to obtain a second concatenation result; inputting the second concatenation result into the second C2F; and inputting the processing result of the second C2F into the first multi-scale fusion model for channel interaction, extraction and fusion of convolutional features at different scales, and enhancement of key region expression to obtain the first fused feature map.

[0038] In an exemplary embodiment, the multi-level feature-focused detection model includes a third c2f, a second multi-scale fusion model, a fourth c2f, a third multi-scale fusion model, a second OBB output layer, and a third OBB output layer. The method further includes: after obtaining the rotated bounding box information of multiple small targets, performing one-dimensional convolution on the processing result of the second c2f, inputting the one-dimensional convolution processing result into the third c2f, and inputting the processing result of the third c2f into the second multi-scale fusion model to obtain a second fusion feature map; inputting the second fusion feature map into the second multi-scale fusion model to predict the rotated bounding box of a medium target to obtain the medium target in the remote sensing image to be detected; performing one-dimensional convolution on the processing result of the third c2f and concatenating it with the upsampling result of the third scale feature map, inputting it into the fourth c2f, and inputting the processing result of the fourth c2f into the third multi-scale fusion model to obtain a third fusion feature map; inputting the third fusion feature map into the third multi-scale fusion model to predict the rotated bounding box of a large target to obtain the large target in the remote sensing image to be detected.

[0039] In an exemplary embodiment, the first multi-scale fusion model, the second multi-scale fusion model, and the third multi-scale fusion model all include a high-efficiency channel attention model, a multi-branch parallel structure, and a spatial attention model connected in series. The second concatenation result is input into the second C2F, and the processing result of the second C2F is input into the first multi-scale fusion model to perform channel interaction, extraction and fusion of convolutional features at different scales, and enhancement of key region expression to obtain a first fused feature map. Specifically, this includes: extracting the channel interaction feature map of the processing result of the second C2F through the high-efficiency channel attention model; extracting convolutional features of different scales from the channel interaction feature map through the multi-branch parallel structure, and fusing the convolutional features of different scales to obtain fused features; and inputting the fused features into the spatial attention model to enhance the expression of key regions to obtain the first fused feature map.

[0040] In an exemplary embodiment, the channel interaction post-feature map of the remote sensing image to be detected is extracted using an efficient channel attention model. Specifically, this includes: in the efficient channel attention model, the processing result of the second c2f is subjected to average pooling to obtain a small target feature map of size H×W×C; C is the number of channels in the small target feature map; H is the height of the small target feature map; W is the width of the small target feature map; the size of the convolution kernel is calculated based on the number of channels; based on the calculated convolution kernel size, a one-dimensional convolution is performed on the average-pooled small target feature map to achieve interaction between local channels in the average-pooled small target feature map; a channel attention vector is generated using the Sigmoid function; each channel of the small target feature map is multiplied by the corresponding element in the channel attention vector to obtain the channel interaction post-feature map.

[0041] Specifically, such as Figure 3 As shown, the input image x First, multi-scale information is extracted using an efficient channel attention model, multi-branch average pooling, and depthwise separable convolution. Then, these features are processed using a spatial attention model.

[0042] Specifically, ECA is a general-purpose, plug-and-play model that improves the performance of Convolutional Neural Networks (CNNs). ECA consists of a compression model (for compressing global spatial information) and an activation model (for enabling channel interactions). After aggregating features through global average pooling without dimensionality reduction, ECA adaptively determines the convolutional kernel size. k Subsequently, a convolution kernel of size 1 is applied to the feature map. kThe input feature map is processed by a one-dimensional (1-D) convolution, followed by a sigmoid function to obtain the channel attention vector. Finally, the output feature map is obtained by multiplying each channel of the input feature map with the corresponding element in the attention vector. ECA achieves local cross-channel interaction through adaptive one-dimensional convolution, thereby significantly improving model performance with minimal parameters and computational cost. ECA compresses the spatial dimension of the input feature map, transforming the size of each channel's feature map from H×W×C to 1×1×C, and then adjusts the size according to the number of channels. C The convolution kernel size is dynamically calculated using formula (5):

[0043] (5); in, and For hyperparameters, Usually, it is taken as 2. It is usually set to 1. k The size of the convolution kernel. C This represents the number of channels.

[0044] Channel attention weights are generated using the Sigmoid function and multiplied channel by channel with the original feature map to achieve feature recalibration. Figure 3 middle Ẋ The input small target image is the result of c2f processing. Ẍ The output image is the fused feature map, which is the feature map after channel interaction. W , H , C These represent the width, height, and number of channels of the small target image, respectively. GAP represents global pooling. Formula (5) is represented. This represents the Sigmoid function.

[0045] In an exemplary embodiment, the multi-branch parallel structure includes six branches; the first branch includes a series of convolutional layers with kernels of 7×1, 1×7, 7×1, and 1×7; the second branch includes a series of convolutional layers with kernels of 5×1, 1×5, 5×1, and 1×5; the third branch includes a series of convolutional layers with kernels of 3×1, 1×3, 3×1, and 1×3; the fourth branch is a convolutional layer with kernels of 1×1; the fifth branch includes a convolutional layer with kernels of 3×1 and 1×3; and the sixth branch is an average pooling layer.

[0046] The six branches in the multi-branch parallel structure extract different features based on different convolutional kernels. A 7×7 convolutional kernel is simulated by concatenating 1×7 and 7×1 kernels; strip convolution effectively reduces the number of parameters. Complex background information is a common problem in remote sensing targets, and ECA effectively mitigates this by suppressing channel information irrelevant to the target through adaptive channel weight allocation. Simultaneously, it enhances the detailed features of small targets through local cross-channel interactions. This aligns with the effects of multi-branch (average pooling and depthwise separable convolution), and the addition of multi-branch (average pooling and depthwise separable convolution) improves the performance of small target detection. SAM (Spatial Attention) and ECA (Channel Attention) are complementary. SAM enhances the model's sensitivity to spatial location information, improving task performance. It performs well in locating small targets in complex backgrounds.

[0047] In the multi-scale fusion model, the input feature map is first processed by ECA, which significantly improves performance despite having very few parameters. Subsequently, the multi-scale features of the landslide are fully extracted through six parallel paths. The output feature maps of these six paths are concatenated along the channel dimension, and then a 1×1 convolution is used to fuse feature information and reduce the channel dimension. Finally, the output feature maps of the two branches are concatenated to form the output of the multi-scale fusion model. Next, the spatial attention model processes the output. Two 1×H×W feature maps are generated through max pooling and average pooling. These two feature maps are concatenated using a Concat operation, and a 7×7 convolution is applied to generate a single-channel feature map.

[0048] In SAM, the input is concatenated by spatial pooling and channel pooling, then weighted by 1*1 convolution and the sigmoid function. Finally, the weights are multiplied by the output to obtain the detection result.

[0049] The spatial attention feature map is obtained through the Sigmoid function. Finally, the output is multiplied by the original input to restore it to the C×H×W size as shown in formula (6):

[0050] (6); in, The output is a spatial attention weight map. Represents the Sigmoid function. For a 7×7 convolution, For average pooling, For max pooling, F For the input feature map, In an exemplary embodiment, the training process of the multi-level feature focusing detection model specifically includes: acquiring sample small target images with small target bounding boxes; training the multi-level feature focusing detection model using the sample small target images and adjusting the parameters of the multi-level feature focusing detection model until the loss value calculated by the original loss function of the multi-level feature focusing detection model is minimized; based on the multi-level feature focusing detection model corresponding to the minimum loss value calculated by the original loss function, introducing a Gaussian angle loss function to continue training, so as to improve the detection accuracy of the multi-level feature focusing detection model for rotating targets.

[0051] Specifically, during the training phase, the initial learning rate is set to 0.01, and the learning rate momentum is set to 0.937. Due to GPU memory limitations, the batch size is set to 6. The batch size is set to 24, Dropout is 0.5, the optimizer is SDG, and the training epochs are 800.

[0052] Figure 4 The diagram shows the comparative experimental results of aspect ratios of 1:1 and 1:5 provided by this invention. Comparative experiments were conducted under aspect ratio conditions of 1:1 and 1:5, as shown below. Figure 4 As shown, when the aspect ratio of the target to be detected is close to 1:1, the Gaussian angle loss changes as a cosine function, while the initial loss function remains unchanged, which effectively solves the angle confusion problem. However, when the aspect ratio of the target to be detected is greater than 1, the Gaussian angle loss is close to the original loss because there is no angle confusion problem for targets with large aspect ratios, and the Gaussian angle loss has no effect in this case.

[0053] GM-YOLO significantly improves detection accuracy across various remote sensing datasets: To enhance feature fusion, a multi-scale fusion model is introduced, improving detection accuracy by 4%. To reduce angular ambiguity, GAL is introduced, achieving a 4.7% accuracy improvement compared to the baseline network. By integrating these two improvement strategies, the network excels in feature extraction of small rotating targets in remote sensing images, significantly enhancing detection accuracy. (See Table 1.)

[0054] Table 1 GM-YOLO outperforms other classic algorithms on most categories of the DIOR dataset. However, its accuracy drops for the categories "Airport" and "Dam". This is because the targets in these two categories are larger and have a higher aspect ratio, causing the algorithm to occasionally misclassify a single target as multiple targets. For ease of comparison, the categories in the dataset have been numbered. Compared to YOLOv8OBB, GM-YOLO achieves an accuracy improvement of 2.5% to 4% in 15 categories (including Airplane, Baseball Court, Chimney, Dam, Bridge, Expressway Service Area, Expressway Toll Station, Ground Track Field, Golf Field, Harbor, Overpass, Stadium, Storage Tank, Train Station, and Windmill). Other categories also show varying degrees of improvement, as detailed in Table 2 below.

[0055] In Table 2, R-CNN stands for Region-based Convolutional Neural Network (R-CNN); RICNN stands for Rotation-Invariant Convolutional Neural Network (RICNN); RICAOD stands for Rotation-Invariant Classification and Object Detection (RICAOD); RIFD-CNN stands for Rotation-Invariant and Fisher Discriminative Convolutional Neural Network (RIFD-CNN); Faster R-CNN stands for Faster Region-based Convolutional Neural Network (Faster R-CNN); SSD stands for Single Shot MultiBox Detector (SSD); and Faster R-CNN FPN-ResNet-50 stands for Faster Region-based Convolutional Neural Network with Feature Pyramid Network and ResNet-50 (Faster R-CNN). FPN-ResNet-50); Faster R-CNN FPN-ResNet-101 is a faster region-based convolutional neural network based on Feature Pyramid Network and ResNet-101; Mask-R-CNN FPN-ResNet-50 is a mask region-based convolutional neural network based on Feature Pyramid Network and ResNet-50.Mask-R-CNN and FPN-ResNet-101 are mask region-based convolutional neural networks based on feature pyramid networks and ResNet-101 (Mask-R-CNN); RetinaNet and ResNet-50 are RetinaNet networks based on ResNet-50 (RetinaNet with ResNet-50, RetinaNet ResNet-50); RetinaNet and ResNet-101 are RetinaNet networks based on ResNet-101 (RetinaNet with ResNet-101, RetinaNet ResNet-101); PANet and ResNet-50 are path aggregation networks based on ResNet-50 (PANetResNet-50); PANet and ResNet-101 are path aggregation networks based on ResNet-101 (Path Aggregation Network with ResNet-50, PANetResNet-50). ResNet-101, PANet; CornerNet is the Corner Proposal Network; YOLOv8OBB is the YOLOv8 version, Oriented Bounding Box Detection Network; FSODNet is the Few-Shot Object Detection Network; GM-YOLO is a Gaussian angle loss and multi-level feature focusing detection network (GAL-MLFF YOLO). GM-YOLO is a multi-level feature focusing detection model.

[0056] Table 2 Figure 5 This is a schematic diagram of the small target rotating bounding box detection results provided by the present invention, as shown below. Figure 5 As shown, GM-YOLO performs well for common, difficult-to-detect targets in remote sensing image detection, such as dense targets, small-scale targets, square-shaped targets, and targets with complex backgrounds.

[0057] When applying the small target detection method based on Gaussian angle loss provided by this invention, it is not necessary to consider... Figure 1 The steps shown are executed in sequence. The specific execution order of each step can be determined as needed, and this invention does not impose any restrictions on it.

[0058] The above describes a method for detecting small targets in a rotating bounding box based on Gaussian angle loss, provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding device for detecting small targets in a rotating bounding box based on Gaussian angle loss, such as... Figure 6 As shown.

[0059] Figure 6 A schematic diagram of a small target detection device based on Gaussian angle loss based on a rotating frame provided by the present invention includes: The first acquisition module 601 is used to acquire a multi-level feature focusing detection model. The multi-level feature focusing detection model is an improvement based on the YOLOv8OBB network model, in which a multi-scale fusion model is embedded between the c2f and OBB output layers of the YOLOv8OBB network model. The multi-scale fusion model enhances the feature representation capability of small targets through cross-level feature interaction. The loss function of the multi-level feature focusing detection model is constructed based on Gaussian angle loss. Gaussian angle loss is used to solve the boundary discontinuity problem of square-like targets in angle regression, so as to improve the localization accuracy of the rotating bounding box of small targets.

[0060] The second acquisition module 602 is used to acquire the remote sensing image to be detected and to perform normalization processing on the remote sensing image to be detected; the remote sensing image to be detected includes multiple small targets with different directions and different scales.

[0061] The prediction module 603 is used to perform feature fusion enhancement on the normalized remote sensing image to be detected through a multi-scale fusion model in the multi-level feature focusing detection model to obtain a first fused feature map, and to perform small target rotation bounding box prediction through the first OBB output layer based on the first fused feature map to obtain the rotation bounding box information of multiple small targets in the remote sensing image to be detected; the small target rotation bounding box information includes the category of the small target and the coordinates of the small target rotation bounding box.

[0062] Specific limitations regarding the Gaussian angle loss-based rotating bounding box small target detection device can be found in the limitations of the Gaussian angle loss-based rotating bounding box small target detection method described above, and will not be repeated here. Each model in the aforementioned Gaussian angle loss-based rotating bounding box small target detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These models can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each model.

[0063] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 A rotating bounding box method for small target detection based on Gaussian angle loss is provided.

[0064] The present invention also provides Figure 7 The schematic diagram of the computer device shown is as follows: Figure 7 As shown, at the hardware level, this computer device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above. Figure 1 A rotating bounding box method for small target detection based on Gaussian angle loss is provided.

[0065] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0066] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this invention.

Claims

1. A method for detecting small targets using a rotating bounding box based on Gaussian angle loss, characterized in that, include: A multi-level feature-focused detection model is obtained; the multi-level feature-focused detection model is an improvement based on the YOLOv8OBB network model, in which a multi-scale fusion model is embedded between the c2f and OBB output layers of the YOLOv8OBB network model; the multi-scale fusion model enhances the feature representation capability of small targets through cross-level feature interaction; the loss function of the multi-level feature-focused detection model is constructed based on Gaussian angle loss; the Gaussian angle loss is used to solve the boundary discontinuity problem of square-like targets in angle regression, so as to improve the localization accuracy of the rotating bounding box of small targets; The remote sensing image to be detected is acquired and normalized; the remote sensing image to be detected includes multiple small targets of different directions and scales. In the multi-level feature-focused detection model, the normalized remote sensing image to be detected is enhanced by feature fusion through the multi-scale fusion model to obtain a first fused feature map. Based on the first fused feature map, the rotation bounding box prediction of small targets is performed through the first OBB output layer to obtain the rotation bounding box information of multiple small targets in the remote sensing image to be detected. The rotation bounding box information of small targets includes the category of small targets and the coordinates of the rotation bounding box of small targets. The multi-level feature-focused detection model includes a Backbone, a first C2F, a second C2F, and a first multi-scale fusion model. The step of enhancing the normalized remote sensing image to be detected through feature fusion using the multi-scale fusion model to obtain a first fused feature map specifically includes: inputting the remote sensing image to be detected into the Backbone; extracting a first-scale feature map, a second-scale feature map, and a third-scale feature map of the remote sensing image to be detected through the hierarchical structure of the convolutional network in the Backbone; upsampling the third-scale feature map and concatenating it with the second-scale feature map to obtain a first concatenation result; performing cross-stage partial aggregation and multi-scale feature processing on the first C2F; upsampling the processing result of the first C2F and concatenating it with the first-scale feature map to obtain a second concatenation result; inputting the second concatenation result into the second C2F; and inputting the processing result of the second C2F into the first multi-scale fusion model for channel interaction, extraction and fusion of convolutional features at different scales, and enhancement of key region expression to obtain the first fused feature map. The multi-level feature focusing detection model includes a third C2F, a second multi-scale fusion model, a fourth C2F, a third multi-scale fusion model, a second OBB output layer, and a third OBB output layer; The first, second, and third multi-scale fusion models all include a high-efficiency channel attention model, a multi-branch parallel structure, and a spatial attention model connected in series. The step of inputting the second concatenation result into the second C2F and then inputting the processing result of the second C2F into the first multi-scale fusion model for channel interaction, extraction and fusion of convolutional features at different scales, and enhancement of key region representation to obtain the first fused feature map specifically includes: extracting the channel interaction-adjusted feature map of the second C2F processing result through the high-efficiency channel attention model; extracting convolutional features of different scales from the channel interaction-adjusted feature map through the multi-branch parallel structure and fusing the convolutional features of different scales to obtain fused features; and inputting the fused features into the spatial attention model to enhance the representation of key regions to obtain the first fused feature map.

2. The method as described in claim 1, characterized in that, The loss function of the multi-level feature focusing detection model is: ; in, , The Hellinger distance is calculated based on the Bach distance. For classifying losses, To pinpoint the loss, Loss to the target Gaussian angle loss; The calculation formula for the Gaussian angle loss is as follows: ; in, These represent the actual width, actual height, actual rotation angle, and predicted rotation angle of the bounding box, respectively.

3. The method as described in claim 1, characterized in that, The method further includes: After obtaining the rotated bounding box information of multiple small targets, the processing result of the second C2F is processed by one-dimensional convolution, and the processing result of the one-dimensional convolution is input into the third C2F. The processing result of the third C2F is then input into the second multi-scale fusion model to obtain the second fusion feature map. The second fused feature map is input into the second multi-scale fusion model to predict the rotating bounding box of the central target, thereby obtaining the central target in the remote sensing image to be detected. The processing result of the third C2F is convolved in one dimension and then concatenated with the upsampling result of the third scale feature map. This concatenation is then fed into the fourth C2F, and the processing result of the fourth C2F is fed into the third multi-scale fusion model to obtain the third fusion feature map. The third fused feature map is input into the third multi-scale fusion model to predict the large target rotation bounding box, thereby obtaining the large target in the remote sensing image to be detected.

4. The method as described in claim 1, characterized in that, The channel interaction feature map of the processing result of extracting the second c2f through the efficient channel attention model specifically includes: In the efficient channel attention model, the processing result of the second c2f is subjected to average pooling to obtain a small target feature map with size H×W×C; C is the number of channels of the small target feature map; H is the height of the small target feature map; W is the width of the small target feature map; The size of the convolution kernel is calculated based on the number of channels; Based on the calculated convolution kernel size, a one-dimensional convolution is performed on the small target feature map after average pooling to achieve the interaction between local channels in the small target feature map after average pooling. Channel attention vectors are generated using the Sigmoid function; Multiply each channel of the small target feature map with the corresponding element in the channel attention vector to obtain the feature map after channel interaction.

5. The method as described in claim 1, characterized in that, The multi-branch parallel structure includes six branches: the first branch includes a series of convolutional layers with kernels of 7×1, 1×7, 7×1, and 1×7; the second branch includes a series of convolutional layers with kernels of 5×1, 1×5, 5×1, and 1×5; the third branch includes a series of convolutional layers with kernels of 3×1, 1×3, 3×1, and 1×3; the fourth branch is a convolutional layer with kernels of 1×1; the fifth branch includes a convolutional layer with kernels of 3×1 and 1×3; and the sixth branch is an average pooling layer.

Citation Information

Patent Citations

  • YOLOv8 improved model training method and ship detection method

    CN119131580A