A semi-supervised label based method for detecting coastal ship targets in SAR images
By introducing the ArBIoU loss metric and the thermo-distillation training strategy, the ship target detection in SAR images is optimized, solving the problem of low detection accuracy in near-shore scenarios and achieving high-precision ship target detection.
Patent Information
- Application Number
- CN202310211466.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-02-27
AI Technical Summary
Existing CNN-based SAR image ship target detection methods have low detection accuracy in complex near-shore scenes, especially in densely distributed or complex scenes where ship targets are difficult to achieve the expected results. Furthermore, traditional hard labeling and self-distillation techniques fail to effectively utilize negative sample information, resulting in limited detection accuracy.
A near-shore ship target detection method based on semi-soft labels for SAR images is adopted. A novel rotation balance cross-union ratio loss metric (ArBIoU) and thermo-distillation training strategy are introduced. Through an improved DSA-Net network model, the detection network is optimized by using semi-soft labels and self-distillation technology, and the weight relationship between aspect ratio deviation and center point offset is quantified to improve detection accuracy.
It significantly improves the accuracy of ship target detection in near-shore scenarios and enhances detection performance, especially in near-shore scenarios where the detection accuracy is improved by 4.65%, and exhibits excellent generalization performance in both offshore and near-shore scenarios.
Smart Images

Figure CN116563697B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of radar remote sensing, and in particular to a SAR image near-shore ship target detection method based on a semi-soft label. BACKGROUND
[0002] Synthetic Aperture Radar (SAR) has the characteristics of all-weather and all-day observation, and is an important technical means for tracking and monitoring sea ship targets. In recent years, the method for detecting sea surface targets by using SAR images has been widely applied to the fields of sea situation awareness, marine resource exploration, and sea traffic control, and is one of the key technologies for realizing national defense security and commercial development. In recent years, with the rapid development of computer science and technology, deep learning methods (DL) represented by convolution neural networks (CNN) have been widely applied to the field of SAR image ship target detection due to their strong feature extraction capability and unparalleled performance advantages. Compared with traditional constant false alarm rate (CFAR) methods, the CNN-based method has achieved remarkable improvement in detection accuracy.
[0003] At present, most of the CNN-based methods in this field are evolved from natural image object detection methods. Although good results have been achieved, the detection accuracy in complex scenes such as near shore is generally not high, which is a prominent problem that needs to be solved. First, unlike natural images that contain rich color features and detailed information of the target, SAR images reflect the electromagnetic scattering characteristics of the target through gray information, and the image quality is generally poor, providing relatively less feature information for the network to extract. In order to solve this problem, the existing improvement strategy mainly designs a module in the network for extracting target scattering points. This method can improve the detection accuracy to a certain extent. However, electromagnetic scattering characteristics are not unique to ship targets. Therefore, in the case of dense distribution of ship targets or complex near shore scenes, the effect of this method is difficult to meet expectations. Secondly, the feature expression of ship targets on natural images and SAR images is different, which leads to the fact that a feasible scheme on natural images may fail on SAR images. For example, on SAR images, ship targets in near shore scenes show strong aspect ratio difference and center point offset in the regression process. Therefore, this characteristic must be considered in the SAR ship target loss calculation process. In order to solve this problem, some research has proposed a Complete Intersection-over-Union (CIoU) loss metric, which effectively estimates the aspect ratio difference and center point offset of the predicted target and the true value in the regression process. On this basis, Skew CIoU introduces angle difference, which is more sensitive to target rotation detection. However, the above methods do not consider the weight relationship between aspect ratio difference and center point offset, which limits the detection accuracy in near shore scenes.
[0004] On the other hand, due to the unique imaging mechanism of SAR images, the image quality is not high, and the extractable target features are few, which poses higher requirements and greater challenges to ship detection in complex scenes such as near shore. In order to solve this problem, some methods use attention mechanisms, that is, by weighting the image, the important areas containing ship targets are highlighted while irrelevant areas are ignored. In essence, this method enhances the influence of ship targets in the image dimension and eliminates the information of negative samples (targets that are not ships). In addition, traditional convolutional neural network methods are based on hard labels (i.e. positive sample labels are 1 and negative sample labels are 0) for target detection. However, negative samples themselves also contain a lot of learnable "dark knowledge", and traditional methods usually ignore the role of this information, especially in complex near shore scenes, the role of negative samples is more significant, therefore, there is still much room for improvement in existing methods. For example, some methods propose a detection strategy based on soft labels, that is, assigning a probability value in the (0, 1) interval to the target in the label dimension. However, using soft labels for detection alone still has drawbacks. For example,Figure 1 As shown, the hard label completely ignores the dark knowledge of the negative sample, and the soft label can use part of the negative sample information, but there are two problems: first, the use of positive samples has information loss, and second, there may be false labels. The existing soft label-based detection methods mainly have the following three types: the first type is label smoothing, that is, the hard label is converted into a soft label by a manually set method, and the characteristic of this method is simple operation, but the robustness and interpretability of the method are very weak; the second type is the knowledge distillation method, which uses a large network to distill a small network, the purpose is to realize the trade-off between network detection accuracy and speed. Therefore, in terms of unilateral improvement of accuracy, there is still a lot of room for improvement. The third type is self-distillation (Self-Distillation, hereinafter referred to as SD), that is, the network distills itself. The advantage of this is that it can adaptively generate soft labels that are most suitable for its own characteristics, and realize unilateral improvement of accuracy. However, the existing self-distillation technology is mostly state self-distillation at the same temperature, that is, the later iteration rounds distill the earlier iteration rounds, or the later network layers distill the earlier network layers. Among them, the distillation temperature plays a role in smoothing the label, that is, the greater the temperature difference, the more negative sample information the network extracts, and vice versa. Therefore, the existing SD technology does not fully utilize the temperature information, which limits the extraction of the dark knowledge of the negative sample, and thus affects the detection accuracy of the near shore. SUMMARY
[0005] The present application aims to at least partially solve one of the problems of the related art.
[0006] To this end, the present application proposes a semi-soft label-guided network based on self-distillation (SD) for SAR ship detection (hereinafter referred to as S 2 LSDNet), which simultaneously introduces a new Angle-related Balance Intersection-over-Union (hereinafter referred to as ArBIoU) loss metric scale, which can improve the detection accuracy of ship targets in SAR images.
[0007] Another object of the present application is to propose a semi-soft label-guided network based on self-distillation (SD) for SAR ship detection.
[0008] To achieve the above object, the present application proposes a semi-soft label-guided network based on self-distillation (SD) for SAR ship detection, which comprises:
[0009] obtain a training set and a test set based on a SAR image ship detection data set;
[0010] input the training set and the true value label corresponding to the image in the training set into an improved DSA-Net network model for training to obtain a teacher model;
[0011] calculate a soft label with probability information by using the teacher model to calculate a probability value, and further calculate a semi-soft label; and retrain the improved DSA-Net network model by using the true value label and the semi-soft label to obtain a student model for a detection network model for target detection;
[0012] obtain a ship target detection result of an image to be detected in the test set based on an optimal detection weight of the detection network model obtained by loss calculation on the student model at different distillation temperatures in a self-distillation training process.
[0013] To achieve the above object, another aspect of the present application provides a SAR image near-shore ship target detection device based on a semi-soft label, comprising:
[0014] a data acquisition module for acquiring a training set and a test set based on a SAR image ship detection data set;
[0015] a teacher model training module for inputting the training set and the true value label corresponding to the image in the training set into an improved DSA-Net network model for training to obtain a teacher model;
[0016] a student model training module for calculating a soft label with probability information by using the teacher model to calculate a probability value, and further calculating a semi-soft label; and training the DSA-Net network model by using the true value label and the semi-soft label to obtain a student model for a detection network model for target detection;
[0017] a target detection module for obtaining a ship target detection result of an image to be detected in the test set based on an optimal detection weight of the detection network model obtained by loss calculation on the student model at different distillation temperatures in a self-distillation training process.
[0018] The SAR image near-shore ship target detection method and device based on a semi-soft label of the embodiments of the present application improve the detection precision of near-shore ship images.
[0019] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0020] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description, taken in conjunction with the following drawings of which:
[0021] Figure 1 Fig. 1 is a schematic diagram of sample distribution in existing hard labels and sample distribution in soft labels;
[0022] Figure 2 Fig. 2 is a flowchart of a semi-soft label based SAR image nearshore ship target detection method according to an embodiment of the present application;
[0023] Figure 3 Fig. 3 is a schematic diagram of sample distribution in semi-soft labels according to an embodiment of the present application;
[0024] Figure 4 Fig. 4 is a diagram of an improved DSA-Net network architecture according to an embodiment of the present application;
[0025] Figure 5 Fig. 5 is a schematic diagram of a workflow according to an embodiment of the present application;
[0026] Fig. 6(a) and Fig. 6(b) are schematic diagrams of total training curves and detection accuracy under different rounds of influence based on different loss scales of ArBIoU, respectively;
[0027] Fig. 7(a) and Fig. 7(b) are schematic diagrams of total training curves and detection accuracy under different rounds of influence based on different labels of temperature self-distillation, respectively;
[0028] Fig. 8(a) and Fig. 8(b) are schematic diagrams of PR curves in a far sea scene and PR curves in a nearshore scene, respectively;
[0029] Figure 9 Fig. 9 is an example diagram of detection results in different scenes according to an embodiment of the present application;
[0030] Fig. 10(a) and Fig. 10(b) are schematic diagrams of detection results of a baseline network improved DSA-Net and detection results of the present application, respectively;
[0031] Figure 11 Fig. 11 is a schematic diagram of a structure of a semi-soft label based SAR image nearshore ship target detection device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] It should be noted that the embodiments and features in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0033] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work should fall into the protection scope of the present application.
[0034] The semi-soft label based SAR image near-shore ship target detection method and device proposed according to the embodiments of the present application are described below with reference to the drawings.
[0035] Figure 2 The flowchart of the semi-soft label based SAR image near-shore ship target detection method according to an embodiment of the present application is shown in
[0036] As shown in Figure 1 , the method includes but is not limited to the following steps:
[0037] S1, obtaining a training set and a test set based on a SAR image ship detection data set;
[0038] S2, inputting the training set and the true value label corresponding to the image in the training set into the improved DSA-Net network model for training to obtain a teacher model;
[0039] S3, using the teacher model to calculate the probability value to obtain a soft label with probability information and further calculate a semi-soft label; and using the true value label and the semi-soft label to train the improved DSA-Net network model again to obtain a student model used as a detection network model for target detection;
[0040] S4, calculating the loss of the student model under different distillation temperatures in the self-distillation training process to obtain the optimal detection weight of the detection network model, and obtaining the ship target detection result of the image to be detected in the test set based on the optimal detection weight.
[0041] Specifically, the embodiments of the present application are described in detail below with reference to the drawings.
[0042] The present application is based on a dual-separation attention network (DSA-Net) that achieves good detection accuracy on natural light images; then ArBIoU loss metric is introduced in the DSA-Net for quantifying the weight correlation of the aspect ratio deviation and the center point deviation in the near-shore ship regression process, and then a baseline network, i.e., an improved DSA-Net, is obtained. The network architecture of the improved DSA-Net is shown in Figure 4As shown; then, using the obtained baseline network output containing a large amount of dark knowledge and without information loss or mislabeling, such as... Figure 3 As shown; finally, the baseline network is trained using a semi-soft label and temperature difference SD strategy; finally, the trained network is used as the detection network for ship target detection in SAR images.
[0043] Understandably, this invention proposes a ship detection method based on semi-soft labels, overcoming the shortcomings of existing methods such as insufficient utilization of negative sample information, loss of positive sample information, and mislabeling; it proposes a temperature difference self-distillation training strategy, solving the drawbacks of insufficient distillation and inadequate utilization of negative sample information in traditional methods; and it proposes an ArBIoU loss scale, focusing on the characteristics of large aspect ratio differences and center point offset in the ship target regression process in near-shore scenarios, and quantifies the weight relationship between aspect ratio deviation and center point deviation.
[0044] As an example, this invention uses the improved DSA-Net as both a teacher and student model for training and inference under different temperature conditions. The final loss function is the sum of the detection loss and the SD loss. The steps of this invention can be described as follows: Figure 5 As shown:
[0045] Step 1: Correct the initial DSA-Net.
[0046] The original loss function in DSA-Net was modified to the ArBIoU loss function, resulting in an improved DSA-Net, which serves as the baseline network. During regression, the predicted bounding box R and its corresponding ground truth box R0 are... gt The ArBIoU scale can be calculated as:
[0047]
[0048] Where θ and θ gt The angles o and o' represent the predicted bounding box and the truth box relative to the horizontal direction, respectively. gt This represents the coordinates of the center points of the predicted bounding box and the truth box, where c represents R and R'. gt The shortest diagonal length of the enclosed region, ρ(.), represents the calculated distance. IoU can be calculated as:
[0049]
[0050] Where area(.) calculates the area, and ∩ and ∪ represent the intersection and union of the two rectangles, respectively. v represents R and R gt The difference in aspect ratio can be calculated as follows:
[0051]
[0052] where w and w gt denote the width of the predicted and ground truth bounding boxes, respectively, and h and h gt denote the length of the predicted and ground truth bounding boxes, respectively. a and b are two weight coefficients to characterize the weight association between the aspect ratio deviation and the center point deviation and IoU, respectively. They can be calculated as:
[0053]
[0054]
[0055] It can be seen that for the weight coefficient a, the closer the aspect ratio of the ship target is, the greater the value of a is, at this time, the center point deviation accounts for a larger proportion in the regression calculation; on the contrary, the greater the aspect ratio difference is, the smaller the value of a is, at this time, the center point deviation accounts for a smaller proportion. The weight coefficient b builds the weight association between the aspect ratio of the ship target and the IoU, wherein the greater the IoU is, the greater the aspect ratio difference accounts for in the regression calculation; on the contrary, the smaller the IoU is, the smaller the aspect ratio difference accounts for.
[0056] Step two: divide the data set.
[0057] Specifically, the public SAR image ship detection data set SSDD+ is adopted, and the number is allocated according to 8:2 to form the training set and the test set. At the same time, in order to verify the detection effect of the application in the near shore and the far sea two scenes, according to the real distribution of the ship targets in the test image, the application further subdivides the test image into 34 near shore images and 198 far sea images as two kinds of supplementary test data sets. In addition, in order to verify the generalization performance of the application, the application additionally adopts a large wide SAR image as a test image. It is worth noting that the image does not participate in the training process of the network, and is only used for testing.
[0058] Step three: adjust the size of the training image.
[0059] Specifically, the image size can be adjusted according to the size specification of the network input, and the input image size is uniformly adjusted to 608*608 for subsequent teacher model training.
[0060] Step four: pre-train the teacher network model.
[0061] Specifically, the training data containing images and true value labels (hard labels) are input to the baseline network for pre-training to obtain the teacher model, and the improved DSA-Net detection loss L Dec to obtain the weight of the teacher model. The detection loss can be calculated as:
[0062]
[0063] where f bb , f cs , and f cla represent the loss regression of anchor boxes, confidence, and classification probability, respectively, where and represent the offset vector of the predicted and ground truth bounding boxes, respectively, which contains five parameters (x, y, w, h, θ), where x and y represent the horizontal and vertical coordinates of the center point of the bounding box. and represent the confidence values of the predicted and ground truth bounding boxes, respectively, and p i gt represent the classification probability values of the predicted and ground truth bounding boxes, respectively. The rotation box, confidence, and classification regression can be calculated as:
[0064]
[0065] where N represents the number of generated anchor boxes, obj i is a binary value equal to 1 if the i-th anchor box contains a ship target, otherwise it represents that the anchor box does not contain a ship target. The weighting coefficients (λ1, λ2) are set to (5, 0.5) in the present application to ensure the priority of positive samples.
[0066] Step five: infer to generate soft labels.
[0067] Specifically, under high temperature conditions at temperature T = t, inference is performed using the teacher model to obtain soft labels with probability information, and the probability value y ti from the teacher model can be calculated as:
[0068]
[0069] where T represents the distillation temperature, and in the present application the temperature is taken as 20. z ti represents the output of the teacher model, and K represents the number of outputs. Accordingly, the corresponding semi-soft label can be calculated as:
[0070]
[0071] where label represents the true value label contained in the image, and T Con represents the confidence threshold in the inference process.
[0072] Step six: train the student network model to obtain network weights.
[0073] Specifically, the present application trains the student model with the ground truth label and the semi-soft label generated in step five as the final detection network. The ground truth label is used to generate the detection loss, and the semi-soft label is used to generate the self-distillation loss, and finally the weight of the student model is obtained based on the total loss function. Obviously, the total loss function of the network is composed of two parts of detection loss and self-distillation loss, which can be calculated as:
[0074] L final = L Dec + L SD
[0075] Considering that the network is used to transfer knowledge through a large number of anchor boxes generated in the self-distillation training process. Therefore, in order to avoid the calculation burden and interference of useless anchor boxes (knowledge) in the teacher network to the student network, the present application presets a confidence coefficient to filter out useless areas with a confidence of 0, and the calculation process can be represented as:
[0076]
[0077] Therefore, the total rotation box regression amount can be calculated as:
[0078]
[0079] wherein, represents the regression amount of the rotation box in the self-distillation process, and respectively represent the offset vector of the rectangular box in the teacher model and the student model. Similarly, the total classification regression amount can be calculated as:
[0080]
[0081] wherein, represents the classification regression amount in the SD process, and respectively represent the classification probability value of the rectangular box in the semi-soft label and the student model. In addition, the total confidence regression amount can be calculated as:
[0082]
[0083] wherein, represents the confidence regression amount in the SD process, and respectively represent the confidence value of the rectangular box in the teacher model and the student model. It should be noted here that no confidence coefficient is set in the confidence regression calculation, because the influence of the negative sample has been considered in the confidence regression. In summary, the total loss function of the network can also be represented as:
[0084]
[0085] Step seven: load network weight, and perform ship detection.
[0086] Specifically, the temperature in the student model is set to 1, and the trained weight is loaded for use as a final network model for ship detection.
[0087] Therefore, the final evaluation indicators of the application are respectively recall, precision, F1 score, average precision (AP), and class average AP (mAP). In single-class target detection, the mAP value is equal to the AP value. Among them, AP 0.5 represents the AP value when IoU is 0.5.
[0088] Ablation learning. In order to verify the performance effect of the SD strategy and the ArBIoU loss scale contained in the application, the application introduces these two parts respectively based on DSA-Net, checks the detection accuracy on the SSDD+ dataset, and the related results are shown in Table 1. It can be seen that the introduction of ArBIoU and semi-soft label based on temperature self-distillation can respectively improve the AP 0.5 value by 1.02% and 3.34%, and the introduction of both can improve the AP 0.5 value by 4.65%. Therefore, the designed SD strategy and ArBIoU loss scale do have the effect of improving the detection performance of the network.
[0089] Table 1
[0090]
[0091] Further, the specific effect of ArBIoU loss scale. In order to intuitively reflect the performance gain of ArBIoU on loss calculation, the application introduces ArbIoU, SkewCIoU and CIoU three kinds of measurement scales based on DSA-Net. The training process is shown in Figure 6(a), and the detection accuracy under different rounds is shown in Figure 6(b). It can be seen that the ArBIoU proposed in the application maintains the most stable training state throughout the training process, and the final convergence value is the smallest. At the same time, except that the accuracy at the 50th round is slightly lower than that of SkewCIoU, it maintains the highest detection accuracy. It should be noted that according to the training curve, the application can judge that at epoch = 50, the network has not yet reached the convergence state.
[0092] Further, the specific impact of the semi-soft label based on temperature self-distillation. In order to intuitively reflect the impact of the semi-soft label on the training and testing of the network, the present application respectively selects the hard label, the soft label and the semi-soft label three situations for experiment. The training process is shown in Fig. 7(a), and the detection accuracy under different rounds is shown in Fig. 7(b). It can be seen that the semi-soft label based on temperature self-distillation proposed in the present application maintains a relatively stable training state and a small convergence value throughout the training process. At the same time, it maintains a relatively high detection accuracy throughout the process.
[0093] Table 2
[0094]
[0095]
[0096] Further, the detection results under different scenarios. The present application distinguishes the open sea and the near shore scenarios for experimental comparison. The detection results are shown in Table 2, which are the detection results comparison under different scenarios on the SSDD+ dataset. It can be seen that in the open sea scenario, the method proposed in the present application is the highest in the three indicators of Recall, F1 score and mAP, among which mAP is the highest, indicating the highest detection accuracy, which is 1.64% higher than the second place. In the near shore scenario, the method of the present application is the highest in all indicators, among which mAP is 3.63% higher than the second place, which shows that the present application has the best detection effect in the open sea and the near shore scenarios, and the performance advantage is more obvious in the near shore scenario. The PR curves corresponding to the detection of the two scenarios are shown in Fig. 8(a) and Fig. 8(b), which are the PR curves under different scenarios, Fig. 8(a) is the PR curve under the open sea scenario, and Fig. 8(b) is the PR curve under the near shore scenario. It can be seen that whether in the open sea or in the near shore environment, the area surrounded by the curve corresponding to the present application is the largest, which also proves the conclusion that the detection accuracy is the highest.
[0097] Further, the detection result comparison of the SSDD+ test set. The present application detects all images on the SSDD+ test set, and the detection results are shown in Table 3. It can be seen that the detection accuracy of the present application reaches 97.08%, ranking first, and the speed can reach 30.7FPS, ranking also in the front. Therefore, compared with the existing detection method, the detection performance of the present application is better. In addition, the visualization effect example diagram of part of the detection results of the present application is shown in Fig. 9. Figure 9
[0098] Table 3
[0099]
[0100]
[0101] Further, the generalization performance detection result comparison. In order to verify the generalization performance of the present application, i.e. practicability, the present application uses the training set of the public data set SSDD+ to train the network, and carries out detection on a large wide SAR image collected. Fig. 10(a) and Fig. 10(b) are the wide SAR image detection result visualization comparison results. The green frame represents the correctly detected ship target, the yellow frame represents the missed ship target, and the red frame represents the false alarm. Fig. 10(a) is the detection result of the improved DSA-Net of the baseline network, and Fig. 10(b) is the detection result of the present application. It can be seen that, compared with the baseline network, the present application detects the ship target more completely and accurately, and the false alarm is lower. Therefore, the present application has good generalization performance.
[0102] The semi-soft label based SAR image near-shore ship target detection method according to the embodiment of the present application overcomes the defects of the prior art, such as insufficient utilization of negative sample information, loss of positive sample information and false labeling, solves the drawbacks of the traditional method, such as insufficient distillation and insufficient utilization of negative sample information, and focuses on the characteristics of the large aspect ratio difference and center point offset in the ship target regression process in the near-shore scene, and quantifies the weight relationship of the aspect ratio deviation and the center point deviation.
[0103] In order to realize the above-mentioned embodiments, as shown in Figure 11 The semi-soft label based SAR image near-shore ship target detection device 10 provided in the embodiment also includes a data acquisition module 100, a teacher model training module 200, a student model training module 300 and a target detection module 400.
[0104] The data acquisition module 100 is configured to acquire a training set and a test set of a SAR image ship detection data set;
[0105] The teacher model training module 200 is configured to input the training set and the true value label corresponding to the image in the training set into the improved DSA-Net network model for training to obtain a teacher model;
[0106] The student model training module 300 is configured to calculate a soft label with probability information by using the teacher model to calculate the probability value, and further calculate a semi-soft label; and train a DSA-Net network model by using the true value label and the semi-soft label to obtain a student model used for a detection network model for target detection;
[0107] The target detection module 400 is configured to calculate the loss of the student model at different distillation temperatures in the self-distillation training process to obtain the optimal detection weight of the detection network model, and obtain the ship target detection result of the image to be detected in the test set based on the optimal detection weight.
[0108] Further, the probability value y of the soft label of the teacher model tiis calculated by the following formula:
[0109]
[0110] wherein T represents a distillation temperature, z ti represents an output of a teacher model, K represents a number of outputs, and the corresponding semi-soft label is:
[0111]
[0112] wherein label is a true value label contained in an image in a training set, T Con represents a confidence threshold in an inference process.
[0113] The semi-soft label based SAR image near-shore ship target detection device according to the embodiment of the present application overcomes the defects of insufficient utilization of negative sample information and loss of positive sample information and incorrect labeling in the prior art, solves the problems of insufficient distillation and insufficient utilization of negative sample information in the traditional method, and quantifies the weight relationship between the aspect ratio deviation and the center point deviation.
[0114] It should be noted that the above description of the semi-soft label based SAR image near-shore ship target detection method embodiment is also applicable to the semi-soft label based SAR image near-shore ship target detection device of the embodiment, which will not be described here.
[0115] In addition, the terms "first", "second", "third", etc. are used only for descriptive purposes and should not be construed as indicating or implying relative importance or an indicated number of technical features. Therefore, the features defined as "first", "second", etc. can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, such as two, three, etc., unless otherwise specifically limited.
[0116] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms is not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the skilled in the art can combine and combine the different embodiments or examples described in the present application and the features of the different embodiments or examples without contradiction.
[0117] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and are not to be construed as limiting the present application, and that variations, modifications, substitutions and changes can be made by those skilled in the art without departing from the scope of the present application.
Claims
1. A method for detecting a near-shore ship target in a SAR image based on semi-soft labels, characterized in that, The method comprises the following steps: obtain a training set and a test set based on a SAR image ship detection data set; input the training set and the true value label corresponding to the image in the training set into an improved DSA-Net network model for training to obtain a teacher model; calculate the probability value by using the teacher model to obtain a soft label with probability information and further calculate a semi-soft label; and use the true value label and the semi-soft label to train the improved DSA-Net network model again to obtain a student model for a detection network model for target detection; loss calculation is performed on the student model at different distillation temperatures in the self-distillation training process to obtain the optimal detection weight of the detection network model, and the ship target detection result of the image to be detected in the test set is obtained based on the optimal detection weight; adjusting a loss function of an original DSA-Net as an ArBIoU loss function to obtain the improved DSA-Net network model, in a regression process, calculating ArBIoU of a predicted rectangular frame of an image in the training set and a corresponding true value frame wherein, and denotes the included angle between the predicted rectangular frame and the true value frame with the horizontal direction, denotes the coordinates of the center points of the predicted rectangular frame and the true value frame, denotes and the length of the shortest diagonal of the enclosed area, denotes the calculated distance, and the IoU is calculated: wherein, denotes the calculated area, and denote the intersection and union area of two rectangular frames, respectively, denotes and the aspect ratio difference: where, and w and h represent the width and height of the predicted and ground truth bounding boxes, respectively, gt h and h represent the length of the predicted and ground truth bounding boxes, respectively, and are two weight coefficients to characterize the weight association of the aspect ratio deviation with the center point deviation and IoU, respectively. 。 2. The method of claim 1, wherein, probability values of the soft labels of the teacher model are calculated by the following equation: where T represents the distillation temperature, denotes the output of the teacher model, K denotes the number of outputs, and the corresponding semi-soft labels are: where label is the true value label contained in the image in the training set, represents the confidence threshold in the inference process.
3. The method of claim 2, wherein, the true value label is used to generate a detection loss, the semi-soft label is used to generate a self-distillation loss, and the weight of the student model is obtained based on a total loss function, and the total loss function includes the detection loss and the self-distillation loss: Pre-set confidence coefficient to calculate the self-distillation loss: total anchor point box regression amount: where, represents the regression quantity of anchor boxes in the distillation process, and respectively represent the offset vectors of the rectangular boxes in the teacher model and the student model, and the total classification probability regression quantity is: where, denotes the classification regression quantity in the SD process, and denotes the classification probability value of the rectangle box in the semi-soft label and student model, respectively, the total confidence regression quantity: wherein, denotes the confidence regressor in the SD process, and denotes the confidence value of the rectangular box in the teacher model and student model, respectively.
4. The method of claim 3, wherein, the calculation method of the total loss function further includes: 。 5. The method of claim 4, wherein, a detection loss based on the DSA-Net network model obtaining the weights of the teacher model, the detection loss being calculated by the following formula: wherein , , and respectively represent the anchor boxes, the regression quantities of confidence and classification probability.
6. The method of claim 5, wherein, Preset and These represent the offset vectors of the predicted bounding box and the truth bounding box, respectively, and the offset vectors contain ( Five parameters, among which and This represents the x and y coordinates of the center point of the predicted rectangle. and These represent the confidence scores for the predicted bounding box and the truth box, respectively. and Let represent the classification probability values of the predicted bounding box and the ground truth box, respectively. Then, the regressors of the anchor box, confidence score, and classification probability are calculated by the following formula: wherein, represents the number of generated anchor boxes, is a binary value, equal to 1 if the i-th anchor box contains a ship target, is a trade-off coefficient.
7. The method of claim 1, wherein, the method further comprises adjusting the image size of the training set according to the image input size of the improved DSA-Net network model to input the image into the improved DSA-Net network model for teacher model training.
8. A semi-soft label based SAR image near-shore ship target detection apparatus using the method according to claim 1, characterized in that, comprise: a data acquisition module for obtaining a training set and a test set based on a SAR image ship detection data set; a teacher model training module for inputting the training set and the true value label corresponding to the image in the training set into an improved DSA-Net network model for training to obtain a teacher model; a student model training module for calculating the probability value by using the teacher model to obtain a soft label with probability information and further calculating a semi-soft label; and use the true value label and the semi-soft label to train the DSA-Net network model to obtain a student model for a detection network model for target detection; a target detection module for loss calculation on the student model at different distillation temperatures in the self-distillation training process to obtain the optimal detection weight of the detection network model, and the ship target detection result of the image to be detected in the test set is obtained based on the optimal detection weight.
9. The apparatus of claim 8, wherein, probability values of the soft labels of the teacher model are calculated by the following equation: where T represents the distillation temperature, denotes the output of the teacher model, K denotes the number of outputs, and the corresponding semi-soft labels are: where label is the true value label contained in the image in the training set, represents the confidence threshold in the inference process.
Citation Information
Patent Citations
SAR image ship detection method and system based on lightweight deep learning
CN113469073A
SAR image ship target detection method, electronic equipment and storage medium
CN115019180A