New grassland SAR image ground object target detection method
By introducing the CBAM attention mechanism and Wise-IoUv3 loss function in the YOLOv8 model, the problem of the reduction in the accuracy of the grassland SAR image detection algorithm in small object detection is solved, and the detection accuracy and model generalization ability are significantly improved.
Patent Information
- Application Number
- CN202411652428.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-25
AI Technical Summary
The existing grassland SAR image detection algorithm has the problem of degradation in small object detection, and the IoU loss function fails to fully consider the shape differences between the prediction box and the real box, which affects the accuracy and performance of the detection.
Using YOLOv8 as the basic network, the feature extraction and fusion of the model is optimized to improve the accuracy of bounding box regression by introducing the CBAM attention mechanism and the improved Wise-IoUv3 loss function.
It significantly improves the accuracy of the detection of object objects in grassland SAR images, reduces missed detection and missed detection, enhances the generalization ability and rapid convergence speed of the model, and meets the practical application needs.
Smart Images

Figure CN119516405A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image target detection, and in particular to a new method for detecting ground objects in grassland SAR images. Background Art
[0002] In the current grassland SAR image detection algorithm, the detection of small targets has always been a difficult problem. Since the features of small targets are not obvious, the detection accuracy may decrease. In addition, SAR images usually have complex backgrounds, in which the target scales are diverse. The existing IoU loss function has certain defects and does not fully consider the shape difference between the predicted box and the real box, which affects the accuracy and performance of the detection. Summary of the invention
[0003] The present disclosure intends to provide a new method for detecting ground objects in grassland SAR images, which reduces missed detections and false detections, improves detection accuracy, and fully meets practical application requirements.
[0004] According to one of the solutions disclosed herein, a new method for detecting ground objects in grassland SAR images is provided, comprising:
[0005] Create grassland SAR image dataset;
[0006] Format conversion and division of grassland SAR image data;
[0007] YOLOv8 is used as the basic network for model training, including: feature extraction through the Backbone network; processing and enhancing the features extracted from the Backbone through the improved Neck network, and fusing them; using the improved loss function for training in the Head network;
[0008] Model reasoning and evaluation.
[0009] In some embodiments, wherein YOLOv8 is used as the basic network for model training, further comprising:
[0010] Set the number of ground object target categories and target category names in grassland SAR images;
[0011] Increase the diversity and richness of the dataset through data augmentation operations including rotation, translation, scaling, and mosaic;
[0012] Feature extraction is performed by adding CBAM attention mechanism to the Neck layer based on YOLOv8;
[0013] By adding the CBAM attention mechanism module to the Neck layer based on the PAN-FPN network, feature fusion is performed;
[0014] Output the predicted information including bounding box location, class probability and confidence score in YOLOv8 through the Detect module;
[0015] Calculate grassland SAR image loss;
[0016] The model performs back propagation to update the model weights and obtain the optimal parameters.
[0017] In some embodiments, feature extraction is performed by adding a CBAM attention mechanism to the Neck layer based on YOLOv8, including:
[0018] The input grassland SAR image passes through the second layer C2f module of the Backbone network to obtain the feature map P2, the fourth layer C2f module to obtain the feature map P4, the sixth layer C2f module to obtain the feature map P6 and the ninth layer SPPF module to obtain the feature map P9.
[0019] In some embodiments, a CBAM attention mechanism module is added to the Neck layer based on the PAN-FPN network to perform feature fusion, including:
[0020] Feature map P9 is processed through the Upsample module to obtain feature map P10, and feature map P6 and feature map P10 are processed through the Concat operation to obtain feature map P11;
[0021] Feature map P11 is processed by C2f operation to obtain feature map P12, feature map P12 is processed by adding CBAM attention mechanism module to obtain feature map P13, feature map P13 is processed by Upsample module to obtain feature map P14, feature map P14 and feature map P4 are processed by Concat operation to obtain feature map P15;
[0022] The feature map P15 is processed by C2f to obtain the feature map P16, and the feature map P16 is processed by adding the CBAM attention mechanism module to obtain the feature map P17, and the feature map P17 is processed by Con v The module obtains feature map P18, and feature map P18 and feature map P12 are concat-operated to obtain feature map P19;
[0023] The feature map P19 is processed by C2f to obtain the feature map P20, and the feature map P20 is processed by adding the CBAM attention mechanism module to obtain the feature map P21, and the feature map P21 is processed by Con v The module obtains feature map P22, and feature map P22 and feature map P9 are concat-operated to obtain feature map P23;
[0024] Feature map P23 is subjected to C2f operation to obtain feature map P24, and feature map P24 is subjected to the added CBAM attention mechanism module to obtain feature map P25.
[0025] Input feature map P17, feature map P21 and feature map P25 into the Detect module.
[0026] In some embodiments, calculating grassland SAR image loss includes:
[0027] The IoU loss is defined as follows:
[0028]
[0029] Among them, B and B gt are the predicted bounding box and the true bounding box, b and B respectively. gt It's B and B gt The center point of
[0030] Classification function Loss clas Calculation formula:
[0031]
[0032] Where p is the target category probability, q is the IoU value between the predicted box and the real box for positive samples, and q = 0 for negative samples;
[0033] The regression loss function is represented by Loss DEL +Loss WIOU Composition, Loss DEL Calculation formula:
[0034]
[0035] S i , S i+1 are the predicted value and the near-predicted value output by the network, y, y i ,y i+1 is the actual value of the label, the integral value of the label, and the integral value of the adjacent labels;
[0036] Loss WIoUv3 The outlier degree β is introduced to characterize the quality of the anchor box. The definition of the outlier degree is shown in formula (5):
[0037]
[0038] Use β to construct a non-monotonic focusing coefficient γ and obtain WIoUv3, as shown in formula (6):
[0039]
[0040] in:
[0041]
[0042] In some embodiments, model reasoning includes:
[0043] Output a series of detection results including bounding box coordinates, category probability and confidence;
[0044] By screening with the non-maximum suppression algorithm, redundant detection boxes that highly overlap with high-confidence detections are removed, and only the most representative detection box P is retained.
[0045] In some embodiments, the non-maximum suppression algorithm includes:
[0046] Sort P by confidence score, P with higher confidence has higher priority;
[0047] Set the threshold s as the screening criterion;
[0048] Starting from the P with the highest confidence, check its IOU with the surrounding Ps. The intersection-over-union ratio is used to measure the degree of overlap between boxes.
[0049] If the intersection-and-union ratio of the current P and the surrounding P exceeds the threshold s, these redundant Ps are suppressed and only the current P is retained;
[0050] Repeat the above process, selecting the next P with the highest confidence in each iteration until all P are processed.
[0051] In some embodiments, wherein the model evaluation comprises:
[0052] Conduct quantitative analysis on the detection results of the model;
[0053] Evaluate the performance of the model based on the PR curve;
[0054] Save the model evaluation results and perform visualization operations.
[0055] In some embodiments, the detection results of the model are quantitatively analyzed, including:
[0056] Evaluation indicators such as precision, recall and average precision are used to quantitatively analyze the detection results of the model. The definition of precision and recall is:
[0057]
[0058]
[0059] In the given formula, TP represents the number of samples correctly predicted as positive categories, FP represents the number of negative category samples incorrectly predicted as positive categories, and FN represents the number of positive category samples incorrectly predicted as negative categories.
[0060] In some embodiments, evaluating the performance of the model according to the PR curve includes:
[0061] Calculate AP:
[0062]
[0063] Among them, AP is the area under the PR curve. As a function of Precisio and Recall, its value range is between 0 and 1. The higher the AP value, the better the performance of the model. If the area under the PR curve is 1, it means that the performance of the model has reached the best state.
[0064] A new grassland SAR image ground object target detection method of various embodiments disclosed in the present invention at least produces a grassland SAR image data set; converts and divides the format of grassland SAR image data; uses YOLOv8 as the basic network for model training, including: extracting features through the Backbone network; processing and enhancing the features extracted from the Backbone through the improved Neck network, and fusing them; using the improved loss function in the Head network for training; model reasoning and evaluation, so as to deeply analyze the characteristics of grassland SAR images, optimize the original YOLOv8 model, introduce the CBAM attention mechanism and change the original CIoU loss function to the Wise-IoUv3 loss function. The CBAM module optimizes the attention mechanism in the channel and spatial dimensions, enhances the important features of the grassland SAR image and suppresses the unimportant features, reduces the calculation of redundant features, and the model can better focus on the key details of the target and improve the generalization ability of the model. At the same time, the original loss function is changed to the Wise-IoUv3 loss function, and the dynamic focusing mechanism enables it to adjust the loss according to the sample quality, which improves the accuracy of bounding box regression in target detection and significantly improves the detection performance of the model. At the same time, the model has excellent generalization ability and fast convergence speed.
[0065] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure, as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In the drawings, which are not necessarily drawn to scale, similar reference numerals in different views may represent similar components. Similar reference numerals with letter suffixes or similar reference numerals with different letter suffixes may represent different instances of similar components. The drawings generally illustrate various embodiments by way of example and not limitation, and together with the description and claims, serve to explain the disclosed embodiments.
[0067] Figure 1A schematic diagram of a new implementation flow of a method for detecting ground objects in grassland SAR images according to an embodiment of the present disclosure is shown;
[0068] Figure 2 An improved YOLOv8 structure diagram of an embodiment of the present disclosure is shown;
[0069] Figure 3 An example diagram of a CBAM attention module according to an embodiment of the present disclosure is shown;
[0070] Figure 4 An example diagram of the Wise-IoUv3 loss function according to an embodiment of the present disclosure is shown;
[0071] Figure 5 A NMS flow chart of an embodiment of the present disclosure is shown;
[0072] Figure 6 The result of ground object recognition in grassland SAR image according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0074] The improved YOLOv8 grassland SAR (Synthetic Aperture Radar, SAR) ground object target recognition method is a key grassland ecological monitoring task. SAR has the advantages of all-day, all-weather, strong penetration, and covers more abundant ground object information. It has broad application prospects in the fields of classification and target recognition. At present, due to the unique nature of SAR imaging, grassland SAR image ground object recognition methods face the problems of low resolution of SAR images, significant differences in texture and statistical characteristics from optical images, and complex background of SAR images. The positioning accuracy of small targets is relatively low. In some complex scenes, the target features are blurred, resulting in false detection and missed detection. As a result, YOLOv8's accuracy in processing SAR images is often lower than that of optical images.
[0075] Compared with traditional machine learning, YOLOv8 is a very fast target detection algorithm that can achieve real-time detection speed while ensuring high detection accuracy. It also adopts a modular design and is easy to expand and modify. In view of the complex background of SAR images, blurred target features, and poor detection of small targets, the disclosed embodiment introduces a hybrid attention mechanism CBAM (Convolutional Block Attention Module) that combines space and channels in the Neck part, aiming to enhance the network's enhanced capture of SAR image target features in both space and channels, thereby improving inspection accuracy. At the same time, the original CIoU loss function of YOLOv8 is also improved to the Wise-IoUv3 loss function. Through the weighted mechanism, WIoU can better handle small targets, enhance the generalization ability of the YOLOv8 model, and accelerate model convergence.
[0076] In combination with the above-mentioned background technology, the present disclosure records the corresponding solutions in the form of embodiments to solve the defects in the prior art, but it is not intended to limit the scope of protection of the patent right claimed by the present disclosure.
[0077] As one of the solutions, Figure 1 The following is a schematic diagram of a new grassland SAR image ground object target detection method implementation process according to an embodiment of the present disclosure. The embodiment of the present disclosure provides a new grassland SAR image ground object target detection method, including:
[0078] Create grassland SAR image dataset;
[0079] Format conversion and division of grassland SAR image data;
[0080] YOLOv8 is used as the basic network for model training, including: feature extraction through the Backbone network; processing and enhancing the features extracted from the Backbone through the improved Neck network, and fusing them; using the improved loss function for training in the Head network;
[0081] Model reasoning and evaluation.
[0082] In view of the above content, this paper proposes a new YOLOv8 improvement scheme for the technical defects of the current grassland SAR image detection algorithm. Through in-depth analysis of the characteristics of grassland SAR images, the original YOLOv8 model is optimized as follows: the CBAM attention mechanism is introduced and the original CIoU loss function is changed to the Wise-IoUv3 loss function. The CBAM module optimizes the attention mechanism in the channel and spatial dimensions, enhances the important features of grassland SAR images and suppresses unimportant features, reduces the calculation of redundant features, and the model can better focus on the key details of the target and improve the generalization ability of the model. At the same time, the original loss function is changed to the Wise-IoUv3 loss function, and the dynamic focusing mechanism enables it to adjust the loss according to the sample quality, which improves the accuracy of bounding box regression in target detection, significantly improves the detection performance of the model, and makes the model have excellent generalization ability and fast convergence speed.
[0083] The steps of the embodiments of the present disclosure are exemplary. The following takes steps S1 to S5 as an example to further illustrate a new grassland SAR image ground object target detection method of the present disclosure.
[0084] Step S1: Self-made grassland SAR image dataset.
[0085] Step S2: Format conversion and division of grassland SAR image data;
[0086] Step S21: Convert the images and XML annotation files in the original data set into txt format to facilitate reading and processing of the YOLOv8 model;
[0087] Step S22: Divide the data set into a training set, a test set, and a validation set in a ratio of 7:2:1.
[0088] In some specific embodiments, the present disclosure may be to use YOLOv8 as a basic network for model training, further comprising:
[0089] Set the number of ground object target categories and target category names in grassland SAR images;
[0090] Increase the diversity and richness of the dataset through data augmentation operations including rotation, translation, scaling, and mosaic;
[0091] Feature extraction is performed by adding CBAM attention mechanism to the Neck layer based on YOLOv8;
[0092] By adding the CBAM attention mechanism module to the Neck layer based on the PAN-FPN network, feature fusion is performed;
[0093] Output the predicted information including bounding box location, class probability and confidence score in YOLOv8 through the Detect module;
[0094] Calculate grassland SAR image loss;
[0095] The model performs back propagation to update the model weights and obtain the optimal parameters.
[0096] The embodiment of the present disclosure may further include step S3 based on the above step S2.
[0097] Step S3: Model training
[0098] This embodiment uses YOLOv8 as the basic network to detect objects in grassland SAR images. First, the training set is subjected to feature extraction through the Backbone network. These features are crucial for subsequent detection tasks. Next, the features extracted from the Backbone are processed and enhanced through the improved Neck network, and the features are fused to enhance the representation ability of the model. Then, the improved loss function is used in the Head network for training to optimize the match between the model prediction box and the true box, and output the position, category, and probability of the bounding box. Finally, the improved YOLOv8 model is used to improve the accuracy of object recognition in grassland SAR images. The overall structure of the improved YOLOv8 is as follows: Figure 2 An improved YOLOv8 structure diagram of an embodiment of the present disclosure is shown.
[0099] Step S31: setting the number of ground object target categories nc and the target category names classes in the grassland SAR image.
[0100] Step S32: Increase the diversity and richness of the data set through data enhancement operations such as rotation, translation, scaling, and Mosaic.
[0101] Step S33: feature extraction;
[0102] This embodiment adds a CBAM attention mechanism to the Neck layer based on YOLOv8. The module structure of the CBAM attention mechanism is as follows: Figure 3 An example diagram of the CBAM attention module of an embodiment of the present disclosure is shown. The CBAM attention mechanism performs feature enhancement and feature fusion on the feature map generated by Backbone. The grassland SAR image training set is input into the improved YOLOv8 model:
[0103] Step S331: Input grassland SAR image and pass it through the second layer C2f module of Backbone network to obtain feature map P2, the fourth layer C2f module to obtain feature map P4, the sixth layer C2f module to obtain feature map P6 and the ninth layer SPPF module to obtain feature map P9.
[0104] Step S34: feature fusion;
[0105] YOLOv8 uses the PAN-FPN network, and on this basis, the Neck layer adds a 4-layer CBAM attention mechanism module. CBAM applies attention mechanisms in the spatial dimension and channel dimension, allowing the network to pay more attention to important features, thereby improving the expressiveness of features;
[0106] Step S341: feature map P9 is subjected to an Upsample module to obtain feature map P10, and feature map P6 and feature map P10 are subjected to a Concat operation to obtain feature map P11;
[0107] Step S342: feature map P11 is subjected to C2f operation to obtain feature map P12, feature map P12 is subjected to the added CBAM attention mechanism module to obtain feature map P13, feature map P13 is subjected to Upsample module to obtain feature map P14, feature map P14 and feature map P4 are subjected to Concat operation to obtain feature map P15;
[0108] Step S343: Feature map P15 is subjected to C2f operation to obtain feature map P16, feature map P16 is subjected to the added CBAM attention mechanism module to obtain feature map P17, feature map P17 is subjected to Conv module to obtain feature map P18, feature map P18 and feature map P12 are subjected to Concat operation to obtain feature map P19;
[0109] Step S344: feature map P19 is subjected to C2f operation to obtain feature map P20, feature map P20 is subjected to the added CBAM attention mechanism module to obtain feature map P21, feature map P21 is subjected to Conv module to obtain feature map P22, feature map P22 and feature map P9 are subjected to Concat operation to obtain feature map P23;
[0110] Step S345: Feature map P23 is subjected to C2f operation to obtain feature map P24, and feature map P24 is subjected to the added CBAM attention mechanism module to obtain feature map P25.
[0111] Step S346: Finally, feature map P17, feature map P21 and feature map P25 are input into the Detect module.
[0112] Step 35: Output the predicted bounding box location, class probability, and confidence score in YOLOv8 through the Detect module.
[0113] Step S36: Calculate grassland SAR image loss Loss;
[0114] The improved YOLOv8 loss function consists of a classification loss function and a regression loss function. WIoUv3 is introduced to replace the CIoU loss function in the original regression loss function. The schematic diagram of the WIoU loss function is as follows: Figure 4 An example diagram of the Wise-IoUv3 loss function of an embodiment of the present disclosure is shown, and the overall loss function Loss calculation formula (1) is shown as follows:
[0115] Loss YOLOv8 =Loss clas +Loss reg =Loss VFL +Loss DEL +Loss WIOU (1)
[0116] Step S361: The IoU loss is defined as follows:
[0117]
[0118] Among them, B and B gt are the predicted bounding box and the true bounding box, b and B respectively. gt It's B and B gt The center point of
[0119] Step S362: Classification function Loss clas The calculation formula is shown in (3):
[0120]
[0121] Where p is the target category probability, q is the IoU value between the predicted box and the real box for positive samples, and q = 0 for negative samples;
[0122] Step S363: The regression loss function is represented by Loss DEL +Loss WIOU Composition, Loss DEL The calculation formula is shown in (4):
[0123]
[0124] S i , S i+1 The predicted value and the near predicted value output by the network are y, y i ,y i+1That is, the actual value of the label, the label integral value, and the adjacent label integral value;
[0125] Step S364: Loss WIoUv3 The outlier degree β is introduced to characterize the quality of the anchor frame. A low outlier degree indicates a high-quality anchor frame, and a high outlier degree indicates a low-quality anchor frame. The definition of the outlier degree is shown in formula (5):
[0126]
[0127] Finally, a non-monotonic focusing coefficient γ is constructed using β to obtain WIoUv3, as shown in formula (6):
[0128]
[0129] in:
[0130]
[0131] Step S37: The model performs back propagation to update the model weights, obtain the optimal parameters, and complete the model training.
[0132] In some specific embodiments, the present disclosure may be, model reasoning, including:
[0133] Output a series of detection results including bounding box coordinates, category probability and confidence;
[0134] By screening with the non-maximum suppression algorithm, redundant detection boxes that highly overlap with high-confidence detections are removed, and only the most representative detection box P is retained.
[0135] In some specific embodiments, the present disclosure may be, model evaluation, comprising:
[0136] Conduct quantitative analysis on the detection results of the model;
[0137] Evaluate the performance of the model based on the PR curve;
[0138] Save the model evaluation results and perform visualization operations.
[0139] The embodiment of the present disclosure may further include step S4 based on the above step S3.
[0140] Step S4: Model inference and evaluation.
[0141] Step S41: Input the samples in the grassland SAR image test set into the trained model, which undergoes a series of processing processes such as feature extraction, feature fusion and Detect module. The model finally outputs a series of detection results including bounding box coordinates, category probability and confidence.
[0142] Step S42: Through the screening of the non-maximum suppression algorithm (NMS), the model can remove those redundant detection boxes that are highly overlapped with high-confidence detections, and only retain the most representative detection box P. The process of NMS is:
[0143] Step S421: sorting P according to the confidence score, P with higher confidence has higher priority;
[0144] Step S422: setting an appropriate threshold s, s∈[0.5,0.7], as a screening criterion;
[0145] Step S423: Starting from the P with the highest confidence, check its IOU with the surrounding Ps, and the intersection-over-union ratio is used to measure the overlap between the boxes;
[0146] Step S424: If the intersection-and-union ratio of the current P and the surrounding P exceeds the threshold s, these redundant Ps are suppressed and only the current P is retained;
[0147] Step S425: Repeat the above process, selecting the next P with the highest confidence in each iteration until all P are processed. The NMS process is as follows: Figure 5 A NMS flow chart of an embodiment of the present disclosure is shown.
[0148] The embodiment of the present disclosure may further include step S5 based on the above step S4.
[0149] Step S5: Model evaluation.
[0150] Step S51: Use evaluation indicators such as precision, recall, and average precision (AP) to quantitatively analyze the detection results of the model. The precision and recall are defined as follows:
[0151]
[0152]
[0153] In the given formula, TP represents the number of samples correctly predicted as positive, FP represents the number of negative samples incorrectly predicted as positive, and FN represents the number of positive samples incorrectly predicted as negative.
[0154] Step S52: Then calculate AP, the formula is as follows:
[0155]
[0156] Among them, AP is the area under the PR curve. As a function of Precision and Recall, it ranges from 0 to 1. The higher the AP value, the better the performance of the model. If the area under the PR curve is 1, it means that the performance of the model has reached the best state.
[0157] Step S53: Save the model evaluation results, which should include information such as the location, category and confidence level of the grassland SAR image objects, and visualize the output results on the image, such as Figure 6 The result of ground object recognition in grassland SAR image according to an embodiment of the present disclosure is shown.
[0158] The present disclosure is applied to grassland remote sensing SAR image ground object target detection, but is not limited to grassland SAR image ground object target detection.
[0159] The new grassland SAR image ground object target detection method of each embodiment of the present invention improves the attention mechanism and loss function of the YOLOv8 model, and significantly improves the accuracy of the model in grassland SAR image ground object target recognition for the low resolution of SAR images and complex background environment. First, the CBAM attention module is introduced after the C2f module in the Neck network, and a total of 4 layers are introduced to optimize and fuse the features extracted by the Backbone network. Then, the Wise-IoUv3 loss function is introduced to replace the original CIoU loss function. The dynamic non-monotonic focusing mechanism is more accurate in locating small targets and irregularly shaped grasslands, further improving the generalization performance of the model and accelerating the convergence speed of the model. This series of improvements not only reduces missed detections and false detections, improves detection accuracy, but also better meets the needs of actual applications.
[0160] In some specific embodiments, a new grassland SAR image ground object target detection device disclosed in the present invention includes one or more processing modules configured to execute the specific implementation methods of steps S1 to S5 in the above text.
[0161] Specifically, one of the inventive concepts of the present disclosure is a new grassland SAR image ground object target detection method of various embodiments of the present disclosure, at least making a grassland SAR image data set; format conversion and division of grassland SAR image data; using YOLOv8 as the basic network for model training, including: feature extraction through the Backbone network; processing and enhancing the features extracted from the Backbone through the improved Neck network, and fusing them; using the improved loss function in the Head network for training; model reasoning and evaluation, so as to deeply analyze the characteristics of grassland SAR images, optimize the original YOLOv8 model, introduce the CBAM attention mechanism and change the original CIoU loss function to the Wise-IoUv3 loss function. The CBAM module optimizes the attention mechanism in the channel and spatial dimensions, enhances the important features of the grassland SAR image and suppresses the unimportant features, reduces the calculation of redundant features, and the model can better focus on the key details of the target and improve the generalization ability of the model. At the same time, the original loss function is changed to the Wise-IoUv3 loss function, and the dynamic focusing mechanism enables it to adjust the loss according to the sample quality, which improves the accuracy of bounding box regression in target detection and significantly improves the detection performance of the model. At the same time, the model has excellent generalization ability and fast convergence speed.
[0162] The present disclosure also provides a computer-readable storage medium having computer-executable instructions stored thereon. When the computer-executable instructions are executed by a processor, the method mainly implements the above-mentioned new grassland SAR image ground object target detection method, which at least includes:
[0163] Create grassland SAR image dataset;
[0164] Format conversion and division of grassland SAR image data;
[0165] YOLOv8 is used as the basic network for model training, including: feature extraction through the Backbone network; processing and enhancing the features extracted from the Backbone through the improved Neck network, and fusing them; using the improved loss function for training in the Head network;
[0166] Model reasoning and evaluation.
[0167] The above embodiments are only exemplary embodiments of the present disclosure and are not intended to limit the present disclosure. The protection scope of the present disclosure is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present disclosure within the essence and protection scope of the present disclosure, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present disclosure.
Claims
1. A new method for detecting ground objects in grassland SAR images, including: Create grassland SAR image dataset; Format conversion and division of grassland SAR image data; YOLOv8 is used as the basic network for model training, including: feature extraction through the Backbone network; processing and enhancing the features extracted from the Backbone through the improved Neck network, and fusing them; using the improved loss function for training in the Head network; Model reasoning and evaluation.
2. The method according to claim 1, wherein: YOLOv8 is used as the basic network for model training, which further includes: Set the number of ground object target categories and target category names in grassland SAR images; Increase the diversity and richness of the dataset through data augmentation operations including rotation, translation, scaling, and mosaic; Feature extraction is performed by adding CBAM attention mechanism to the Neck layer based on YOLOv8; By adding the CBAM attention mechanism module to the Neck layer based on the PAN-FPN network, feature fusion is performed; Output the predicted information including bounding box location, class probability and confidence score in YOLOv8 through the Detect module; Calculate grassland SAR image loss; The model performs back propagation to update the model weights and obtain the optimal parameters.
3. The method according to claim 2, wherein: By adding the CBAM attention mechanism to the Neck layer based on YOLOv8, feature extraction is performed, including: The input grassland SAR image passes through the second layer C2f module of the Backbone network to obtain the feature map P2, the fourth layer C2f module to obtain the feature map P4, the sixth layer C2f module to obtain the feature map P6 and the ninth layer SPPF module to obtain the feature map P9.
4. The method according to claim 3, wherein: The CBAM attention mechanism module is added to the Neck layer based on the PAN-FPN network for feature fusion, including: Feature map P9 is processed through the Upsample module to obtain feature map P10, and feature map P6 and feature map P10 are processed through the Concat operation to obtain feature map P11; Feature map P11 is processed by C2f operation to obtain feature map P12, feature map P12 is processed by adding CBAM attention mechanism module to obtain feature map P13, feature map P13 is processed by Upsample module to obtain feature map P14, feature map P14 and feature map P4 are processed by Concat operation to obtain feature map P15; Feature map P15 is subjected to C2f operation to obtain feature map P16, feature map P16 is subjected to the added CBAM attention mechanism module to obtain feature map P17, feature map P17 is subjected to Conv module to obtain feature map P18, feature map P18 and feature map P12 are subjected to Concat operation to obtain feature map P19; Feature map P19 is processed by C2f to obtain feature map P20, feature map P20 is processed by adding CBAM attention mechanism module to obtain feature map P21, feature map P21 is processed by Conv module to obtain feature map P22, feature map P22 and feature map P9 are processed by Concat operation to obtain feature map P23; Feature map P23 is processed by C2f to obtain feature map P24, and feature map P24 is processed by adding CBAM attention mechanism module to obtain feature map P25; Input feature map P17, feature map P21 and feature map P25 into the Detect module.
5. The method according to claim 4, wherein: Calculate grassland SAR image loss, including: The IoU loss is defined as follows: Among them, B and B gt are the predicted bounding box and the true bounding box, b and B respectively. gt It's B and B gt The center point of Classification function Loss clas Calculation formula: Among them, p is the probability of the target category, q is the IoU value between the predicted box and the real box for positive samples, and q = 0 for negative samples; The regression loss function is represented by Loss DEL +Loss WIOU Composition, Loss DEL Calculation formula: S i , S i+1 are the predicted value and the near-predicted value output by the network, y, y i ,y i+1 is the actual value of the label, the integral value of the label, and the integral value of the adjacent labels; Loss WIoUv3 The outlier degree β is introduced to characterize the quality of the anchor box. The definition of the outlier degree is shown in formula (5): Use β to construct a non-monotonic focusing coefficient γ and obtain WIoUv3, as shown in formula (6): in:
6. The method according to claim 5, wherein: Model reasoning, including: Output a series of detection results including bounding box coordinates, category probability and confidence; By screening with the non-maximum suppression algorithm, redundant detection boxes that highly overlap with high-confidence detections are removed, and only the most representative detection box P is retained.
7. The method according to claim 6, wherein: Non-maximum suppression algorithm, including: Sort P by confidence score, P with higher confidence has higher priority; Set the threshold s as the screening criterion; Starting from the P with the highest confidence, check its IOU with the surrounding Ps. The intersection-over-union ratio is used to measure the degree of overlap between boxes. If the intersection-and-union ratio of the current P and the surrounding P exceeds the threshold s, these redundant Ps are suppressed and only the current P is retained; Repeat the above process, selecting the next P with the highest confidence in each iteration until all P are processed.
8. The method according to claim 1, wherein: Model evaluation, including: Conduct quantitative analysis on the detection results of the model; Evaluate the performance of the model based on the PR curve; Save the model evaluation results and perform visualization operations.
9. The method according to claim 5, wherein the detection result of the model is quantitatively analyzed, comprising: Evaluation indicators such as precision, recall and average precision are used to quantitatively analyze the detection results of the model. The definition of precision and recall is: In the given formula, TP represents the number of samples correctly predicted as positive categories, FP represents the number of negative category samples incorrectly predicted as positive categories, and FN represents the number of positive category samples incorrectly predicted as negative categories.
10. The method according to claim 1, wherein the performance of the model is evaluated according to the PR curve, comprising: Calculate AP: Among them, AP is the area under the PR curve. As a function of Precisio and Recall, its value range is between 0 and 1. The higher the AP value, the better the performance of the model. If the area under the PR curve is 1, it means that the performance of the model has reached the best state.
Citation Information
Cited By
Visual content security detection method and device based on large model and CNN dynamic collaboration
CN120580629A
DSA-based left atrial appendage automatic segmentation and measurement method
CN120852457A