CN115170908A - Data annotation model training method and device and electronic equipment - Google Patents

Data annotation model training method and device and electronic equipment Download PDF

Info

Publication number
CN115170908A
CN115170908A CN202210813475.7A CN202210813475A CN115170908A CN 115170908 A CN115170908 A CN 115170908A CN 202210813475 A CN202210813475 A CN 202210813475A CN 115170908 A CN115170908 A CN 115170908A
Authority
CN
China
Prior art keywords
data
model
data set
labeling
annotation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210813475.7A
Other languages
Chinese (zh)
Inventor
熊峰
郝志会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210813475.7A priority Critical patent/CN115170908A/en
Publication of CN115170908A publication Critical patent/CN115170908A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06V10/7753Incorporation of unlabelled data, e.g. multiple instance learning [MIL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a data labeling model training method, a device and electronic equipment, wherein the data labeling model training method comprises the following steps: determining an initial data annotation model and an initial data annotation auxiliary model; acquiring a tagged data set and a non-tagged data set; pre-training the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predicting the unlabeled data set by using the intermediate data labeling model; and performing iterative training on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model to obtain a target data labeling model. According to the technical scheme, efficient, accurate and automatic data labeling can be realized, so that the data labeling cost is greatly reduced, and the data labeling efficiency is improved.

Description

Data annotation model training method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of image recognition, in particular to a data annotation model training method and device and electronic equipment.
Background
With the development and progress of society, the tasks of detecting, classifying and identifying in image data are more and more, for example, in the traffic field, automatic detection, classification and identification of traffic image data are often required. In the prior art, automatic detection, classification and identification of image data are usually realized by means of an algorithm model, but when an automatic image data identification model is trained, a large amount of labeled data is needed, if label-free data is labeled by adopting a manual labeling method, a large amount of labor cost is consumed, the data labeling efficiency is extremely low, if an active learning method is adopted to measure the importance of the label-free data first and then select important label-free data for manual labeling, the method can reduce the manual labeling cost to a certain extent when the data quantity of the label-free data is not large, but when the magnitude of the label-free data is very high, the reduction degree of the manual labeling cost is very limited. Therefore, a data annotation scheme with reduced annotation cost, high efficiency and accuracy is needed.
Disclosure of Invention
The embodiment of the disclosure provides a data annotation model training method and device and electronic equipment.
In a first aspect, an embodiment of the present disclosure provides a data annotation model training method.
Specifically, the data annotation model training method includes:
determining an initial data annotation model and an initial data annotation auxiliary model;
acquiring a tagged data set and a non-tagged data set;
pre-training the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predicting the unlabeled data set by using the intermediate data labeling model;
and performing iterative training on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model to obtain a target data labeling model.
In an implementation manner of the present disclosure, the iteratively training the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model includes:
and a label merging step, comprising: merging the prediction results of the labeled data set and the unlabeled data set to obtain a merged data set;
training a prediction step, comprising:
training the initial data labeling auxiliary model by using the merged data set to obtain an intermediate data labeling auxiliary model;
updating the model parameters of the intermediate data annotation model by using the model parameters of the intermediate data annotation auxiliary model to obtain an updated data annotation model;
predicting the non-tag data set by using an updated data labeling model to obtain a new prediction result of the non-tag data set;
and judging whether the iteration ending condition is met, if not, taking a new prediction result of the unlabeled data set as the prediction result of the unlabeled data set, returning to the label combining step, and repeatedly executing until the iteration ending condition is met.
In an implementation manner of the present disclosure, the initial parameter of the initial data labeling auxiliary model is a model parameter of an intermediate data labeling model obtained after the initial data labeling model is pre-trained for the first time.
In one implementation manner of the present disclosure, after predicting the unlabeled data set, the method further includes:
and respectively carrying out data enhancement processing on the prediction results of the labeled data set and the unlabeled data set, and taking the prediction results of the labeled data set and the unlabeled data set obtained after the data enhancement processing as the input of the iterative training.
In one implementation of the present disclosure, the predicting the unlabeled data set by using the intermediate data labeling model includes:
predicting the non-tag data set by using the intermediate data labeling model to obtain a prediction result of the non-tag data set and a confidence coefficient of the prediction result;
and taking the prediction result with the confidence coefficient higher than a preset confidence coefficient threshold value as the prediction result of the unlabeled data set.
In one implementation manner of the present disclosure, the updating the model parameters of the intermediate data labeling model by using the model parameters of the intermediate data labeling auxiliary model to obtain an updated data labeling model includes:
determining a first parameter weight of the intermediate data annotation auxiliary model and a second parameter weight of the intermediate data annotation model;
based on the first parameter weight and the second parameter weight, carrying out weighted average on the model parameters of the intermediate data annotation auxiliary model and the model parameters of the intermediate data annotation model;
and updating the model parameters of the intermediate data annotation model by using the model parameters obtained by weighted averaging to obtain an updated data annotation model.
In a second aspect, an embodiment of the present disclosure provides a data annotation method.
Specifically, the data labeling method includes:
acquiring a data set to be marked;
and inputting the data set to be labeled into a target data labeling model obtained by training by the training method to obtain a labeling result corresponding to the data set to be labeled.
In a third aspect, an embodiment of the present disclosure provides a data annotation model training apparatus.
Specifically, the data labeling model training device includes:
a determination module configured to determine an initial data annotation model and an initial data annotation auxiliary model;
a first obtaining module configured to obtain a tagged dataset and a non-tagged dataset;
the pre-training module is configured to pre-train the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predict the unlabeled data set by using the intermediate data labeling model;
and the iterative training module is configured to perform iterative training on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model to obtain a target data labeling model.
In a fourth aspect, an embodiment of the present disclosure provides a data annotation device.
Specifically, the data labeling apparatus includes:
the second acquisition module is configured to acquire a data set to be annotated;
and the labeling module is configured to input the data set to be labeled into a target data labeling model obtained by training of the training device, so as to obtain a labeling result corresponding to the data set to be labeled.
In a fifth aspect, the present disclosure provides an electronic device, including a memory and at least one processor, wherein the memory is configured to store one or more computer instructions, and wherein the one or more computer instructions are executed by the at least one processor to implement the method steps of the data annotation model training method and/or the data annotation method described above.
In a sixth aspect, embodiments of the present disclosure provide a computer-readable storage medium for storing computer instructions for a data annotation device, which includes computer instructions for performing the above-mentioned data annotation model training method and/or data annotation method to train the data annotation model and/or data annotation device.
In a seventh aspect, the disclosed embodiments provide a computer program product comprising a computer program/instructions, wherein the computer program/instructions, when executed by a processor, implement the method steps of the data annotation model training method and/or the data annotation method described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the technical scheme provides a training method of the data annotation model, and the data annotation model obtained by training has stronger robustness by means of iterative update of the data annotation auxiliary model to the data annotation model. According to the technical scheme, efficient, accurate and automatic data labeling can be realized, so that the data labeling cost is greatly reduced, and the data labeling efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 illustrates a flow diagram of a method of data annotation model training in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of a data annotation process according to an embodiment of the present disclosure;
FIG. 3A illustrates an overall flow diagram of a data annotation process according to an embodiment of the present disclosure;
FIG. 3B illustrates an example view of a traffic image according to one embodiment of this disclosure;
FIG. 4 is a block diagram of a data annotation model training apparatus according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of a data annotation device according to an embodiment of the present disclosure;
FIG. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 7 is a block diagram of a computer system suitable for implementing a data annotation model training method and/or a data annotation method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
The technical scheme provided by the embodiment of the disclosure provides a training method of a data annotation model, and the data annotation model obtained by training has stronger robustness by means of iterative update of a data annotation auxiliary model to the data annotation model. According to the technical scheme, efficient, accurate and automatic data labeling can be realized, so that the data labeling cost is greatly reduced, and the data labeling efficiency is improved.
Fig. 1 shows a flowchart of a data annotation model training method according to an embodiment of the present disclosure, as shown in fig. 1, the data annotation model training method includes the following steps S101-S104:
in step S101, an initial data annotation model and an initial data annotation auxiliary model are determined;
in step S102, a tagged data set and a non-tagged data set are obtained;
in step S103, pre-training the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predicting the unlabeled data set by using the intermediate data labeling model;
in step S104, iterative training is performed on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model, so as to obtain a target data labeling model.
As mentioned above, as society develops and advances, the tasks of detecting, classifying and identifying in image data are increasing, such as in the traffic field, and there is often a need for automatic detection, classification and identification of traffic image data. In the prior art, automatic detection, classification and identification of image data are usually realized by means of an algorithm model, but when an automatic image data identification model is trained, a large amount of labeled data is needed, if label-free data is labeled by adopting a manual labeling method, a large amount of labor cost is consumed, the data labeling efficiency is extremely low, if an active learning method is adopted to measure the importance of the label-free data first and then select important label-free data for manual labeling, the method can reduce the manual labeling cost to a certain extent when the data quantity of the label-free data is not large, but when the magnitude of the label-free data is very high, the reduction degree of the manual labeling cost is very limited. Therefore, a data annotation scheme with reduced annotation cost, high efficiency and accuracy is needed.
In view of the above drawbacks, in this embodiment, a method for training a data annotation model is provided, in which iterative update of a data annotation model by a data annotation auxiliary model is used, so that the trained data annotation model has stronger robustness. According to the technical scheme, efficient, accurate and automatic data labeling can be realized, so that the data labeling cost is greatly reduced, and the data labeling efficiency is improved.
In an embodiment of the present disclosure, the data annotation model training method can be applied to a computer, a computing device, an electronic device, a server, a service cluster, and the like, which train a data annotation model.
In an embodiment of the present disclosure, the initial data labeling model may be selected according to the requirements of practical applications, for example, the initial data labeling model may be selected as a classification model, a detection model, or the like.
In an embodiment of the present disclosure, the data annotation auxiliary model refers to a model having the same structure as the data annotation model and used for assisting in training the data annotation model, except that the initialization parameters of the initial data annotation model and the initial data annotation auxiliary model are different, the initialization parameters of the initial data annotation model may be determined based on a parameter initialization technique, and the initialization parameters of the initial data annotation auxiliary model are model parameters of an intermediate data annotation model obtained after the initial data annotation model is pre-trained for the first time, so as to improve the training speed of the initial data annotation auxiliary model.
In an embodiment of the present disclosure, the labeled data set refers to a preset data set with corresponding labeled data, for example, for a traffic image, a label may be labeled on information such as whether a traffic sign is included, a type of the traffic sign, whether characters and numbers are included in the traffic sign, and what the included characters and numbers are, and the traffic image and the corresponding labeled data may form a labeled data set, and the unlabeled data set refers to a preset data set without corresponding labeled data, for example, a unlabeled data set only including a traffic image and without corresponding labeled data.
In the above embodiment, first, the structure of the initial data annotation model and the structure of the initial data annotation auxiliary model are determined, wherein the parameters of the initial data annotation model are initialized, and the parameters of the initial data annotation auxiliary model are not initialized; then acquiring a labeled data set and a non-labeled data set; then, pre-training the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predicting the unlabeled data set by using the obtained intermediate data labeling model to obtain a prediction result of the unlabeled data set; and finally, performing iterative training on the intermediate data labeling model by using the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model to obtain a final target data labeling model.
In an embodiment of the present disclosure, the step S104 of performing iterative training on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model may include the following steps:
and a label merging step, comprising: merging the prediction results of the labeled data set and the unlabeled data set to obtain a merged data set;
training a prediction step, comprising:
training the initial data labeling auxiliary model by using the merged data set to obtain an intermediate data labeling auxiliary model;
updating the model parameters of the intermediate data annotation model by using the model parameters of the intermediate data annotation auxiliary model to obtain an updated data annotation model;
predicting the unlabeled data set by using an updated data labeling model to obtain a new prediction result of the unlabeled data set;
judging whether the iteration ending condition is met, if not, taking a new prediction result of the non-tag data set as the prediction result of the non-tag data set, returning to the tag merging step, and repeating the execution until the iteration ending condition is met.
In this embodiment, when iteratively training the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model:
firstly, executing a label merging step, namely merging the prediction results of the labeled data set and the unlabeled data set to obtain a merged data set, wherein the merging of the prediction results of the labeled data set and the unlabeled data set can enrich the training data set of the initial data labeling auxiliary model so as to enhance the completeness of the training of the data labeling auxiliary model.
Then, executing a training prediction step, namely training the initial data labeling auxiliary model by using the obtained merged data set to obtain an intermediate data labeling auxiliary model corresponding to the initial data labeling auxiliary model;
then, updating model parameters of the intermediate data annotation model by using the model parameters of the intermediate data annotation auxiliary model to obtain an updated data annotation model;
predicting the unlabeled data set again by using the obtained updated data labeling model to obtain a new prediction result of the unlabeled data set;
and then judging whether an iteration ending condition is met, if so, ending the iteration, and if not, taking a new prediction result of the unlabeled data set as a prediction result of the unlabeled data set, returning to the label merging step, and repeatedly executing the label merging step, the training prediction step and the judging step of whether the iteration ending condition is met until the iteration ending condition is met.
The iteration ending condition may be, for example, convergence of a preset loss function, or the number of iterations reaching a preset number, or the like. The preset loss function may be set according to the needs of practical application, and the present disclosure does not particularly limit the specific expression form thereof.
Based on the iterative updating of the data annotation model and the data annotation auxiliary model and the massive label-free data set, the data annotation model and the data annotation auxiliary model can continuously learn each other, so that the data annotation quality of the data annotation model and the data annotation auxiliary model is greatly improved.
Further, in order to enrich the number and types of the labeled data and the pseudo-labeled data, improve the completeness of the training of the data labeling model and the data labeling auxiliary model, and reduce the overfitting phenomenon of the models, in an embodiment of the present disclosure, data enhancement processing may be performed on the prediction results of the labeled data set and the unlabeled data set, respectively.
That is, in an embodiment of the present disclosure, after the step of predicting the unlabeled dataset, the method may further include the following steps:
and respectively carrying out data enhancement processing on the prediction results of the labeled data set and the unlabeled data set, and taking the prediction results of the labeled data set and the unlabeled data set obtained after the data enhancement processing as the input of the iterative training.
The data enhancement processing may be, for example, left-right transformation, random erasure, random noise addition, or the like. Further, the prediction results of the labeled data set and the unlabeled data set may be subjected to different degrees of data enhancement, for example, the labeled data set may be subjected to a weaker degree of data enhancement, and the prediction results of the unlabeled data set may be subjected to a stronger degree of data enhancement.
The predicted results of the labeled data set and the unlabeled data set obtained after the data enhancement processing will replace the predicted results of the labeled data set and the unlabeled data set before the data enhancement processing, and serve as the input of the iterative training, that is, in this embodiment, the label merging step may be implemented as:
and merging the prediction results of the labeled data set and the unlabeled data set obtained after the data enhancement processing to obtain a merged data set.
In an embodiment of the present disclosure, the step of predicting the unlabeled data set by using the intermediate data labeling model may include the following steps:
predicting the non-label data set by using the intermediate data labeling model to obtain a prediction result of the non-label data set and a confidence coefficient of the prediction result;
and taking the prediction result with the confidence coefficient higher than a preset confidence coefficient threshold value as the prediction result of the unlabeled data set.
In this embodiment, in order to improve the data quality of the prediction result of the unlabeled data set, after the unlabeled data set is predicted by using the intermediate data labeling model, not all the obtained prediction results are involved in the training of the subsequent data labeling auxiliary model, but some prediction results with higher confidence degrees are selected to be involved in the training of the subsequent data labeling auxiliary model. The confidence of the prediction result can be used as one of the output results when the intermediate data labeling model predicts the unlabeled data set, and the output result is output together with the data prediction result. The preset confidence threshold may be set according to the needs of the actual application, and the disclosure does not particularly limit the preset confidence threshold.
In an embodiment of the present disclosure, the step of updating the model parameters of the intermediate data annotation model by using the model parameters of the intermediate data annotation auxiliary model to obtain the updated data annotation model may include the following steps:
determining a first parameter weight of the intermediate data annotation auxiliary model and a second parameter weight of the intermediate data annotation model;
carrying out weighted average on the model parameters of the intermediate data labeling auxiliary model and the model parameters of the intermediate data labeling model based on the first parameter weight and the second parameter weight;
and updating the model parameters of the intermediate data annotation model by using the model parameters obtained by weighted averaging to obtain an updated data annotation model.
In this embodiment, a parameter weighting update, that is, an Exponential Moving Average (EMA) update manner is adopted, and model parameters of the intermediate data annotation model are updated by using model parameters of the intermediate data annotation auxiliary model, specifically, first, a first parameter weight of the model parameters of the intermediate data annotation auxiliary model and a second parameter weight of the model parameters of the intermediate data annotation model are determined; then carrying out corresponding weighted average on the model parameters of the intermediate data labeling auxiliary model and the model parameters of the intermediate data labeling model according to the first parameter weight and the second parameter weight; and then, carrying out assignment updating on the model parameters of the intermediate data annotation model by using the model parameters obtained by weighted averaging to obtain an updated data annotation model. For example, assuming that the first parameter weight is 0.1, the second parameter weight is 0.9, the model parameters of the intermediate data labeling auxiliary model are represented by parameter sets { A1, A2, A3 \8230; }, and the model parameters of the intermediate data labeling model are represented by parameter sets { B1, B2, B3 \8230; }, the first model parameter B1 of the intermediate data labeling model may be updated as: a1 0.1+ B1 + 0.9, and updating a second model parameter B2 of the intermediate data labeling model as: and A2, 0.1, B2, 0.9, and so on, namely realizing the weighted updating of the model parameters of the intermediate data labeling model to obtain an updated data labeling model.
Fig. 2 shows a flowchart of a data annotation method according to an embodiment of the disclosure, and as shown in fig. 2, the data annotation method includes the following steps S201-S202:
in step S201, a data set to be annotated is acquired;
in step S202, the data set to be labeled is input into the target data labeling model obtained by the training method, so as to obtain a labeling result corresponding to the data set to be labeled.
As mentioned above, as society develops and advances, the tasks of detecting, classifying and identifying in image data are increasing, such as in the traffic field, and there is often a need for automatic detection, classification and identification of traffic image data. In the prior art, automatic detection, classification and identification of image data are usually realized by means of an algorithm model, but when an automatic image data identification model is trained, a large amount of labeled data is needed, if label-free data is labeled by adopting a manual labeling method, a large amount of labor cost is consumed, the data labeling efficiency is extremely low, if an active learning method is adopted to measure the importance of the label-free data first and then select important label-free data for manual labeling, the method can reduce the manual labeling cost to a certain extent when the data quantity of the label-free data is not large, but when the magnitude of the label-free data is very high, the reduction degree of the manual labeling cost is very limited. Therefore, a data annotation scheme with reduced annotation cost, high efficiency and accuracy is needed.
In view of the above drawbacks, in this embodiment, a data annotation method is provided, which implements annotation of data by using a data annotation model obtained by iteratively updating a data annotation model with a data annotation auxiliary model. According to the technical scheme, efficient, accurate and automatic data labeling can be achieved, so that the data labeling cost is greatly reduced, and the data labeling efficiency is improved.
In an embodiment of the present disclosure, the data annotation method may be applied to a computer, a computing device, an electronic device, a server, a service cluster, and the like, which annotates data.
In the above embodiment, a data set to be labeled is first obtained, where the data set to be labeled may include, for example, traffic images that are acquired, that are not labeled, and that do not include tag data; and then inputting the data set to be labeled into a target data labeling model obtained by training with the training method to obtain a labeling result corresponding to the data set to be labeled, for example, whether the acquired traffic image contains a traffic sign, the type of the traffic sign, whether the traffic sign contains characters and numbers, what the contained characters and numbers are, and the like. The target data labeling model is obtained by utilizing iterative update training of a data labeling auxiliary model. Wherein, the preset treatment can comprise one or more of the following treatment modes: data statistics, data detection, and the like.
Technical terms and technical features related to the technical terms and technical features shown in fig. 2 and related embodiments are the same as or similar to those of the technical terms and technical features shown in fig. 1 and related embodiments, and for the explanation and description of the technical terms and technical features related to the technical terms and technical features shown in fig. 2 and related embodiments, reference may be made to the above explanation of the explanation of fig. 1 and related embodiments, and no further description is provided here.
Fig. 3A shows an overall flowchart of a data annotation method according to an embodiment of the present disclosure, as shown in fig. 3A, in the data annotation method:
first, an initial data annotation model and an initial data annotation auxiliary model are determined.
Then, a tagged dataset and a non-tagged dataset are obtained.
And then, pre-training the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, predicting the unlabeled data set by using the intermediate data labeling model, and performing data enhancement processing on the prediction results of the labeled data set and the unlabeled data set respectively.
And then, executing a label merging step, namely merging the prediction results of the labeled data set and the unlabeled data set to obtain a merged data set.
Then, executing a training prediction step, namely training the initial data labeling auxiliary model by using the merged data set to obtain an intermediate data labeling auxiliary model; determining a first parameter weight of the intermediate data annotation auxiliary model and a second parameter weight of the intermediate data annotation model, performing weighted average on the model parameters of the intermediate data annotation auxiliary model and the model parameters of the intermediate data annotation model based on the first parameter weight and the second parameter weight, and updating the model parameters of the intermediate data annotation model by using the model parameters obtained by the weighted average to obtain an updated data annotation model; and predicting the unlabeled data set by using an updated data labeling model to obtain a new prediction result of the unlabeled data set.
And then, judging whether an iteration ending condition is met, if not, taking a new prediction result of the unlabeled data set as a prediction result of the unlabeled data set, returning to the label combining step, and repeatedly executing until the iteration ending condition is met, so as to obtain a target data labeling model.
Finally, acquiring a data set to be marked; inputting the data set to be labeled into the target data labeling model to obtain a labeling result corresponding to the data set to be labeled; and performing preset processing on the obtained labeling data.
Based on the method, efficient, accurate and automatic data labeling can be realized, for example, for the traffic image shown in fig. 3B, by means of the target data labeling model, the traffic image can be identified to contain the traffic sign, the traffic sign is classified into a speed limit sign, the traffic sign contains the number 5, and the contained number 5 refers to the information such as the highest running speed.
It should be noted that, although the technical solutions of the present disclosure have been described only by taking data labels as examples, the technical solutions can also be applied to task scenarios like object detection, object segmentation, and the like.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 4 shows a block diagram of a data annotation model training apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device by software, hardware, or a combination of the two. As shown in fig. 4, the data annotation model training apparatus includes:
a determining module 401 configured to determine an initial data annotation model and an initial data annotation auxiliary model;
a first obtaining module 402 configured to obtain a tagged dataset and a non-tagged dataset;
a pre-training module 403, configured to pre-train the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predict the unlabeled data set by using the intermediate data labeling model;
an iterative training module 404, configured to perform iterative training on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model to obtain a target data labeling model.
As mentioned above, as society develops and advances, the tasks of detecting, classifying and identifying in image data are increasing, such as in the traffic field, and there is often a need for automatic detection, classification and identification of traffic image data. In the prior art, automatic detection, classification and identification of image data are usually realized by means of an algorithm model, but when an automatic image data identification model is trained, a large amount of labeled data is needed, if label-free data is labeled by adopting a manual labeling method, a large amount of labor cost is consumed, the data labeling efficiency is extremely low, if an active learning method is adopted to measure the importance of the label-free data first and then select important label-free data for manual labeling, the method can reduce the manual labeling cost to a certain extent when the data quantity of the label-free data is not large, but when the magnitude of the label-free data is very high, the reduction degree of the manual labeling cost is very limited. Therefore, a data annotation scheme with reduced annotation cost, high efficiency and accuracy is needed.
In view of the above drawbacks, in this embodiment, a training apparatus for a data annotation model is provided, which makes the trained data annotation model have stronger robustness by means of iterative update of a data annotation auxiliary model on the data annotation model. According to the technical scheme, efficient, accurate and automatic data labeling can be realized, so that the data labeling cost is greatly reduced, and the data labeling efficiency is improved.
In an embodiment of the present disclosure, the data annotation model training apparatus may be implemented as a computer, a computing device, an electronic device, a server, a service cluster, or the like, which trains the data annotation model.
Fig. 5 shows a block diagram of a data annotation device according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 5, the data annotation device includes:
a second obtaining module 501, configured to obtain a data set to be annotated;
the labeling module 502 is configured to input the data set to be labeled into the target data labeling model trained by the training apparatus of claim 8, so as to obtain a labeling result corresponding to the data set to be labeled.
As mentioned above, as society develops and advances, the tasks of detecting, classifying and identifying in image data are increasing, such as in the traffic field, and there is often a need for automatic detection, classification and identification of traffic image data. In the prior art, automatic detection, classification and identification of image data are usually realized by means of an algorithm model, but when an automatic image data identification model is trained, a large amount of labeled data is needed, if label-free data is labeled by adopting a manual labeling method, a large amount of labor cost is needed, the data labeling efficiency is extremely low, if an active learning method is adopted to measure the importance of the label-free data first and then select important label-free data for manual labeling, the method can reduce the manual labeling cost to a certain extent when the data volume of the label-free data is small, but when the magnitude of the label-free data is very high, the reduction degree of the manual labeling cost is very limited. Therefore, a data annotation scheme with reduced annotation cost, high efficiency and accuracy is needed.
In view of the above drawbacks, in this embodiment, a data annotation device is provided, which implements annotation of data by using a data annotation model obtained by iterative update of a data annotation model by using a data annotation auxiliary model. According to the technical scheme, efficient, accurate and automatic data labeling can be realized, so that the data labeling cost is greatly reduced, and the data labeling efficiency is improved.
In an embodiment of the present disclosure, the data annotation device may be implemented as a computer, a computing device, an electronic device, a server, a service cluster, or the like, which annotates data.
Technical terms and technical features related to the above-described apparatus-related embodiments are the same as or similar to those mentioned in the above-described method-related embodiments, and for the explanation and description of the technical terms and technical features related to the above-described apparatus-related embodiments, reference may be made to the above-described explanation of the method-related embodiments, and no further description is given here.
The present disclosure also discloses an electronic device, fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 6, the electronic device 600 includes a memory 601 and a processor 602; wherein the content of the first and second substances,
the memory 601 is used to store one or more computer instructions that are executed by the processor 602 to implement the above-described method steps.
FIG. 7 is a block diagram of a computer system suitable for implementing a data annotation model training method and/or a data annotation method according to an embodiment of the present disclosure.
As shown in fig. 7, the computer system 700 includes a processing unit 701 that can execute various processes in the above-described embodiments according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the computer system 700 are also stored. The processing unit 701, the ROM702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary. The processing unit 701 may be implemented as a CPU, a GPU, a TPU, an FPGA, an NPU, or other processing units.
In particular, the methods described above may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the method. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus in the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A data annotation model training method comprises the following steps:
determining an initial data annotation model and an initial data annotation auxiliary model;
acquiring a tagged data set and a non-tagged data set;
pre-training the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predicting the unlabeled data set by using the intermediate data labeling model;
and performing iterative training on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model to obtain a target data labeling model.
2. The method of claim 1, wherein iteratively training the intermediate data labeling model based on the predicted results of the labeled dataset and the unlabeled dataset and the initial data labeling auxiliary model comprises:
and label merging step, including: merging the prediction results of the labeled data set and the unlabeled data set to obtain a merged data set;
training a prediction step, comprising:
training the initial data labeling auxiliary model by using the merged data set to obtain an intermediate data labeling auxiliary model;
updating the model parameters of the intermediate data annotation model by using the model parameters of the intermediate data annotation auxiliary model to obtain an updated data annotation model;
predicting the unlabeled data set by using an updated data labeling model to obtain a new prediction result of the unlabeled data set;
judging whether the iteration ending condition is met, if not, taking a new prediction result of the non-tag data set as the prediction result of the non-tag data set, returning to the tag merging step, and repeating the execution until the iteration ending condition is met.
3. The method of claim 2, wherein the initial parameters of the initial data labeling auxiliary model are model parameters of an intermediate data labeling model obtained after the initial data labeling model is pre-trained for the first time.
4. The method of any of claims 1-3, after predicting the unlabeled dataset, further comprising:
and respectively carrying out data enhancement processing on the prediction results of the labeled data set and the unlabeled data set, and taking the prediction results of the labeled data set and the unlabeled data set obtained after the data enhancement processing as the input of the iterative training.
5. The method of any of claims 1-3, the predicting the unlabeled dataset with the intermediate data labeling model, comprising:
predicting the non-tag data set by using the intermediate data labeling model to obtain a prediction result of the non-tag data set and a confidence coefficient of the prediction result;
and taking the prediction result with the confidence coefficient higher than a preset confidence coefficient threshold value as the prediction result of the non-label data set.
6. The method according to claim 2 or 3, wherein the updating the model parameters of the intermediate data annotation model by using the model parameters of the intermediate data annotation auxiliary model to obtain an updated data annotation model comprises:
determining a first parameter weight of the intermediate data annotation auxiliary model and a second parameter weight of the intermediate data annotation model;
based on the first parameter weight and the second parameter weight, carrying out weighted average on the model parameters of the intermediate data annotation auxiliary model and the model parameters of the intermediate data annotation model;
and updating the model parameters of the intermediate data annotation model by using the model parameters obtained by the weighted average to obtain an updated data annotation model.
7. A method of data annotation, comprising:
acquiring a data set to be marked;
inputting the data set to be labeled into a target data labeling model obtained by training according to the training method of any one of claims 1 to 6, and obtaining a labeling result corresponding to the data set to be labeled.
8. A data annotation model training apparatus, comprising:
a determination module configured to determine an initial data annotation model and an initial data annotation auxiliary model;
a first obtaining module configured to obtain a tagged dataset and a non-tagged dataset;
the pre-training module is configured to pre-train the initial data labeling model by using the labeled data set to obtain an intermediate data labeling model, and predict the unlabeled data set by using the intermediate data labeling model;
and the iterative training module is configured to perform iterative training on the intermediate data labeling model based on the prediction results of the labeled data set and the unlabeled data set and the initial data labeling auxiliary model to obtain a target data labeling model.
9. A data annotation device, comprising:
the second acquisition module is configured to acquire a data set to be annotated;
a labeling module configured to input the data set to be labeled into a target data labeling model obtained by training with the training apparatus of claim 8, so as to obtain a labeling result corresponding to the data set to be labeled.
10. An electronic device comprising a memory and at least one processor; wherein the memory is to store one or more computer instructions, wherein the one or more computer instructions are to be executed by the at least one processor to implement the method steps of any one of claims 1-7.
CN202210813475.7A 2022-07-11 2022-07-11 Data annotation model training method and device and electronic equipment Pending CN115170908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210813475.7A CN115170908A (en) 2022-07-11 2022-07-11 Data annotation model training method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210813475.7A CN115170908A (en) 2022-07-11 2022-07-11 Data annotation model training method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115170908A true CN115170908A (en) 2022-10-11

Family

ID=83494043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210813475.7A Pending CN115170908A (en) 2022-07-11 2022-07-11 Data annotation model training method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115170908A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116070711A (en) * 2022-10-25 2023-05-05 北京百度网讯科技有限公司 Data processing method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116070711A (en) * 2022-10-25 2023-05-05 北京百度网讯科技有限公司 Data processing method, device, electronic equipment and storage medium
CN116070711B (en) * 2022-10-25 2023-11-10 北京百度网讯科技有限公司 Data processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110188765B (en) Image semantic segmentation model generation method, device, equipment and storage medium
CN109086811B (en) Multi-label image classification method and device and electronic equipment
Li et al. Box-supervised instance segmentation with level set evolution
CN113326380B (en) Equipment measurement data processing method, system and terminal based on deep neural network
CN108229522A (en) Training method, attribute detection method, device and the electronic equipment of neural network
CN111127364A (en) Image data enhancement strategy selection method and face recognition image data enhancement method
CN114429566A (en) Image semantic understanding method, device, equipment and storage medium
CN113569852A (en) Training method and device of semantic segmentation model, electronic equipment and storage medium
CN111160638B (en) Conversion estimation method and device
CN115170908A (en) Data annotation model training method and device and electronic equipment
CN115018552A (en) Method for determining click rate of product
CN113435499A (en) Label classification method and device, electronic equipment and storage medium
CN114548192A (en) Sample data processing method and device, electronic equipment and medium
WO2023158881A1 (en) Computationally efficient distillation using generative neural networks
CN116071609A (en) Small sample image classification method based on dynamic self-adaptive extraction of target features
WO2023059811A1 (en) Constrained device placement using neural networks
US20220156524A1 (en) Efficient Neural Networks via Ensembles and Cascades
CN114494787A (en) Image tag determination method and device, electronic equipment and storage medium
US20210073591A1 (en) Robustness estimation method, data processing method, and information processing apparatus
CN111462893B (en) Chinese medical record auxiliary diagnosis method and system for providing diagnosis basis
CN112395528B (en) Text label distinguishing method and device, electronic equipment and storage medium
CN114359700A (en) Data processing method and device, electronic equipment and storage medium
CN112446738A (en) Advertisement data processing method, device, medium and electronic equipment
CN112749293A (en) Image classification method and device and storage medium
CN112131418A (en) Target labeling method, target labeling device and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination