A semi-supervised sea surface target detection method, system, device and storage medium

By adjusting the confidence threshold and bounding box consistency regularization technique, the quality of false labels and bounding box localization are optimized, solving the problem of low quality of false labels in sea surface target detection and improving detection performance and accuracy.

CN116385879BActive Publication Date: 2026-02-03SHANGHAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310369693.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-07
Publication Date
2026-02-03
Estimated Expiration
2043-04-07

AI Technical Summary

Technical Problem

Existing semi-supervised target detection algorithms suffer from poor pseudo-label quality in sea surface target detection. In particular, the lack of correlation between classification confidence and target localization accuracy leads to confirmation bias and inaccurate bounding box localization, affecting detection performance.

Method used

By adjusting the confidence threshold and bounding box consistency regularization technique, the quality of pseudo-labels and bounding boxes is optimized. A teacher-student model architecture is adopted, the confidence threshold is dynamically adjusted, and the loss function is optimized by combining the intersection-over-union ratio and regression consistency factor to improve the model training effect.

Benefits of technology

It improves the performance of sea surface target detection, enhances the quality of false tags and the accuracy of bounding box positioning, and improves the accuracy and consistency of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116385879B_ABST
    Figure CN116385879B_ABST
Patent Text Reader

Abstract

The application discloses a semi-supervised sea surface target detection method, system, device and storage medium, and relates to the field of target detection. A confidence threshold adjustment model of sea surface target categories is established, and a classification loss function of unlabeled data is determined according to the confidence threshold adjustment model; a regression loss function of the unlabeled data is adjusted through boundary box consistency regularization; and the confidence threshold is used to improve the pseudo-label quality in the model training process. The confidence threshold of each sea surface target category is dynamically adjusted, the pseudo-label quality is improved, the strong dependence on the intersection over union in the traditional positive and negative sample matching mechanism is relieved through boundary box consistency regularization, the quality of the boundary box is improved, and then the sea surface target detection performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection, and in particular to a semi-supervised method, system, device and storage medium for detecting sea surface targets. Background Technology

[0002] With the continuous development of artificial intelligence, more and more unmanned devices are emerging. Drones for aerial operations, self-driving cars, and unmanned surface vessels (USVs) for maritime operations have played a significant role in high-risk scenarios. USVs are important intelligent devices that can replace humans in maritime operations. Modern USVs can autonomously complete dangerous and tedious tasks such as tracking, seabed surveys, port patrols, and mine clearance without human piloting.

[0003] Meanwhile, unmanned surface vessels can be equipped with visual perception systems to detect targets on the sea surface. When targets such as ships or vessels appear in the detected images, they can be located and identified for later tracking and manual analysis.

[0004] Object detection is a crucial task in computer vision. Currently, mainstream object detection tasks are based on deep learning algorithms, and the detection performance of these algorithms depends on the number of labeled image samples trained on the model, i.e., the label information such as the location and category of the detected object. However, since manual annotation is costly, researchers must consider both model performance and development costs when conducting experiments. This, to some extent, limits the development of object detection algorithms. Therefore, semi-supervised learning algorithms have emerged. The core idea of ​​semi-supervised object detection algorithms is to utilize unlabeled data to improve model performance.

[0005] Most current semi-supervised object detection algorithms improve loss functions, data augmentation techniques, and model training. The most advanced semi-supervised object detection algorithms combine pseudo-label learning and consistency learning. However, pseudo-label learning often suffers from severe confirmation bias. To improve pseudo-label quality, mainstream object detection algorithms primarily measure it by whether the maximum likelihood of the classification result of the pre-trained detection model's prediction of unlabeled images exceeds a pre-set, fixed confidence threshold. However, the proportion of each category in the dataset varies, resulting in different detection difficulties. Therefore, setting the same confidence threshold to filter detection results for all categories is unreasonable and will lead to severe confirmation bias.

[0006] Studies have shown that classification confidence and target localization accuracy are not positively correlated. Bounding boxes with higher class confidence often have lower IoU (Intersection over Union) ratios (IoU) with the ground truth bounding boxes. Therefore, considering only classification confidence to measure the quality of pseudo-labels has limitations. Furthermore, for target localization tasks, the strong reliance on IoU in traditional positive-negative sample matching mechanisms conflicts with the inaccurate localization information provided by pseudo-labels in semi-supervised detection tasks. Summary of the Invention

[0007] The purpose of this invention is to provide a semi-supervised method, system, device, and storage medium for detecting sea surface targets. By adjusting the confidence threshold, the quality of pseudo-labels is improved, and the quality of bounding boxes is improved through bounding box consistency regularization, thereby improving the performance of sea surface target detection.

[0008] To achieve the above objectives, the present invention provides the following solution:

[0009] A semi-supervised method for detecting sea surface targets includes:

[0010] A semi-supervised sea surface target detection model is constructed; the semi-supervised sea surface target detection model includes a teacher model and a student model with the same initialization parameters and network architecture;

[0011] Establish a confidence threshold adjustment model for sea surface target categories, and improve the classification loss function for unlabeled data based on the confidence threshold adjustment model;

[0012] Adjust the regression loss function for unlabeled data using bounding box consistency regularization;

[0013] Based on the classification loss function and the adjusted regression loss function, determine the total loss function of the semi-supervised sea surface target detection model;

[0014] Obtain a sea surface target detection image dataset; the sea surface target detection image dataset includes labeled image samples and unlabeled image samples;

[0015] The teacher model is pre-trained using the labeled image samples, and the pre-trained teacher model parameters are then transferred to the student model.

[0016] Based on the total loss function, the pre-trained teacher model and the parameter-transferred student model are trained using the sea surface target detection image dataset. During the training process, the confidence threshold adjustment model is used to dynamically adjust the confidence threshold of each sea surface target category. The student model is trained using labeled data and unlabeled data with pseudo-labels. After the student model completes the current parameter update, the network weight parameters obtained by training are passed to the teacher model through an exponential moving average to obtain the trained teacher model.

[0017] An image of a sea surface target to be detected is input into a trained teacher model, which outputs the detection result of each sea surface target in the image.

[0018] Optionally, the confidence threshold adjustment model is:

[0019] τ′=T s (c)·τ;

[0020]

[0021]

[0022] In the formula, τ′ is the adjusted confidence threshold for class c, and T s (c) represents the learning performance parameter of class c in step s, τ is the confidence threshold of class c before adjustment, ρ is the maximum value of class prediction by the model in step s, G is the total number of unlabeled data points, and g is the g-th unlabeled data point. For the model's prediction of the unlabeled image sample I' in step s, This is a weak enhancement operation, where y represents the category.

[0023] Optionally, the classification loss function for the unlabeled data is:

[0024]

[0025]

[0026] In the formula, Let be the classification loss function for unlabeled data, α be the ratio of unlabeled image samples to labeled image samples in the mini-batch, n be the number of labeled image samples in the mini-batch, σ be the statistical coefficient, and H be the cross-entropy loss function. The labels are pseudo-labels, and pm(*) represents the output probability of the model. For strong enhancement operations, I′ k Let k be the k-th unlabeled image sample.

[0027] Optionally, adjusting the regression loss function for unlabeled data using bounding box consistency regularization specifically includes:

[0028] The teacher model uses an intersection-union assignment method to construct a bounding box set for each pseudo-true candidate box;

[0029] Using the formula Q = S γ ×D 1-γ Calculate the quality of the bounding box; where Q is the quality of the bounding box, S is the final classification score of the bounding box on the teacher model R-CNN, D is the intersection-union ratio between the bounding box and the pseudo ground truth candidate box, and γ is the control parameter.

[0030] The bounding boxes in each bounding box set are sorted in descending order according to the size of Q, and the first K bounding boxes are selected as positive samples of their respective pseudo-true value candidate boxes, and the bounding boxes after the Kth bounding box are negative samples of their respective pseudo-true value candidate boxes.

[0031] Using formula Define a regression consistency factor for each pseudo-true value candidate box; where, ∈ i Let K be the regression consistency factor for the i-th pseudo-true value candidate box, and K be the number of positive sample bounding boxes assigned to the i-th pseudo-true value candidate box. It is the j-th positive sample of the i-th pseudo-true value candidate box;

[0032] Using the regression consistency factor as the weight for instance-based regression loss, the regression loss function for unlabeled data is obtained as follows: In the formula, For unlabeled data, the regression loss function is reg and Let M be the regression output and the true value, respectively. M is the number of false true value candidate boxes, and N is the number of positive samples for the i-th false true value candidate box.

[0033] Optionally, the total loss function of the semi-supervised sea surface target detection model is:

[0034]

[0035] In the formula, L is the total loss function, and β is the weighting coefficient; The cross-entropy loss function is for labeled data. I l For the l-th labeled image sample, This represents the hard label of the l-th labeled data.

[0036] Optionally, the teacher model is pre-trained using the labeled image samples, specifically including:

[0037] The labeled image samples are weakly enhanced to increase the number of labeled image samples; the weak enhancement includes translation and flipping operations;

[0038] The teacher model is pre-trained using weakly augmented labeled image samples to obtain the pre-trained teacher model.

[0039] Optionally, based on the total loss function, the pre-trained teacher model and the parameter-transferred student model are trained using a sea surface target detection image dataset. During the training process, the confidence threshold adjustment model dynamically adjusts the confidence threshold for each sea surface target category to obtain a well-trained student model. Specifically, this includes:

[0040] Unlabeled image samples from the sea surface target detection image dataset are input into the pre-trained teacher model. The pre-trained teacher model is trained, and when the accuracy of the teacher model's output is greater than or equal to the accuracy threshold, unlabeled image samples with pseudo-labels are output.

[0041] A predetermined number of labeled image samples are extracted from the sea surface target detection image dataset;

[0042] Weak enhancement is applied to the extracted labeled image samples;

[0043] The Mixup method is used to mix unlabeled image samples with pseudo-labels and weakly augmented labeled image samples in proportion z to generate augmented dataset; where z is a random value in the β distribution.

[0044] The augmented dataset is input into the parameter-transferred student model. The parameter-transferred student model is trained based on the total loss function. During the training process, the confidence threshold is used to dynamically adjust the confidence threshold of each sea surface target category. At the same time, the teacher model is updated through the exponential moving average index of the student model to obtain the trained student model.

[0045] A semi-supervised sea surface target detection system includes:

[0046] A detection model construction module is used to construct a semi-supervised sea surface target detection model; the semi-supervised sea surface target detection model includes a teacher model and a student model with the same initialization parameters and network architecture;

[0047] The classification loss determination module is used to establish a confidence threshold adjustment model for sea surface target categories and determine the classification loss function for unlabeled data based on the confidence threshold adjustment model.

[0048] The regression loss adjustment module is used to adjust the regression loss function for unlabeled data through bounding box consistency regularization.

[0049] The total loss determination module is used to determine the total loss function of the semi-supervised sea surface target detection model based on the classification loss function and the adjusted regression loss function.

[0050] The sample dataset acquisition module is used to acquire a sea surface target detection image dataset; the sea surface target detection image dataset includes labeled image samples and unlabeled image samples;

[0051] The model transfer module is used to pre-train the teacher model using the labeled image samples and transfer the pre-trained teacher model parameters to the student model.

[0052] The training module is used to train the pre-trained teacher model and the parameter-transferred student model using the sea surface target detection image dataset based on the total loss function. During the training process, the confidence threshold adjustment model is used to dynamically adjust the confidence threshold of each sea surface target category. The student model is trained using labeled data and unlabeled data with pseudo-labels. After the student model completes the current parameter update, the network weight parameters obtained by training are passed to the teacher model through an exponential moving average to obtain the trained teacher model.

[0053] The application module is used to input an image of a sea surface target to be detected into a trained teacher model and output the category of each sea surface target in the image.

[0054] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the semi-supervised sea surface target detection method as described above.

[0055] A computer-readable storage medium having a computer program stored thereon, which, when executed, implements the semi-supervised sea surface target detection method as described above.

[0056] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0057] This invention discloses a semi-supervised method, system, device, and storage medium for sea surface target detection. It establishes a confidence threshold adjustment model for sea surface target categories and determines the classification loss function for unlabeled data based on this model. The regression loss function for unlabeled data is adjusted using bounding box consistency regularization. During model training, the confidence threshold adjustment model dynamically adjusts the confidence threshold for each sea surface target category, improving the quality of pseudo-labels. Furthermore, the bounding box consistency regularization alleviates the strong dependence on the intersection-union ratio (IU) in traditional positive-negative sample matching mechanisms, improving the quality of bounding boxes and thus enhancing sea surface target detection performance. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 A flowchart of a semi-supervised sea surface target detection method provided in an embodiment of the present invention;

[0060] Figure 2A schematic diagram illustrating a semi-supervised sea surface target detection method provided in an embodiment of the present invention;

[0061] Figure 3 A schematic diagram of the category consistency method provided in the embodiments of the present invention;

[0062] Figure 4 This is a schematic diagram of the positioning consistency method provided in an embodiment of the present invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] The purpose of this invention is to provide a semi-supervised method, system, device, and storage medium for detecting sea surface targets. By adjusting the confidence threshold, the quality of pseudo-labels is improved, and the quality of bounding boxes is improved through bounding box consistency regularization, thereby improving the performance of sea surface target detection.

[0065] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0066] like Figure 1 As shown, this embodiment of the invention provides a semi-supervised sea surface target detection method, including:

[0067] Step 1: Construct a semi-supervised sea surface target detection model; the semi-supervised sea surface target detection model includes a teacher model and a student model with the same initialization parameters and network architecture.

[0068] Both the teacher and student models are based on object detection networks, and the network architecture uses Faster-RCNN neural networks.

[0069] Step 2: Establish a confidence threshold adjustment model for sea surface target categories, and determine the classification loss function for unlabeled data based on the confidence threshold adjustment model.

[0070] For unlabeled data, firstly, the learning performance of each category is determined by the number of unlabeled image samples belonging to that category and exceeding a fixed threshold. These samples are used to flexibly adjust the threshold so that the best unlabeled data passes the confidence threshold. However, learning efficiency does not always increase; if the prediction of unlabeled data falls into another category in subsequent iterations, the learning performance may decrease.

[0071] The existing confidence threshold τ is constant. This invention dynamically adjusts the fixed confidence threshold to account for the different learning effects of each category. The student model adjusts the confidence threshold for each category based on its learning efficiency: in the object detection model, statistical analysis is performed on the number of samples in each category that reach the initial confidence threshold to obtain the "learning effect" for each category. This learning effect is then used to adjust the confidence threshold accordingly, resulting in a more realistic category confidence threshold for each category.

[0072] Specifically, this invention scales the threshold based on the model's prediction performance for each category. It assumes that when the threshold is high, the learning performance of a class can be reflected by the number of samples predicted to fall into that class and whose prediction confidence exceeds the threshold. That is, classes with fewer samples and fewer prediction confidence levels reaching the threshold are considered to have greater learning difficulty or worse learning performance. This process does not introduce additional inference or require an additional validation set. The formula for judging learning performance is as follows:

[0073]

[0074]

[0075] τ′=T s (c)·τ

[0076] In the formula, τ′ is the adjusted confidence threshold for class c, and T s (c) represents the learning performance parameter of class c in step s, τ is the confidence threshold of class c before adjustment, ρ is the maximum value of class prediction by the model in step s, G is the total number of unlabeled data points, and g is the g-th unlabeled data point. For the model's prediction of the unlabeled image sample I′ in step s, This is a weak enhancement operation, where y represents the category.

[0077] When the classes in an unlabeled dataset are balanced (i.e., the number of unlabeled data belonging to different classes is equal or nearly equal), a larger T... s (c) indicates that the estimated learning effect is better. This is achieved by analyzing T... s (c) Perform the following normalization process to make it range between 0 and 1, and then it can be used to measure a fixed threshold τ.

[0078] The principle of the category consistency method is as follows: Figure 3 As shown.

[0079] The classification loss function for unlabeled data is:

[0080]

[0081]

[0082] In the formula, Let be the classification loss function for unlabeled data, α be the ratio of unlabeled image samples to labeled image samples in the mini-batch, n be the number of labeled image samples in the mini-batch, σ be the statistical coefficient, and H be the cross-entropy loss function. P is a pseudo-tag. m (*) represents the output probability of the model. For strong enhancement operations, I′ k This is the k-th unlabeled image sample. Here is the pseudo-label. These are pseudo-tags in one-hot format, meaning that only positive tags are 1, while all other negative tags are 0.

[0083] Step 3: Adjust the regression loss function for unlabeled data using bounding box consistency regularization.

[0084] Since classification scores do not necessarily reflect the quality of the regression bounding boxes, traditional methods in semi-supervised object detection that use the Intersection over Union (IoU) between predicted and ground truth bounding boxes rely too heavily on the accuracy of the ground truth. Furthermore, in semi-supervised object detection, pseudo-labels for unlabeled samples are predicted by the model, and their accuracy cannot be guaranteed. To address this issue, this invention employs a simple and effective method: localization consistency, to filter high-quality bounding boxes and constrain their influence on the regression loss. Multiple bounding boxes are assigned to each pseudo-ground truth bounding box; the consistency of the regression results for these bounding boxes reflects the target localization quality of the corresponding pseudo-ground truth bounding boxes. Improving bounding box quality through bounding box consistency regularization utilizes the regression consistency of positive samples to reflect the localization quality of pseudo-label bounding boxes.

[0085] For unlabeled data, we first measure the quality of the bounding box by defining Q, as shown in the following formula:

[0086] Q = S γ ×D 1-γ

[0087] Where S represents the final classification score of the bounding box on the teacher network R-CNN, D represents the IoU value between the bounding box and the pseudo-ground candidate box, and γ is used to control the contribution of S and IoU to the final calculated Q. Here, the student network shares the bounding boxes generated by the teacher network's RPN.

[0088] For unlabeled sample data, the teacher model first constructs a bounding box set for each pseudo-true candidate box using the traditional IoU-based allocation method. Then, the bounding boxes in each set are sorted according to their quality Q, and the top K are selected as positive samples, with the rest as negative samples. This process filters out high-quality bounding boxes. The K is calculated by summing the IoU values ​​of the positive samples and their corresponding true values, rounding down if the result is a decimal.

[0089] Secondly, some noise may still exist in the selected bounding boxes. To improve the accuracy of bounding box localization, this invention uses the mean of the IoU between all positive samples corresponding to each pseudo-true value candidate box and that pseudo-true value candidate box as a metric, named the regression consistency factor ∈ i .

[0090]

[0091] Where i represents the index of the pseudo-true value candidate box, and K represents the number of positive sample bounding boxes assigned to the i-th pseudo-true value candidate box, and the consistency factor ∈ i Then, this is used as the instance-based regression loss weight to adjust the contribution of each pseudo-true value candidate box to the regression loss of unlabeled data. If the consistency factor is small, it indicates that the location information of the pseudo-true value candidate box is relatively inaccurate, so its contribution to the loss calculation should be reduced, and vice versa. The regression loss function formula for unlabeled data is as follows:

[0092]

[0093] Among them reg and These represent the regression output and the ground-truth, respectively. M represents the number of false ground-truth candidate boxes, and N is the number of positive samples for the i-th false ground-truth candidate box.

[0094] The principle of the location consistency method is as follows: Figure 4 As shown.

[0095] Step 4: Determine the total loss function of the semi-supervised sea surface target detection model based on the classification loss function and the adjusted regression loss function.

[0096] Finally, for labeled data, conventional classification and bounding box regression losses are used for supervision. For unlabeled sample data, pseudo-labels are filtered out using confidence thresholds for the corresponding categories to improve pseudo-label quality. Bounding box consistency regularization is used to adjust the regression loss. The bounding box consistency regularization, combined with the improved classification loss, forms the overall loss function.

[0097] For labeled data, the teacher model first performs weak augmentation on the labeled data, and then directly uses cross-entropy loss for supervision, as shown in the following formula:

[0098]

[0099] Where n represents the number of labeled image samples in the mini-batch, I represents labeled data, and p m (*) represents the model's output probability, and y represents the class. This represents the hard label of the l-th labeled data. This indicates a weak enhancement operation.

[0100] For labeled data, the student model directly uses the smoothL1 function loss as the loss function for supervision.

[0101] The final loss function is a weighted sum of supervised and unsupervised losses, where the weighting coefficient is β:

[0102]

[0103] Step 5: Obtain the sea surface target detection image dataset; the sea surface target detection image dataset includes labeled image samples and unlabeled image samples.

[0104] Step 6: Pre-train the teacher model using the labeled image samples, and then transfer the pre-trained teacher model parameters to the student model.

[0105] Step 7: Based on the total loss function, train the pre-trained teacher model and the parameter-transferred student model using the sea surface target detection image dataset. During the training process, dynamically adjust the confidence threshold of each sea surface target category using the confidence threshold adjustment model. Train the student model using labeled data and unlabeled data with pseudo-labels. After the student model completes the current parameter update, transfer the trained network weight parameters to the teacher model using an exponential moving average to obtain the trained teacher model.

[0106] The student network performs inverse stochastic gradient descent based on the loss function, while the teacher network updates using the student network's EMA (Exponential Moving Average).

[0107] During teacher model training:

[0108] 1. The labeled image sample dataset is augmented by weak enhancements, including translation and flipping operations. The augmented labeled image samples are then used to pre-train the teacher model, enabling it to initially possess some object detection capabilities.

[0109] 2. Input the unlabeled image samples into the pre-trained teacher model to obtain the prediction results of the unlabeled image samples.

[0110] During training, the student model:

[0111] A certain number of labeled image samples and unlabeled image samples with pseudo-labels are extracted from the original dataset according to a certain ratio to form a mini-batch of data, such as... Figure 2 As shown, weak augmentation is performed on the extracted labeled image samples, followed by strong augmentation on the unlabeled image samples with pseudo-labels and the weakly augmented labeled image samples. Here, strong augmentation uses a mixup operation, mixing the unlabeled images with pseudo-labels and the labeled images at a certain ratio z (z is a random value in the beta distribution) to generate a new augmented dataset. Subsequently, the augmented dataset is input into the student model, which has the same initialization parameters and network architecture as the pre-trained teacher model. Then, the quality of pseudo-labels is improved by adjusting the confidence threshold for each category to achieve consistency in category classification. Simultaneously, candidate box localization consistency regularization is used to improve the target localization accuracy and reduce the impact of pseudo-label localization bias. Finally, the weighted improved localization loss and classification loss constitute the overall loss function, which is then updated using stochastic gradient descent. The teacher model is updated using the exponential moving average (EMA) of the student model. At this point, when the student network converges, training is complete, and it can be used independently for object detection in images.

[0112] Step 8: Input an image of the sea surface target to be detected into the trained teacher model, and output the category of each sea surface target in the image.

[0113] This invention adjusts the confidence threshold for each sea surface target category based on its learning efficiency, forming a set of category confidence thresholds. Simultaneously, to alleviate the conflict between the strong dependence on IoU in traditional positive-negative sample matching mechanisms and the inaccurate localization information of pseudo-labels in semi-supervised detection tasks, bounding box consistency regularization is used to further improve the quality of bounding boxes. This improves the quality of pseudo-labels and thus enhances the positive role of unlabeled data in model training.

[0114] This invention also provides a semi-supervised sea surface target detection system, comprising:

[0115] A detection model construction module is used to construct a semi-supervised sea surface target detection model; the semi-supervised sea surface target detection model includes a teacher model and a student model with the same initialization parameters and network architecture;

[0116] The classification loss determination module is used to establish a confidence threshold adjustment model for sea surface target categories and determine the classification loss function for unlabeled data based on the confidence threshold adjustment model.

[0117] The regression loss adjustment module is used to adjust the regression loss function for unlabeled data through bounding box consistency regularization.

[0118] The total loss determination module is used to determine the total loss function of the semi-supervised sea surface target detection model based on the classification loss function and the adjusted regression loss function.

[0119] The sample dataset acquisition module is used to acquire a sea surface target detection image dataset; the sea surface target detection image dataset includes labeled image samples and unlabeled image samples;

[0120] The model transfer module is used to pre-train the teacher model using the labeled image samples and transfer the pre-trained teacher model parameters to the student model.

[0121] The training module is used to train the pre-trained teacher model and the parameter-transferred student model using the sea surface target detection image dataset based on the total loss function. During the training process, the confidence threshold adjustment model is used to dynamically adjust the confidence threshold of each sea surface target category. The student model is trained using labeled data and unlabeled data with pseudo-labels. After the student model completes the current parameter update, the network weight parameters obtained by training are passed to the teacher model through an exponential moving average to obtain the trained teacher model.

[0122] The application module is used to input an image of a sea surface target to be detected into a trained teacher model and output the category of each sea surface target in the image.

[0123] The semi-supervised sea surface target detection system provided in this embodiment of the invention has a similar working principle and beneficial effects to the semi-supervised sea surface target detection method described in the above embodiments, so it will not be described in detail here. For details, please refer to the introduction of the above method embodiments.

[0124] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the semi-supervised sea surface target detection method as described above.

[0125] Furthermore, when the computer program in the aforementioned memory is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0126] Furthermore, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the semi-supervised sea surface target detection method as described above.

[0127] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0128] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A semi-supervised method for detecting sea surface targets, characterized in that, include: Construct a semi-supervised sea surface target detection model; The semi-supervised sea surface target detection model includes a teacher model and a student model with the same initialization parameters and network architecture; Establish a confidence threshold adjustment model for sea surface target categories, and determine the classification loss function for unlabeled data based on the confidence threshold adjustment model; Adjust the regression loss function for unlabeled data using bounding box consistency regularization; Based on the classification loss function and the adjusted regression loss function, determine the total loss function of the semi-supervised sea surface target detection model; Obtain a sea surface target detection image dataset; the sea surface target detection image dataset includes labeled image samples and unlabeled image samples; The teacher model is pre-trained using the labeled image samples, and the pre-trained teacher model parameters are then transferred to the student model. Based on the total loss function, the pre-trained teacher model and the parameter-transferred student model are trained using the sea surface target detection image dataset. During the training process, the confidence threshold adjustment model is used to dynamically adjust the confidence threshold of each sea surface target category. The student model is trained using labeled data and unlabeled data with pseudo-labels. After the student model completes the current parameter update, the network weight parameters obtained by training are passed to the teacher model through an exponential moving average to obtain the trained teacher model. An image of a sea surface target to be detected is input into a trained teacher model, which outputs the category of each sea surface target in the image.

2. The semi-supervised sea surface target detection method according to claim 1, characterized in that, The confidence threshold adjustment model is as follows: τ′=T s (c)·t; In the formula, v' is the adjusted confidence threshold for class c, and T s (c) represents the learning performance parameter of class c in step s, τ is the confidence threshold of class c before adjustment, ρ is the maximum value of class prediction by the model in step s, G is the total number of unlabeled data points, and g is the g-th unlabeled data point. For the model's prediction of the unlabeled image sample I' in step s, This is a weak enhancement operation, where y represents the category.

3. The semi-supervised sea surface target detection method according to claim 2, characterized in that, The classification loss function for the unlabeled data is: In the above formula, Let be the classification loss function for unlabeled data, α be the ratio of unlabeled image samples to labeled image samples in the mini-batch, n be the number of labeled image samples in the mini-batch, σ be the statistical coefficient, and H be the cross-entropy loss function. p is a pseudo tag m (*) represents the output probability of the model. To enhance the operation, I' k Let k be the k-th unlabeled image sample.

4. The semi-supervised sea surface target detection method according to claim 3, characterized in that, The method of adjusting the regression loss function for unlabeled data through bounding box consistency regularization specifically includes: The teacher model uses an intersection-union assignment method to construct a bounding box set for each pseudo-true candidate box; Using the formula Q = S γ ×D 1-γ Calculate the quality of the bounding box; where Q is the quality of the bounding box, S is the final classification score of the bounding box on the teacher model R-CNN, D is the intersection-union ratio between the bounding box and the pseudo ground truth candidate box, and γ is the control parameter. The bounding boxes in each bounding box set are sorted in descending order according to the size of Q, and the first K bounding boxes are selected as positive samples of their respective pseudo-true value candidate boxes, and the bounding boxes after the Kth bounding box are negative samples of their respective pseudo-true value candidate boxes. Using formula Define a regression consistency factor for each pseudo-true value candidate box; where, ∈ i Let K be the regression consistency factor for the i-th pseudo-true value candidate box, and K be the number of positive sample bounding boxes assigned to the i-th pseudo-true value candidate box. It is the j-th positive sample of the i-th pseudo-true value candidate box; Using the regression consistency factor as the weight for instance-based regression loss, the regression loss function for unlabeled data is obtained as follows: In the formula, For unlabeled data, the regression loss function is reg and Let M be the regression output and the true value, respectively. M is the number of false true value candidate boxes, and N is the number of positive samples for the i-th false true value candidate box.

5. The semi-supervised sea surface target detection method according to claim 4, characterized in that, The total loss function of the semi-supervised sea surface target detection model is: In the formula, L is the total loss function, and β is the weighting coefficient; The cross-entropy loss function is for labeled data. I l For the l-th labeled image sample, This represents the hard label of the l-th labeled data.

6. The semi-supervised sea surface target detection method according to claim 1, characterized in that, The teacher model is pre-trained using the labeled image samples, specifically including: The labeled image samples are weakly enhanced to increase the number of labeled image samples; the weak enhancement includes translation and flipping operations; The teacher model is pre-trained using weakly augmented labeled image samples to obtain the pre-trained teacher model.

7. The semi-supervised sea surface target detection method according to claim 6, characterized in that, Based on the aforementioned total loss function, the pre-trained teacher model and the parameter-transferred student model are trained using a sea surface target detection image dataset. During the training process, the confidence threshold adjustment model dynamically adjusts the confidence threshold for each sea surface target category to obtain a well-trained student model. Specifically, this includes: Unlabeled image samples from the sea surface target detection image dataset are input into the pre-trained teacher model. The pre-trained teacher model is trained, and when the accuracy of the teacher model's output is greater than or equal to the accuracy threshold, unlabeled image samples with pseudo-labels are output. A predetermined number of labeled image samples are extracted from the sea surface target detection image dataset; Weak enhancement is applied to the extracted labeled image samples; The Mixup method is used to mix unlabeled image samples with pseudo-labels and weakly augmented labeled image samples in proportion z to generate an augmented dataset; where z is a random value in the β distribution. The augmented dataset is input into the parameter-transferred student model. The parameter-transferred student model is trained based on the total loss function. During the training process, the confidence threshold is used to dynamically adjust the confidence threshold of each sea surface target category. At the same time, the teacher model is updated through the exponential moving average index of the student model to obtain the trained student model.

8. A semi-supervised sea surface target detection system, characterized in that, include: The detection model building module is used to build a semi-supervised sea surface target detection model; The semi-supervised sea surface target detection model includes a teacher model and a student model with the same initialization parameters and network architecture; The classification loss determination module is used to establish a confidence threshold adjustment model for sea surface target categories and determine the classification loss function for unlabeled data based on the confidence threshold adjustment model. The regression loss adjustment module is used to adjust the regression loss function for unlabeled data through bounding box consistency regularization. The total loss determination module is used to determine the total loss function of the semi-supervised sea surface target detection model based on the classification loss function and the adjusted regression loss function. The sample dataset acquisition module is used to acquire a sea surface target detection image dataset; the sea surface target detection image dataset includes labeled image samples and unlabeled image samples; The model transfer module is used to pre-train the teacher model using the labeled image samples and transfer the pre-trained teacher model parameters to the student model. The training module is used to train the pre-trained teacher model and the parameter-transferred student model using the sea surface target detection image dataset based on the total loss function. During the training process, the confidence threshold adjustment model is used to dynamically adjust the confidence threshold of each sea surface target category. The student model is trained using labeled data and unlabeled data with pseudo-labels. After the student model completes the current parameter update, the network weight parameters obtained by training are passed to the teacher model through an exponential moving average to obtain the trained teacher model. The application module is used to input an image of a sea surface target to be detected into a trained teacher model and output the category of each sea surface target in the image.

9. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the semi-supervised sea surface target detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed, implements the semi-supervised sea surface target detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Semi-supervised object detection and training method and device based on two-stage object detector

    CN114882325A

  • Semi-supervised target detection method for improving false label quality and class imbalance

    CN114898173A