A small sample data labeling model pre-training method and system
By performing general feature learning and pseudo-label management in the data annotation model, the problem of insufficient model recognition ability under small sample conditions is solved, and efficient and stable data annotation model training and updating are achieved, improving annotation accuracy and generalization ability.
Patent Information
- Application Number
- CN202610756064.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, data annotation models struggle to effectively learn category features and localization capabilities under small sample conditions, resulting in insufficient model feature learning, slow convergence, severe overfitting, and poor generalization ability, making it difficult to meet the annotation accuracy and stability requirements of practical applications.
By utilizing a large amount of unlabeled data in the task domain for general feature learning, pseudo-labels are generated and high-confidence samples are selected for training set reconstruction. Combined with cross-round monitoring and manual correction feedback, the model is continuously iterated and updated, abnormal pseudo-labeled data is identified and removed, and model parameters are adjusted to improve the model's recognition ability under small sample conditions.
It achieves efficient training and stable updating of the model under small sample conditions, reduces the dependence on large-scale manually labeled data, improves labeling performance and generalization ability, reduces the cost of human intervention, and prevents misjudgment and bias accumulation.
Smart Images

Figure CN122286317A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, specifically to a method and system for pre-training a small sample data labeled model. Background Technology
[0002] With the continuous development of artificial intelligence and computer vision technologies, the automatic annotation of images, videos, or industrial inspection data using data annotation models has become an important technical means to improve data processing efficiency and reduce manual annotation costs. Especially in application scenarios such as defect detection, target recognition, and scene understanding, data annotation models can automatically output annotation results such as target category, location coordinates, and confidence level, providing basic data support for subsequent model training, quality inspection, and intelligent decision-making. For example, in the scenario of circuit board defect detection, data annotation models can automatically identify and annotate the defect types and their locations in PCB images, thereby reducing the workload of manual labeling and improving detection efficiency and consistency. Therefore, how to build data annotation models suitable for specific scenarios has become a technical issue of continuous concern in this field.
[0003] In existing technologies, data annotation models typically rely on a large amount of high-quality manually labeled data for supervised training. Only with sufficient sample size and accurate label information can the model learn stable category features and localization capabilities. However, in many practical applications, especially in professional fields such as industrial inspection, medical image analysis, and special equipment monitoring, obtaining large-scale high-quality labeled data is often costly. On the one hand, although a large amount of raw data can be obtained, most of it does not come with category and location labels. On the other hand, the manual annotation process usually requires the participation of operators with professional knowledge, which is time-consuming, costly, and inefficient. As a result, the labeled data that can actually be used for supervised training is often only a small number of samples. In this case, if a small amount of manually labeled data is used directly to train the data annotation model, problems such as insufficient model feature learning, slow convergence, severe overfitting, and poor generalization ability are likely to occur, making it difficult to meet the requirements for annotation accuracy and stability in practical applications. Summary of the Invention
[0004] This invention utilizes a large amount of unlabeled data within the task domain to perform general feature learning on a data labeling model, enabling the model to pre-acquire basic representation capabilities related to the target scene. Then, based on a small amount of manually labeled data, the model is adapted for a specific task, allowing it to establish effective recognition capabilities for target category and location information under small sample conditions. This achieves the goal of completing model initialization training with fewer manually labeled samples, thereby reducing reliance on large-scale manually labeled data and improving training efficiency and initial labeling performance in small sample scenarios. Furthermore, by generating pseudo-labels for the unlabeled data and selecting high-confidence samples for training set reconstruction, continuous model iteration and updates are performed. Simultaneously, manual correction feedback is introduced for low-confidence samples, allowing the model to automatically expand training samples while continuously absorbing real-world supervision information. This improves the utilization rate of unlabeled data, reduces manual intervention costs, and enhances the model's continuous optimization capabilities in practical applications. Further, throughout the entire model update lifecycle, cross-round monitoring of pseudo-labeled data from each round is conducted, combined with trusted benchmarks... This study uses a method to update the reference direction of sample construction parameters and analyzes the deviation and fluctuation of the influence direction of pseudo-labeled sample parameters. This helps identify anomalous pseudo-labeled data that appears to have high confidence in the early iterations but exhibits unstable performance later. This avoids misjudgment caused by relying solely on a single round of confidence to screen pseudo-labels, improving the accuracy and robustness of anomalous pseudo-label identification. After identifying anomalous pseudo-labeled data, the study further analyzes its propagation influence on other pseudo-labeled data, identifies the associated pseudo-labeled data affected by it, and removes the anomalous pseudo-labeled data and its associated pseudo-labeled data from the training set. At the same time, the update components in the model parameters related to this type of anomalous perturbation are weakened or corrected. This not only blocks the continuous infiltration of anomalous pseudo-labels at the training data level but also reduces the influence of existing errors at the model parameter level, preventing the bias from accumulating and amplifying in subsequent training. In small sample data labeling tasks, this approach simultaneously achieves low-cost training, efficient model construction, stable iterative updates, and anomalous propagation control, ultimately improving the convergence stability, labeling accuracy, and generalization ability of the data labeling model.
[0005] This invention provides a method for pre-training a small sample data labeled model, comprising: By sequentially performing general training and adaptive training on the data labeling model, a specific data labeling model can be obtained. All unlabeled data are processed by a specific data labeling model, and the pseudo-label and corresponding confidence score of each unlabeled data are output. The unlabeled data corresponding to the K pseudo-labels with the highest confidence scores are recorded as pseudo-labeled data. The pseudo-labeled data are added to a specific training set to complete the reconstruction of the specific training set. The parameters of the specific data labeling model are adjusted by the reconstructed specific training set to complete the update of the specific data labeling model. The process involves constructing manually labeled data to be corrected, then using a specific training set with the added data to perform adaptive training on a specific data labeling model. This process is repeated iteratively, reconstructing the specific training set and updating the specific data labeling model, until the iteration conditions are met. The output of the specific data labeling model is then a pre-trained data labeling model, enabling real-time updates to the data labeling model. Each time the data labeling model completes a real-time update, the data labeling task is re-executed using the data labeling model. This process continues until no more data to be corrected is generated, completing the data labeling task. The update or real-time update of a specific data annotation model is considered as an iteration round of the entire lifecycle. All constructed pseudo-annotated data are monitored across rounds to identify abnormal pseudo-annotated data. For each abnormal pseudo-annotated data identified, a propagation domain analysis is performed to determine the associated influencing pseudo-annotated data. The abnormal pseudo-annotated data and all influencing pseudo-annotated data are then removed from the specific training set. Based on the abnormal pseudo-annotated data and all influencing pseudo-annotated data, parameter adjustment operations are performed on the specific data annotation model to reduce the impact of these annotated data on the specific data annotation model.
[0006] Preferably, constructing the labeled data to be corrected based on manual annotations specifically includes the following steps: The data annotation task is performed through a data annotation model. Specifically, the data to be annotated is fed into a pre-trained data annotation model for processing, and the annotation labels and corresponding confidence scores of the data to be annotated are output. The data to be annotated with confidence scores lower than the confidence threshold output during the execution of the data annotation task are combined into data to be corrected, and human-made annotation labels corresponding to the data to be corrected are continuously obtained.
[0007] Preferably, monitoring is performed across all constructed pseudo-labeled data to identify anomalous pseudo-labeled data, specifically including the following steps: In each iteration, all manually labeled data and all data to be corrected are combined to form a parameter update main direction analysis dataset. The update main direction analysis dataset includes the updated main direction analysis data, which is associated with the manually labeled data. The updated main direction analysis data is fed into the updated specific data labeling model for processing. The main direction loss value is constructed based on the difference between the manually labeled data and the prediction output of the updated specific data labeling model. The gradient value of the key layer parameters is calculated based on the main direction loss value and recorded as the main direction influence parameter direction value. All main direction influence parameter direction values are combined to form a local main direction influence parameter direction vector. The local main direction influence parameter direction vector is normalized. The normalization operation is to divide the local main direction influence parameter direction vector by the L2 norm of the local main direction influence parameter direction vector. The average value of the normalized output of the local main direction influence parameter direction vectors corresponding to all updated main direction analysis data in the updated main direction analysis dataset is calculated to obtain the main direction influence parameter direction vector. In each iteration, the pseudo-labeled data is simultaneously traversed. The selected pseudo-labeled data is fed into the updated specific data labeling model for processing. An analysis loss value is constructed based on the difference between the pseudo-labels and the prediction output of the updated specific data labeling model. The gradient values of the key layer parameters are calculated based on the analysis loss value and denoted as the pseudo-labeling influence parameter direction values. The pseudo-labeling influence parameter direction values corresponding to all key layer parameters are concatenated and normalized to obtain the pseudo-labeling influence parameter direction vector. The similarity between the pseudo-labeling influence parameter direction vector and the main direction influence parameter direction vector is calculated and denoted as the main direction deviation value corresponding to the selected pseudo-labeled data. The standard deviation of the main direction deviation value of the selected pseudo-labeled data in the current iteration and the main direction deviation values in the previous m iterations is calculated and denoted as the main direction deviation fluctuation amplitude. If the main direction deviation fluctuation amplitude is higher than the deviation fluctuation threshold, the selected pseudo-labeled data is regarded as abnormal pseudo-labeled data, and a propagation domain analysis is performed based on the abnormal pseudo-labeled data to determine the influence pseudo-labeled data associated with the abnormal pseudo-labeled data. If the main direction deviation fluctuation amplitude is not higher than the deviation fluctuation threshold, the pseudo-labeled data continues to be traversed.
[0008] Preferably, propagation domain analysis is performed based on the anomalous pseudo-labeled data to determine the influencing pseudo-labeled data associated with the anomalous pseudo-labeled data, specifically including the following steps: The pseudo-labeling influence parameter direction vector of the abnormal pseudo-labeled data in the current round is concatenated with the pseudo-labeling influence parameter direction vectors corresponding to the previous m iteration rounds to form the pseudo-labeling influence parameter direction matrix. The number of rows in the pseudo-labeling influence parameter direction matrix is the number of iteration rounds, and the number of columns is the number of key layer parameters. Singular value decomposition is performed on the pseudo-labeling influence parameter direction matrix to obtain the left singular matrix, singular values, and right singular matrix. The right singular matrix is denoted as the parameter influence subspace. Starting with the anomalous pseudo-labeled data, iterate through the pseudo-labeled data, calculate the pseudo-labeling influence parameter direction vector corresponding to the selected pseudo-labeled data, and project the pseudo-labeling influence parameter direction vector onto the parameter influence subspace to obtain the projection vector. Specifically, the projection method is to perform a product operation on the parameter influence subspace, the transpose of the parameter influence subspace, and the pseudo-labeling influence parameter direction vector to obtain the projection vector. The ratio of the square norm of the projection vector to the square norm of the pseudo-labeling influence parameter direction vector is recorded as the sensitivity corresponding to the selected pseudo-labeled data. If the sensitivity is higher than the sensitivity threshold, the selected pseudo-labeled data is recorded as the influence pseudo-labeled data associated with the anomalous pseudo-labeled data. If the sensitivity is not higher than the sensitivity threshold, continue to traverse the pseudo-labeled data.
[0009] Preferably, the parameter adjustment operation for a specific data annotation model is performed based on the abnormal pseudo-labeled data and all the pseudo-labeled data that affect it, specifically including the following steps: The weighted summation operation is performed on the abnormal pseudo-labeled data and the direction vectors of the pseudo-labeling influence parameters corresponding to all the pseudo-labeled data to obtain the main perturbation parameter vector. The adjustment amount of the specific data labeling model on the key layer parameters in the current iteration is obtained, the model update vector is constructed, and the transpose of the main perturbation parameter vector, the model update vector and the main perturbation parameter vector are multiplied together to obtain the main perturbation component. The direction of minimizing the main perturbation component is used to perform backpropagation of gradient descent to perform parameter adjustment operation on the specific data labeling model.
[0010] Preferably, the general training specifically includes the following: for each unlabeled data in the general training set, augmented unlabeled data is constructed using image augmentation techniques. The augmented unlabeled data is then fed into the data labeling model for processing to obtain the output features corresponding to the augmented unlabeled data. The output features of any two augmented unlabeled data corresponding to the same unlabeled data are taken as positive sample pairs, and the output features of any two augmented unlabeled data corresponding to the same unlabeled data are taken as negative sample pairs. A contrastive loss is constructed based on the positive and negative sample pairs, and backpropagation of gradient descent is performed based on the contrastive loss to iteratively update the parameters in the data labeling model until the rate of decrease of the contrastive loss converges in the most recent several rounds. The trained data labeling model is then used as a general feature encoder.
[0011] Preferably, the adaptive training specifically includes the following: using human-annotated data from a specific training set as input to a general feature encoder, using human-annotated labels associated with the human-annotated data as the target output of the general feature encoder, constructing a loss value based on the difference between the predicted output and the target output of the general feature encoder, minimizing the direction of the loss value, and then performing backpropagation of gradient descent based on the loss value to iteratively update all parameters of the general feature encoder until the accuracy of the general feature encoder is higher than a preset accuracy threshold, and outputting the trained general feature encoder as a specific data annotation model.
[0012] This invention provides a small sample data annotation model pre-training system, comprising: The general training module is used to acquire several sets of unlabeled data and combine them into a general training set. The data labeling model is then trained using the general training set to obtain a general feature encoder. The adaptation training module is used to acquire several sets of manually labeled data. Each set of manually labeled data is associated with a corresponding manually labeled label. All the manually labeled data are combined into a specific training set. The general feature encoder is then adapted and trained using the specific training set to obtain a specific data labeling model. The pseudo-label augmentation training module is used to process all unlabeled data through a specific data labeling model, output the pseudo-label and corresponding confidence score for each unlabeled data, and record the unlabeled data corresponding to the K pseudo-labels with the highest confidence scores as pseudo-labeled data. The pseudo-labeled data is then added to a specific training set to complete the reconstruction of the specific training set. The parameters of the specific data labeling model are adjusted using the reconstructed specific training set to complete the update of the specific data labeling model. The pseudo-label adjustment module is used to treat the completion or real-time update of a specific data labeling model as an iteration round of the entire life cycle. It monitors all constructed pseudo-labeled data across rounds, identifies abnormal pseudo-labeled data, and performs propagation domain analysis on each abnormal pseudo-labeled data to determine the associated influencing pseudo-labeled data. The abnormal pseudo-labeled data and all influencing pseudo-labeled data are then removed from the specific training set. Finally, parameter adjustment operations are performed on the specific data labeling model based on the abnormal pseudo-labeled data and all influencing pseudo-labeled data to reduce the impact of these labeled data on the specific data labeling model. The human annotation module is used to perform data annotation tasks through the data annotation model. Specifically, the data annotation task involves feeding the data to be annotated into the pre-trained data annotation model for processing, outputting the annotation labels and corresponding confidence scores of the data to be annotated, and forming the annotated data to be corrected by including the annotated data with confidence scores lower than the confidence threshold during the execution of the data annotation task, continuously obtaining the human annotation labels corresponding to the annotated data to be corrected, and adding all the annotated data to be corrected that are associated with human annotation labels to a specific training set. The data annotation module is used to complete the data annotation task until no more data to be corrected is generated.
[0013] The present invention has the following advantages: This invention utilizes a large amount of unlabeled data within the task domain to perform general feature learning on a data labeling model, enabling the model to pre-acquire basic representation capabilities related to the target scene. Then, based on a small amount of manually labeled data, the model is adapted for a specific task, allowing it to establish effective recognition capabilities for target category and location information under small sample conditions. This achieves the goal of completing model initialization training with fewer manually labeled samples, thereby reducing reliance on large-scale manually labeled data and improving training efficiency and initial labeling performance in small sample scenarios. Furthermore, by generating pseudo-labels for the unlabeled data and selecting high-confidence samples for training set reconstruction, continuous model iteration and updates are performed. Simultaneously, manual correction feedback is introduced for low-confidence samples, allowing the model to automatically expand training samples while continuously absorbing real-world supervision information. This improves the utilization rate of unlabeled data, reduces manual intervention costs, and enhances the model's continuous optimization capabilities in practical applications. Further, throughout the entire model update lifecycle, cross-round monitoring of pseudo-labeled data from each round is conducted, combined with trusted benchmarks... This study uses a method to update the reference direction of sample construction parameters and analyzes the deviation and fluctuation of the influence direction of pseudo-labeled sample parameters. This helps identify anomalous pseudo-labeled data that appears to have high confidence in the early iterations but exhibits unstable performance later. This avoids misjudgment caused by relying solely on a single round of confidence to screen pseudo-labels, improving the accuracy and robustness of anomalous pseudo-label identification. After identifying anomalous pseudo-labeled data, the study further analyzes its propagation influence on other pseudo-labeled data, identifies the associated pseudo-labeled data affected by it, and removes the anomalous pseudo-labeled data and its associated pseudo-labeled data from the training set. At the same time, the update components in the model parameters related to this type of anomalous perturbation are weakened or corrected. This not only blocks the continuous infiltration of anomalous pseudo-labels at the training data level but also reduces the influence of existing errors at the model parameter level, preventing the bias from accumulating and amplifying in subsequent training. In small sample data labeling tasks, this approach simultaneously achieves low-cost training, efficient model construction, stable iterative updates, and anomalous propagation control, ultimately improving the convergence stability, labeling accuracy, and generalization ability of the data labeling model. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the structure of the small sample data annotation model pre-training system used in an embodiment of the present invention. Detailed Implementation
[0015] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this invention.
[0016] Example 1: A method for pre-training a small sample data annotation model, comprising: Several sets of unlabeled data are acquired and combined into a general training set. The data annotation model is then trained using this general training set to obtain a general feature encoder. It should be noted that the unlabeled data here refers to data from the domain corresponding to the data annotation task, but without accompanying annotation information. Taking circuit board defect detection as an example, the unlabeled data specifically consists of a large number of PCB images with accompanying annotations, sourced from the DeepPCB public dataset. Although these unlabeled data do not have information such as defect category and location labels, they can be used to learn general structural and texture features of circuit board images. The data annotation model uses the YOLOv7 model to annotate the defect category and location labels in the PCB images. The data labeling model is trained using a general training set. Specifically, the following steps are taken: For each unlabeled dataset in the general training set, enhanced unlabeled data is constructed using image enhancement techniques such as scaling, color jittering, contrast adjustment, and Gaussian blurring. This enhanced unlabeled data is then fed into the data labeling model for processing. Here, the output of the backbone network in the YOLOv7 model is selected as the processing result of the data labeling model to obtain the output features corresponding to the enhanced unlabeled data. The output features of any two enhanced unlabeled datasets corresponding to the same unlabeled dataset are taken as positive sample pairs, and the output features of any two enhanced unlabeled datasets corresponding to the same unlabeled dataset are taken as negative sample pairs. A contrastive loss is constructed based on the proximity of positive sample pairs and the distance between negative sample pairs. The contrastive loss is constructed using InfoNCE Loss. Then, gradient descent is performed using backpropagation to iteratively update the parameters of the backbone network in the YOLOv7 model until the rate of decrease of the contrastive loss converges in the most recent rounds. The trained data labeling model is then used as a general feature encoder. Several manually labeled data sets are acquired, each associated with a corresponding manually labeled tag. These tags include defect categories and their corresponding location labels. All manually labeled data sets are then combined into a specific training set. This specific training set is used to adapt and train a general feature encoder to obtain a specific data labeling model. It should be noted that the manually labeled data here refers to data annotated by operators. Taking circuit board defect detection as an example, the manually labeled data specifically consists of PCB images with manually labeled defect types and locations. The number of manually labeled data sets in the specific training set is much smaller than the number of unlabeled data sets in the general training set, typically only a few dozen. Adaptive training of the general feature encoder is performed using a specific training set. Specifically, this includes: using human-annotated data from the specific training set as input to the general feature encoder, and using human-annotated labels associated with the human-annotated data as the target output of the general feature encoder. A loss value is constructed based on the difference between the predicted output and the target output of the general feature encoder. The loss value includes the difference in defect category classification and the difference between location labels. MSE can be used to minimize the direction of the loss value. Then, backpropagation of gradient descent is performed based on the loss value to iteratively update all parameters of the general feature encoder until the accuracy of the general feature encoder meets the expectation, that is, the accuracy of the general feature encoder is higher than the preset accuracy threshold. The trained general feature encoder is then output as a specific data annotation model. A specific data annotation model is used to process all unlabeled data, outputting a pseudo-label and its corresponding confidence level for each data point. The pseudo-labels are formatted similarly to manually labeled labels. The K pseudo-labels with the highest confidence levels are designated as pseudo-labeled data and added to a specific training set to reconstruct it. The reconstructed training set is then used to adjust the parameters of the specific data annotation model, updating the model. K is typically set to 100. It's important to note that a confidence threshold is usually set when selecting pseudo-labeled data; if the confidence level exceeds this threshold... If the number of unlabeled data points is greater than 100, the unlabeled data will be sorted in descending order of confidence level, and the first 100 unlabeled data points will be selected as pseudo-labeled data. If the number of unlabeled data points with confidence levels higher than the confidence threshold is less than or equal to 100, all unlabeled data points with confidence levels higher than the confidence threshold will be directly selected as pseudo-labeled data. The reconstruction of the specific training set and the update of the specific data labeling model will be repeatedly performed iteratively until the iteration condition is met, and the specific data labeling model will be output as a pre-trained data labeling model. It should be noted that the iteration condition here is generally set to reach the maximum number of iterations, which is set to 50. Data annotation tasks are performed using a data annotation model. Specifically, the data to be labeled is fed into a pre-trained data annotation model for processing. The model outputs the corresponding labels and confidence scores for each data point. Data points with confidence scores below a certain threshold are grouped into data points requiring correction. Human-generated labels are continuously acquired for these data points. All data points with associated human-generated labels are added to a specific training set. The model is then trained on this training set to adapt it to the data point. This process of reconstructing the training set and updating the model is repeated iteratively until the iteration conditions are met. The output of the pre-trained data annotation model is then displayed, enabling real-time updates. Each time the model is updated in real-time, the data annotation task is re-executed using the model until no more data points require correction. According to the data annotation task, it is necessary to note that whenever data to be annotated is generated, it will be sent to the annotators. The annotators will perform manual annotation operations on the data to be annotated and obtain the corresponding manual annotation labels. If the number of data to be annotated is too large, a small sample size threshold can be set. Whenever the number of data to be annotated that has undergone manual annotation operations reaches the small sample size threshold, these data to be annotated that have been associated with manual annotation labels will be added to a specific training set without waiting for all data to be annotated to undergo manual annotation operations. By adding the specific training set and pseudo-annotated data obtained by performing manual annotation operations, a data annotation model suitable for small sample scenarios can be quickly retrieved until no more data to be annotated is generated, indicating that the data annotation model has been adjusted and can be directly used to process all data to be annotated to complete the data annotation operation for all data to be annotated. The update or real-time update of a specific data labeling model is considered an iterative cycle throughout its lifecycle. All constructed pseudo-labeled data is monitored across cycles to identify anomalous pseudo-labeled data. For each identified anomalous pseudo-labeled data, a propagation domain analysis is performed to determine its associated influencing pseudo-labeled data. The anomalous pseudo-labeled data and all influencing pseudo-labeled data are then removed from the specific training set. Furthermore, parameter adjustments are made to the specific data labeling model based on these anomalous and influencing pseudo-labeled data to reduce their impact. It's important to note that the confidence level of pseudo-labeled data is affected by the parameters of the specific data labeling model and the specific training set. During continuous iteration, both the parameters of the data labeling model and the specific training set change. Therefore, pseudo-labeled data varies across different iteration cycles. The confidence level of the output of the labeling model will also change. The decision boundary of the originally high-confidence pseudo-labeled data becomes increasingly blurred throughout the entire lifecycle of the data labeling model update. That is, the originally high-confidence pseudo-labeled data may only show a specific high confidence level under the data labeling model with inaccurate parameters in the early stage. The actual labeling results are quite different from the pseudo labels. Such pseudo-labeled data will be regarded as anomalous pseudo-labeled data. Anomalous pseudo-labeled data participates in the data labeling model update process. The pseudo-labeled data built in subsequent rounds may also be affected by the propagation of anomalous pseudo-labeled data. These anomalous pseudo-labeled data and influencing pseudo-labeled data will introduce bias into the update of the data labeling model and continuously amplify the bias in the iterative rounds of data labeling model updates, making it difficult for the data labeling model to converge. Therefore, it is necessary to reduce the impact of these labeled data on the specific data labeling model. For all constructed pseudo-labeled data, cross-round monitoring is performed to identify abnormal pseudo-labeled data. The specific steps include the following: In each iteration, the main direction analysis dataset is updated by combining all manually labeled data and all data to be corrected. This updated dataset includes the updated main direction analysis data, which is then associated with the manually labeled data. The updated main direction analysis data is fed into the updated specific data labeling model for processing. The main direction loss value is constructed based on the difference between the manually labeled data and the predicted output of the updated specific data labeling model. Taking circuit board defect detection as an example, the analysis loss value includes defect category loss, location loss, and confidence loss. The defect category loss and confidence loss are calculated using binary cross-entropy loss, and the location loss is calculated using CIoU. Loss calculation involves calculating gradient values for key layer parameters based on the main direction loss value, denoted as the main direction influence parameter direction value. Here, the key layer parameters are specifically the learnable parameters of the layers in the data annotation model that are most sensitive to the final defect detection result and best reflect the influence of samples on the decision boundary. For example, in YOLOv7, the weights and biases of the classification branch convolutional layers, the bounding box regression branch convolutional layers, and the target confidence branch convolutional layers can be selected from the backbone network. These are set by the operator in the configuration file. All main direction influence parameter direction values are combined to form a local main direction influence parameter direction vector. Normalization is then performed on this local main direction influence parameter direction vector. Specifically, the local main direction influence parameter direction vector is divided by its L2 norm. The average value of the normalized output of all local main direction influence parameter direction vectors corresponding to the updated main direction analysis data in the updated main direction analysis dataset is then calculated to obtain the main direction influence parameter direction vector. This vector represents the main direction of key layer parameter updates under credible supervision. In each iteration, pseudo-labeled data is traversed simultaneously. Selected pseudo-labeled data is fed into the updated specific data labeling model for processing. An analysis loss value is constructed based on the difference between the pseudo-labels and the predicted output of the updated specific data labeling model. Taking circuit board defect detection as an example, the analysis loss value includes defect category loss, location loss, and confidence loss. Gradient values are calculated for key layer parameters based on these analysis loss values, denoted as the pseudo-label influence parameter direction value. This value characterizes the gradient contribution of the pseudo-labeled data to the key layer parameters, reflecting the update direction of the pseudo-labeled data for the key layer parameters. The pseudo-label influence parameter direction values corresponding to all key layer parameters are concatenated and normalized to obtain the pseudo-label influence parameter direction vector. The similarity between the pseudo-label influence parameter direction vector and the main direction influence parameter direction vector is calculated using the cosine similarity algorithm, denoted as the main direction deviation value corresponding to the selected pseudo-labeled data, used to characterize the selected pseudo-labeled data. The analysis focuses on the difference between the update direction of parameters in a specific data annotation model based on selected pseudo-labeled data and manually labeled data. It calculates the standard deviation of the principal direction deviation value of the selected pseudo-labeled data in the current iteration compared to the principal direction deviation values in the previous m iterations, denoted as the principal direction deviation fluctuation amplitude. m is typically set to 10. If the principal direction deviation fluctuation amplitude exceeds the deviation fluctuation threshold (set by the operator), the selected pseudo-labeled data is considered anomalous. Propagation domain analysis is then performed based on the anomalous pseudo-labeled data to determine the associated influence of the anomalous pseudo-labeled data on the pseudo-labeled data. If the principal direction deviation fluctuation amplitude is not higher than the deviation fluctuation threshold, the pseudo-labeled data continues to be iterated. It should be noted that by analyzing the changes in the principal direction deviation value across multiple iterations, it can be determined whether the pseudo-labeled data exhibits a specific high confidence level only under conditions where the initial parameters are not sufficiently accurate in the data annotation model. Based on the propagation domain analysis of the anomalous pseudo-labeled data, the influence of the anomalous pseudo-labeled data on the pseudo-labeled data is determined. This includes the following steps: The pseudo-labeling influence parameter direction vector of the abnormal pseudo-labeled data in the current iteration is concatenated with the pseudo-labeling influence parameter direction vectors corresponding to the previous m iterations to form the pseudo-labeling influence parameter direction matrix. The number of rows in the pseudo-labeling influence parameter direction matrix is the number of iterations, and the number of columns is the number of key layer parameters. Singular value decomposition is performed on the pseudo-labeling influence parameter direction matrix to obtain the left singular matrix, singular values, and right singular matrix. The number of rows in the left singular matrix is the number of iterations, and the number of columns is the number of main perturbation modes, which describes the perturbation strength of the main perturbation mode in different iterations. The singular value matrix is a diagonal matrix, and the number of rows and columns are the number of singular values. The singular value represents a main perturbation mode, which is obtained by the matrix rank. The number of rows in the right singular matrix is the number of key layer parameters, and the number of columns is the number of main perturbation modes. The right singular matrix is denoted as the parameter influence subspace. Starting with the anomalous pseudo-labeled data, the pseudo-labeled data is traversed. The direction vector of the pseudo-labeling influence parameter corresponding to the selected pseudo-labeled data is calculated, and the direction vector of the pseudo-labeling influence parameter is projected onto the parameter influence subspace to obtain the projection vector. Specifically, the parameter influence subspace, the transpose of the parameter influence subspace, and the direction vector of the pseudo-labeling influence parameter are multiplied together to obtain the projection vector. The ratio of the square norm of the projection vector to the square norm of the direction vector of the pseudo-labeling influence parameter is recorded as the sensitivity of the selected pseudo-labeled data. The sensitivity characterizes the influence correlation between the selected pseudo-labeled data and the anomalous pseudo-labeled data in the parameter influence subspace. The closer the sensitivity is to 1, the more it indicates that the selected pseudo-labeled data and the anomalous pseudo-labeled data are in the same propagation domain. If the sensitivity is higher than the sensitivity threshold, the selected pseudo-labeled data is recorded as the influence pseudo-labeled data associated with the anomalous pseudo-labeled data. If the sensitivity is not higher than the sensitivity threshold, the pseudo-labeled data is traversed again. Based on the abnormal pseudo-labeled data and all data affecting the pseudo-labeled data, parameter adjustment operations are performed on the specific data labeling model, including the following steps: A weighted summation operation is performed on the abnormal pseudo-labeled data and the direction vectors of the pseudo-labeling influence parameters corresponding to all the pseudo-labeled data. During the weighted summation operation, the weights can be set to the sensitivity corresponding to the pseudo-labeled data. The weights in the abnormal pseudo-labeled data are set to 1. The main perturbation parameter vector is obtained, and the adjustment amount of the specific data labeling model on the key layer parameters in the current iteration is obtained. The model update vector is constructed, and the transpose of the main perturbation parameter vector, the model update vector, and the main perturbation parameter vector are multiplied together to obtain the main perturbation component. The direction of minimizing the main perturbation component is used to perform backpropagation of gradient descent and perform parameter adjustment operation on the specific data labeling model. This application utilizes a large amount of unlabeled data within the task domain to perform general feature learning on the data labeling model, enabling the model to pre-acquire basic representation capabilities related to the target scene. Then, based on a small amount of manually labeled data, the model is adapted for specific tasks, allowing it to establish effective recognition capabilities for target category and location information under small sample conditions. This achieves the goal of completing model initialization training with fewer manually labeled samples, thereby reducing dependence on large-scale manually labeled data and improving training efficiency and initial labeling performance in small sample scenarios. Furthermore, by generating pseudo-labels for the unlabeled data and selecting high-confidence samples for training set reconstruction, continuous model iteration updates are performed. Simultaneously, manual correction feedback is introduced for low-confidence samples, allowing the model to automatically expand training samples while continuously absorbing real-world supervision information. This improves the utilization rate of unlabeled data, reduces manual intervention costs, and enhances the model's continuous optimization capabilities in practical applications. Further, throughout the entire model update lifecycle, cross-round monitoring of pseudo-labeled data from each round is conducted, combined with confidence benchmarks... This study uses a method to update the reference direction of sample construction parameters and analyzes the deviation and fluctuation of the influence direction of pseudo-labeled sample parameters. This helps identify anomalous pseudo-labeled data that appears to have high confidence in the early iterations but exhibits unstable performance later. This avoids misjudgment caused by relying solely on a single round of confidence to screen pseudo-labels, improving the accuracy and robustness of anomalous pseudo-label identification. After identifying anomalous pseudo-labeled data, the study further analyzes its propagation influence on other pseudo-labeled data, identifies the associated pseudo-labeled data affected by it, and removes the anomalous pseudo-labeled data and its associated pseudo-labeled data from the training set. At the same time, the update components in the model parameters related to this type of anomalous perturbation are weakened or corrected. This not only blocks the continuous infiltration of anomalous pseudo-labels at the training data level but also reduces the influence of existing errors at the model parameter level, preventing the bias from accumulating and amplifying in subsequent training. In small sample data labeling tasks, this approach simultaneously achieves low-cost training, efficient model construction, stable iterative updates, and anomalous propagation control, ultimately improving the convergence stability, labeling accuracy, and generalization ability of the data labeling model.
[0017] Example 2: A pre-training system for a small sample data annotation model, such as... Figure 1 As shown, it includes: The general training module is used to acquire several sets of unlabeled data and form a general training set. The data annotation model is then trained using this general training set to obtain a general feature encoder. It should be noted that the unlabeled data here refers to data from the domain corresponding to the data annotation task, but without accompanying annotation information. Taking circuit board defect detection as an example, the unlabeled data specifically consists of a large number of PCB images with accompanying annotations, sourced from the DeepPCB public dataset. Although this unlabeled data lacks information such as defect category and location labels, it can be used to learn general structural and texture features of circuit board images. The data annotation model uses the YOLOv7 model to annotate information such as defect category and location labels in the PCB images. The adaptation training module is used to adapt the general feature encoder to a specific training set. Specifically, it includes the following: using human-annotated data from the specific training set as input to the general feature encoder, and using human-annotated labels associated with the human-annotated data as the target output of the general feature encoder. A loss value is constructed based on the difference between the predicted output and the target output of the general feature encoder. The loss value includes the difference in defect category classification and the difference between location labels. MSE can be used to minimize the direction of the loss value. Then, backpropagation of gradient descent is performed based on the loss value to iteratively update all parameters of the general feature encoder until the accuracy of the general feature encoder meets the expectations. The trained general feature encoder is then output as a specific data annotation model. The pseudo-label augmentation training module processes all unlabeled data using a specific data labeling model, outputting a pseudo-label and its corresponding confidence level for each unlabeled data point. The pseudo-labels are in the same format as manually labeled labels. The unlabeled data points corresponding to the K pseudo-labels with the highest confidence levels are recorded as pseudo-labeled data and added to a specific training set to reconstruct the specific training set. The reconstructed specific training set is then used to adjust the parameters of the specific data labeling model, thus updating the specific data labeling model. K is typically set to 100. It should be noted that a confidence level threshold is usually set when selecting pseudo-labeled data. If the number of unlabeled data points with confidence levels higher than the threshold is greater than 100, the unlabeled data points are arranged in descending order of confidence level, and the first 100 unlabeled data points are selected as pseudo-labeled data. If the number of unlabeled data points with confidence levels higher than the threshold is not greater than 100, all unlabeled data points with confidence levels higher than the threshold are directly selected as pseudo-labeled data. The pseudo-label adjustment module treats the update or real-time update of a specific data labeling model as an iterative cycle throughout its lifecycle. It monitors all constructed pseudo-labeled data across cycles to identify anomalous pseudo-labels. For each identified anomalous pseudo-label, it performs propagation domain analysis to determine the associated influencing pseudo-labels. The anomalous pseudo-label and all influencing pseudo-labels are then removed from the specific training set. Finally, parameter adjustments are performed on the specific data labeling model based on these factors to reduce their impact. It's important to note that the confidence level of pseudo-labeled data is influenced by the parameters of the specific data labeling model and the specific training set. During continuous iteration, both the parameters of the data labeling model and the specific training set change; therefore, pseudo-labeled data will vary across different iteration cycles. The confidence level output by the data labeling model will also change. The decision boundary of the originally high-confidence pseudo-labeled data becomes increasingly blurred throughout the entire lifecycle of the data labeling model update. That is, the originally high-confidence pseudo-labeled data may only show a specific high confidence level under the data labeling model with inaccurate parameters in the early stage. The actual labeling results are quite different from the pseudo labels. Such pseudo-labeled data will be regarded as anomalous pseudo-labeled data. Anomalous pseudo-labeled data participates in the update process of the data labeling model. The pseudo-labeled data constructed in subsequent rounds may also be affected by the propagation of anomalous pseudo-labeled data. These anomalous pseudo-labeled data and influencing pseudo-labeled data will introduce bias into the update of the data labeling model and continuously amplify the bias in the iterative rounds of data labeling model updates, making it difficult for the data labeling model to converge. Therefore, it is necessary to reduce the impact of these labeled data on the specific data labeling model. The human annotation module is used to perform data annotation tasks through the data annotation model. Specifically, the data annotation task involves feeding the data to be annotated into the pre-trained data annotation model for processing, outputting the annotation labels and corresponding confidence scores of the data to be annotated, and forming the annotated data to be corrected by including the annotated data with confidence scores lower than the confidence threshold during the execution of the data annotation task, continuously obtaining the human annotation labels corresponding to the annotated data to be corrected, and adding all the annotated data to be corrected that are associated with human annotation labels to a specific training set. The data annotation module is used to complete the data annotation task until no more data to be corrected is generated.
[0018] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims. Parts not described in detail in this specification are prior art known to those skilled in the art.
Claims
1. A small sample data labeling model pre-training method, characterized in that, include: By sequentially performing general training and adaptive training on the data labeling model, a specific data labeling model can be obtained. All unlabeled data are processed by a specific data labeling model, and the pseudo-label and corresponding confidence score of each unlabeled data are output. The unlabeled data corresponding to the K pseudo-labels with the highest confidence scores are recorded as pseudo-labeled data. The pseudo-labeled data are added to a specific training set to complete the reconstruction of the specific training set. The parameters of the specific data labeling model are adjusted by the reconstructed specific training set to complete the update of the specific data labeling model. The process involves constructing manually labeled data to be corrected, then using a specific training set with the added data to perform adaptive training on a specific data labeling model. This process is repeated iteratively, reconstructing the specific training set and updating the specific data labeling model, until the iteration conditions are met. The output of the specific data labeling model is then a pre-trained data labeling model, enabling real-time updates to the data labeling model. Each time the data labeling model completes a real-time update, the data labeling task is re-executed using the data labeling model. This process continues until no more data to be corrected is generated, completing the data labeling task. The update or real-time update of a specific data labeling model is regarded as an iteration round of the entire life cycle. All constructed pseudo-labeled data are monitored across rounds to identify abnormal pseudo-labeled data. For each abnormal pseudo-labeled data identified, a propagation domain analysis is performed based on the abnormal pseudo-labeled data to determine the associated influential pseudo-labeled data. The abnormal pseudo-labeled data and all influential pseudo-labeled data are then removed from the specific training set, and parameter adjustment operations are performed on the specific data labeling model based on the abnormal pseudo-labeled data and all influential pseudo-labeled data.
2. The small sample data labeling model pre-training method of claim 1, wherein, The process of constructing labeled data to be corrected based on human annotations includes the following steps: The data annotation task is performed through a data annotation model. Specifically, the data to be annotated is fed into a pre-trained data annotation model for processing, and the annotation labels and corresponding confidence scores of the data to be annotated are output. The data to be annotated with confidence scores lower than the confidence threshold output during the execution of the data annotation task are combined into data to be corrected, and human-made annotation labels corresponding to the data to be corrected are continuously obtained.
3. The small sample data labeling model pre-training method of claim 2, wherein, For all constructed pseudo-labeled data, cross-round monitoring is performed to identify abnormal pseudo-labeled data. The specific steps include the following: In each iteration, all manually labeled data and all data to be corrected are combined to form a parameter update main direction analysis dataset. The update main direction analysis dataset includes the updated main direction analysis data, which is associated with the manually labeled data. The updated main direction analysis data is fed into the updated specific data labeling model for processing. The main direction loss value is constructed based on the difference between the manually labeled data and the prediction output of the updated specific data labeling model. The gradient value of the key layer parameters is calculated based on the main direction loss value and recorded as the main direction influence parameter direction value. All main direction influence parameter direction values are combined to form a local main direction influence parameter direction vector. The local main direction influence parameter direction vector is normalized. The normalization operation is to divide the local main direction influence parameter direction vector by the L2 norm of the local main direction influence parameter direction vector. The average value of the normalized output of the local main direction influence parameter direction vectors corresponding to all updated main direction analysis data in the updated main direction analysis dataset is calculated to obtain the main direction influence parameter direction vector. In each iteration, the pseudo-labeled data is simultaneously traversed. The selected pseudo-labeled data is fed into the updated specific data labeling model for processing. An analysis loss value is constructed based on the difference between the pseudo-labels and the prediction output of the updated specific data labeling model. The gradient values of the key layer parameters are calculated based on the analysis loss value and denoted as the pseudo-labeling influence parameter direction values. The pseudo-labeling influence parameter direction values corresponding to all key layer parameters are concatenated and normalized to obtain the pseudo-labeling influence parameter direction vector. The similarity between the pseudo-labeling influence parameter direction vector and the main direction influence parameter direction vector is calculated and denoted as the main direction deviation value corresponding to the selected pseudo-labeled data. The standard deviation of the main direction deviation value of the selected pseudo-labeled data in the current iteration and the main direction deviation values in the previous m iterations is calculated and denoted as the main direction deviation fluctuation amplitude. If the main direction deviation fluctuation amplitude is higher than the deviation fluctuation threshold, the selected pseudo-labeled data is regarded as abnormal pseudo-labeled data, and a propagation domain analysis is performed based on the abnormal pseudo-labeled data to determine the influence pseudo-labeled data associated with the abnormal pseudo-labeled data. If the main direction deviation fluctuation amplitude is not higher than the deviation fluctuation threshold, the pseudo-labeled data continues to be traversed.
4. The small sample data labeling model pre-training method of claim 3, wherein, Based on the propagation domain analysis of the anomalous pseudo-labeled data, the influence of the anomalous pseudo-labeled data on the pseudo-labeled data is determined. This includes the following steps: The pseudo-labeling influence parameter direction vector of the abnormal pseudo-labeled data in the current round is concatenated with the pseudo-labeling influence parameter direction vectors corresponding to the previous m iteration rounds to form the pseudo-labeling influence parameter direction matrix. The number of rows in the pseudo-labeling influence parameter direction matrix is the number of iteration rounds, and the number of columns is the number of key layer parameters. Singular value decomposition is performed on the pseudo-labeling influence parameter direction matrix to obtain the left singular matrix, singular values, and right singular matrix. The right singular matrix is denoted as the parameter influence subspace. Starting with the anomalous pseudo-labeled data, iterate through the pseudo-labeled data, calculate the pseudo-labeling influence parameter direction vector corresponding to the selected pseudo-labeled data, and project the pseudo-labeling influence parameter direction vector onto the parameter influence subspace to obtain the projection vector. Specifically, the projection method is to perform a product operation on the parameter influence subspace, the transpose of the parameter influence subspace, and the pseudo-labeling influence parameter direction vector to obtain the projection vector. The ratio of the square norm of the projection vector to the square norm of the pseudo-labeling influence parameter direction vector is recorded as the sensitivity corresponding to the selected pseudo-labeled data. If the sensitivity is higher than the sensitivity threshold, the selected pseudo-labeled data is recorded as the influence pseudo-labeled data associated with the anomalous pseudo-labeled data. If the sensitivity is not higher than the sensitivity threshold, continue to traverse the pseudo-labeled data.
5. The small sample data labeling model pre-training method of claim 4, wherein, Based on the abnormal pseudo-labeled data and all data affecting the pseudo-labeled data, parameter adjustment operations are performed on the specific data labeling model, including the following steps: The weighted summation operation is performed on the abnormal pseudo-labeled data and the direction vectors of the pseudo-labeling influence parameters corresponding to all the pseudo-labeled data to obtain the main perturbation parameter vector. The adjustment amount of the specific data labeling model on the key layer parameters in the current iteration is obtained, the model update vector is constructed, and the transpose of the main perturbation parameter vector, the model update vector and the main perturbation parameter vector are multiplied together to obtain the main perturbation component. The direction of minimizing the main perturbation component is used to perform backpropagation of gradient descent to perform parameter adjustment operation on the specific data labeling model.
6. The method for pre-training a small sample data labeled model according to claim 5, characterized in that, The general training specifically includes the following: For each unlabeled data in the general training set, image augmentation techniques are used to construct augmented unlabeled data corresponding to the unlabeled data. The augmented unlabeled data is then fed into the data labeling model for processing to obtain the output features corresponding to the augmented unlabeled data. The output features of any two augmented unlabeled data corresponding to the same unlabeled data are taken as positive sample pairs, and the output features of any two augmented unlabeled data corresponding to the same unlabeled data are taken as negative sample pairs. A contrastive loss is constructed based on the positive and negative sample pairs, and then backpropagation of gradient descent is performed based on the contrastive loss to iteratively update the parameters in the data labeling model until the rate of decrease of the contrastive loss converges in the most recent few rounds. The trained data labeling model is then used as a general feature encoder.
7. The method for pre-training a small sample data labeled model according to claim 6, characterized in that, Adaptive training specifically includes the following: using human-annotated data from a specific training set as input to a general feature encoder, using human-annotated labels associated with the human-annotated data as the target output of the general feature encoder, constructing a loss value based on the difference between the predicted output and the target output of the general feature encoder, minimizing the direction of the loss value, and then performing backpropagation of gradient descent based on the loss value to iteratively update all parameters of the general feature encoder until the accuracy of the general feature encoder is higher than a preset accuracy threshold, and outputting the trained general feature encoder as a specific data annotation model.
8. A pre-training system for a small sample data annotation model, characterized in that, The system employs a small sample data annotation model pre-training method according to any one of claims 1-7, comprising: The general training module is used to acquire several sets of unlabeled data and combine them into a general training set. The data labeling model is then trained using the general training set to obtain a general feature encoder. The adaptation training module is used to acquire several sets of manually labeled data. Each set of manually labeled data is associated with a corresponding manually labeled label. All the manually labeled data are combined into a specific training set. The general feature encoder is then adapted and trained using the specific training set to obtain a specific data labeling model. The pseudo-label augmentation training module is used to process all unlabeled data through a specific data labeling model, output the pseudo-label and corresponding confidence score for each unlabeled data, and record the unlabeled data corresponding to the K pseudo-labels with the highest confidence scores as pseudo-labeled data. The pseudo-labeled data is then added to a specific training set to complete the reconstruction of the specific training set. The parameters of the specific data labeling model are adjusted using the reconstructed specific training set to complete the update of the specific data labeling model. The pseudo-label adjustment module is used to treat the completion or real-time update of a specific data labeling model as an iteration round of the entire life cycle. It monitors all constructed pseudo-labeled data across rounds, identifies abnormal pseudo-labeled data, and performs propagation domain analysis on each abnormal pseudo-labeled data to determine the associated influential pseudo-labeled data. The abnormal pseudo-labeled data and all influential pseudo-labeled data are then removed from the specific training set, and parameter adjustment operations are performed on the specific data labeling model based on the abnormal pseudo-labeled data and all influential pseudo-labeled data. The human annotation module is used to perform data annotation tasks through the data annotation model. Specifically, the data annotation task involves feeding the data to be annotated into the pre-trained data annotation model for processing, outputting the annotation labels and corresponding confidence scores of the data to be annotated, and forming the annotated data to be corrected by including the annotated data with confidence scores lower than the confidence threshold during the execution of the data annotation task, continuously obtaining the human annotation labels corresponding to the annotated data to be corrected, and adding all the annotated data to be corrected that are associated with human annotation labels to a specific training set. The data annotation module is used to complete the data annotation task until no more data to be corrected is generated.
