Satellite remote sensing rotating target detection method and system based on YOLOv8
By optimizing the YOLO network structure and designing new loss function and feature fusion modules, the existing target detection methods have solved the problems of large parameters and high leakage detection rates in satellite detection tasks, and more efficient satellite remote sensing rotation target detection is achieved.
Patent Information
- Application Number
- CN202510056104.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-02
AI Technical Summary
The existing deep learning-based object detection method has limited its effective application in satellite detection missions due to the huge number of model parameters and high target miss detection rates.
A satellite remote sensing rotation object detection method based on YOLOv8 is proposed. By optimizing the YOLO network structure, the number of model parameters is reduced, and a new rKLDloss loss function and high-performance feature fusion module are designed to improve detection accuracy.
It realizes improving the target detection accuracy in satellite remote sensing images, significantly reducing the amount of model parameters, and showing better performance when detecting remote sensing small targets such as small cars.
Smart Images

Figure CN119919828A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of satellite remote sensing target detection, and in particular to a satellite remote sensing rotating target detection method and system based on YOLOv8. Background Art
[0002] In recent years, with the rapid progress of remote sensing technology and satellite communication technology, the number of satellite remote sensing images has increased dramatically, and the image resolution has continued to improve. This has made the application of remote sensing image target detection technology in reconnaissance, traffic planning and other fields increasingly prominent.
[0003] In the past, remote sensing image target detection mainly relied on traditional methods, which usually required manual feature extraction, which was not only time-consuming and labor-intensive, but also increased the difficulty of detection. However, with the vigorous development of deep learning technology, deep learning-based target detection methods have greatly promoted the progress in this field. However, current deep learning-based target detection methods still face challenges such as large model parameters and high target missed detection rate, which limit their effective application in satellite detection tasks. Summary of the invention
[0004] The purpose of the present invention is to propose a satellite remote sensing rotating target detection method and system based on YOLOv8, which optimizes the YOLO network structure to improve the detection accuracy of targets in remote sensing images.
[0005] According to a first aspect of an embodiment of the present disclosure, a satellite remote sensing rotating target detection method based on YOLOv8 is provided, comprising the following steps:
[0006] Preprocess satellite remote sensing images;
[0007] The preprocessed satellite remote sensing images are input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets;
[0008] The YOLOv8 model is optimized and trained using satellite remote sensing images with bounding boxes and classification categories, with the new rKLDloss loss function as an aid during training.
[0009] In target detection, the accuracy of detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered a false detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
[0010] In one of the embodiments, the YOLOv8 model is a one-stage target detection network model, including an image input module, a backbone feature extraction network, a feature fusion network, and a detection head;
[0011] The image input module includes an adaptive anchor frame calculation network and an adaptive image scaling function module, which are used to process the input image to meet the model input requirements; the adaptive anchor frame calculation network includes position prediction, shape prediction and feature adaptation modules; the position prediction branch outputs the target center point prediction value, and the shape prediction branch outputs the target shape prediction value under the guidance of the position prediction information; a set of anchor frames is generated by selecting the maximum possible position and the most likely shape of the position; the feature adaptation module uses the target offset output by the shape prediction branch to adjust the original feature map, realize feature alignment, and output a new feature map; the role of adaptive image scaling is to scale pictures of different sizes to a standard size, and then enter the model from the input end;
[0012] The backbone feature extraction network includes a CBL module, an SPPF module, and an FFEM module; the CBL module includes Conv, BN, and Leaky-Relu, which are used for feature sampling and mapping to a nonlinear space; the SPPF module is used to input the sampling results of the CBL module into 1*1, 5*5, 9*9, and 13*13 Maxpool modules respectively, and then connect the output results to obtain fusion features; the FFEM module includes PConv, a CBL module, and a residual module, which are used for fast fusion of shallow features;
[0013] The feature fusion network is a network architecture formed by the fusion of the FPN network and the PAN network, and is used to effectively fuse the features extracted by the backbone feature extraction network;
[0014] The detection head is a decoupled detection head that separates the classification and detection processes so that each scale has an independent detector.
[0015] In one embodiment, optimizing the YOLOv8 model includes: reducing a downsampling operation and deleting a 20*20 large target detection head; and adding an upsampling and feature connection operation in the feature fusion network, and adding a 160*160 small target detection head.
[0016] In one embodiment, optimizing the YOLOv8 model includes: designing a high-performance feature fusion module EFRM based on the EMA attention mechanism, and embedding it between each feature layer of the backbone feature extraction network and the feature fusion network.
[0017] In one embodiment, optimizing the YOLOv8 model includes: partially designing a fast feature extraction module FFEM through a convolution module PConv.
[0018] In one of the embodiments, the new rKLDloss loss function is used to solve the problem of inaccurate target location positioning, and converts the rotation box (x, y, w, h, θ) into a two-dimensional Gaussian distribution N (μ, Σ):
[0019]
[0020] Where x and y represent the horizontal and vertical coordinates of the center point, w and h represent the width and height of the bounding box, θ represents the rotation angle of the rotation box, R represents the rotation matrix, and Λ represents the diagonal matrix of the eigenvalue;
[0021] The rKLDLoss loss function is formed by combining the center point loss with the loss of the height, width and rotation angle of the rotation box and assigning different weights:
[0022]
[0023] Among them, α and β represent the proportional coefficients of the center point loss and the coupled loss of the height, width and rotation angle of the rotation box, μ represents the Gaussian distribution corresponding to the rotation bounding box, and Σ represents the covariance matrix of the Gaussian distribution corresponding to the bounding box.
[0024] In one embodiment, the confusion matrix can define precision and recall:
[0025]
[0026] TP represents samples that are actually positive and correctly predicted as positive by the model, FP represents samples that are actually negative but incorrectly predicted as positive by the model, and FN represents samples that are actually positive but incorrectly predicted as negative by the model. In order to balance the conflict between accuracy and recall, the mAP indicator is used to evaluate the performance of the detection model:
[0027]
[0028] Where P i Represents the accuracy of the i-th category of objects to be classified, R i N represents the recall rate of the i-th category of objects to be classified; class Represents the total number of detected objects in the data set; mAP is used to measure the performance of the target detection model. The higher the mAP value, the better the performance of the model.
[0029] In order to further evaluate the recall and precision of the model and obtain the best confidence of the target detection model, the F1 score is used as the evaluation indicator:
[0030]
[0031] When the confidence changes from 0 to 1, the value of F1 is plotted as a curve, namely the F1 curve.
[0032] According to a second aspect of an embodiment of the present disclosure, a satellite remote sensing rotating target detection system based on YOLOv8 is provided, comprising:
[0033] Preprocessing module, preprocessing satellite remote sensing images;
[0034] Classification module: The preprocessed satellite remote sensing image is input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets;
[0035] The optimization module optimizes the YOLOv8 model and uses satellite remote sensing images with bounding boxes and classification categories to train the optimized YOLOv8 model. The training is assisted by the new rKLDloss loss function.
[0036] In the detection module, in target detection, the accuracy of the detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered an incorrect detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
[0037] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored and running on the memory, wherein when the processor executes the program, the method for detecting rotating targets in satellite remote sensing based on YOLOv8 is implemented.
[0038] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for detecting rotating targets in satellite remote sensing based on YOLOv8 is implemented.
[0039] Compared with the prior art, the above technical solution adopted by the present invention has the advantages that remote sensing target detection is realized based on the improved YOLOv8 algorithm by optimizing the YOLO network structure. The specific optimization includes the backbone feature extraction network, the feature fusion network and the detection head. In addition, in combination with the EMA attention mechanism, a high-performance feature fusion module EFRM is designed and introduced between the backbone feature extraction network and the feature fusion network. At the same time, a fast feature extraction module FFEM is also designed to replace the original C2f module. These improvements not only make the YOLOv8 algorithm significantly better than the original version in detection accuracy, but also greatly reduce the amount of model parameters to two-thirds of the original. More importantly, the improved algorithm shows superior performance in detecting small remote sensing targets such as small cars. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0041] Figure 1 This is the overall model architecture diagram of the present invention;
[0042] Figure 2 It is a structural diagram of the residual module FB_block of the present invention;
[0043] Figure 3 It is a structural diagram of the fast feature extraction module (FFEM) of the present invention;
[0044] Figure 4 It is a structural diagram of a high-performance feature fusion module (EFRM) of the present invention;
[0045] Figure 5 It is a comparison diagram of the attention paid to small targets before and after the optimization of the backbone network structure of the model of the present invention;
[0046] Figure 6 Comparison between the original detection image of the present invention and the detection image after the high-performance feature fusion module is introduced;
[0047] Figure 7 It is a comparison diagram of the original model confusion matrix and the improved model confusion matrix of the present invention;
[0048] Figure 8 A comparison chart of the average detection accuracy mAP of the model of the present invention and other models;
[0049] Fig. 9 A comparison chart of the model of the present invention and other models in terms of positioning and classification loss;
[0050] Fig.10This is a comparison chart of the effects of the model of the present invention and other models in detecting remote sensing targets. DETAILED DESCRIPTION
[0051] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0052] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0053] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0054] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0055] Embodiment 1:
[0056] This embodiment provides a satellite remote sensing rotating target detection method based on YOLOv8, which can achieve accurate detection of remote sensing targets. It includes the following steps:
[0057] S1: Preprocess satellite remote sensing images;
[0058] First, we create a remote sensing target dataset: by class screening the existing open source large-scale remote sensing dataset DOTAv1.0, we extract five types of remote sensing targets with obvious directionality, namely small cars, large cars, small boats, oil tanks and airplanes, as remote sensing rotation target datasets. The resolution of these images ranges from 800×800 pixels to 4000×4000 pixels. The dataset consists of three parts: training set, test set and validation set. The training set has 1223 images and labels, the test set has 937 images and labels, and the validation set has 378 images and labels. The labels of the dataset consist of angles and horizontal bounding boxes, with a total of 259,841 instances.
[0059] Since the original image resolution of the DOTA dataset is too high, direct training will not only increase the computing pressure of the GPU device but also reduce the model detection accuracy. Therefore, the original dataset was preprocessed. Specifically, each image in the dataset was cut into a 640×640 image. In order to prevent the target information in the original image from being lost due to cutting, the image overlap ratio was ensured to be 25% during the cutting process. For images that were not large enough to be cut, the edge pixels were filled to meet the size required for training.
[0060] The RGB three-channel information in the cropped original image is encoded into a three-dimensional tensor of 640*640*3 and input into the model.
[0061] S2: The preprocessed satellite remote sensing image is input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets;
[0062] After the image is input into the YOLOv8 model, multiple positions of the image will be directly output for regression to obtain the bounding boxes and classification categories of multiple objects. The entire image is directly used to train the model. The target recognition method of the YOLO series is end-to-end, that is, a one-stage target detection algorithm, and the detection speed is faster than the two-stage algorithm. It has 5 versions, namely n, s, m, l and x, each version corresponds to a different network depth and width. The YOLOv8 model includes an image input module, a backbone feature extraction network, a feature fusion network and a detection head.
[0063] The image input module includes an adaptive anchor frame calculation network and an adaptive image scaling function module, which are used to process the input image to meet the model input requirements.
[0064] The adaptive anchor frame calculation network can guide the generation of the rotation anchor frame according to the position information of the target. This network is divided into position prediction, shape prediction and feature adaptation modules. The position prediction branch outputs the target center point prediction value, and the shape prediction branch outputs the target shape prediction value (including width, height and angle) under the guidance of the position prediction information. A set of anchor frames is generated by selecting the maximum possible position and the most likely shape of the position. The feature adaptation module uses the target offset output by the shape prediction branch to adjust the original feature map, realize feature alignment, and output a new feature map. This design can adapt to the extreme aspect ratio of the target and improve the detection rate.
[0065] The purpose of adaptive image scaling is to scale images of different sizes to a standard size before entering the model from the input end. In order to ensure the target size ratio, adaptive scaling is performed by maintaining the aspect ratio and padding with zeros.
[0066] The backbone feature extraction network includes a CBL module, an SPPF module, and an FFEM module; the CBL module includes Conv, BN, and Leaky-Relu, which are used for feature sampling and mapping to a nonlinear space; the SPPF module is used to input the sampling results of the CBL module into 1*1, 5*5, 9*9, and 13*13 Maxpool modules respectively, and then connect the output results to obtain fusion features; the FFEM module includes PConv, a CBL module, and a residual module, which are used for fast fusion of shallow features;
[0067] The feature fusion network is a network architecture formed by the fusion of the FPN network and the PAN network, which can further screen and fuse the features from the backbone feature extraction network, thereby improving the detection ability of the network. Among them, FPN uses a top-down method to upsample and fuse the feature map, and PAN uses a bottom-up method to downsample and fuse the feature map. The two work together to help the model learn features.
[0068] The detection head mainly includes a classification prediction network and a bounding box prediction network. The classification prediction network is responsible for identifying the target category in the image, while the bounding box prediction network is responsible for predicting the position and size of the target. This structure completely separates the classification and bounding box regression networks, avoiding the problem of feature mismatch and improving the accuracy of target detection.
[0069] S3: Optimize the YOLOv8 model and train it using satellite remote sensing images with bounding boxes and classification categories, using the new rKLDloss loss function to assist in the training.
[0070] In order to solve the problem that the YOLOv8 target detection algorithm seriously missed the detection of small remote sensing targets, the feature extraction and fusion layer of small targets and the corresponding small target detection head were added. In order to solve the problem that the YOLOv8 model has a large number of parameters and is not easy to deploy on edge devices, the network was pruned and a new feature extraction module FFEM was designed to lighten the model. Finally, an efficient feature fusion module EMFF was designed and applied to the YOLOv8 detection network to improve the detection accuracy.
[0071] The main reason for the problem of missed detection of small targets in remote sensing is that the scale of remote sensing images is very large, usually 1000*1000 or even larger. The small targets (such as cars, boats, etc.) therein have only less than 100 pixels. The detection layer of the YOLOv8 detection network may not be able to pay attention to these small targets. Assuming that the input of the YOLOv8 network is an image of size 640×640, the feature map sizes assigned to the three detection layers through five downsamplings are 20×20, 40×40 and 80×80 respectively. In these three feature maps, 80×80 is responsible for detecting small targets, and the receptive field size of each feature map is 640 / 80=8. If the width or height of the target in the original image is less than 8 pixels, it is difficult for the network to obtain valuable small target feature information. Considering that there are no large targets in remote sensing images, the present invention proposes to increase the small target detection head to improve the model detection accuracy, and cut the large target detection head and the corresponding downsampling layer to lightweight the model.
[0072] The fifth downsampling was deleted from the backbone feature extraction network. The corresponding upsampling layer in the FPN network structure was also deleted, and an upsampling operation was added based on the last upsampling layer of the original FPN structure to obtain a larger feature map (size 160×160) and merge it with the second downsampling feature map of the backbone network. A 160×160 detection head was added to receive the new feature map to detect small targets.
[0073] In order to solve the problem that the YOLOv8 model has a large number of parameters and is not easy to deploy on edge devices, a new feature extraction module, Faster-Feature Enhancement Module (FFEM), is designed using the idea of partial convolution. During the feature extraction process, this module only extracts feature information from some channels of the feature map, and the remaining channels remain unchanged. In addition, the module also combines the residual structure to enrich the feature information, which enables the model to reduce the amount of calculation while ensuring the detection accuracy of the model. The new residual module FB_block is obtained by combining partial convolution (PConv) and residual structure. The residual module contains three branches. The first branch contains three modules. The first module is PConv3*3, followed by two ordinary Conv1*1, which is used to extract features. The second branch contains only one PConv1*1, which enriches the diversity of the convolution kernel and allows the model to learn richer features with less computation. The last branch is a skip connection, which plays the role of reusing input features. The specific structure of the proposed FB_block module is as follows Figure 2 Then the FB_block module is integrated with the C2f module to finally obtain the FFEM module. The specific structure is as follows Figure 3 As shown in Figure 2, compared with the C2f module, the FFEM module can not only fuse features faster but also enable the network to better capture target information of various scales in images with complex backgrounds.
[0074] EMA (Efficient Multi-Scale Attention) attention mechanism is a new type of attention module, which improves the ability of feature representation through cross-spatial learning and multi-scale feature fusion. This attention pays attention to channels and spaces at the same time, which enhances the distinguishability of feature representation. A new efficient feature fusion module EMFF is designed using this attention module in combination with the residual structure. This module groups channel dimensions, recalibrates channel weights in each parallel branch, and encodes global information to enhance the model's ability to capture long-distance dependencies. The present invention embeds this module into the second, third, and fourth layers of the backbone feature extraction network and feature fusion network of the detection model to improve the model's attention to the target of interest.
[0075] S4: In target detection, the accuracy of detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered a false detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
[0076] Bounding boxes play an important role in locating objects. Especially in the task of rotating object detection, oriented bounding boxes can reduce more redundant background information than horizontal anchor boxes, increase the proportion of effective target information, and reduce information loss during detection. It is crucial to design a loss function rKLDloss corresponding to the oriented bounding box.
[0077] Convert the rotation box (x, y, w, h, θ) to a two-dimensional Gaussian distribution N (μ, Σ):
[0078]
[0079]
[0080] Where x and y represent the horizontal and vertical coordinates of the center point, w and h represent the width and height of the bounding box, θ represents the rotation angle of the rotation box, R represents the rotation matrix, and Λ represents the diagonal matrix of the eigenvalue.
[0081] The rKLDLoss loss function is formed by combining the center point loss and the coupled loss of the height, width and rotation angle of the rotation box and assigning different weights:
[0082]
[0083] The model detection test was conducted by manually adjusting the ratio of the two losses, where the ratio was artificially divided into ten ratios {1:9, 2:8…, 9:1}. The experiment showed that when the ratio of the center point loss and the coupling loss of the height, width and rotation angle of the rotation box was 2:8, the model detection effect was the best and the mAP value was the highest.
[0084] Finally, the present invention applies the improved detection network to the remote sensing rotating target detection task, and the missed detection problem of YOLOv8 on small targets is significantly improved after the improvement.
[0085] For example, the TP value of the car category is 0.86, the FP value is 0.31, and the FN value is 0.06. The confusion matrix can be used to define the precision and recall:
[0086]
[0087] For each target, when the threshold is reduced from 1 to 0, the confusion matrix will change. Then, a curve is drawn with accuracy and recall as the horizontal and vertical axes respectively. This curve is called the PR curve. The area enclosed by the PR curve and the two axes is called the average precision (AP). For the entire data set, the average precision mAP is used to evaluate the detection performance of the model:
[0088]
[0089] Where P i Represents the accuracy of the i-th category of objects to be classified, R i N represents the recall rate of the i-th category of objects to be classified. class Represents the total number of detected objects in the dataset. mAP is used to measure the performance of the target detection model. The higher the mAP value, the better the performance of the model.
[0090] At the same time, in order to further evaluate the recall and precision of the model and obtain the best confidence of the target detection model, the present invention also uses the F1 score as an evaluation indicator, which is calculated as follows:
[0091]
[0092] When the confidence changes from 0 to 1, the value of F1 is plotted as a curve, namely the F1 curve.
[0093] Table 1 Comparison of the results of the proposed method with seven other state-of-the-art methods (the highest performance is shown in bold)
[0094]
[0095]
[0096] Experimental results show that the proposed model achieves the best results, especially in the three types of target recognition tasks: small cars, boats and oil tanks, outperforming other detection methods.
[0097] Figure 5 This is a comparison of the degree of attention to small targets before and after the optimization of the backbone network structure of the model of the present invention. From the figure, it can be observed that the attention color of the optimized model is significantly deepened, which indicates that the model can better focus on these small-scale targets.
[0098] Figure 7 This is a comparison diagram of the original detection image of the present invention and the detection image after the high-performance feature fusion module is introduced. This figure proves that after the high-performance feature fusion module is introduced into the model, the model's attention to the target is significantly improved, and the missed detection rate is reduced.
[0099] Figure 8 The average detection accuracy of the improved model and the recent SOTA model on the DOTA dataset is compared. This figure proves that the proposed model has higher detection accuracy and faster convergence speed than other models.
[0100] Fig. 9The changes in the positioning loss and classification loss of the improved model and the recent SOTA model during training are compared. The figure proves that the loss of the improved model converges faster, the loss value is lower, and the detection result is closer to the original label value.
[0101] Fig.10 The improved model is compared with the recent SOTA model in the DOTA dataset. The figure proves that the improved model is more sensitive to small remote sensing targets and significantly reduces the number of missed targets.
[0102] Embodiment 2:
[0103] This embodiment provides a satellite remote sensing rotating target detection system based on YOLOv8, including:
[0104] Preprocessing module, preprocessing satellite remote sensing images;
[0105] Classification module: The preprocessed satellite remote sensing image is input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets;
[0106] The optimization module optimizes the YOLOv8 model and uses satellite remote sensing images with bounding boxes and classification categories to train the optimized YOLOv8 model. The training is assisted by the new rKLDloss loss function.
[0107] In the detection module, in target detection, the accuracy of the detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered an incorrect detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
[0108] Embodiment three:
[0109] An electronic device includes a memory, a processor, and a computer program stored and running on the memory, wherein the processor implements the above-mentioned satellite remote sensing rotating target detection method based on YOLOv8 when executing the program, including:
[0110] Preprocess satellite remote sensing images;
[0111] The preprocessed satellite remote sensing images are input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets;
[0112] The YOLOv8 model is optimized and trained using satellite remote sensing images with bounding boxes and classification categories, with the new rKLDloss loss function as an aid during training.
[0113] In target detection, the accuracy of detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered a false detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
[0114] Embodiment 4:
[0115] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned satellite remote sensing rotating target detection method based on YOLOv8, including:
[0116] Preprocess satellite remote sensing images;
[0117] The preprocessed satellite remote sensing images are input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets;
[0118] The YOLOv8 model is optimized and trained using satellite remote sensing images with bounding boxes and classification categories, with the new rKLDloss loss function as an aid during training.
[0119] In target detection, the accuracy of detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered a false detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
[0120] Those skilled in the art should understand that the modules or steps of the present disclosure can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present disclosure is not limited to any specific combination of hardware and software.
[0121] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0122] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A satellite remote sensing rotating target detection method based on YOLOv8, characterized in that: The following steps are involved: Preprocess satellite remote sensing images; The preprocessed satellite remote sensing images are input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets; The YOLOv8 model is optimized and trained using satellite remote sensing images with bounding boxes and classification categories, with the new rKLDloss loss function as an aid during training. In target detection, the accuracy of detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered a false detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
2. According to a satellite remote sensing rotating target detection method based on YOLOv8 as claimed in claim 1, it is characterized in that: The YOLOv8 model is a one-stage target detection network model, including an image input module, a backbone feature extraction network, a feature fusion network, and a detection head; The image input module includes an adaptive anchor frame calculation network and an adaptive image scaling function module, which are used to process the input image to meet the model input requirements; The adaptive anchor frame calculation network includes position prediction, shape prediction and feature adaptation modules; The position prediction branch outputs the target center point prediction value, and the shape prediction branch outputs the target shape prediction value under the guidance of the position prediction information; a set of anchor boxes are generated by selecting the maximum possible position and the most likely shape at that position; The feature adaptation module uses the target offset output by the shape prediction branch to adjust the original feature map, achieve feature alignment, and output a new feature map; The role of adaptive image scaling is to scale images of different sizes to a standard size before entering the model from the input end; The backbone feature extraction network includes a CBL module, an SPPF module, and an FFEM module; the CBL module includes Conv, BN, and Leaky-Relu, which are used for feature sampling and mapping to a nonlinear space; the SPPF module is used to input the sampling results of the CBL module into 1*1, 5*5, 9*9, and 13*13 Maxpool modules respectively, and then connect the output results to obtain fusion features; the FFEM module includes PConv, a CBL module, and a residual module, which are used for fast fusion of shallow features; The feature fusion network is a network architecture formed by the fusion of the FPN network and the PAN network, and is used to effectively fuse the features extracted by the backbone feature extraction network; The detection head is a decoupled detection head that separates the classification and detection processes so that each scale has an independent detector.
3. According to a satellite remote sensing rotating target detection method based on YOLOv8 as claimed in claim 1, it is characterized in that: The optimization of the YOLOv8 model includes: reducing one downsampling operation in the backbone feature extraction network and deleting a 20*20 large target detection head; adding one upsampling and feature connection operation in the feature fusion network, and adding a 160*160 small target detection head.
4. According to a satellite remote sensing rotating target detection method based on YOLOv8 as claimed in claim 1, it is characterized in that: The optimization of the YOLOv8 model includes: designing a high-performance feature fusion module EFRM based on the EMA attention mechanism, and embedding it between each feature layer of the backbone feature extraction network and the feature fusion network.
5. According to a satellite remote sensing rotating target detection method based on YOLOv8 as claimed in claim 2, it is characterized in that: The optimization of the YOLOv8 model includes: partial convolution module PConv design fast feature extraction module FFEM.
6. According to a satellite remote sensing rotating target detection method based on YOLOv8 as claimed in claim 1, it is characterized in that: The new rKLDloss loss function is used to solve the problem of inaccurate target positioning and convert the rotation box (x, y, w, h, θ) into a two-dimensional Gaussian distribution N (μ, Σ): μ=(x,y) T (1) Where x and y represent the horizontal and vertical coordinates of the center point, w and h represent the width and height of the bounding box, θ represents the rotation angle of the rotation box, R represents the rotation matrix, and Λ represents the diagonal matrix of the eigenvalue; The rKLDLoss loss function is formed by combining the center point loss with the loss of the height, width and rotation angle of the rotation box and assigning different weights: Among them, α and β represent the proportional coefficients of the center point loss and the coupled loss of the height, width and rotation angle of the rotation box, μ represents the Gaussian distribution corresponding to the rotation bounding box, and Σ represents the covariance matrix of the Gaussian distribution corresponding to the bounding box.
7. According to a satellite remote sensing rotating target detection method based on YOLOv8 as claimed in claim 1, it is characterized in that: The confusion matrix can define precision and recall: TP represents samples that are actually positive and correctly predicted as positive by the model, FP represents samples that are actually negative but incorrectly predicted as positive by the model, and FN represents samples that are actually positive but incorrectly predicted as negative by the model. In order to balance the conflict between accuracy and recall, the mAP indicator is used to evaluate the performance of the detection model: Where P i Represents the accuracy of the i-th category of objects to be classified, R i N represents the recall rate of the i-th category of objects to be classified; class Represents the total number of detected objects in the data set; mAP is used to measure the performance of the target detection model. The higher the mAP value, the better the performance of the model. In order to further evaluate the recall and precision of the model and obtain the best confidence of the target detection model, the F1 score is used as the evaluation indicator: When the confidence changes from 0 to 1, the value of F1 is plotted as a curve, namely the F1 curve.
8. A satellite remote sensing rotating target detection system based on YOLOv8, characterized in that: include: Preprocessing module, preprocessing satellite remote sensing images; Classification module: The preprocessed satellite remote sensing image is input into the YOLOv8 model to obtain the bounding boxes and classification categories of multiple targets; The optimization module optimizes the YOLOv8 model and uses satellite remote sensing images with bounding boxes and classification categories to train the optimized YOLOv8 model. The training is assisted by the new rKLDloss loss function. In the detection module, in target detection, the accuracy of the detection is determined based on the IoU of the prediction box and the bounding box. When the IoU is greater than the threshold, the match is considered accurate. When the IoU is greater than the threshold but the category is incorrect, it is considered an incorrect detection. Even if the category of the prediction box matches the true category, if the IoU is less than the threshold, it is considered a false detection of the background. When there is no prediction box on the target, it is defined as a missed detection. A confusion matrix is constructed based on the above detection, and the confusion matrix is analyzed to obtain the prediction accuracy of each target category.
9. An electronic device comprising a memory, a processor and a computer program stored and running on the memory, characterized in that: When the processor executes the program, the satellite remote sensing rotating target detection method based on YOLOv8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a satellite remote sensing rotating target detection method based on YOLOv8 is implemented.
Citation Information
Cited By
SIM card information extraction method and system based on rotating target detection and dynamic correction
CN121482805A