A method and related device for SAR image target detection and identification
By training a pre-defined neural network model and using the width and height information of the predicted and true bounding boxes to calculate the scale loss, the problems of missed detections and false detections in SAR images are solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202310212016.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-02-24
AI Technical Summary
Existing deep learning-based target detection methods cannot effectively solve the problems of missed detections and false detections in SAR images, mainly because the differences between SAR images and optical images make the bounding boxes of detected targets susceptible to interference features.
By training a pre-defined neural network model, the scale loss is calculated using the width and height information of the predicted bounding box and the real bounding box, and the model parameters are adjusted to obtain an object detection model, thereby improving the accuracy of the bounding box and reducing false positives and false negatives.
It improves the accuracy of target detection in SAR images, reduces false detections and missed detections caused by clutter interference and similar target features, and enhances the accuracy of detection.
Smart Images

Figure CN116206186B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method and related apparatus for SAR image target detection and recognition. Background Technology
[0002] Synthetic Aperture Radar (SAR) is a high-resolution imaging radar that can obtain high-resolution radar images similar to optical photography under extremely low visibility weather conditions. It is widely used in military and civilian fields. SAR image target detection is a technique for automatically locating and identifying specific targets from SAR images, and it has a wide range of applications in real life.
[0003] With the rapid development of artificial intelligence, deep learning-based object detection methods have emerged, mainly divided into two types: two-stage detection models, such as Fast-RCNN and Faster-RCNN; and one-stage detection models, such as the YOLO (You Only Look Once) series. However, currently available deep learning-based object detection methods are primarily designed for object recognition in optical images, while SAR images differ significantly from optical images. Therefore, directly applying currently available deep learning-based object detection methods to SAR image object detection makes the bounding boxes of detected targets susceptible to interference features, leading to false positives and false negatives.
[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0005] The main objective of this invention is to provide a SAR image target detection and recognition method and related apparatus, which aims to solve the problems of missed detection and false detection when the existing technology cannot perform target detection and recognition on SAR images.
[0006] To achieve the above objectives, the present invention provides a SAR image target detection method, comprising:
[0007] Several sample SAR images from the training sample set are input into a preset neural network model to obtain the predicted bounding boxes of each sample SAR image; wherein, the several include at least one;
[0008] Based on the predicted bounding box and the true bounding box of each sample SAR image, determine the first tensor and the second tensor of each sample SAR image.
[0009] Wherein, the first tensor is obtained by dot product of the width and height of the predicted bounding box, and the second tensor is obtained by dot product of the width and height of the true bounding box;
[0010] The scale loss of the training sample set is determined by calculating the loss based on the first tensor and the second tensor of each sample SAR image.
[0011] The model parameters of the preset neural network model are adjusted based on the scale loss to obtain the target detection model;
[0012] The target detection model is used to determine the predicted bounding box of the SAR image to be identified.
[0013] Optionally, the step of calculating the scale loss of the training sample set based on the first tensor and the second tensor of each of the sample SAR images specifically includes:
[0014] The scale loss of the training sample set is obtained by calculating the loss based on the first tensor and the second tensor of each sample SAR image using the binary cross-entropy loss function.
[0015] Optionally, adjusting the model parameters of the preset neural network model based on the scale loss to obtain the target detection model specifically includes:
[0016] Obtain the classification loss, localization loss, and confidence loss of the preset neural network model;
[0017] The classification loss is obtained based on the predicted and true categories of the target objects in each sample SAR image; the localization loss and the confidence loss are obtained based on the predicted and true bounding boxes of each sample SAR image.
[0018] The total loss of the preset neural network model is determined based on the classification loss, localization loss, confidence loss, and scaling loss of the preset neural network model.
[0019] The model parameters of the preset neural network model are adjusted based on the total loss to obtain a trained target detection model.
[0020] Optionally, determining the total loss of the preset neural network model based on the classification loss, localization loss, confidence loss, and scaling loss of the preset neural network model specifically includes:
[0021] Within a preset range, determine the scale weight values corresponding to the preset neural network model;
[0022] The scale loss is weighted according to the scale weight values to obtain the weighted scale loss;
[0023] The total loss of the preset neural network model is determined based on the weighted scale loss, the localization loss, the confidence loss, and the classification loss.
[0024] Optionally, determining the scale weight values of the preset neural network model within a preset value range specifically includes:
[0025] Within the preset value range, multiple preset parameter values are selected at preset intervals;
[0026] The scale loss is weighted according to each of the preset parameter values to obtain multiple initial weighted scale losses;
[0027] Based on the initial weighted scaling loss, the model parameters of the preset neural network model are adjusted to obtain multiple adjusted preset neural network models;
[0028] Obtain a verification sample set and determine the prediction accuracy of each of the adjusted preset neural network models;
[0029] The preset parameter value corresponding to the highest prediction accuracy is used as the scale weight value corresponding to the preset neural network model.
[0030] Optionally, adjusting the model parameters of the preset neural network model based on the total loss to obtain a trained target detection model specifically includes:
[0031] Based on the total loss, the model parameters of the preset neural network model are adjusted, and the process of inputting several sample SAR images from the next training sample set into the preset neural network model to obtain the predicted bounding boxes of each sample SAR image in the next training sample set continues until the preset neural network model meets the preset conditions, thus obtaining the trained target detection model.
[0032] Optionally, the preset neural network model is a YOLOv5 network model.
[0033] Optionally, the SAR image target detection method is applied to vehicle-mounted SAR image target detection.
[0034] To achieve the above objectives, this application also provides a SAR image target recognition method, the method comprising:
[0035] The predicted bounding box of the image to be identified is obtained by using any of the SAR image target detection methods described above.
[0036] Based on the predicted bounding box, the category of the target object corresponding to the predicted bounding box is determined.
[0037] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the SAR image target detection method as described in any of the above claims, or the steps in the SAR image target recognition method as described above.
[0038] To achieve the above objectives, the present invention also provides a terminal, comprising: a processor and a memory; the memory storing a computer-readable program executable by the processor; the processor executing the computer-readable program implements the steps in the SAR image target detection method as described above, or the steps in the SAR image target recognition method as described above.
[0039] This invention first inputs several sample SAR images from a training sample set into a preset neural network model to obtain the predicted bounding boxes of each sample SAR image. Then, based on the predicted and true bounding boxes of each sample SAR image, a first tensor and a second tensor are determined. The first tensor is obtained by multiplying the width and height of the predicted bounding box, and the second tensor is obtained by multiplying the width and height of the true bounding box. Loss calculation is then performed based on the first and second tensors of each sample SAR image to determine the scale loss of the training sample set. The model parameters of the preset neural network model are adjusted based on the scale loss to obtain a target detection model. This target detection model can focus on the width and height dimensions of the predicted bounding box, thereby making the determination of the predicted bounding box of the SAR image to be identified more accurate. This avoids false detections and missed detections caused by clutter interference or similar target features, thus improving the accuracy of SAR image target detection. Attached Figure Description
[0040] Figure 1 A flowchart of a SAR image target detection method provided in an embodiment of the present invention;
[0041] Figure 2 Here is a structural diagram of the existing YOLOv5 model;
[0042] Figure 3 A flowchart of step S104 provided in an embodiment of the present invention;
[0043] Figure 4 A flowchart of step S302 provided in an embodiment of the present invention;
[0044] Figure 5 A flowchart of step S401 provided in an embodiment of the present invention;
[0045] Figure 6 The detection metrics for the existing YOLOv5 model are shown in the graph.
[0046] Figure 7 The detection metrics for an existing YOLOv5 model that includes a convolutional attention module;
[0047] Figure 8 A detection metric diagram of a target detection model including a convolutional attention module provided in an embodiment of the present invention;
[0048] Figure 9 The target detection result of the existing target detection model on the optical image A1 is shown in the figure.
[0049] Figure 10 The image shows the target detection results of the existing YOLOv5 model on the SAR image A2 corresponding to the optical image A1.
[0050] Figure 11 The target detection results of the existing YOLOv5 model, which includes a convolutional attention module, on SAR image A2.
[0051] Figure 12 This is a target detection effect diagram of the target detection model including a convolutional attention module for target detection in SAR image A2, provided by an embodiment of the present invention.
[0052] Figure 13 The target detection result of the existing target detection model on the optical image B1 is shown in the figure.
[0053] Figure 14 The target detection results of the existing YOLOv5 model on the SAR image B2 corresponding to the optical image B1 are shown in the figure.
[0054] Figure 15 The target detection result of the existing YOLOv5 model, which includes a convolutional attention module, on SAR image B2.
[0055] Figure 16 The target detection effect diagram of the target detection model including the convolutional attention module provided in this embodiment of the invention for target detection of SAR image B2.
[0056] Figure 17 The target detection result of the existing target detection model on the optical image C1 is shown in the figure.
[0057] Figure 18 The target detection results of the existing YOLOv5 model on the SAR image C2 corresponding to the optical image C1 are shown in the figure.
[0058] Figure 19 The target detection results of the existing YOLOv5 model, which includes a convolutional attention module, on the SAR image C2.
[0059] Figure 20 The target detection effect diagram of the target detection model including the convolutional attention module for target detection of SAR image C2 provided in the embodiments of the present invention is shown.
[0060] Figure 21 This is a schematic diagram of the terminal structure provided in an embodiment of the present invention. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0062] Existing deep learning-based target detection methods are primarily designed for optical images. SAR images differ fundamentally from optical images. Firstly, the signal-to-noise ratio of SAR images is much lower than that of optical images, resulting in greater noise interference. Secondly, target features in SAR images also present as a geometric set of scattering points, closely resembling the interference features in SAR images. Therefore, currently disclosed deep learning-based target detection methods are unsuitable for SAR image target detection. Using these methods on SAR images leads to missed detections and false detections due to clutter interference and the similarity of target features, resulting in low accuracy in target detection for SAR images.
[0063] To address the aforementioned technical problems, this invention provides a SAR image target detection method, terminal, and medium, as detailed below.
[0064] This invention provides a SAR image target detection method, such as... Figure 1 As shown, the SAR image target detection method includes at least the following steps:
[0065] S101, input several sample SAR images from the training sample set into a preset neural network model to obtain the predicted bounding boxes of each sample SAR image.
[0066] The training sample set mentioned above may include several training samples, and each training sample may include at least: a sample SAR image, the true bounding box of the target object in the sample SAR image, and the true class. Among them, "several" includes at least one.
[0067] Specifically, each sample SAR image in the training sample set can be sequentially input into a preset neural network model to obtain the predicted bounding box of each sample SAR image. It is understood that in this embodiment of the invention, multiple training sample sets can be obtained to continuously train the preset neural network model, thereby ensuring the detection accuracy of the obtained target detection model.
[0068] In some embodiments of the present invention, the preset neural network model is the YOLOv5 network model. The YOLOv5 network model has a higher recognition rate and faster recognition speed compared to other models in the YOLOv series. Furthermore, the YOLOv5 network model is a one-stage object detection algorithm, which is faster than two-stage object detection algorithms.
[0069] In this embodiment of the invention, the YOLOv5 network model is used as the preset neural network model, resulting in a fast detection speed and high recognition rate of the trained target detection model. This further improves the accuracy and processing speed of SAR image target detection and further avoids the occurrence of missed detections and false detections.
[0070] Furthermore, the YOLOv5 network model includes a convolutional attention module. For example... Figure 2 As shown, the existing YOLOv5 network model mainly includes three parts: Backbone, Neck, and Prediction. The Backbone primarily consists of a focus module, a CBL module, a Bootstrap CSP module, and an SPP module. In this embodiment of the invention, convolutional attention modules can be added to each CBL module in the Backbone, which can further improve the detection speed of SAR image targets.
[0071] S102, based on the predicted bounding box and the true bounding box of each sample SAR image, determine the first tensor and the second tensor of each sample SAR image.
[0072] In this embodiment of the invention, the predicted bounding box and the ground truth bounding box can be represented by four dimensions: the x-coordinate of the center point, the y-coordinate of the center point, the width, and the height. Furthermore, both the width and height are represented by tensors.
[0073] Among them, the first tensor S P To predict the width w of the bounding box P and height h P The dot product yields the second tensor S. T To determine the width w of the actual bounding box T and height h T The dot product is as follows:
[0074] S P =wP ·h P S T =w T ·h T ;
[0075] Among them, the first tensor S P The second tensor S represents the size information of the predicted bounding box. T This indicates the dimensions of the actual bounding box.
[0076] S103, calculate the loss based on the first and second tensors of each sample SAR image to determine the scale loss of the preset neural network model.
[0077] Specifically, the scale loss of the preset neural network model can be obtained by calculating the loss based on the first and second tensors of each sample SAR image using a binary classification cross loss function, as shown below:
[0078]
[0079] Where i represents the i-th SAR image in the training sample set.
[0080] S104. Based on this scale loss, the model parameters of the preset neural network model are adjusted to obtain the target detection model.
[0081] like Figure 3 As shown, step S104 above can be achieved by at least the following steps:
[0082] S301, obtain the classification loss, localization loss and confidence loss of the preset neural network model.
[0083] In this embodiment of the invention, after inputting several sample SAR images from the training sample set into a preset neural network model, in addition to obtaining the predicted bounding boxes of each sample SAR image, the predicted category corresponding to each predicted bounding box can also be obtained. This predicted category is used to describe the category of the target object within the predicted bounding box.
[0084] Specifically, the classification loss Loss(c) of the preset neural network model can be determined by comparing the predicted categories of the predicted bounding boxes of the SAR images in each sample set with the true categories of the true bounding boxes in the training samples. P ,c T ).
[0085] Additionally, the loss can be calculated based on the true bounding boxes of the predicted bounding boxes of each sample SAR image in the training sample set, to determine the localization loss Loss(b) of the preset neural network model. P ,b T ) and confidence loss (oP ,o T )
[0086] S302, determine the total loss of the preset neural network model based on the classification loss, localization loss, confidence loss and scale loss of the preset neural network model.
[0087] Specifically, the total loss of the preset neural network model is:
[0088] Loss = Loss(c P ,c T )+Loss(o P ,o T )+Loss(b P ,b T )+Loss(s P ,s T );
[0089] Among them, Loss(c P ,c T ) represents the classification loss, Loss(o P ,o T ) represents the confidence loss, Loss(b P ,b T ) represents the localization loss, Loss(s P ,s T ) indicates scale loss.
[0090] Furthermore, such as Figure 4 As shown, step S302 above can be achieved by at least the following steps:
[0091] S401, within the preset value range, determine the scale weight value corresponding to the preset neural network model.
[0092] Specifically, such as Figure 5 As shown, step S401 can be achieved through at least the following steps:
[0093] S501, select multiple preset parameter values within a preset range at preset intervals.
[0094] In this embodiment of the invention, the preset value range is [0,1].
[0095] Specifically, multiple preset parameter values can be selected from a preset range according to a preset detection. It is understandable that the smaller the preset interval, the more preset parameter values will be obtained.
[0096] S502, the scale loss is weighted according to each preset parameter value to obtain multiple initial weighted losses.
[0097] Specifically, multiple preset parameter values H' can be obtained from the above step S501. S Each of these is multiplied by the scaling loss to obtain multiple initial weighted losses Loss'(s). P ,s T ):
[0098] Loss's(s P ,s T )=H' S Loss(s) P ,s T ).
[0099] S503, adjust the model parameters of the preset neural network model based on each initial weighted loss to obtain multiple adjusted preset neural network models.
[0100] In this embodiment of the invention, a preset neural network model can first be copied to obtain multiple identical preset neural network models, wherein the number of preset neural network models is the same as the number of initial weighted losses. Then, by assigning an initial weighted loss to each preset neural network model, the model parameters of each preset neural network model are adjusted to obtain multiple adjusted preset neural network models.
[0101] Furthermore, the sum of the localization loss, confidence loss, and classification loss with each initial weighted loss can be used as the initial total loss. The model parameters of the corresponding preset neural network models can be adjusted using the initial total loss to obtain multiple adjusted preset neural network models.
[0102] S504, Obtain the validation training set, validate each adjusted preset neural network model, and determine the prediction accuracy of each adjusted preset neural network model.
[0103] The aforementioned validation training set includes multiple validation samples, each of which includes: a validation SAR image, the true bounding box of the validation SAR image, and the true class.
[0104] Let's take an adjusted preset neural network model as an example to illustrate:
[0105] First, each validation SAR image in the validation training set is input into the adjusted preset neural network model to obtain the predicted bounding box of each validation SAR image.
[0106] Then, based on the predicted bounding boxes and true bounding boxes of each verified SAR image, the prediction accuracy of the adjusted preset neural network model is calculated.
[0107] Furthermore, based on the positional information of the predicted bounding boxes and the ground truth bounding boxes, the similarity between the predicted bounding boxes and their corresponding ground truth bounding boxes can be determined. If the similarity is greater than a preset threshold, the predicted bounding box is considered to be the same as the corresponding ground truth bounding box. Then, by counting the number of predicted bounding boxes in the verification training set that are the same as the corresponding ground truth bounding boxes, the prediction accuracy of the adjusted preset neural network model can be determined.
[0108] S505 uses the preset parameter value corresponding to the highest prediction accuracy as the scale weight value of the preset neural network model.
[0109] Specifically, the maximum value is selected from the multiple prediction accuracies obtained above, and the prediction parameter value corresponding to this maximum value is used as the scale weight value H of the preset neural network model. S .
[0110] Since the scale weight values are different for different detection tasks, the scale weight values and their corresponding detection tasks can be stored so that they can be called up for subsequent identical detection tasks.
[0111] S402, the scale loss is weighted according to the scale weight value to obtain the weighted scale loss.
[0112] Specifically, the weighted scaling loss Loss(s) P ,s T )for:
[0113] Loss(s P ,s T )=H S Loss(s) P ,s T );
[0114] Among them, H S This represents the scale weight value.
[0115] S403. Determine the total loss of the preset neural network model based on the weighted scale loss, localization loss, confidence loss, and classification loss.
[0116] In this embodiment of the invention, the scale loss is weighted to adjust its importance in the total loss, thereby further improving the accuracy of target detection in SAR images.
[0117] S303, adjust the model parameters of the preset neural network model according to the total loss to obtain the trained target detection model.
[0118] Specifically, the model parameters of the preset neural network model can be adjusted according to the total loss, and the process of inputting several sample SAR images from the next training sample set into the preset neural network model to obtain the predicted bounding boxes of each sample SAR image in the next training sample set can be continued until the preset neural network model meets the preset conditions, thus obtaining the trained target detection model.
[0119] The aforementioned preset conditions include either meeting the preset requirements for the total loss value or reaching the preset number of training iterations. The preset requirements can be determined based on the accuracy of the object detection model, which will not be detailed here. The preset number of training iterations can be the maximum number of training iterations for the preset neural network model, such as 500.
[0120] S105, determine the predicted bounding box of the SAR image to be identified through the target detection model.
[0121] The trained target detection model is obtained through the above steps S101-S104. When it is necessary to perform target detection on the SAR image to be identified, the SAR image to be identified is input into the target detection model, and the predicted bounding box of the SAR image to be identified can be obtained. In addition, the predicted category corresponding to each predicted bounding box can also be obtained.
[0122] In this embodiment of the invention, a test set is used to test existing object detection models, existing object detection models including convolutional attention modules, and the object detection model including an attention module provided by this invention. The test results are as follows: Figure 6 , 7 And as shown in Figure 8. Among them, Figure 6 The graph shows the detection metrics for the existing YOLOv5 model. Figure 7 The image shows the detection metrics for an existing YOLOv5 model that includes a convolutional attention model. Figure 8 This invention provides a detection metric map for a target detection model that includes a convolutional attention module.
[0123] Figure 9 This image shows the target detection results of an existing target detection model applied to optical image A1. Figure 10 This is a target detection result of the existing YOLOv5 model on the SAR image A2 corresponding to the optical image A1. Figure 11 This image shows the target detection performance of an existing YOLOv5 model, including a convolutional attention module, on SAR image A2. Figure 12 The target detection effect diagram of the target detection model including the convolutional attention module provided by the present invention on the SAR image A2.
[0124] Figure 13 This image shows the target detection results of an existing target detection model applied to optical image B1. Figure 14 This is a target detection result of the existing YOLOv5 model on the SAR image B2 corresponding to the optical image B1. Figure 15 This image shows the target detection performance of an existing YOLOv5 model, including a convolutional attention module, on SAR image B2. Figure 16 The target detection effect diagram of the target detection model including the convolutional attention module provided by the present invention on the SAR image B2.
[0125] Figure 17 The image shows the target detection results of the existing target detection model on the optical image C1. Figure 18 This is a target detection result of the existing YOLOv5 model on the SAR image C2 corresponding to the optical image C1. Figure 19 This image shows the target detection performance of an existing YOLOv5 model, including a convolutional attention module, on SAR image C2. Figure 20 The target detection effect diagram of the target detection model including the convolutional attention module provided by the present invention on the SAR image C2.
[0126] Furthermore, the SAR image detection method provided in this embodiment of the invention can be used for target detection in vehicle-mounted SAR images. The vehicle-mounted SAR image can be obtained by imaging and processing vehicle-mounted SAR echo data.
[0127] In the SAR image detection method provided in this embodiment of the invention, when it can be used for vehicle-mounted SAR image target detection, the sample SAR image in the above steps S101-S105 is a sample vehicle-mounted SAR image and the SAR image to be identified is a vehicle-mounted SAR image to be identified, so as to achieve target detection of vehicle-mounted SAR images.
[0128] The SAR image target detection method provided by this invention uses the first tensor and the second tensor of each sample SAR image to represent the width and height dimensions of the target object's bounding box. The scale loss of the preset neural network model calculated based on the first and second tensors is used to represent the accuracy of the predicted width and height dimensions of the target object's bounding box. The smaller the scale loss, the closer the predicted width and height dimensions of the bounding box are to the actual bounding box dimensions. This allows the target detection model based on scale loss to significantly improve the phenomenon of missed detections and false detections caused by clutter interference and similar target features, thereby effectively improving the accuracy of SAR image target detection.
[0129] This invention also provides a SAR image target recognition method, which mainly includes the following steps:
[0130] The predicted bounding box of the image to be identified is obtained by any of the SAR image target detection methods described above.
[0131] Based on the predicted bounding box, determine the category of the target object corresponding to the predicted bounding box.
[0132] Specifically, the object category of the target object can be determined based on the size and shape of the predicted bounding box. Furthermore, bounding box templates for various object categories and their corresponding object categories can be pre-stored. By matching the predicted bounding box with the bounding box templates, the object category corresponding to the bounding box template that matches the predicted bounding box is taken as the object category of the target object, thereby achieving target recognition in SAR images.
[0133] The above-mentioned object categories can refer to: people, trees, vehicles, etc.
[0134] It is understood that the SAR image target detection method provided by this invention can effectively improve the accuracy of SAR image target detection, meaning that the detected predicted bounding boxes have high accuracy and low noise. Therefore, by obtaining the predicted bounding boxes of the image to be identified using the SAR image target detection method provided by this invention, and then determining the object category of the target object based on the predicted bounding boxes, the accuracy will also be improved, thereby enhancing the accuracy of target recognition.
[0135] Based on the above-described SAR image target detection method and SAR image target recognition method, the present invention also provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps in the SAR image target detection method or the steps in the SAR image target recognition method described in the above-described embodiments.
[0136] Based on the above-described SAR image target detection method and SAR image target recognition method, this invention also provides a terminal, such as... Figure 21 As shown, it includes at least one processor 90; a display screen 91; and a memory 92, and may also include a communications interface 93 and a bus 94. The processor 90, display screen 91, memory 92, and communications interface 93 can communicate with each other via the bus 94. The display screen 91 is configured to display a preset user guide interface in the initial setup mode. The communications interface 93 can transmit information. The processor 90 can call logical instructions in the memory 92 to execute the methods described in the above embodiments.
[0137] Furthermore, the logic instructions in the aforementioned memory 92 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0138] The memory 92, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 90 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 92, thereby implementing the methods in the above embodiments.
[0139] The memory 92 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal. Furthermore, the memory 92 may include high-speed random access memory (RAM) and non-volatile memory. Examples include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as transient storage media.
[0140] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the terminal and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.
[0141] The terminals and media provided in this application correspond one-to-one with the methods. Therefore, the terminals and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the terminals and media will not be repeated here. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0142] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.
[0143] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A method for target detection in SAR images, characterized in that, The SAR image target detection method comprises: inputting a plurality of sample SAR images of a training sample set into a preset neural network model to obtain a predicted bounding box of each sample SAR image; wherein the plurality of samples comprises at least one; determining a first tensor and a second tensor of each sample SAR image according to the predicted bounding box and the real bounding box of each sample SAR image; wherein the first tensor is obtained by point multiplication according to the width and height of the predicted bounding box, and the second tensor is obtained by point multiplication according to the width and height of the real bounding box; performing loss calculation according to the first tensor and the second tensor of each sample SAR image to determine the scale loss of the training sample set; the loss calculation according to the first tensor and the second tensor of each sample SAR image to determine the scale loss of the training sample set, specifically comprising: performing loss calculation according to the first tensor and the second tensor of each sample SAR image by a binary classification cross-entropy loss function to obtain the scale loss of the training sample set; adjusting the model parameters of the preset neural network model based on the scale loss to obtain a target detection model; determining the predicted bounding box of the SAR image to be recognized by the target detection model; the model parameter adjustment of the preset neural network model based on the scale loss to obtain a target detection model, specifically comprising: obtaining the classification loss, the positioning loss and the confidence loss of the preset neural network model; wherein the classification loss is obtained according to the predicted class and the real class of the target object in each sample SAR image; the positioning loss and the confidence loss are obtained according to the predicted bounding box and the real bounding box of each sample SAR image; determining the total loss of the preset neural network model according to the classification loss, the positioning loss, the confidence loss and the scale loss of the preset neural network model; adjusting the model parameters of the preset neural network model according to the total loss to obtain a trained target detection model; determining the total loss of the preset neural network model according to the classification loss, the positioning loss, the confidence loss and the scale loss of the preset neural network model, specifically comprising: determining the scale weight value corresponding to the preset neural network model in a preset value range; weighting the scale loss according to the scale weight value to obtain a weighted scale loss; determining the total loss of the preset neural network model based on the weighted scale loss, the positioning loss, the confidence loss and the classification loss; storing the scale weight value and the corresponding detection task so as to be called for subsequent same detection task; determining the scale weight value of the preset neural network model in a preset value range, specifically comprising: selecting a plurality of preset parameter values at a preset interval in the preset value range; weighting the scale loss according to each preset parameter value to obtain a plurality of initial weighted scale losses; The preset neural network model is adjusted in model parameters based on the initial weighting scale loss to obtain a plurality of adjusted preset neural network models; A verification sample set is obtained, and the prediction accuracy of each of the adjusted preset neural network models is determined; The preset parameter value corresponding to the maximum prediction accuracy is taken as the scale weight value corresponding to the preset neural network model; According to the position information of the predicted bounding box and the real bounding box, the similarity of the predicted bounding box and the corresponding real bounding box is determined, and the predicted bounding box and the corresponding real bounding box are determined to be the same when the similarity is greater than a preset threshold; According to the number of predicted bounding boxes in the verification training set that are the same as the corresponding real bounding boxes, the prediction accuracy of the adjusted preset neural network model is determined.
2. The SAR image target detection method of claim 1, wherein, The preset neural network model is adjusted in model parameters according to the total loss to obtain a trained target detection model, specifically including: According to the total loss, the preset neural network model is adjusted in model parameters, and the steps of inputting a plurality of sample SAR images in the next training sample set into the preset neural network model to obtain the predicted bounding box of each of the sample SAR images in the next training sample set are continued to be performed until the preset neural network model meets a preset condition, and a trained target detection model is obtained.
3. The SAR image target detection method of claim 1, wherein, The SAR image target detection method is applied to vehicle-mounted SAR image target detection.
4. A method for target recognition in SAR images, characterized in that, The method comprises: A predicted bounding box of an image to be recognized is obtained by the SAR image target detection method according to any one of claims 1-3. According to the predicted bounding box, the object class of the target object corresponding to the predicted bounding box is determined.
5. A computer readable storage medium, characterized in that, The computer readable storage medium stores one or more programs that can be executed by one or more processors to implement the steps in the SAR image target detection method according to any one of claims 1-3 or the steps in the SAR image target recognition method according to claim 4.
6. A terminal, characterized by comprising: It comprises: A processor and a memory; the memory stores a computer readable program that can be executed by the processor; when the processor executes the computer readable program, the steps in the SAR image target detection method according to any one of claims 1-3 or the steps in the SAR image target recognition method according to claim 4 are implemented.
Citation Information
Patent Citations
Target detection model training method, and target detection method and device
CN112329873A