Model increment training method and device, equipment and storage medium

By screening samples with high contribution in the candidate sample set for incremental training, the problem of performance degradation of the deep neural network model in the case of domain shift is solved, and the accuracy of the old data is maintained while improving the recognition ability of new data. .

CN118570582APending Publication Date: 2024-08-30SUZHOU INS IMAGE SOFTWARE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410720470.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

During the application process of the deep neural network model, when the actual prediction data and the model training data have a domain shift, the test performance of the model in the new domain will decrease, and using new data to train the model may lead to the accuracy of the model on the old data. decline, and traditional model fine-tuning methods will extend the training time.

Method used

By processing the test samples based on the initial image processing model, determine the error processing samples and form a candidate sample set, calculate the contribution of each candidate training sample, screen out the incremental training samples with high contribution, and increment the initial model Train to obtain the target image processing model.

Benefits of technology

While ensuring that the model's accuracy on old data does not decline, it quickly improves the model's ability to identify new data, reducing model training costs and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570582A
    Figure CN118570582A
Patent Text Reader

Abstract

The invention discloses a model increment training method and device, equipment and a storage medium, and relates to the technical field of computer vision. The model incremental training method comprises the steps of determining an error processing sample in a test sample image based on a processing result of an initial image processing model for the test sample image; the initial image processing model is obtained based on initial sample image training; forming a candidate sample set by the initial sample image and the error processing sample, and determining the contribution degree of each candidate training sample in the candidate sample set to convergence of an initial image processing model; determining an incremental training sample in the candidate sample set based on the contribution degree; and performing incremental training on the initial image processing model through the incremental training sample to obtain a target image processing model. According to the technical scheme provided by the embodiment of the invention, the recognition capability of the model on new data is improved while the accuracy of the model on old data is not reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a model incremental training method, device, equipment and storage medium. Background Art

[0002] In the current application of deep neural network models, when the domain of actual prediction data and model training data shifts, the test performance of the model on the new domain will be significantly reduced. Therefore, it is necessary to iterate the model to improve the accuracy of the model on the actual prediction data.

[0003] If new data is used to train the model, the model may focus on the new data, causing the model's accuracy on old data to decrease. However, if both new and old data are used to train the model, the training time will be greatly extended. Therefore, how to ensure that the model's accuracy on old data does not decrease while quickly improving the model's ability to recognize new data has attracted the attention of developers. Summary of the invention

[0004] The present invention provides a model incremental training method, device, equipment and storage medium, which can ensure that the accuracy of the model on old data does not decrease while improving the model's recognition ability for new data.

[0005] According to one aspect of the present invention, a model incremental training method is provided, comprising:

[0006] Determining an incorrectly processed sample in the test sample image based on a processing result of the initial image processing model for the test sample image; the initial image processing model is obtained by training based on the initial sample image;

[0007] The initial sample image and the error-processed samples form a candidate sample set, and the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model is determined;

[0008] Determining incremental training samples in the candidate sample set based on the contribution;

[0009] The initial image processing model is incrementally trained through incremental training samples to obtain a target image processing model.

[0010] According to another aspect of the present invention, there is provided a model incremental training device, comprising:

[0011] An error sample acquisition module is used to determine an error processing sample in the test sample image based on the processing result of the initial image processing model on the test sample image; the initial image processing model is obtained by training based on the initial sample image;

[0012] A sample set acquisition module, used to form a candidate sample set from the initial sample image and the error-processed sample, and determine the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model;

[0013] An incremental sample determination module, configured to determine incremental training samples in the candidate sample set based on the contribution;

[0014] The model incremental training module is used to perform incremental training on the initial image processing model through incremental training samples to obtain a target image processing model.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the model incremental training method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the model incremental training method described in any embodiment of the present invention when executed.

[0020] According to another aspect of the present invention, a computer program product is provided, including a computer program, which implements the model incremental training method of any embodiment of the present disclosure when executed by a processor.

[0021] The technical solution of the embodiment of the present invention is to form a candidate sample set from initial sample images for training an initial image processing model and error-processed samples resulting from model processing errors, and then determine incremental training samples in the candidate sample set based on the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model. Finally, the initial image processing model is incrementally trained based on the incremental training samples to obtain a target image processing model. By selecting incremental training samples from the sample set consisting of initial sample images and error-processed samples, the model's recognition ability for new data can be quickly improved while ensuring that the accuracy of the model on old data does not decrease.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 is a flowchart of a model incremental training method provided according to Embodiment 1 of the present invention;

[0025] Figure 2a is a flow chart of a model incremental training method provided according to Embodiment 2 of the present invention;

[0026] Figure 2b is a flowchart of model incremental training provided according to Embodiment 2 of the present invention;

[0027] Figure 2c is a schematic diagram of selecting incremental training samples according to Embodiment 2 of the present invention;

[0028] Figure 3 is a structural schematic diagram of a model incremental training device provided according to Embodiment 3 of the present invention;

[0029] Figure 4 It is a structural schematic diagram of an electronic device for implementing the model incremental training method of an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Embodiment 1

[0033] Figure 1 A flowchart of a model incremental training method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where incremental training of a model is performed when a data domain offset occurs. The method can be performed by a model incremental training device. The model incremental training device can be implemented in the form of hardware and / or software. The model incremental training device can be configured in various general-purpose computing devices. Figure 1 As shown, the method includes:

[0034] S110, determining an incorrectly processed sample in the test sample image based on a processing result of the initial image processing model on the test sample image; the initial image processing model is obtained by training based on the initial sample image.

[0035] The initial image processing model is a model trained based on the initial sample image, and the initial image processing model converges on the initial sample image. Exemplarily, the initial image processing model may be a classification model, a target detection model, or an instance segmentation model.

[0036] The set of test sample images has a slight domain offset from the set of initial sample images. The initial image processing model converges on the initial sample images, but there will be over-killing in the process of processing the test sample images. Exemplarily, the initial image processing model is a target detection model. In the process of target detection on the test sample images, cows may be identified as horses or cows in special cases may not be detected; another exemplary case is that the initial image processing model is a classification model. In the process of classifying the test sample images, objects of category A may be identified as category B, while objects of category B may be identified as other categories.

[0037] In an embodiment of the present invention, in order to improve the ability of the initial image processing model to recognize new data, the initial image processing model is used to process the test sample image, and based on the processing results, the error processing samples are determined in the test sample image, so that the initial image processing model is iterated based on the error processing samples to achieve active learning of the model.

[0038] In a specific example, the initial image processing model is a classification model, and the initial image processing model is used to classify the test sample image. The classification result output by the model is compared with the data label, and the test sample image that is incorrectly classified by the model is determined as an incorrectly processed sample.

[0039] In another specific example, the initial image processing model is a target detection model, which is used to perform target detection on a test sample image, and the target detection result output by the model is compared with the data label, and the test sample image that is incorrectly detected by the model is determined as an incorrectly processed sample.

[0040] S120, forming a candidate sample set from the initial sample image and the error-processed samples, and determining the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model.

[0041] In the embodiment of the present invention, in order to improve the recognition ability of the model for the error-processed samples and ensure that the accuracy of the model on the initial sample image does not decrease, the initial sample image and the error-processed samples together constitute a candidate sample set.

[0042] If the initial image processing model is iteratively updated directly through the candidate sample set, the cost of training the new model will increase due to the increase in data volume and the shift in the data domain. At the same time, the accuracy in the original data domain (i.e., the initial sample image) will decrease. This phenomenon is generally called catastrophic forgetting.

[0043] In order to improve the efficiency of model training, the existing technology proposes a model fine-tuning method for iterative training. Model fine-tuning means freezing some model parameters during the model training process and retaining only a small number of trainable model parameters. This method ensures the model's ability to recognize old data by freezing some parameters, reduces the amount of model calculations to achieve the effect of accelerating training, and by retaining a small number of trainable parameters, enables the model to gain the ability to recognize new data during the fine-tuning process.

[0044] However, during the model fine-tuning process, if the fine-tuning data does not contain old data, the model may focus on the new data, thereby reducing the accuracy of the model on the old data; if the fine-tuning data contains old data, a large number of errors accumulated from the correct identification of samples from the old data set during the fine-tuning process will interfere with the training effect of the model on the new data set, and fine-tuning the model containing old data will also greatly prolong the training time.

[0045] In order to ensure the model training effect and reduce the model training cost, the embodiment of the present invention further screens samples that are more helpful to the model convergence in the model training process in the candidate sample set. Specifically, the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model is calculated, so as to select a part of the candidate sample set for model training according to the contribution, thereby reducing the model training cost. Among them, the contribution of the candidate training sample to the convergence of the initial image processing model can be measured by the gradient score of the candidate training sample.

[0046] Therefore, based on the gradient of the loss function of the initial image processing model, the gradient score of each candidate training sample can be calculated, and the gradient score can be used as the contribution of the candidate training sample to the convergence of the initial image processing model.

[0047] In addition, since the initial image processing model has been trained to a good effect based on the initial sample images, and there are errors only in some test data, the loss function score can be used instead of the gradient score, that is, the loss function score can also be used as the contribution of the candidate training samples to the convergence of the initial image processing model.

[0048] S130: Determine an incremental training sample in the candidate sample set based on the contribution.

[0049] The incremental training samples are used to perform incremental training on the initial image processing model, and the incremental training samples are samples screened from the candidate sample set.

[0050] In an embodiment of the present invention, based on the contribution of each candidate training sample in the candidate sample set, an incremental training sample is determined in the candidate sample set. Specifically, the candidate training samples can be sorted from high to low according to the contribution, and a set number of candidate training samples whose contribution is higher than a set threshold in the sorting are selected as incremental training samples, so as to use candidate training samples with high contribution for model training and improve the model convergence efficiency. It is also possible to stratify the candidate training samples in the candidate sample set according to a preset stratification threshold, and use all candidate training samples with a contribution higher than the stratification threshold, and some candidate training samples with a contribution lower than the stratification threshold as incremental training samples to improve the training efficiency and ensure the model training effect.

[0051] S140, performing incremental training on the initial image processing model through incremental training samples to obtain a target image processing model.

[0052] In an embodiment of the present invention, the initial image processing model is incrementally trained through incremental training samples to obtain a target image processing model. Specifically, some parameters of the initial image processing model are frozen, and the remaining trainable model parameters are adjusted through incremental training samples until the evaluation index value of the model meets the set standard. Exemplarily, the set standard is the accuracy of the model.

[0053] The structure of the target image processing model obtained through training is the same as that of the initial image processing model, and the changes in the model parameters are kept within the set range.

[0054] Optionally, the target image processing model is used to perform image classification, target detection or instance segmentation on the input image to be processed.

[0055] In this optional embodiment, the target image processing model can be a classification model for classifying images; the target image processing model can also be a target detection model for detecting set targets in images, for example, it can be applied to defect detection of parts in industrial scenarios; the target image processing model can also be an instance segmentation model for segmenting multiple targets contained in an image.

[0056] The technical solution of the embodiment of the present invention is to form a candidate sample set from initial sample images for training an initial image processing model and error-processed samples of model processing errors, and then determine incremental training samples in the candidate sample set based on the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model, and finally perform incremental training on the initial image processing model based on the incremental training samples to obtain a target image processing model. By selecting incremental training samples based on the contribution to the convergence of the model in the sample set composed of the initial sample images and the error-processed samples, the model's recognition ability for new data can be quickly improved while ensuring that the accuracy of the model on old data does not decrease.

[0057] Embodiment 2

[0058] Figure 2a This is a flowchart of a model incremental training method provided in the second embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps for determining the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model, specific steps for determining incremental training samples in the candidate sample set based on the contribution, and specific steps for performing incremental training on the initial image processing model through incremental training samples to obtain a target image processing model. Figure 2a As shown, the method includes:

[0059] S210, determining an incorrectly processed sample in the test sample image based on a processing result of the initial image processing model on the test sample image; the initial image processing model is obtained by training based on the initial sample image.

[0060] In the embodiment of the present invention, the process of model incremental training is as follows Figure 2b As shown, the initial image processing model θ1 is obtained by model training on the set D of initial sample images, and then the initial image processing model predicts the predicted sample images in the set D1 of predicted sample images. If the prediction is wrong, the set d of incorrectly processed samples will be manually labeled.

[0061] S220, forming a candidate sample set from the initial sample image and the error-processed sample, and calculating the loss function score of each candidate training sample based on the candidate training samples in the candidate sample set and the supervision labels corresponding to the candidate training samples.

[0062] In the embodiment of the present invention, the candidate sample set is composed of the set D of initial sample images and the set d of error-processed samples. In the process of active model learning, the most important step is the selection of training data. Assume that an initial image processing model θ1 trained on a set of initial sample images D has been obtained. This model has processing errors in the processing of a set of test sample images D1 (which has a domain offset from D). The set of incorrectly processed samples is d∈D1. Define the regularized gradient score χ t as follows:

[0063]

[0064] Among them, w t is the weight of model θ1 at time t, f(x i ;w t ) is the model input data x i The output after i is the input data x i The corresponding supervision label, L is the loss function of the model, Relative to f(x i ;w t ), Used to calculate the loss function relative to f(x i ;w t ), which represents the sensitivity of the loss function to changes in the model’s predictions, is the normalized gradient vector, which indicates the steepest descent direction of the loss function in the parameter space. Indicates the expected value of the modulus of the data in brackets.

[0065] According to the above formula, we can get the data x at a certain moment i ∈d is the regularized gradient score on the model θ1. It should be noted that a larger gradient regularization score usually indicates that the data is more helpful for the convergence of the model during the training process of the deep learning model. By comparing the regularized gradient scores, the model can select data that is more helpful for convergence from the entire candidate sample set.

[0066] Since the model θ1 has been trained based on the initial sample images to achieve good results, there is only a processing deviation on some data. Therefore, it can be considered that at this time are orthogonal, and the convergence of the model depends more on When the loss function is the cross entropy function, we know that:

[0067]

[0068] Among them, p(w t ,x i ) is the model with weight w t When the model is used for the input data x i The generated probability distribution, y i is the input data x i The corresponding supervision label of .

[0069] Based on the above analysis, the loss function score can be used to approximate the above regularized gradient score. The loss function score calculation formula is as follows:

[0070]

[0071] Using loss function scores instead of regular gradient scores can reduce resource consumption and simplify the calculation process.

[0072] Based on the above analysis, the initial image processing model θ1 obtained at a certain moment can obtain the loss function score of each candidate training sample in the candidate sample sets D and d through model reasoning, as an indicator to evaluate whether the candidate training sample is beneficial to model iteration, thereby controlling the total amount of incremental training samples, avoiding the accumulation of losses on a large number of correctly identified samples, and selecting samples that can help the model converge.

[0073] S230, determining the loss function score as the contribution of the candidate training sample to the convergence of the initial image processing model.

[0074] In the embodiment of the present invention, the loss function score can well characterize the degree of help of the candidate training sample for the model convergence, and the loss function score requires less calculation than the gradient score calculation. Therefore, in order to increase the speed of determining the incremental training sample, in the embodiment of the present invention, the loss function score is directly determined as the contribution of the candidate training sample to the convergence of the initial image processing model.

[0075] S240 , sorting the candidate training samples in the candidate sample set according to the contribution of each candidate training sample to the convergence of the initial image processing model to obtain a candidate training sample sequence.

[0076] In the embodiment of the present invention, to facilitate the selection of incremental training samples, firstly, the candidate training samples in the candidate sample set are sorted according to the contribution of each candidate training sample to the convergence of the initial image processing model to obtain a candidate training sample sequence.

[0077] S250, stratifying the candidate training sample sequence according to the stratification threshold to obtain a first data layer and a second data layer; the stratification threshold is positively correlated with the proportion of the error-processed samples in the candidate sample set;

[0078] The contribution of the candidate training samples in the first data layer is greater than the stratification threshold; the contribution of the candidate training samples in the second data layer is less than or equal to the stratification threshold.

[0079] In the embodiment of the present invention, the candidate training sample sequence is stratified according to the stratification threshold to obtain a first data layer whose contribution is greater than the stratification threshold and a second data layer whose contribution is less than or equal to the stratification threshold. The stratification threshold is positively correlated with the proportion of the error-processed samples in the candidate sample set.

[0080] In a specific example, the candidate sample set is composed of a set D of initial sample images and a set d of error-processed samples. Figure 2c As shown, the candidate sample set is stratified according to the stratification threshold r. The value of the stratification threshold r is positively correlated with the proportion of the set of incorrectly processed samples d in the candidate sample set. That is, the greater the proportion of d in the candidate sample set, the greater the value of the stratification threshold r.

[0081] S260: Extract a first number of target training samples in the second data layer, and determine the target training samples and candidate training samples in the first data layer as incremental training samples.

[0082] In an embodiment of the present invention, in order to reduce the cost of model training and improve training efficiency, a first number of target training samples are extracted in the second data layer, all data in the first data layer are sampled, and finally the target training samples extracted in the second data layer and the candidate training samples in the first data layer are determined as incremental training samples.

[0083] By extracting all candidate training samples with contribution higher than the stratification threshold r, the data set d' is obtained. Since the initial image processing model is trained based on the initial sample image, and the error processing samples are samples predicted incorrectly by the model, in general, the contribution of the error processing samples will be greater than the contribution of the initial sample image. When the stratification threshold r is small, that is, the error processing samples account for a small proportion of the candidate sample set, the amount of candidate training samples divided into the first data layer is large, and extracting all candidate training samples in the first data layer can achieve as many error processing samples as possible to help the initial image processing model iteration; when the stratification threshold r is large, that is, the error processing samples account for a large proportion of the candidate sample set, the amount of candidate training samples divided into the first data layer is small, and extracting all candidate training samples in the first data layer can achieve the reduction of the number of samples sampled to high contribution, avoiding the same type of errors in too many error processing samples causing the model to have catastrophic forgetting on the initial sample image.

[0084] For the candidate training samples in the second data layer whose contribution is lower than the stratification threshold r, if all are selected, the model training cost will be high, and too many original sample images will affect the learning effect of the model for new data (i.e., incorrectly processed samples). Therefore, in the second data layer, the first number of target training samples D′ can be randomly selected, and finally the target training samples and all candidate training samples in the first data layer are used as incremental training samples D′⊕d′.

[0085] Among them, the first number is positively correlated with the stratification threshold. The stratification threshold r is small, that is, when the proportion of error-processed samples in the candidate sample set is small, as many error-processed samples as possible are extracted, and fewer samples are extracted in the second data layer. On the one hand, it can avoid extracting too many original sample images when the proportion of error-processed samples in the candidate sample set is small, thereby affecting the learning effect of the model with more new data. On the other hand, the sample size can be reduced, which can reduce the cost of model training.

[0086] On the contrary, when the stratification threshold r is large, that is, when the proportion of error-processed samples in the candidate sample set is large, the number of error-processed samples extracted is reduced, and more samples are extracted in the second data layer. This can avoid extracting too many error-processed samples when the proportion of error-processed samples in the candidate sample set is large, which may lead to catastrophic forgetting of the model.

[0087] Optionally, extracting a first number of target training samples in the second data layer includes:

[0088] Based on the arrangement order of the candidate training samples in the candidate training sample sequence, the candidate training samples in the second data layer are divided into fixed equal parts;

[0089] A second number of target training samples is extracted from each equal portion; the second number is positively correlated with the stratification threshold; and the product of the number of fixed equal portions and the second number is the first number.

[0090] In this optional embodiment, a specific method is provided for extracting a first number of target training samples in the second data layer, and determining the target training samples and the candidate training samples in the first data layer as incremental training samples: based on the arrangement order of the candidate training samples in the candidate training sample sequence, the candidate training samples in the second data layer are divided into fixed equal parts, and the specific number of parts can be adjusted according to actual conditions, for example, divided into 10 equal parts. Further, a second data amount of target training samples is randomly extracted from each equal part. The second data amount is positively correlated with the stratification threshold, and the product of the number of fixed equal parts and the second amount is the first amount.

[0091] Based on the arrangement order, the candidate training samples in the second data layer are divided into fixed equal parts, and the second number of target training samples are randomly selected from each part. This can control the ratio of new and old data in the incremental training samples, and ensure that candidate training samples with different contributions are evenly selected, thereby improving the sample balance and ensuring the model training effect.

[0092] S270, freezing the backbone model parameters associated with the backbone network in the initial image processing model.

[0093] In the embodiment of the present invention, in order to further ensure that the model retains the ability to recognize old data, reduce the workload of model training, and improve training efficiency, the backbone network association in the initial image processing model is frozen to obtain the backbone model parameters. In the subsequent model incremental training process, the model structure does not change, and the backbone model parameters remain unchanged, only the other parameters in the model except the backbone model parameters are fine-tuned.

[0094] S280. According to the incremental training samples, the model parameters other than the backbone model parameters in the initial image processing model are adjusted to obtain the target image processing model.

[0095] In an embodiment of the present invention, according to the incremental training samples, the model parameters other than the backbone model parameters in the initial image processing model are adjusted to obtain the target image processing model. The target training sample D′ extracted from the second data layer in the set of incremental training samples D′⊕d′ will be used as experience in the experience replay algorithm to participate in model fine-tuning, so as to avoid the model affecting the recognition ability of old data while learning new data. The candidate training sample d′ extracted from the first data layer in the incremental training samples can help the model improve its recognition ability of new data (i.e., test sample images).

[0096] By freezing the main model parameters and only adjusting other model parameters, we can ensure that the model retains the ability to recognize old data, reduce the workload of model training, and improve training efficiency.

[0097] Optionally, according to the incremental training samples, other model parameters except the backbone model parameters in the initial image processing model are adjusted to obtain a target image processing model, including:

[0098] According to the incremental training samples, other model parameters except the backbone network parameters in the initial image processing model are adjusted, and evaluation indicators of the adjusted model are obtained;

[0099] When the evaluation index does not meet the set standard, the back propagation algorithm is used to iteratively adjust the model parameters other than the backbone network in the adjusted model until the evaluation index of the adjusted model meets the set standard, and the model that meets the set standard is determined as the target image processing model.

[0100] In this optional embodiment, a specific method is provided for adjusting the model parameters other than the backbone model parameters in the initial image processing model according to the incremental training samples to obtain the target image processing model: according to the incremental training samples, the model parameters other than the backbone network parameters in the initial image processing model are adjusted, and the evaluation index of the adjusted model is obtained. For example, the evaluation index is the model accuracy. When the accuracy does not meet the set accuracy threshold, the back propagation algorithm is used to iteratively adjust the model parameters other than the backbone network in the adjusted model until the evaluation index of the adjusted model meets the set standard, and the model that meets the set standard is determined as the target image processing model.

[0101] In addition, the number of model iterations can also be set in advance, and the back propagation algorithm can be used to iteratively adjust the model parameters other than the backbone network in the adjusted model until the number of iterations reaches the preset number, and the adjusted model is used as the target image processing model.

[0102] The technical solution of the embodiment of the present invention uses an already trained initial image processing model through an active learning method to generate the contribution of candidate training samples to model convergence, and incrementally trains the model by selecting new data with high contribution and some old data with low contribution. While retaining the model's recognition ability for old data, the model's recognition ability for new data is improved, and some old data with low contribution is removed. This can avoid the accumulation of losses on positive samples and affect the model fine-tuning accuracy, and can also speed up the training speed of the model. In the process of model fine-tuning, there is no need to change the model structure, and only some model parameters need to be iteratively adjusted, thereby reducing the model training cost.

[0103] Embodiment 3

[0104] Figure 3 A schematic diagram of the structure of a model incremental training device provided in Example 3 of the present invention.

[0105] like Figure 3 As shown, the device comprises:

[0106] An error sample acquisition module 310 is used to determine an error processing sample in the test sample image based on the processing result of the initial image processing model on the test sample image; the initial image processing model is obtained by training based on the initial sample image;

[0107] A sample set acquisition module 320, configured to form a candidate sample set from the initial sample image and the error-processed sample, and determine the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model;

[0108] An incremental sample determination module 330, configured to determine incremental training samples in the candidate sample set based on the contribution;

[0109] The model incremental training module 340 is used to perform incremental training on the initial image processing model through incremental training samples to obtain a target image processing model.

[0110] The technical solution of the embodiment of the present invention is to form a candidate sample set from initial sample images for training an initial image processing model and error-processed samples of model processing errors, and then determine incremental training samples in the candidate sample set based on the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model, and finally perform incremental training on the initial image processing model based on the incremental training samples to obtain a target image processing model. By selecting incremental training samples based on the contribution to the convergence of the model in the sample set composed of the initial sample images and the error-processed samples, the model's recognition ability for new data can be quickly improved while ensuring that the accuracy of the model on old data does not decrease.

[0111] Optionally, the sample set acquisition module 320 is specifically configured to:

[0112] According to the candidate training samples in the candidate sample set and the supervision labels corresponding to the candidate training samples, the loss function score of each candidate training sample is calculated;

[0113] The loss function score is determined as the contribution of the candidate training sample to the convergence of the initial image processing model.

[0114] Optionally, the incremental sample determination module 330 includes:

[0115] A sample sorting unit, used to sort the candidate training samples in the candidate sample set according to the contribution of each candidate training sample to the convergence of the initial image processing model, so as to obtain a candidate training sample sequence;

[0116] A data stratification unit, used to stratify the candidate training sample sequence according to a stratification threshold to obtain a first data layer and a second data layer; the stratification threshold is positively correlated with the proportion of the error-processed samples in the candidate sample set;

[0117] The contribution of the candidate training samples in the first data layer is greater than the stratification threshold; the contribution of the candidate training samples in the second data layer is less than or equal to the stratification threshold;

[0118] The incremental sample determination unit is used to extract a first number of target training samples in the second data layer, and determine the target training samples and candidate training samples in the first data layer as incremental training samples.

[0119] Optionally, an incremental sample determination unit is used to:

[0120] Based on the arrangement order of the candidate training samples in the candidate training sample sequence, the candidate training samples in the second data layer are divided into fixed equal parts;

[0121] A second number of target training samples is extracted from each equal portion; the second number is positively correlated with the stratification threshold; and the product of the number of the fixed equal portions and the second number is the first number.

[0122] Optionally, the model incremental training module 340 includes:

[0123] A parameter freezing unit, used to freeze the backbone model parameters associated with the backbone network in the initial image processing model;

[0124] The incremental training unit is used to adjust other model parameters in the initial image processing model except the backbone model parameters according to the incremental training samples to obtain a target image processing model.

[0125] Optional, incremental training unit, specifically used for:

[0126] According to the incremental training samples, adjusting other model parameters in the initial image processing model except the backbone network parameters, and obtaining evaluation indicators of the adjusted model;

[0127] When the evaluation index does not meet the set standard, the back propagation algorithm is used to iteratively adjust the other model parameters in the adjusted model except the backbone network until the evaluation index of the adjusted model meets the set standard, and the model that meets the set standard is determined as the target image processing model.

[0128] Optionally, the target image processing model is used to perform image classification, target detection or instance segmentation on the input image to be processed.

[0129] The model incremental training device provided in the embodiment of the present invention can execute the model incremental training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0130] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0131] Embodiment 4

[0132] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0133] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, applicators, blade applicators, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0134] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0135] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0136] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the model incremental training method.

[0137] In some embodiments, the model incremental training method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the model incremental training method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the model incremental training method in any other appropriate manner (e.g., by means of firmware).

[0138] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0139] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or application.

[0140] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0142] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data applier), or a computing system that includes a middleware component (e.g., an application applier), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0143] A computing system may include a client and an application server. The client and the application server are generally remote from each other and usually interact through a communication network. The relationship between the client and the application server is generated by computer programs running on corresponding computers and having a client-application server relationship with each other. The application server may be a cloud application server, also known as a cloud computing application server or a cloud host, which is a host product in a cloud computing application system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS applications.

[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0145] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A model incremental training method, characterized in that: include: Based on the processing result of the initial image processing model on the test sample image, determining the wrongly processed sample in the test sample image; The initial image processing model is obtained by training based on the initial sample image; The initial sample image and the error-processed samples form a candidate sample set, and the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model is determined; Determining an incremental training sample in the candidate sample set based on the contribution; The initial image processing model is incrementally trained through incremental training samples to obtain a target image processing model.

2. The method according to claim 1, characterized in that Determining the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model includes: According to the candidate training samples in the candidate sample set and the supervision labels corresponding to the candidate training samples, the loss function score of each candidate training sample is calculated; The loss function score is determined as the contribution of the candidate training sample to the convergence of the initial image processing model.

3. The method according to claim 1, characterized in that Determining an incremental training sample in the candidate sample set based on the contribution includes: According to the contribution of each candidate training sample to the convergence of the initial image processing model, the candidate training samples in the candidate sample set are sorted to obtain a candidate training sample sequence; According to a stratification threshold, the candidate training sample sequence is stratified to obtain a first data layer and a second data layer; the stratification threshold is positively correlated with the proportion of the error-processed samples in the candidate sample set; The contribution of the candidate training samples in the first data layer is greater than the stratification threshold; the contribution of the candidate training samples in the second data layer is less than or equal to the stratification threshold; A first number of target training samples are extracted from the second data layer, and the target training samples and candidate training samples in the first data layer are determined as incremental training samples.

4. The method according to claim 3, characterized in that Extracting a first number of target training samples from the second data layer includes: Based on the arrangement order of the candidate training samples in the candidate training sample sequence, the candidate training samples in the second data layer are divided into fixed equal parts; A second number of target training samples is extracted from each equal portion; the second number is positively correlated with the stratification threshold; and the product of the number of the fixed equal portions and the second number is the first number.

5. The method according to claim 1, characterized in that The initial image processing model is incrementally trained through incremental training samples to obtain a target image processing model, including: Freezing backbone model parameters associated with the backbone network in the initial image processing model; According to the incremental training samples, other model parameters in the initial image processing model except the backbone model parameters are adjusted to obtain a target image processing model.

6. The method according to claim 5, characterized in that According to the incremental training samples, other model parameters in the initial image processing model except the backbone model parameters are adjusted to obtain a target image processing model, including: According to the incremental training samples, adjusting other model parameters in the initial image processing model except the backbone network parameters, and obtaining evaluation indicators of the adjusted model; When the evaluation index does not meet the set standard, the back propagation algorithm is used to iteratively adjust the other model parameters in the adjusted model except the backbone network until the evaluation index of the adjusted model meets the set standard, and the model that meets the set standard is determined as the target image processing model.

7. The method according to any one of claims 1 to 6, characterized in that: The target image processing model is used to perform image classification, target detection or instance segmentation on the input image to be processed.

8. A model incremental training device, characterized in that: include: An error sample acquisition module is used to determine an error processing sample in the test sample image based on the processing result of the initial image processing model on the test sample image; The initial image processing model is obtained by training based on the initial sample image; A sample set acquisition module, used to form a candidate sample set from the initial sample image and the error-processed sample, and determine the contribution of each candidate training sample in the candidate sample set to the convergence of the initial image processing model; An incremental sample determination module, configured to determine incremental training samples in the candidate sample set based on the contribution; The model incremental training module is used to perform incremental training on the initial image processing model through incremental training samples to obtain a target image processing model.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the model incremental training method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the model incremental training method described in any one of claims 1-7 when executed.

Citation Information

Cited By

  • Data set adjustment method and device, equipment and medium

    CN120744102A