A data processing method, device and equipment

By using the method of combining basic models and teacher models in incremental learning, calculate the loss value and conduct model training, solve the problem of the performance decline and storage demand of machine learning models on the old data, and realize the continuous learning and the model of the model Maintenance.

CN114298179BActive Publication Date: 2025-01-28HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111551720.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-01-28
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

During incremental learning, the performance of machine learning models on old data declines, resulting in the problem of ‘catastrophic forgetting’, and at the same time, the demand for storing large amounts of old tagged data is high, resulting in increased storage pressure.

Method used

Teacher models, basic data sets and basic auxiliary sets of basic models, old tasks, and data sets and auxiliary sets of incremental tasks are used to calculate the loss values ​​and conduct model training to generate target models to avoid forgetting problems.

Benefits of technology

The performance of machine learning models on the old data is effectively avoided, the storage requirements for label data are reduced, and the generalization performance of the model with no label data is used.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114298179B_ABST
    Figure CN114298179B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device and equipment, including: inputting labeled data in a basic data set and a newly added data set into a basic model to obtain a predicted label; determining a first loss value based on the predicted label and the actual label; inputting pseudo-label data in a basic auxiliary set into a basic model to obtain a first basic vector, inputting pseudo-label data in a basic auxiliary set into a first teacher model to obtain a second basic vector, and determining a second loss value based on the first basic vector and the second basic vector; inputting pseudo-label data in a newly added auxiliary set into a basic model to obtain a first newly added vector, inputting pseudo-label data in a newly added auxiliary set into a second teacher model to obtain a second newly added vector, and determining a third loss value based on the first newly added vector and the second newly added vector; training the basic model based on the first loss value, the second loss value and the third loss value to obtain a target model. Through the technical solution of the present application, the performance of the target model on the old task is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data processing method, device and equipment. Background Art

[0002] Machine learning is a way to achieve artificial intelligence. It is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. Machine learning is used to study how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning pays more attention to algorithm design, enabling computers to automatically learn patterns from data and use patterns to predict unknown data. Machine learning has been widely used, such as deep learning, data mining, computer vision, natural language processing, biometric recognition, search engines, medical diagnosis, speech recognition and handwriting recognition.

[0003] In order to use machine learning to implement artificial intelligence processing, a training data set can be constructed. The training data set includes a large amount of labeled data (such as image data, that is, images with calibrated boxes and calibrated categories). A machine learning model is trained based on the training data set, such as a machine learning model with target detection function. The machine learning model can be used to perform target detection on the data to be processed. For example, the target box in the data to be processed can be detected, and the target category can be identified, such as vehicle category, animal category, electronic product category, etc.

[0004] In order to train a machine learning model, it is usually necessary to obtain a large amount of labeled data. In practical applications, labeled data is gradually obtained as demand increases, which requires the machine learning model to have the ability to learn continuously, that is, incremental learning. Incremental learning means that the labeled data in the training data set is obtained in batches. The specific form can be the gradual expansion of labeled data for different tasks, labeled data for different scenarios, and labeled data for the same scenario. The goal of incremental learning is to overcome the problem of "catastrophic forgetting" on old data when the machine learning model learns new data. In other words, the performance of the machine learning model for new data is relatively high, but the performance for old data is relatively low.

[0005] In the incremental learning process, since each task only stores a small amount of labeled data, it is difficult to maintain the performance of the machine learning model on the old data, that is, there is a catastrophic forgetting problem of old data. With the increasing number of incremental tasks, a large amount of old data needs to be stored, that is, there is a problem of large storage requirements. Summary of the invention

[0006] The present application provides a data processing method, the method comprising:

[0007] Obtain a basic model to be trained; obtain a first teacher model, a basic data set, and a basic auxiliary set corresponding to the old task, wherein the basic data set includes labeled data, and the basic auxiliary set includes pseudo-labeled data; obtain a second teacher model, a new data set, and a new auxiliary set corresponding to the incremental task, wherein the new data set includes labeled data, and the new auxiliary set includes pseudo-labeled data;

[0008] Inputting the labeled data in the basic data set and the newly added data set into the basic model to obtain the predicted labels corresponding to the labeled data; determining a first loss value based on the predicted labels corresponding to the labeled data and the actual labels corresponding to the labeled data;

[0009] Inputting the pseudo-label data in the basic auxiliary set to the basic model to obtain a first basic vector, inputting the pseudo-label data in the basic auxiliary set to the first teacher model to obtain a second basic vector, and determining a second loss value based on the first basic vector and the second basic vector;

[0010] Input the pseudo-label data in the newly added auxiliary set to the basic model to obtain a first newly added vector, input the pseudo-label data in the newly added auxiliary set to the second teacher model to obtain a second newly added vector, and determine a third loss value based on the first newly added vector and the second newly added vector;

[0011] Determine a target loss value based on the first loss value, the second loss value, and the third loss value, and train the basic model based on the target loss value to obtain a trained target model;

[0012] The target model is used to perform data processing on the data to be processed.

[0013] The present application provides a data processing device, the device comprising:

[0014] An acquisition module is used to acquire a basic model to be trained; acquire a first teacher model, a basic data set, and a basic auxiliary set corresponding to an old task, wherein the basic data set includes labeled data, and the basic auxiliary set includes pseudo-label data; acquire a second teacher model, a new data set, and a new auxiliary set corresponding to an incremental task, wherein the new data set includes labeled data, and the new auxiliary set includes pseudo-label data;

[0015] A determination module, used for inputting the labeled data in the basic data set and the newly added data set into the basic model to obtain the predicted label corresponding to the labeled data; determining a first loss value based on the predicted label corresponding to the labeled data and the actual label corresponding to the labeled data; inputting the pseudo-label data in the basic auxiliary set into the basic model to obtain a first basic vector, inputting the pseudo-label data in the basic auxiliary set into the first teacher model to obtain a second basic vector, and determining a second loss value based on the first basic vector and the second basic vector; inputting the pseudo-label data in the newly added auxiliary set into the basic model to obtain a first newly added vector, inputting the pseudo-label data in the newly added auxiliary set into the second teacher model to obtain a second newly added vector, and determining a third loss value based on the first newly added vector and the second newly added vector; determining a target loss value based on the first loss value, the second loss value and the third loss value;

[0016] A training module is used to train the basic model based on the target loss value to obtain a trained target model; the target model is used to perform data processing on the data to be processed.

[0017] The present application provides a data processing device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the data processing method disclosed in the embodiment of the present application.

[0018] It can be seen from the above technical solutions that in the embodiment of the present application, the basic model can be trained based on the basic data set, the basic auxiliary set, the newly added data set and the newly added auxiliary set to obtain the target model. The basic data set and the basic auxiliary set are data sets for old tasks, which are used to ensure the performance of the target model on the old tasks and avoid catastrophic forgetting problems. The basic data set includes labeled data, and the basic auxiliary set includes pseudo-labeled data (i.e., pseudo-labeled data obtained based on unlabeled data). Obviously, a small amount of labeled data and a large amount of unlabeled data can ensure the performance of the target model on the old tasks, avoid catastrophic forgetting problems, and do not need to store a large amount of labeled data, reducing the storage requirements of labeled data. In addition, the newly added data set and the newly added auxiliary set are data sets for incremental tasks, which are used to ensure the performance of the target model on incremental tasks. The newly added data set includes labeled data, and the newly added auxiliary set includes pseudo-labeled data (i.e., pseudo-labeled data obtained based on unlabeled data). Obviously, a small amount of labeled data and a large amount of unlabeled data can ensure the performance of the target model on incremental tasks, and do not need to store a large amount of labeled data, reducing the storage requirements of labeled data. In addition, a large amount of unlabeled data can be used to improve the generalization performance of the target model. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.

[0020] Figure 1 It is a flowchart of a data processing method in one embodiment of the present application;

[0021] Figure 2 is a schematic diagram of an incremental learning process in one embodiment of the present application;

[0022] Figure 3 It is a flowchart of a data processing method in one embodiment of the present application;

[0023] Figure 4 is a schematic diagram of the structure of a data processing device in one embodiment of the present application;

[0024] Figure 5 It is a hardware structure diagram of a data processing device in one embodiment of the present application. DETAILED DESCRIPTION

[0025] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.

[0026] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".

[0027] In the present application, a data processing method is proposed. Figure 1 FIG. 1 is a flow chart of the data processing method, which can be applied to any type of device. The method may include:

[0028] Step 101, obtain the basic model to be trained; obtain the first teacher model, basic data set and basic auxiliary set corresponding to the old task, the basic data set may include labeled data, and the basic auxiliary set may include pseudo-labeled data; obtain the second teacher model, new data set and new auxiliary set corresponding to the incremental task, the new data set may include labeled data, and the new auxiliary set may include pseudo-labeled data.

[0029] Exemplarily, obtaining the basic auxiliary set corresponding to the old task may include, but is not limited to: inputting the unlabeled data in the unlabeled data set into the basic model to obtain the pseudo-label data corresponding to the unlabeled data, and the pseudo-label data may include predicted pseudo-labels and predicted probability values. For each label supported by the basic model, the pseudo-label data corresponding to the label is determined based on the predicted pseudo-labels in each pseudo-label data; based on the predicted probability value in the pseudo-label data corresponding to the label, N1 pseudo-label data with large predicted probability values ​​may be selected as the pseudo-label data in the basic auxiliary set, and N1 may be a positive integer.

[0030] Exemplarily, obtaining the second teacher model corresponding to the incremental task may include but is not limited to: inputting the labeled data in the basic data set into the basic model to obtain the predicted label and predicted probability value corresponding to the labeled data; determining the first confidence loss value based on the predicted label and predicted probability value corresponding to each labeled data; inputting the pseudo-label data in the basic auxiliary set into the basic model to obtain the predicted label and predicted probability value corresponding to the pseudo-label data; determining the second confidence loss value based on the predicted label and predicted probability value corresponding to each pseudo-label data; inputting the labeled data in the newly added data set into the basic model to obtain the predicted label corresponding to the labeled data; determining the task loss value based on the predicted label and actual label corresponding to each labeled data. On this basis, the basic model is trained based on the first confidence loss value, the second confidence loss value and the task loss value to obtain the trained second teacher model.

[0031] Exemplarily, obtaining a new auxiliary set corresponding to an incremental task may include, but is not limited to: inputting the unlabeled data in the unlabeled data set into the second teacher model to obtain pseudo-label data corresponding to the unlabeled data, where the pseudo-label data may include predicted pseudo-labels and predicted probability values; for each label supported by the second teacher model, determining the pseudo-label data corresponding to the label based on the predicted pseudo-labels in each pseudo-label data; based on the predicted probability values ​​in the pseudo-label data corresponding to the label, selecting N2 pseudo-label data with large predicted probability values ​​as the pseudo-label data in the new auxiliary set, where N2 may be a positive integer.

[0032] Step 102: Input the labeled data in the basic data set and the newly added data set to the basic model to obtain the predicted labels corresponding to the labeled data; determine the first loss value based on the predicted labels corresponding to the labeled data and the actual labels corresponding to the labeled data (i.e., the calibration information corresponding to the labeled data). Input the pseudo-label data in the basic auxiliary set to the basic model to obtain the first basic vector, input the pseudo-label data in the basic auxiliary set to the first teacher model to obtain the second basic vector, and determine the second loss value based on the first basic vector and the second basic vector. Input the pseudo-label data in the newly added auxiliary set to the basic model to obtain the first newly added vector, input the pseudo-label data in the newly added auxiliary set to the second teacher model to obtain the second newly added vector, and determine the third loss value based on the first newly added vector and the second newly added vector.

[0033] Exemplarily, the base model, the first teacher model, and the second teacher model all include M network layers, M is a positive integer greater than 1, there is a target network layer among the M network layers, and the target network layer is at least one network layer among the M network layers. On this basis, the first basis vector is the feature vector output by the target network layer of the base model; the second basis vector is the feature vector output by the target network layer of the first teacher model; the first additional vector is the feature vector output by the target network layer of the base model; and the second additional vector is the feature vector output by the target network layer of the second teacher model.

[0034] Exemplarily, when inputting the labeled data in the basic data set to the basic model, a first number of labeled data may be selected from the basic data set, data augmentation may be performed on each selected labeled data, and the data augmented labeled data may be input to the basic model. When inputting the labeled data in the newly added data set to the basic model, a second number of labeled data may be selected from the newly added data set, data augmentation may be performed on each selected labeled data, and the data augmented labeled data may be input to the basic model. When inputting the pseudo-labeled data in the basic auxiliary set to the basic model and the pseudo-labeled data in the basic auxiliary set to the first teacher model, a third number of pseudo-labeled data may be selected from the basic auxiliary set, data augmentation may be performed on each selected pseudo-labeled data, and the data augmented pseudo-labeled data may be input to the basic model, and the data augmented pseudo-labeled data may be input to the first teacher model. When the pseudo-label data in the newly added auxiliary set is input into the basic model, and the pseudo-label data in the newly added auxiliary set is input into the second teacher model, a fourth number of pseudo-label data can be selected from the newly added auxiliary set, data augmentation is performed on each selected pseudo-label data, and the pseudo-label data after data augmentation is input into the basic model, and the pseudo-label data after data augmentation is input into the second teacher model. In the above process, the first number, the second number, the third number, and the fourth number can satisfy a preset number ratio.

[0035] Step 103: determine a target loss value based on the first loss value, the second loss value, and the third loss value, and train the basic model based on the target loss value to obtain a trained target model. Exemplarily, the target model is used to perform data processing on the data to be processed. For example, the data to be processed can be input to the target model, and the target model performs data processing on the data to be processed to obtain a data processing result.

[0036] Exemplarily, determining the target loss value based on the first loss value, the second loss value and the third loss value may include but is not limited to: determining the target loss value based on the sum of the first loss value, the second loss value and the third loss value, that is, the target loss value may be the sum of these three loss values.

[0037] It can be seen from the above technical solutions that in the embodiment of the present application, the basic model can be trained based on the basic data set, the basic auxiliary set, the newly added data set and the newly added auxiliary set to obtain the target model. The basic data set and the basic auxiliary set are data sets for old tasks, which are used to ensure the performance of the target model on the old tasks and avoid catastrophic forgetting problems. The basic data set includes labeled data, and the basic auxiliary set includes pseudo-labeled data (i.e., pseudo-labeled data obtained based on unlabeled data). Obviously, a small amount of labeled data and a large amount of unlabeled data can ensure the performance of the target model on the old tasks, avoid catastrophic forgetting problems, and do not need to store a large amount of labeled data, reducing the storage requirements of labeled data. In addition, the newly added data set and the newly added auxiliary set are data sets for incremental tasks, which are used to ensure the performance of the target model on incremental tasks. The newly added data set includes labeled data, and the newly added auxiliary set includes pseudo-labeled data (i.e., pseudo-labeled data obtained based on unlabeled data). Obviously, a small amount of labeled data and a large amount of unlabeled data can ensure the performance of the target model on incremental tasks, and do not need to store a large amount of labeled data, reducing the storage requirements of labeled data. In addition, a large amount of unlabeled data can be used to improve the generalization performance of the target model.

[0038] The technical solution of the embodiment of the present application is described below in conjunction with specific application scenarios.

[0039] In order to train a machine learning model, it is usually necessary to obtain a large amount of labeled data, which is gradually obtained as demand increases. This requires the machine learning model to have the ability to learn continuously, that is, incremental learning, which can also be called continuous learning or lifelong learning. The goal of incremental learning is to overcome the problem of "catastrophic forgetting" on old data when the machine learning model learns new data.

[0040] See also Figure 2As shown, it is a schematic diagram of the incremental learning process. After the basic model is obtained based on the labeled basic data, part of the labeled basic data will be stored, and the incremental model will be obtained based on the labeled basic data and the labeled incremental data. That is, the incremental model is obtained by continuous learning or incremental learning of the basic model, and the incremental model needs to avoid "catastrophic forgetting" on the labeled basic data.

[0041] Obviously, when there is more labeled basic data, the incremental model can be guaranteed to "catastrophically forget" the labeled basic data, but the storage requirement is also greater. In the incremental learning process, a large amount of labeled basic data will not be stored, which makes it difficult to maintain the performance of the incremental model on the old data, and there is a problem of catastrophic forgetting of the old data. As the incremental tasks increase, there is a problem of large storage requirements.

[0042] In fact, there is a large amount of unlabeled data in real-world scenarios. If these unlabeled data can be effectively used, the "catastrophic forgetting" problem in the case of a small amount of labeled data can be solved, and the problem of growing storage requirements can be solved. In addition, incremental tasks are often unpredictable. When facing some scenarios where labeled samples are very rare (such as medical images), the model may overfit due to the scarcity of labeled incremental data. At this time, a large amount of unlabeled data can also be used to improve the generalization performance of the model.

[0043] Based on the above findings, an incremental learning method based on semi-supervised learning is proposed in the embodiments of the present application. Semi-supervised learning (SSL) is a learning paradigm that uses a small amount of labeled data and a large amount of unlabeled data to train model parameters. In this embodiment, unlabeled data can be effectively used for incremental learning, thereby solving the "catastrophic forgetting" problem and improving the performance of the model on old and new data in the incremental learning process under the premise of limited storage space.

[0044] See also Figure 3 FIG. 1 is a flow chart of an incremental learning method, which may include:

[0045] Step 301: Obtain a basic model, a basic data set corresponding to an old task, and a newly added data set corresponding to an incremental task, wherein the basic data set includes labeled data, and the newly added data set includes labeled data.

[0046] For example, assume that the machine learning model encounters t tasks in actual application (different tasks are used to achieve different functions, such as detection tasks, classification tasks, segmentation tasks, etc., and there is no restriction on the type of task, such as task 1 is used to detect category 1 and category 2, task 2 is used to detect category 1, category 2 and category 3, and so on), the first t-1 tasks are called old tasks, the machine learning model obtained on the old tasks is called the basic model, the labeled data set corresponding to the stored old tasks is called the basic data set, the tth task is called the incremental task, and the labeled data set corresponding to the incremental task is called the newly added data set.

[0047] Exemplarily, the basic model can be a machine learning model, such as a machine learning model based on a deep learning algorithm, a machine learning model based on a neural network, etc., and there is no restriction on the type of the basic model. Regarding the structure of the basic model, there is no restriction in this embodiment, and regarding the function of the basic model, there is no restriction in this embodiment, such as being used to implement detection tasks, classification tasks, segmentation tasks, etc.

[0048] In this embodiment, the basic model may be a basic model corresponding to the first t-1 tasks (the first t-1 tasks are called old tasks), that is, the basic model is trained based on the labeled data corresponding to the first t-1 tasks. The labeled data used to train the basic model corresponds to the basic data set. For example, part of the labeled data used to train the basic model is stored in the basic data set, that is, the basic data set includes a small amount of labeled data.

[0049] Among them, the basic data set may include multiple labeled data (such as labeled images, etc.), and for each labeled data, the labeled data corresponds to calibration information, and this calibration information is the actual label corresponding to the labeled data. For example, for classification tasks, the actual label can be the calibration category. For detection tasks, the actual label can be the calibration box (for example, when the calibration box is a rectangular calibration box, it can be the coordinates of the four vertices of the rectangular calibration box) and the calibration category (that is, the category of the target object in the calibration box). For segmentation tasks, the actual label can be the category of each pixel.

[0050] In this embodiment, the tth task is called an incremental task. In the incremental learning process, the basic model needs to be trained to obtain a target model corresponding to the incremental task. The target model is the model corresponding to the tth task. The labeled data used to train the target model corresponds to the newly added data set, and these labeled data are stored in the newly added data set.

[0051] The newly added data set may include multiple labeled data. For each labeled data, the labeled data has corresponding calibration information, and the calibration information is the actual label corresponding to the labeled data.

[0052] In summary, we can obtain the basic model, basic data set and newly added data set. The sample data in the basic data set is labeled data, and the sample data in the newly added data set is labeled data.

[0053] Step 302: Obtain the first teacher model corresponding to the old task.

[0054] Exemplarily, the first teacher model can be generated based on the basic model, the network structure of the first teacher model can be the same as the network structure of the basic model, and the network parameters of the first teacher model can be the same as or different from the network parameters of the basic model. For example, the basic model is directly used as the first teacher model, or the network parameters of the basic model are adjusted, and the adjusted basic model is used as the first teacher model.

[0055] Step 303: Obtain a basic auxiliary set corresponding to the old task, where the basic auxiliary set includes pseudo-label data.

[0056] Exemplarily, an unlabeled data set may be obtained, the unlabeled data set includes a plurality of unlabeled data (such as unlabeled images, etc.), and each unlabeled data in the unlabeled data set has no calibration information. For each unlabeled data in the unlabeled data set, the unlabeled data may be input into a basic model to obtain pseudo-label data corresponding to the unlabeled data, and the pseudo-label data may include a predicted pseudo-label and a predicted probability value.

[0057] For example, for each unlabeled data in the unlabeled data set, the unlabeled data can be input into the basic model, and the basic model processes the unlabeled data to obtain the predicted pseudo-label and predicted probability value corresponding to the unlabeled data, and the predicted pseudo-label and the predicted probability value are called the pseudo-label data corresponding to the unlabeled data. For example, for classification tasks, the predicted pseudo-label may include a predicted category (i.e., the category of the target object), and the predicted probability value may include a probability value corresponding to the predicted category (i.e., the probability value that the target object is the predicted category). For detection tasks, the predicted pseudo-label may include a predicted box and a predicted category, and the predicted probability value may include a probability value corresponding to the predicted box and a probability value corresponding to the predicted category. For segmentation tasks, the predicted pseudo-label may include the category of each pixel, and the predicted probability value may include a probability value corresponding to the category of each pixel.

[0058] In summary, after multiple unlabeled data in the unlabeled data set are input into the basic model, multiple pseudo-label data can be obtained, and each pseudo-label data includes a predicted pseudo-label and a predicted probability value.

[0059] Exemplarily, for each label supported by the basic model, the pseudo-label data corresponding to the label is determined based on the predicted pseudo-label in each pseudo-label data, that is, the pseudo-label data corresponding to the predicted pseudo-label and the label. For example, taking the basic model of the classification task as an example, the basic model can support multiple categories, each category is a label, such as the basic model supports category 1, category 2 and category 3. Since the predicted pseudo-label of the pseudo-label data includes the predicted category, the pseudo-label data corresponding to category 1 can be selected from all pseudo-label data, the pseudo-label data corresponding to category 2 can be selected from all pseudo-label data, and the pseudo-label data corresponding to category 3 can be selected from all pseudo-label data.

[0060] Exemplarily, for each label supported by the basic model, based on the predicted probability value in the pseudo-label data corresponding to the label, N1 pseudo-label data with large predicted probability values ​​are selected as pseudo-label data in the basic auxiliary set, where N1 is a positive integer. For example, based on the order of the predicted probability values ​​in each pseudo-label data from large to small, the pseudo-label data are sorted, and the top N1 pseudo-label data are selected and stored in the basic auxiliary set. Alternatively, based on the order of the predicted probability values ​​in each pseudo-label data from small to large, the pseudo-label data are sorted, and the bottom N1 pseudo-label data are selected and stored in the basic auxiliary set.

[0061] For example, assuming that the basic model supports category 1, category 2, and category 3, the basic auxiliary set may include N1 pseudo-label data with large predicted probability values ​​among all pseudo-label data corresponding to category 1, N1 pseudo-label data with large predicted probability values ​​among all pseudo-label data corresponding to category 2, and N1 pseudo-label data with large predicted probability values ​​among all pseudo-label data corresponding to category 3.

[0062] In summary, a basic auxiliary set can be obtained, which includes a plurality of pseudo-label data. For the pseudo-label data, the pseudo-label data may include a predicted pseudo-label and a predicted probability value.

[0063] In summary, it can be seen that the domain matching of the basic model can be performed on the unlabeled data, pseudo-labeled data can be generated and screened to obtain a basic auxiliary set. In practical applications, the unlabeled data may come from various different fields and include many noise samples. Therefore, in this embodiment, after obtaining a large amount of pseudo-labeled data corresponding to a large amount of unlabeled data, the pseudo-labeled data can be screened to obtain a basic auxiliary set.

[0064] Step 304: Obtain a second teacher model corresponding to the incremental task. For example, the basic model can be trained using the basic data set, the basic auxiliary data set, and the newly added data set to obtain the second teacher model.

[0065] In a possible implementation, based on the basic data set, the basic auxiliary set and the newly added data set, the basic model can be trained using the following steps to obtain a second teacher model:

[0066] Step 3041: input the labeled data in the basic data set (such as each labeled data in the basic data set) into the basic model to obtain the predicted label and predicted probability value corresponding to the labeled data; determine the first confidence loss value based on the predicted label and predicted probability value corresponding to each labeled data.

[0067] Exemplarily, for the second teacher model, the labeled data in the basic data set can be equivalent to unlabeled data, that is, there is no need to consider the calibration information corresponding to the labeled data (such as the actual label), and the first confidence loss value can be determined based on the predicted label and predicted probability value corresponding to the labeled data.

[0068] For example, for each labeled data in the basic data set, the labeled data can be input into the basic model, and the basic model processes the labeled data to obtain the predicted label and predicted probability value corresponding to the labeled data. For example, for classification tasks, the predicted label can include a predicted category, and the predicted probability value can include a probability value corresponding to the predicted category. For detection tasks, the predicted label can include a predicted box and a predicted category, and the predicted probability value can include a probability value corresponding to the predicted box and a probability value corresponding to the predicted category. For segmentation tasks, the predicted label can include the category of each pixel, and the predicted probability value can include a probability value corresponding to the category of each pixel.

[0069] Based on the predicted label and predicted probability value corresponding to each labeled data in the basic data set, the first confidence loss value can be determined. For example, a loss function can be pre-configured, the input of which is the predicted label and predicted probability value, and the output of which is the confidence loss value. On this basis, after obtaining the predicted label and predicted probability value corresponding to the labeled data, the predicted label and predicted probability value corresponding to the labeled data can be substituted into the loss function to obtain the confidence loss value. For the sake of distinction, the confidence loss value corresponding to the basic data set is called the first confidence loss value.

[0070] In a possible implementation, an example of the loss function can be shown in formula (1). Of course, formula (1) is only an example, and this embodiment does not limit the loss function.

[0071]

[0072] In formula (1), θ and φ represent the network parameters corresponding to the basic model, that is, the loss function for the basic model, D represents the number of labeled data in the basic data set, and L cnf (θ, φ; D) represents the first confidence loss value corresponding to the basic data set. x∈D represents the xth labeled data in the basic data set, T represents that the target model corresponding to the incremental task supports a total of T labels (e.g., the basic model supports categories 1, 2, and 3, and the incremental task supports categories 4 and 5, then the target model supports categories 1, 2, 3, 4, and 5), and y∈T represents the yth label among the T labels.

[0073] In formula (1), p(y|x; θ, φ) represents the predicted probability value output by the basic model. For example, when the basic model outputs the predicted label and predicted probability value corresponding to the labeled data, a probability vector can be output, which includes the predicted probability values ​​corresponding to T labels. Assuming that the T labels are category 1, category 2, category 3, category 4, and category 5, the basic model outputs the probability vector [a1, a2, a3, a4, a5], where a1 represents the predicted probability value corresponding to category 1, a2 represents the predicted probability value corresponding to category 2, a3 represents the predicted probability value corresponding to category 3, a4 represents the predicted probability value corresponding to category 4, and a5 represents the predicted probability value corresponding to category 5. In summary, for each labeled data, T predicted probability values ​​corresponding to the labeled data can be obtained, and these T predicted probability values ​​correspond to the T labels.

[0074] Based on the predicted label and predicted probability value corresponding to each labeled data in the basic data set, that is, the T predicted probability values ​​corresponding to the T labels, the first confidence loss value can be obtained based on formula (1).

[0075] Step 3042: input the pseudo-label data in the basic auxiliary set (such as each pseudo-label data in the basic auxiliary set) into the basic model to obtain the predicted label and predicted probability value corresponding to the pseudo-label data; determine the second confidence loss value based on the predicted label and predicted probability value corresponding to each pseudo-label data.

[0076] Exemplarily, for the second teacher model, the pseudo-label data in the basic auxiliary set can be equivalent to unlabeled data, and the second confidence loss value can be determined based on the predicted label and the predicted probability value.

[0077] For example, for each pseudo-label data in the basic auxiliary set, the pseudo-label data can be input into the basic model, and the basic model processes the pseudo-label data to obtain the predicted label and predicted probability value corresponding to the pseudo-label data. Based on the predicted label and predicted probability value corresponding to each pseudo-label data in the basic auxiliary set, the second confidence loss value can be determined. For example, a loss function is pre-configured, the input of the loss function is the predicted label and predicted probability value, and the output of the loss function is the confidence loss value. On this basis, after obtaining the predicted label and predicted probability value corresponding to the pseudo-label data, the predicted label and predicted probability value corresponding to the pseudo-label data can be substituted into the loss function to obtain the confidence loss value. The confidence loss value corresponding to the basic auxiliary set is called the second confidence loss value.

[0078] In a possible implementation, the loss function may be the same as formula (1). Of course, the loss function may also be different from formula (1). In the following, the case where the loss function is the same as formula (1) is taken as an example. In formula (1), θ and φ represent the network parameters corresponding to the basic model, D represents the number of pseudo-label data in the basic auxiliary set, and L cnf (θ, φ; D) represents the second confidence loss value corresponding to the basic auxiliary set. x∈D represents the xth pseudo-label data in the basic auxiliary set, T represents that the target model corresponding to the incremental task supports a total of T labels, and y∈T represents the yth label among the T labels. p(y|x; θ, φ) represents the predicted probability value output by the basic model, such as the T predicted probability values ​​corresponding to the pseudo-label data. Obviously, based on the predicted label and predicted probability value corresponding to each pseudo-label data in the basic auxiliary set, that is, the T predicted probability values ​​corresponding to the T labels, the second confidence loss value can be obtained based on formula (1).

[0079] The physical meaning of the loss function shown in formula (1) is: set T labels for each unlabeled data (that is, pseudo-labeled data and labeled data are equivalent to unlabeled data) so that each label can play a role of mutual restraint, and finally make the probability output of each label of the unlabeled data in the model obey a uniform distribution.

[0080] For example, the basic model will give a higher confidence score to samples that belong to the training data domain, but it may also encounter the problem of "overconfidence" of the model, that is, the model will also give a higher score to some samples that do not belong to the training data domain, that is, the pseudo-label data in the basic auxiliary set may be samples that do not belong to the training data domain. On this basis, by designing the confidence loss function L cnfTo constrain the model training process, so as to perform confidence correction on the unlabeled data, that is, to design a confidence correction network, see the confidence correction network shown in formula (1), to achieve high confidence scores for samples belonging to the training data field, and to give low confidence scores that are similar in all categories to samples that do not belong to the training data field (such as obeying a uniform distribution), so that samples outside the field can be easily identified.

[0081] Step 3043: input the labeled data in the newly added data set (such as each labeled data in the newly added data set) into the basic model to obtain the predicted label corresponding to the labeled data; determine the task loss value based on the predicted label and actual label corresponding to each labeled data in the newly added data set.

[0082] Exemplarily, for the second teacher model, the labeled data in the newly added data set can be equivalent to labeled data, that is, the calibration information corresponding to the labeled data (such as the actual label) needs to be considered, and the task loss value can be determined based on the predicted label and the actual label corresponding to the labeled data.

[0083] For example, for each labeled data in the newly added data set, the labeled data can be input into the basic model, and the basic model processes the labeled data to obtain the predicted label and predicted probability value corresponding to the labeled data. Based on the predicted label and actual label corresponding to each labeled data in the newly added data set, the task loss value can be determined. For example, a loss function can be pre-configured, the input of the loss function is the predicted label and the actual label, and the output of the loss function is the task loss value. On this basis, after obtaining the predicted label corresponding to the labeled data, the predicted label and the actual label corresponding to the labeled data can be substituted into the loss function to obtain the task loss value.

[0084] In a possible implementation, an example of the loss function can be shown in formula (2). Of course, formula (2) is only an example, and this embodiment does not limit this loss function. In formula (2), the cross entropy loss function of the classification task is taken as an example. For detection tasks, segmentation tasks and other tasks, task loss functions can also be designed, and the design method of this task loss function is not limited.

[0085]

[0086] In formula (2), θ and φ represent the network parameters corresponding to the basic model, D represents the total number of labeled data in the newly added data set, and L cls(θ, φ; D) represents the task loss value corresponding to the newly added data set. x∈D represents the x-th labeled data in the newly added data set, and (x, y)∈D represents the actual label corresponding to the x-th labeled data in the newly added data set. p(y|x; θ, φ) represents the matching value between the predicted label and the actual label. If the predicted label corresponding to the labeled data output by the basic model is the same as the actual label corresponding to the labeled data, the matching value is the first value (such as 1). If the predicted label corresponding to the labeled data output by the basic model is different from the actual label corresponding to the labeled data, the matching value is the second value (such as 0).

[0087] Among them, the predicted label corresponding to the labeled data output by the basic model refers to the label with the largest predicted probability value. For example, assuming that the basic model supports multiple labels, the basic model can output the predicted probability value corresponding to each label, and use the label with the largest predicted probability value as the predicted label corresponding to the labeled data.

[0088] In summary, based on the predicted label corresponding to each labeled data in the newly added data set and the actual label corresponding to the labeled data, the task loss value can be obtained based on formula (2).

[0089] Step 3044: Train the basic model based on the first confidence loss value, the second confidence loss value, and the task loss value to obtain a trained second teacher model. For example, a target loss value can be determined based on the first confidence loss value, the second confidence loss value, and the task loss value, and the basic model can be fine-tuned based on the target loss value to obtain a trained second teacher model.

[0090] Exemplarily, the sum of the first confidence loss value, the second confidence loss value and the task loss value can be determined as the target loss value. See formula (3), which is an example of determining the target loss value.

[0091]

[0092] D t Indicates a new data set, L cls (θ,φ t ;D t ) represents the task loss value corresponding to the newly added data set, represents the basic data set, represents the basic auxiliary set, Represents the first confidence loss value corresponding to the basic data set, Represents the second confidence loss value corresponding to the basic auxiliary set, Γ represents the sum of the first confidence loss value and the second confidence loss value.

[0093] in, Represents representative samples of the previous t-1 tasks (i.e., the basic data set. There are many ways to select it. Generally, a fixed number of samples are randomly selected for each task. The number of samples selected is appropriately set according to the memory space. Generally, the more the number, the better the performance retention of the old tasks).

[0094] For example, for task t, the basic dataset and basic auxiliary set All of them are OOD (Out Of Distribution). OOD refers to samples that belong to different distributions from the training data. These samples will interfere with the prediction results of the model. When calculating the loss value, the expected output on the second teacher model is that the confidence of each category is evenly distributed, as shown in formula (1). Finally, the overall training loss of the second teacher model is the sum of the task loss and the confidence loss, as shown in formula (3).

[0095] Exemplarily, after obtaining the target loss value, the network parameters of the basic model can be adjusted based on the target loss value to obtain an adjusted model, such as adjusting the network parameters of the basic model by using a gradient descent method, etc. This embodiment does not limit this adjustment process. Then, it is determined whether the adjusted model has converged. If not, the adjusted model is used as the basic model, and the process returns to step 3041 to repeat the above steps. If so, the adjusted model is used as the second teacher model, and the second teacher model is obtained.

[0096] Among them, if the number of iterations of the basic model reaches the number threshold (which can be configured based on experience), it is determined that the adjusted model has converged; if the number of iterations of the basic model does not reach the number threshold, it is determined that the adjusted model has not converged. Alternatively, if the target loss value of the basic model is less than the loss value threshold, it is determined that the adjusted model has converged; if the target loss value of the basic model is not less than the loss value threshold, it is determined that the adjusted model has not converged. Alternatively, if the iteration duration of the basic model reaches the duration threshold (which can be configured based on experience), it is determined that the adjusted model has converged; if the iteration duration of the basic model does not reach the duration threshold, it is determined that the adjusted model has not converged. Of course, the above are just a few examples and there is no limitation to this.

[0097] In summary, in step 304, the basic model can be adjusted based on the basic data set, the basic auxiliary set and the newly added data set, and optimized using the confidence correction loss to obtain the second teacher model.

[0098] Step 305: Obtain a newly added auxiliary set corresponding to the incremental task, where the newly added auxiliary set includes pseudo-label data.

[0099] Exemplarily, an unlabeled data set may be obtained, and the unlabeled data set may include multiple unlabeled data (such as unlabeled images, etc.), and each unlabeled data in the unlabeled data set has no calibration information. For each unlabeled data in the unlabeled data set, the unlabeled data may be input into the second teacher model, and the second teacher model processes the unlabeled data to obtain pseudo-label data corresponding to the unlabeled data, and the pseudo-label data may include predicted pseudo-labels and predicted probability values.

[0100] In summary, after multiple unlabeled data in the unlabeled data set are input into the second teacher model, multiple pseudo-label data can be obtained, and each pseudo-label data includes a predicted pseudo-label and a predicted probability value.

[0101] Exemplarily, for each label supported by the second teacher model, the pseudo-label data corresponding to the label is determined based on the predicted pseudo-label in each pseudo-label data, that is, the pseudo-label data corresponding to the predicted pseudo-label. For example, taking the second teacher model of the classification task as an example, the second teacher model can support multiple categories, each category is a label, such as supporting category 1, category 2 and category 3. Since the predicted pseudo-label of the pseudo-label data includes the predicted category, the pseudo-label data corresponding to category 1 can be selected from all pseudo-label data, the pseudo-label data corresponding to category 2 can be selected from all pseudo-label data, and the pseudo-label data corresponding to category 3 can be selected from all pseudo-label data.

[0102] Exemplarily, for each label supported by the second teacher model, based on the predicted probability value in the pseudo-label data corresponding to the label, N2 pseudo-label data with large predicted probability values ​​are selected as pseudo-label data in the newly added auxiliary set, where N2 is a positive integer. For example, based on the order of the predicted probability values ​​in each pseudo-label data from large to small, the pseudo-label data are sorted, and the top N2 pseudo-label data are selected and stored in the newly added auxiliary set. Alternatively, based on the order of the predicted probability values ​​in each pseudo-label data from small to large, the pseudo-label data are sorted, and the bottom N2 pseudo-label data are selected and stored in the newly added auxiliary set.

[0103] For example, assuming that the second teacher model supports category 1, category 2, and category 3, the newly added auxiliary set may include N2 pseudo-label data with large predicted probability values ​​among all pseudo-label data corresponding to category 1, N2 pseudo-label data with large predicted probability values ​​among all pseudo-label data corresponding to category 2, and N2 pseudo-label data with large predicted probability values ​​among all pseudo-label data corresponding to category 3.

[0104] In summary, a newly added auxiliary set can be obtained, which includes a plurality of pseudo-label data. For the pseudo-label data, the pseudo-label data may include predicted pseudo-labels and predicted probability values.

[0105] In summary, it can be seen that the domain matching of the second teacher model can be performed on the unlabeled data, pseudo-labeled data can be generated and screened to obtain a newly added auxiliary set. In practical applications, the unlabeled data may come from various different fields and include many noise samples. Therefore, in this embodiment, after obtaining a large amount of pseudo-labeled data corresponding to a large amount of unlabeled data, the pseudo-labeled data can be screened to obtain a newly added auxiliary set.

[0106] For example, the confidence score (i.e., the predicted probability value) is used when selecting the new auxiliary set, because the strategies of all the new auxiliary sets and the second teacher model can be analogized to the previous task T t-1 Above, for the tth newly added task T t , Represents the unlabeled data filtered out by the tth task, that is, the newly added auxiliary set.

[0107] Step 306: Train the basic model (i.e., the basic model obtained in step 301) based on the basic data set, the newly added data set, the basic auxiliary set, and the newly added auxiliary set to obtain a trained target model.

[0108] In a possible implementation, based on the basic data set, the newly added data set, the basic auxiliary set and the newly added auxiliary set, the basic model may be trained by the following steps to obtain a target model:

[0109] Step 3061: Input the labeled data in the basic data set and the newly added data set into the basic model to obtain the predicted labels corresponding to the labeled data; determine the first loss value based on the predicted labels corresponding to the labeled data and the actual labels corresponding to the labeled data, which is also called the task loss value.

[0110] Exemplarily, when the labeled data in the basic data set is input into the basic model, a first number of labeled data can be selected from the basic data set, and each selected labeled data is input into the basic model to obtain a predicted label corresponding to each labeled data. Alternatively, a first number of labeled data can be selected from the basic data set, and data augmentation is performed on each selected labeled data, and each labeled data after data augmentation is input into the basic model to obtain a predicted label corresponding to each labeled data.

[0111] Exemplarily, when the labeled data in the newly added data set is input into the basic model, a second number of labeled data can be selected from the newly added data set, and each selected labeled data is input into the basic model to obtain a predicted label corresponding to each labeled data. Alternatively, a second number of labeled data can be selected from the newly added data set, and data augmentation is performed on each selected labeled data, and each labeled data after data augmentation is input into the basic model to obtain a predicted label corresponding to each labeled data.

[0112] In the above embodiment, data augmentation for labeled data may include, but is not limited to, using spatial transformation and / or color transformation to augment labeled data, which is not limited. When performing data augmentation, random flipping, random cropping and other expansion operations may also be performed, which is not limited.

[0113] Exemplarily, for the target model, the labeled data in the basic data set can be equivalent to the labeled data, that is, the calibration information corresponding to the labeled data (such as the actual label) needs to be considered, and the loss value 1 (that is, the task loss value) can be determined based on the predicted label and the actual label corresponding to the labeled data.

[0114] For example, the labeled data in the basic data set can be input into the basic model, and the basic model processes the labeled data to obtain the predicted label and predicted probability value corresponding to the labeled data. Based on the predicted label and actual label corresponding to the labeled data in the basic data set, the loss value 1 can be determined. For example, a loss function can be pre-configured, the input of the loss function is the predicted label and the actual label, and the output of the loss function is the loss value 1. On this basis, after obtaining the predicted label corresponding to the labeled data, the predicted label and the actual label corresponding to the labeled data can be substituted into the loss function to obtain the loss value 1. For example, an example of the loss function can be shown in formula (2). Of course, formula (2) is only an example, and this loss function is not limited in this embodiment.

[0115] In formula (2), θ and φ represent the network parameters corresponding to the basic model, D represents the number of labeled data in the basic data set, and L cls(θ, φ; D) represents the loss value 1 corresponding to the basic data set. x∈D represents the x-th labeled data in the basic data set, and (x, y)∈D represents the actual label corresponding to the x-th labeled data in the basic data set. p(y|x; θ, φ) represents the matching value between the predicted label and the actual label. If the predicted label corresponding to the labeled data output by the basic model is the same as the actual label corresponding to the labeled data, the matching value is the first value (such as 1). If the predicted label corresponding to the labeled data output by the basic model is different from the actual label corresponding to the labeled data, the matching value is the second value (such as 0).

[0116] In summary, based on the predicted labels corresponding to the labeled data in the basic data set and the actual labels corresponding to the labeled data, the loss value 1 can be obtained based on the above formula (2).

[0117] Exemplarily, the labeled data in the newly added data set can be input into the basic model, and the basic model processes the labeled data to obtain the predicted label and predicted probability value corresponding to the labeled data. Based on the predicted label and actual label corresponding to the labeled data in the newly added data set, the loss value 2 (i.e., the task loss value) can be determined. The determination method of the loss value 2 is similar to the determination method of the loss value 1, except that the basic data set is replaced by the newly added data set. This embodiment will not be repeated in detail.

[0118] Exemplarily, after the loss value 1 and the loss value 2 are obtained, the first loss value can be determined based on the loss value 1 and the loss value 2, such as taking the sum of the loss value 1 and the loss value 2 as the first loss value.

[0119] In summary, the first loss value can be determined based on the basic data set and the newly added data set.

[0120] Step 3062: input the pseudo-label data in the basic auxiliary set to the basic model to obtain a first basic vector, input the pseudo-label data in the basic auxiliary set to the first teacher model to obtain a second basic vector, and determine a second loss value based on the first basic vector and the second basic vector. The second loss value can also be called an anti-forgetting regularized loss value, which is a loss value for knowledge distillation based on the first teacher model and the basic model.

[0121] Exemplarily, when the pseudo-label data in the basic auxiliary set is input into the basic model and the first teacher model, a third number of pseudo-label data can be selected from the basic auxiliary set, and each selected pseudo-label data is input into the basic model to obtain a first basic vector corresponding to each pseudo-label data, and each selected pseudo-label data can be input into the first teacher model to obtain a second basic vector corresponding to each pseudo-label data. Alternatively, a third number of pseudo-label data can be selected from the basic auxiliary set, data augmentation is performed on each selected pseudo-label data, and each pseudo-label data after data augmentation is input into the basic model to obtain a first basic vector corresponding to each pseudo-label data, and each pseudo-label data after data augmentation can be input into the first teacher model to obtain a second basic vector corresponding to each pseudo-label data.

[0122] In the above embodiment, data augmentation of the pseudo-label data may include, but is not limited to: data augmentation of the pseudo-label data by means of space transformation and / or color transformation, etc., which is not limited thereto.

[0123] Exemplarily, the basic model and the first teacher model both include M network layers, where M is a positive integer greater than 1, and a target network layer can be selected from the M network layers, and the target network layer is at least one network layer among the M network layers. For example, any network layer among the M network layers is used as the target network layer, such as the penultimate network layer as the target network layer, the last convolutional layer as the target network layer, the network layer before the prediction layer as the target network layer, the last layer of the backbone network as the target network layer, etc., without limitation. For another example, two network layers among the M network layers are used together as the target network layer, such as the penultimate network layer and the last layer of the backbone network are used together as the target network layer, and the last layer of the backbone network and the network layer before the prediction layer are used together as the target network layer, without limitation. For another example, three or more network layers among the M network layers are used together as the target network layer, without limitation.

[0124] Exemplarily, the first basis vector is a feature vector output by the target network layer of the base model, and the second basis vector is a feature vector output by the target network layer of the first teacher model. For example, after the pseudo-label data in the base auxiliary set is input to the base model, the feature vector output by the target network layer of the base model is obtained, and this feature vector is used as the first basis vector corresponding to the pseudo-label data. After the pseudo-label data in the base auxiliary set is input to the first teacher model, the feature vector output by the target network layer of the first teacher model is obtained, and this feature vector is used as the second basis vector corresponding to the pseudo-label data.

[0125] For example, if the last layer of the backbone network and the network layer before the prediction layer are used as the target network layer together, then after the pseudo-label data in the basic auxiliary set is input into the basic model, the feature vector a1 output by the last layer of the backbone network is obtained, and the feature vector a2 output by the network layer before the prediction layer is obtained, and the feature vector a1 and the feature vector a2 are combined to obtain the first basic vector.

[0126] After the pseudo-label data in the basic auxiliary set is input into the first teacher model, the feature vector b1 output by the last layer of the backbone network is obtained, and the feature vector b2 output by the network layer before the prediction layer is obtained. The feature vector b1 and the feature vector b2 are combined to obtain the second basic vector.

[0127] Exemplarily, for the target model, the pseudo-label data in the basic auxiliary set can be equivalent to unlabeled data, and the second loss value can be determined based on the first basis vector and the second basis vector. For example, the pseudo-label data in the basic auxiliary set can be input into the basic model, and the basic model processes the pseudo-label data to obtain the first basis vector corresponding to the pseudo-label data. And, the pseudo-label data is input into the first teacher model, and the first teacher model processes the pseudo-label data to obtain the second basis vector corresponding to the pseudo-label data. Based on the first basis vector and the second basis vector corresponding to the multiple pseudo-label data in the basic auxiliary set, the second loss value, i.e., the anti-forgetting regularization loss value, can be determined.

[0128] For example, a loss function is pre-configured, the input of which is the first basis vector and the second basis vector, and the output of which is the second loss value. On this basis, after obtaining the first basis vector and the second basis vector corresponding to the pseudo-label data, the first basis vector and the second basis vector corresponding to the pseudo-label data can be substituted into the loss function to obtain the second loss value.

[0129] In a possible implementation, an example of the loss function can be shown in formula (4). Of course, formula (4) is only an example, and this embodiment does not limit the loss function.

[0130]

[0131] In formula (4), θ and φ represent the network parameters corresponding to the basic model, R = {θ R ,φ R}, represents the network parameters corresponding to the first teacher model, and formula (4) represents the calculation of the loss value by constraining the consistency of the basic model with the basic vectors of the first teacher model (i.e., the first basic vector and the second basic vector).

[0132] D means there are D pseudo-label data in the basic auxiliary set, L dist (θ, φ; R, D) represents the second loss value corresponding to the basic auxiliary set. x∈D represents the xth pseudo-label data in the basic auxiliary set, T represents that the target model corresponding to the incremental task supports a total of T labels, and y∈T represents the yth label among the T labels. p1(y|x; θ R ,φ R ) represents the second basis vector output by the first teacher model, and p2(y|x; θ, φ) represents the first basis vector output by the basic model. Obviously, based on the first basis vector and the second basis vector corresponding to the pseudo-label data in the basic auxiliary set, the second loss value can be obtained based on formula (4).

[0133] In summary, the second loss value, namely the anti-forgetting regularized loss value, can be obtained based on the basic auxiliary set.

[0134] Step 3063: input the pseudo-label data in the newly added auxiliary set to the basic model to obtain a first newly added vector, input the pseudo-label data in the newly added auxiliary set to the second teacher model to obtain a second newly added vector, and determine a third loss value based on the first newly added vector and the second newly added vector. The third loss value can also be called a knowledge transfer regularization loss value, which is a loss value for knowledge distillation based on the second teacher model and the basic model.

[0135] Exemplarily, when the pseudo-label data in the newly added auxiliary set is input into the basic model and the second teacher model, a fourth number of pseudo-label data can be selected from the newly added auxiliary set, and each selected pseudo-label data is input into the basic model to obtain a first newly added vector corresponding to each pseudo-label data, and each selected pseudo-label data can be input into the second teacher model to obtain a second newly added vector corresponding to each pseudo-label data. Alternatively, a fourth number of pseudo-label data can be selected from the newly added auxiliary set, data augmentation is performed on each selected pseudo-label data, and each pseudo-label data after data augmentation is input into the basic model to obtain a first newly added vector corresponding to each pseudo-label data, and each pseudo-label data after data augmentation can be input into the second teacher model to obtain a second newly added vector corresponding to each pseudo-label data.

[0136] In the above embodiment, data augmentation of the pseudo-label data may include, but is not limited to: data augmentation of the pseudo-label data by means of space transformation and / or color transformation, etc., which is not limited thereto.

[0137] Exemplarily, the basic model and the second teacher model both include M network layers, where M is a positive integer greater than 1, and a target network layer can be selected from the M network layers, and the target network layer is at least one network layer among the M network layers. For example, any network layer among the M network layers is used as the target network layer, such as the second-to-last network layer as the target network layer, the last convolutional layer as the target network layer, the network layer before the prediction layer as the target network layer, the last layer of the backbone network as the target network layer, etc., without limitation. For another example, two network layers among the M network layers are used together as the target network layer, such as the second-to-last network layer and the last layer of the backbone network are used together as the target network layer, and the last layer of the backbone network and the network layer before the prediction layer are used together as the target network layer, without limitation. For another example, three or more network layers among the M network layers are used together as the target network layer, without limitation.

[0138] Exemplarily, the first newly added vector is the feature vector output by the target network layer of the base model, and the second newly added vector is the feature vector output by the target network layer of the second teacher model. For example, after the pseudo-label data in the newly added auxiliary set is input to the base model, the feature vector output by the target network layer of the base model is obtained, and this feature vector is used as the first newly added vector corresponding to the pseudo-label data. After the pseudo-label data in the newly added auxiliary set is input to the second teacher model, the feature vector output by the target network layer of the second teacher model is obtained, and this feature vector is used as the second newly added vector corresponding to the pseudo-label data.

[0139] Exemplarily, for the target model, the pseudo-label data in the newly added auxiliary set can be equivalent to unlabeled data, and the third loss value can be determined based on the first newly added vector and the second newly added vector. For example, the pseudo-label data in the newly added auxiliary set can be input into the basic model, and the basic model processes the pseudo-label data to obtain the first newly added vector corresponding to the pseudo-label data. And, the pseudo-label data is input into the second teacher model, and the second teacher model processes the pseudo-label data to obtain the second newly added vector corresponding to the pseudo-label data. Based on the first newly added vector and the second newly added vector corresponding to the multiple pseudo-label data in the newly added auxiliary set, the third loss value, that is, the knowledge transfer regularization loss value, can be determined.

[0140] For example, a loss function is pre-configured, the input of which is the first newly added vector and the second newly added vector, and the output of which is the third loss value. On this basis, after obtaining the first newly added vector and the second newly added vector corresponding to the pseudo-label data, the first newly added vector and the second newly added vector corresponding to the pseudo-label data can be substituted into the loss function to obtain the third loss value.

[0141] For example, an example of the loss function can be seen in formula (4). Formula (4) is only an example and does not limit the loss function. In formula (4), θ and φ represent the network parameters corresponding to the basic model, R = {θ R ,φ R}, represents the network parameters corresponding to the second teacher model. L dist (θ, φ; R, D) represents the third loss value corresponding to the newly added auxiliary set. p1(y|x; θ R ,φ R ) represents the second newly added vector output by the second teacher model, and p2(y|x; θ, φ) represents the first newly added vector output by the basic model. Based on the first newly added vector and the second newly added vector corresponding to the pseudo-label data in the newly added auxiliary set, the third loss value can be obtained.

[0142] In summary, based on the newly added auxiliary set, the third loss value, namely the knowledge transfer regularization loss value, can be obtained.

[0143] In the above embodiment, the first number, the second number, the third number and the fourth number can be configured according to experience, and there is no limitation on this, and they can be configured arbitrarily. For example, the first number, the second number, the third number and the fourth number can satisfy a preset ratio, such as the ratio between the first number, the second number, the third number and the fourth number is s1:s2:s3:s4, such as s1:s2:s3:s4 can be 1:1:1:1, s1:s2:s3:s4 can be 2:2:1:1, s1:s2:s3:s4 can be 4:3:2:1, of course, the above are just a few examples of s1:s2:s3:s4, and there is no limitation on the ratio of s1:s2:s3:s4.

[0144] Step 3064: determine a target loss value based on the first loss value, the second loss value, and the third loss value.

[0145] For example, the target loss value may be determined based on the sum of the first loss value (i.e., the task loss value), the second loss value (i.e., the anti-forgetting regularized loss value of knowledge distillation), and the third loss value (i.e., the knowledge transfer regularized loss value of knowledge distillation). The sum of the second loss value and the third loss value may be the distillation loss value used for knowledge distillation.

[0146] Step 3065: Train the basic model based on the target loss value to obtain a trained target model.

[0147] Exemplarily, after obtaining the target loss value, the network parameters of the basic model can be adjusted based on the target loss value to obtain an adjusted model, such as adjusting the network parameters of the basic model by using a gradient descent method, etc. This embodiment does not limit this adjustment process. Then, it is determined whether the adjusted model has converged. If not, the adjusted model is used as the basic model, and the process returns to step 3061 to repeat the above steps. If so, the adjusted model is used as the target model, and the target model is obtained.

[0148] Among them, if the number of iterations of the basic model reaches the number threshold, it is determined that the adjusted model has converged, and if the number of iterations of the basic model does not reach the number threshold, it is determined that the adjusted model has not converged. Alternatively, if the target loss value of the basic model is less than the loss value threshold, it is determined that the adjusted model has converged, and if the target loss value of the basic model is not less than the loss value threshold, it is determined that the adjusted model has not converged. Alternatively, if the iteration duration of the basic model reaches the duration threshold, it is determined that the adjusted model has converged, and if the iteration duration of the basic model does not reach the duration threshold, it is determined that the adjusted model has not converged. Of course, the above are just a few examples.

[0149] In summary, in step 306, the basic model can be trained based on the basic data set, the basic auxiliary set, the newly added data set and the newly added auxiliary set to obtain a trained target model.

[0150] Exemplarily, after obtaining the target model, the target model can be deployed, and the target model performs data processing on the data to be processed to obtain the data processing result. For example, if the target model is used to implement the classification function, the data to be processed can be input into the target model, and the target model performs data processing on the data to be processed, thereby obtaining the classification result. If the target model is used to implement the detection function, the data to be processed can be input into the target model, and the target model performs data processing on the data to be processed, thereby obtaining the detection result. If the target model is used to implement the segmentation function, the data to be processed can be input into the target model, and the target model performs data processing on the data to be processed, thereby obtaining the segmentation result.

[0151] It can be seen from the above technical solutions that in the embodiments of the present application, a small amount of labeled data and a large amount of unlabeled data can ensure the performance of the target model on the old tasks, avoid catastrophic forgetting problems, do not need to store a large amount of labeled data, and reduce the storage requirements of labeled data. A large amount of unlabeled data can be used to improve the generalization performance of the target model. An unlabeled data set and its pseudo-labels that match the basic domain (the domain where the basic data is located) and the newly added domain (the domain where the newly added data is located) are obtained through an effective data domain matching method to improve the validity of the sample. The confidence correction loss is used to train the second teacher model, thereby improving the performance of the second teacher model and improving the quality of selecting unlabeled samples. In incremental training, pseudo-labels and knowledge distillation are used simultaneously to maintain the performance of old samples. Feature distillation is mainly used in knowledge distillation to avoid classification preferences brought by category prediction vectors, and support classification, detection, segmentation and other tasks.

[0152] Based on the same application concept as the above method, a data processing device is proposed in the embodiment of the present application, see Figure 4 FIG. 1 is a schematic diagram of the structure of the data processing device, which may include:

[0153] An acquisition module 41 is used to acquire a basic model to be trained; acquire a first teacher model, a basic data set, and a basic auxiliary set corresponding to an old task, wherein the basic data set includes labeled data, and the basic auxiliary set includes pseudo-labeled data; acquire a second teacher model, a new data set, and a new auxiliary set corresponding to an incremental task, wherein the new data set includes labeled data, and the new auxiliary set includes pseudo-labeled data;

[0154] A determination module 42 is used to input the labeled data in the basic data set and the newly added data set into the basic model to obtain the predicted label corresponding to the labeled data; determine a first loss value based on the predicted label corresponding to the labeled data and the actual label corresponding to the labeled data; input the pseudo-label data in the basic auxiliary set into the basic model to obtain a first basic vector, input the pseudo-label data in the basic auxiliary set into the first teacher model to obtain a second basic vector, and determine a second loss value based on the first basic vector and the second basic vector; input the pseudo-label data in the newly added auxiliary set into the basic model to obtain a first newly added vector, input the pseudo-label data in the newly added auxiliary set into the second teacher model to obtain a second newly added vector, and determine a third loss value based on the first newly added vector and the second newly added vector; determine a target loss value based on the first loss value, the second loss value, and the third loss value;

[0155] The training module 43 is used to train the basic model based on the target loss value to obtain a trained target model; the target model is used to perform data processing on the data to be processed.

[0156] Exemplarily, when the acquisition module 41 acquires the basic auxiliary set corresponding to the old task, it is specifically used to: input the unlabeled data in the unlabeled data set into the basic model to obtain pseudo-label data corresponding to the unlabeled data, and the pseudo-label data includes predicted pseudo-labels and predicted probability values; for each label supported by the basic model, determine the pseudo-label data corresponding to the label based on the predicted pseudo-labels in each pseudo-label data; based on the predicted probability values ​​in the pseudo-label data corresponding to the label, select N1 pseudo-label data with large predicted probability values ​​as the pseudo-label data in the basic auxiliary set.

[0157] Exemplarily, when the acquisition module 41 acquires the second teacher model corresponding to the incremental task, it is specifically used to: input the labeled data in the basic data set into the basic model to obtain the predicted label and predicted probability value corresponding to the labeled data; determine the first confidence loss value based on the predicted label and predicted probability value corresponding to each labeled data; input the pseudo-label data in the basic auxiliary set into the basic model to obtain the predicted label and predicted probability value corresponding to the pseudo-label data; determine the second confidence loss value based on the predicted label and predicted probability value corresponding to each pseudo-label data; input the labeled data in the newly added data set into the basic model to obtain the predicted label corresponding to the labeled data; determine the task loss value based on the predicted label and actual label corresponding to each labeled data; train the basic model based on the first confidence loss value, the second confidence loss value and the task loss value to obtain the second teacher model.

[0158] Exemplarily, when the acquisition module 41 acquires the newly added auxiliary set corresponding to the incremental task, it is specifically used to: input the unlabeled data in the unlabeled data set into the second teacher model to obtain pseudo-label data corresponding to the unlabeled data, and the pseudo-label data includes predicted pseudo-labels and predicted probability values; for each label supported by the second teacher model, determine the pseudo-label data corresponding to the label based on the predicted pseudo-labels in each pseudo-label data; based on the predicted probability values ​​in the pseudo-label data corresponding to the label, select N2 pseudo-label data with large predicted probability values ​​as the pseudo-label data in the newly added auxiliary set.

[0159] Exemplarily, the base model, the first teacher model and the second teacher model all include M network layers, there is a target network layer among the M network layers, and the target network layer is at least one network layer among the M network layers; the first basic vector is the feature vector output by the target network layer of the base model; the second basic vector is the feature vector output by the target network layer of the first teacher model; the first newly added vector is the feature vector output by the target network layer of the base model; the second newly added vector is the feature vector output by the target network layer of the second teacher model.

[0160] Exemplarily, when the determination module 42 determines the target loss value based on the first loss value, the second loss value and the third loss value, it is specifically used to: determine the target loss value based on the sum of the first loss value, the second loss value and the third loss value, that is, the target loss value is the sum of these three loss values.

[0161] Exemplarily, when the determination module 42 inputs the labeled data in the basic data set to the basic model, it is specifically used to: select a first number of labeled data from the basic data set, perform data augmentation on each selected labeled data, and input the data augmented labeled data to the basic model; when the determination module inputs the labeled data in the newly added data set to the basic model, it is specifically used to: select a second number of labeled data from the newly added data set, perform data augmentation on each selected labeled data, and input the data augmented labeled data to the basic model; when the determination module inputs the pseudo-labeled data in the basic auxiliary set to the basic model, it is specifically used to: select a second number of labeled data from the newly added data set, perform data augmentation on each selected labeled data, and input the data augmented labeled data to the basic model; The method is used to: select a third number of pseudo-label data from the basic auxiliary set, perform data augmentation on each selected pseudo-label data, input the pseudo-label data after data augmentation to the basic model, and input the pseudo-label data after data augmentation to the first teacher model; the determination module inputs the pseudo-label data in the newly added auxiliary set to the basic model, and inputs the pseudo-label data in the newly added auxiliary set to the second teacher model, and is specifically used to: select a fourth number of pseudo-label data from the newly added auxiliary set, perform data augmentation on each selected pseudo-label data, and input the pseudo-label data after data augmentation to the basic model, and input the pseudo-label data after data augmentation to the second teacher model; the first number, the second number, the third number and the fourth number satisfy a preset quantity ratio.

[0162] Based on the same application concept as the above method, a data processing device is proposed in the embodiment of the present application, see Figure 5 As shown, the data processing device may include: a processor 51 and a machine-readable storage medium 52, the machine-readable storage medium 52 storing machine-executable instructions that can be executed by the processor 51; the processor 51 is used to execute the machine-executable instructions to implement the data processing method disclosed in the above example of this application.

[0163] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the data processing method disclosed in the above example of the present application can be implemented.

[0164] The above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0165] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0166] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0167] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0168] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0169] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0171] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: Obtain a basic model to be trained; obtain a first teacher model, a basic data set, and a basic auxiliary set corresponding to the old task, wherein the basic data set includes labeled data, and the basic auxiliary set includes pseudo-labeled data; obtain a second teacher model, a new data set, and a new auxiliary set corresponding to the incremental task, wherein the new data set includes labeled data, and the new auxiliary set includes pseudo-labeled data; Inputting the labeled data in the basic data set and the newly added data set into the basic model to obtain the predicted labels corresponding to the labeled data; determining a first loss value based on the predicted labels corresponding to the labeled data and the actual labels corresponding to the labeled data; Inputting the pseudo-label data in the basic auxiliary set to the basic model to obtain a first basic vector, inputting the pseudo-label data in the basic auxiliary set to the first teacher model to obtain a second basic vector, and determining a second loss value based on the first basic vector and the second basic vector; Input the pseudo-label data in the newly added auxiliary set to the basic model to obtain a first newly added vector, input the pseudo-label data in the newly added auxiliary set to the second teacher model to obtain a second newly added vector, and determine a third loss value based on the first newly added vector and the second newly added vector; Determine a target loss value based on the first loss value, the second loss value, and the third loss value, and train the basic model based on the target loss value to obtain a trained target model; Wherein, the target model is used to perform data processing on the data to be processed; The step of obtaining the basic auxiliary set corresponding to the old task includes: inputting the unlabeled data in the unlabeled data set into the basic model to obtain pseudo-label data corresponding to the unlabeled data, wherein the pseudo-label data includes predicted pseudo-labels and predicted probability values; for each label supported by the basic model, determining the pseudo-label data corresponding to the label based on the predicted pseudo-labels in each pseudo-label data; based on the predicted probability values ​​in the pseudo-label data corresponding to the label, selecting N1 pseudo-label data with large predicted probability values ​​as the pseudo-label data in the basic auxiliary set; The method of obtaining a newly added auxiliary set corresponding to the incremental task includes: inputting the unlabeled data in the unlabeled data set into the second teacher model to obtain pseudo-label data corresponding to the unlabeled data, wherein the pseudo-label data includes predicted pseudo-labels and predicted probability values; for each label supported by the second teacher model, determining the pseudo-label data corresponding to the label based on the predicted pseudo-labels in each pseudo-label data; based on the predicted probability values ​​in the pseudo-label data corresponding to the label, selecting N2 pseudo-label data with large predicted probability values ​​as the pseudo-label data in the newly added auxiliary set; The labeled data is a labeled image, and the unlabeled data is an unlabeled image.

2. The method according to claim 1, characterized in that The step of obtaining a second teacher model corresponding to the incremental task includes: Input the labeled data in the basic data set to the basic model to obtain the predicted labels and predicted probability values ​​corresponding to the labeled data; determine the first confidence loss value based on the predicted labels and predicted probability values ​​corresponding to each labeled data; input the pseudo-label data in the basic auxiliary set to the basic model to obtain the predicted labels and predicted probability values ​​corresponding to the pseudo-label data; determine the second confidence loss value based on the predicted labels and predicted probability values ​​corresponding to each pseudo-label data; Input the labeled data in the newly added data set into the basic model to obtain the predicted labels corresponding to the labeled data; determine the task loss value based on the predicted labels and actual labels corresponding to each labeled data; The basic model is trained based on the first confidence loss value, the second confidence loss value and the task loss value to obtain a trained second teacher model.

3. The method according to claim 1, characterized in that The basic model, the first teacher model and the second teacher model all include M network layers, there is a target network layer among the M network layers, and the target network layer is at least one network layer among the M network layers; The first basis vector is a feature vector output by a target network layer of the base model; The second basis vector is a feature vector output by the target network layer of the first teacher model; The first newly added vector is a feature vector output by the target network layer of the basic model; The second newly added vector is a feature vector output by the target network layer of the second teacher model.

4. The method according to claim 1, characterized in that: Determining the target loss value based on the first loss value, the second loss value, and the third loss value includes: determining the target loss value based on a sum of the first loss value, the second loss value, and the third loss value.

5. The method according to claim 1, characterized in that Inputting the labeled data in the basic data set to the basic model includes: selecting a first number of labeled data from the basic data set, performing data augmentation on each selected labeled data, and inputting the data augmented labeled data to the basic model; The inputting the labeled data in the newly added data set to the basic model comprises: selecting a second number of labeled data from the newly added data set, performing data augmentation on each of the selected labeled data, and inputting the data augmented labeled data to the basic model; The inputting the pseudo-label data in the basic auxiliary set to the basic model, and the inputting the pseudo-label data in the basic auxiliary set to the first teacher model, comprises: selecting a third number of pseudo-label data from the basic auxiliary set, performing data augmentation on each of the selected pseudo-label data, and inputting the pseudo-label data after the data augmentation to the basic model, and inputting the pseudo-label data after the data augmentation to the first teacher model; The inputting the pseudo-label data in the newly added auxiliary set to the basic model, and the inputting the pseudo-label data in the newly added auxiliary set to the second teacher model, comprises: selecting a fourth number of pseudo-label data from the newly added auxiliary set, performing data augmentation on each of the selected pseudo-label data, and inputting the pseudo-label data after the data augmentation to the basic model, and inputting the pseudo-label data after the data augmentation to the second teacher model; Among them, the first quantity, the second quantity, the third quantity and the fourth quantity satisfy a preset quantity ratio.

6. A data processing device, characterized in that: The device comprises: An acquisition module is used to acquire a basic model to be trained; acquire a first teacher model, a basic data set, and a basic auxiliary set corresponding to an old task, wherein the basic data set includes labeled data, and the basic auxiliary set includes pseudo-label data; acquire a second teacher model, a new data set, and a new auxiliary set corresponding to an incremental task, wherein the new data set includes labeled data, and the new auxiliary set includes pseudo-label data; A determination module, used for inputting the labeled data in the basic data set and the newly added data set into the basic model to obtain the predicted label corresponding to the labeled data; determining a first loss value based on the predicted label corresponding to the labeled data and the actual label corresponding to the labeled data; inputting the pseudo-label data in the basic auxiliary set into the basic model to obtain a first basic vector, inputting the pseudo-label data in the basic auxiliary set into the first teacher model to obtain a second basic vector, and determining a second loss value based on the first basic vector and the second basic vector; inputting the pseudo-label data in the newly added auxiliary set into the basic model to obtain a first newly added vector, inputting the pseudo-label data in the newly added auxiliary set into the second teacher model to obtain a second newly added vector, and determining a third loss value based on the first newly added vector and the second newly added vector; determining a target loss value based on the first loss value, the second loss value and the third loss value; A training module, used for training the basic model based on the target loss value to obtain a trained target model; the target model is used for performing data processing on the data to be processed; Among them, when the acquisition module acquires the basic auxiliary set corresponding to the old task, it is specifically used to: input the unlabeled data in the unlabeled data set into the basic model to obtain the pseudo-label data corresponding to the unlabeled data, and the pseudo-label data includes predicted pseudo-labels and predicted probability values; for each label supported by the basic model, based on the predicted pseudo-labels in each pseudo-label data, determine the pseudo-label data corresponding to the label; based on the predicted probability value in the pseudo-label data corresponding to the label, select N1 pseudo-label data with large predicted probability values ​​as the pseudo-label data in the basic auxiliary set; Among them, when the acquisition module acquires the newly added auxiliary set corresponding to the incremental task, it is specifically used to: input the unlabeled data in the unlabeled data set into the second teacher model to obtain the pseudo-label data corresponding to the unlabeled data, and the pseudo-label data includes predicted pseudo-labels and predicted probability values; for each label supported by the second teacher model, determine the pseudo-label data corresponding to the label based on the predicted pseudo-labels in each pseudo-label data; based on the predicted probability value in the pseudo-label data corresponding to the label, select N2 pseudo-label data with large predicted probability values ​​as the pseudo-label data in the newly added auxiliary set; The labeled data is a labeled image, and the unlabeled data is an unlabeled image.

7. The device according to claim 6, It is characterized in that Among them, when the acquisition module acquires the second teacher model corresponding to the incremental task, it is specifically used to: input the labeled data in the basic data set into the basic model to obtain the predicted label and predicted probability value corresponding to the labeled data; determine the first confidence loss value based on the predicted label and predicted probability value corresponding to each labeled data; input the pseudo-label data in the basic auxiliary set into the basic model to obtain the predicted label and predicted probability value corresponding to the pseudo-label data; determine the second confidence loss value based on the predicted label and predicted probability value corresponding to each pseudo-label data; input the labeled data in the newly added data set into the basic model to obtain the predicted label corresponding to the labeled data; determine the task loss value based on the predicted label and actual label corresponding to each labeled data; train the basic model based on the first confidence loss value, the second confidence loss value and the task loss value to obtain the second teacher model; Among them, the basic model, the first teacher model and the second teacher model all include M network layers, there is a target network layer among the M network layers, and the target network layer is at least one network layer among the M network layers; the first basic vector is the feature vector output by the target network layer of the basic model; the second basic vector is the feature vector output by the target network layer of the first teacher model; the first newly added vector is the feature vector output by the target network layer of the basic model; the second newly added vector is the feature vector output by the target network layer of the second teacher model; Wherein, when the determination module determines the target loss value based on the first loss value, the second loss value and the third loss value, it is specifically used to: determine the target loss value based on the sum of the first loss value, the second loss value and the third loss value; Among them, when the determination module inputs the labeled data in the basic data set to the basic model, it is specifically used to: select a first number of labeled data from the basic data set, perform data augmentation on each selected labeled data, and input the labeled data after data augmentation to the basic model; when the determination module inputs the labeled data in the newly added data set to the basic model, it is specifically used to: select a second number of labeled data from the newly added data set, perform data augmentation on each selected labeled data, and input the labeled data after data augmentation to the basic model; when the determination module inputs the pseudo-labeled data in the basic auxiliary set to the basic model, it is specifically used to: select a second number of labeled data from the newly added data set, perform data augmentation on each selected labeled data, and input the labeled data after data augmentation to the basic model; Used for: selecting a third number of pseudo-label data from the basic auxiliary set, performing data augmentation on each selected pseudo-label data, and inputting the pseudo-label data after data augmentation to the basic model, and inputting the pseudo-label data after data augmentation to the first teacher model; the determination module inputs the pseudo-label data in the newly added auxiliary set to the basic model, and inputs the pseudo-label data in the newly added auxiliary set to the second teacher model, and is specifically used for: selecting a fourth number of pseudo-label data from the newly added auxiliary set, performing data augmentation on each selected pseudo-label data, and inputting the pseudo-label data after data augmentation to the basic model, and inputting the pseudo-label data after data augmentation to the second teacher model; the first number, the second number, the third number and the fourth number satisfy a preset quantity ratio.

8. A data processing device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the method steps described in any one of claims 1-5.

Citation Information

Patent Citations

  • Image classification method based on semi-supervised self-paced learning cross-task deep network

    CN108764281A

  • Semi-supervised learning method based on pseudo label weighting

    CN112232416A