Data labeling method, device and electronic device
The final annotation result is determined through the generalization ability of multiple data annotation sub-models, which solves the problems of low data annotation efficiency and high cost in the automatic driving deep learning model, and realizes efficient and low-cost data annotation, which is suitable for the automatic driving model. train.
Patent Information
- Application Number
- CN202110427397.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-20
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-04-20
AI Technical Summary
Due to the low efficiency and high cost of data annotation during training of existing autonomous driving deep learning models, the model results in poor performance. In particular, there is a large difference between the public data set and the actual application scenario, and the manual annotation time and cost are high.
The generalization ability of multiple data annotation sub-models is used to determine the final annotation result. The target data is obtained for data cleaning and generalization ability evaluation. A mixed data set is generated by combining multiple public data sets. The data annotation sub-model is used for automatic annotation instead of Manual annotation improves efficiency and reduces costs.
It improves the efficiency and effect of data labeling, reduces labeling costs, and obtains better labeling results. It is suitable for training deep learning models and improves model performance.
Smart Images

Figure CN113139072B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of deep learning and autonomous driving, and in particular to a data labeling method, device and electronic equipment. Background Art
[0002] At present, the deep learning models used in autonomous driving require labeled data during training. The sources of the above labeled data are mainly divided into two types: one is the data in the public data set, and the other is the self-collected data and then manually labeled data.
[0003] However, the scenarios in which public datasets are acquired are usually inconsistent with the actual application scenarios of the models, resulting in poor model performance. For example, many public datasets are collected from roads in Region A, where the road structure, traffic volume, driving rules, driving habits, and even the clarity and installation location of sensors are different from those in Region B, the actual application scenario of the model. This will lead to significant data differences, and the models trained based on these data will inevitably fail to meet expectations when used in Region B.
[0004] In addition, manually labeled data has the problems of low labeling efficiency and high cost. Manually labeled data requires manual labeling of each image one by one. The human eye identifies and manually gives the category of the target and draws the bounding box of the target. The labeling time for each image is long, especially when there are many targets in the image, the labeling time increases exponentially. Therefore, the efficiency of manual labeling is relatively low, and the time and economic costs are very high, which is not conducive to the training of deep learning models and the improvement of model performance. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a data labeling method, device and electronic device to improve labeling efficiency and reduce labeling costs.
[0006] In a first aspect, an embodiment of the present invention provides a data labeling method, the method comprising: acquiring target data; inputting the target data into a pre-trained data labeling model, and outputting a final labeling result; wherein the data labeling model includes multiple data labeling sub-models, and the data labeling model determines the final labeling result based on the generalization capability of the multiple data labeling sub-models.
[0007] In a preferred embodiment of the present invention, the step of acquiring target data includes: collecting target data in a specified scene; and performing data cleaning on the collected target data.
[0008] In a preferred embodiment of the present invention, the above-mentioned data cleaning includes at least one of the following: grayscale histogram processing, image information entropy processing, and image hash similarity processing.
[0009] In a preferred embodiment of the present invention, the above-mentioned step of inputting the target data into a pre-trained data annotation model and outputting the final annotation result includes: determining the generalization capability of each data annotation sub-model; inputting the target data into a pre-trained data annotation model, and outputting the final annotation result based on the generalization capability.
[0010] In a preferred embodiment of the present invention, the above-mentioned step of determining the generalization ability of each data labeling sub-model includes: obtaining multiple public data sets, the public data sets containing multiple original data and the labeling truth values corresponding to the original data; randomly extracting data from the multiple public data sets, and combining the extracted data into a mixed data set; using each data labeling sub-model to label the data of the mixed data set to obtain a first labeling result of each data labeling sub-model; and determining the generalization ability of each data labeling sub-model based on the first labeling result and the labeling truth value of the data in the mixed data set.
[0011] In a preferred embodiment of the present invention, the step of inputting the target data into a pre-trained data annotation model and outputting the final annotation result based on the generalization capability includes: inputting the target data into each data annotation sub-model to obtain a second annotation result of each data annotation sub-model; and outputting the final annotation result based on the second annotation result of each data annotation sub-model and the generalization capability of each data annotation sub-model.
[0012] In a preferred embodiment of the present invention, the step of outputting the final labeling result based on the second labeling results of each data labeling sub-model and the generalization ability of each data labeling sub-model includes: determining the confidence of each data labeling sub-model based on the second labeling results of each data labeling sub-model and the generalization ability of each data labeling sub-model; and taking the second labeling result of the data labeling sub-model with the highest confidence as the final labeling result.
[0013] In a second aspect, an embodiment of the present invention further provides a data labeling device, which includes: a target data acquisition module, used to acquire target data; a labeling result output module, used to input the target data into a pre-trained data labeling model, and output a final labeling result; wherein the data labeling model includes multiple data labeling sub-models, and the data labeling model determines the final labeling result based on the generalization ability of the multiple data labeling sub-models.
[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the above-mentioned data labeling method.
[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the steps of the above-mentioned data labeling method.
[0016] The embodiments of the present invention bring the following beneficial effects:
[0017] The embodiments of the present invention provide a data labeling method, device and electronic device, which input the acquired target data into a pre-trained data labeling model and output the final labeling result. The data labeling model determines the final labeling result based on the generalization ability of multiple data labeling sub-models. In this way, using the data labeling model for data labeling can replace manual labeling, thereby improving the efficiency of data labeling and reducing the low cost of data labeling; using the data labeling model containing multiple data labeling sub-models for data labeling can obtain a better labeling effect.
[0018] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0019] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flowchart of a data labeling method provided by an embodiment of the present invention;
[0022] Figure 2 A flowchart of another data labeling method provided by an embodiment of the present invention;
[0023] Figure 3 A schematic diagram of a data labeling method provided by an embodiment of the present invention;
[0024] Figure 4 A schematic diagram of a generalization capability evaluation process provided by an embodiment of the present invention;
[0025] Figure 5A schematic diagram of a model annotation provided by an embodiment of the present invention;
[0026] Figure 6 A schematic diagram of the structure of a data labeling device provided by an embodiment of the present invention;
[0027] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0029] At present, there are two main sources of labeled data: one is data from public datasets, and the other is self-collected data that is manually labeled. However, the scenarios in which public datasets are obtained are usually inconsistent with the actual application scenarios of the model, resulting in poor model effects. Manually labeled data has the problems of low labeling efficiency and high cost.
[0030] Based on this, an embodiment of the present invention provides a data labeling method, device and electronic device. This technology can be applied to computers, mobile phones, tablet computers, servers and other devices that can realize human-computer interaction, and specifically involves a method for acquiring and labeling deep learning model training data.
[0031] To facilitate understanding of this embodiment, a data labeling method disclosed in an embodiment of the present invention is first introduced in detail.
[0032] Embodiment 1:
[0033] This embodiment provides a data labeling method. Figure 1 A flow chart of a data labeling method is shown, and the data labeling method comprises the following steps:
[0034] Step S102, obtaining target data.
[0035] The target data of this embodiment may be data such as images, laser radar point clouds, millimeter wave radar point clouds, etc., and the collected target data is not data labeled. The target data may be data that needs to be data labeled. Data labeling is an act of processing data. Usually, the types of data labeling include: image labeling, voice labeling, text labeling, video labeling, etc. The basic forms of labeling include labeling picture frames, 3D picture frames, text transcription, image dotting, target object contour lines, etc.
[0036] Step S104, input the target data into a pre-trained data annotation model, and output the final annotation result; wherein the data annotation model includes multiple data annotation sub-models, and the data annotation model determines the final annotation result based on the generalization ability of the multiple data annotation sub-models.
[0037] The data annotation model can perform data annotation on the target data, wherein the data annotation model includes multiple data annotation sub-models, and each data annotation sub-model can output a corresponding annotation result. In this embodiment, an optimal result can be selected from the annotation results output by the generalization ability of the data annotation sub-model as the final annotation result of the data annotation model according to the generalization ability of the data annotation sub-model.
[0038] The generalization ability of the data annotation sub-model refers to the adaptability of the machine learning algorithm to fresh samples. It can add new data sets to the original data sets and output a reasonable result through training. The purpose of learning is to learn the rules hidden behind the data. For data outside the learning set with the same rules, the trained network can also give appropriate outputs. This ability is called generalization ability.
[0039] A data labeling method provided by an embodiment of the present invention inputs the acquired target data into a pre-trained data labeling model and outputs the final labeling result. The data labeling model determines the final labeling result based on the generalization ability of multiple data labeling sub-models. In this method, using a data labeling model for data labeling can replace manual labeling, thereby improving the efficiency of data labeling and reducing the low cost of data labeling; using a data labeling model containing multiple data labeling sub-models for data labeling can obtain a better labeling effect.
[0040] Embodiment 2:
[0041] This embodiment provides another data annotation method, which is implemented on the basis of the above embodiment; this embodiment focuses on describing the specific implementation method of obtaining target data. Figure 2 FIG. 1 is a flow chart of another data labeling method shown in FIG. 1 . The data labeling method in this embodiment includes the following steps:
[0042] Step S202: collecting target data in a specified scene.
[0043] Since the data in the public data set is different from the actual application scenario, this embodiment can collect target data from the real scene through a collection vehicle and perform data cleaning to obtain data with more practical application value.
[0044] See also Figure 3A schematic diagram of a data labeling method is shown, and data collection can be performed first. Taking data collection in the field of vehicle driving as an example, in autonomous driving, cameras, lidars, millimeter-wave radars and other sensors are usually installed on the basis of traditional cars, and data collection can be performed after calibration is completed. According to the expected operating scenarios of the autonomous driving vehicle design, such as ports, mines, parks, highways, cities, etc., select the corresponding scene to collect data. During collection, the data obtained by the vehicle in real time is stored in the storage medium on the vehicle, such as SSD (Solid State Disk or Solid State Drive).
[0045] Step S204, performing data cleaning on the collected target data.
[0046] like Figure 3 As shown, after data collection, data cleaning can be performed. Data cleaning refers to identifying, filtering and deleting abnormal data in the collected data. The abnormal data mainly includes incomplete data, data containing errors, duplicate data, etc.
[0047] Among them, incomplete data can be data in which part or all of the image is white or black, or there is no point in part or all of the area in the point cloud; erroneous data can be data in which the data in the image or point cloud is messy and distorted, and very different from the real scene; duplicate data can be data with high scene similarity, such as waiting for a red light at an intersection, or data collected when the vehicle is stationary.
[0048] By data cleaning, key data can be retained as much as possible, useless data can be greatly reduced, and data can be made more valuable. In this embodiment, data cleaning includes at least one of the following: grayscale histogram processing, image information entropy processing, and image hash similarity processing.
[0049] Grayscale histogram processing can first grayscale the color image, and then count the frequency of occurrence of all pixels in the digital image according to the size of the grayscale value. Using the grayscale histogram algorithm, data with abnormal grayscale value ratios (such as images with a high proportion of grayscale values close to 0 or close to 255) can be identified and deleted.
[0050] Information entropy can describe the uncertainty of the information source. The more monotonous the image is (for example, close to all white or all black), the smaller its information entropy is. For the data collected in a certain scene, there is usually an information entropy mean. If the information entropy is too low, it can be deleted as abnormal data.
[0051] Image hash similarity can be based on the following principle: each image can obtain a hash value through an algorithm, which is called an image fingerprint. Two images with similar fingerprints can be considered similar images. In this embodiment, the DHash (Difference Hash) algorithm is used to calculate the similarity of two images and filter them through a preset threshold. When the similarity is greater than the threshold, it can be treated as duplicate data for deletion.
[0052] In summary, since there are differences between the data in the public data set and the actual application scenarios, the above method provided by the embodiment of the present invention collects target data of the real scene through a collection vehicle and performs data cleaning, so that the obtained data has more practical application value.
[0053] Step S206, input the target data into the pre-trained data annotation model, and output the final annotation result; wherein the data annotation model includes multiple data annotation sub-models, and the data annotation model determines the final annotation result based on the generalization ability of the multiple data annotation sub-models.
[0054] like Figure 3 As shown, after data cleaning, model annotation can be performed. Data annotation can be performed through the following steps: determining the generalization ability of each data annotation sub-model; inputting the target data into the pre-trained data annotation model, and outputting the final annotation result based on the generalization ability.
[0055] First, the generalization ability of each data labeling sub-model can be determined through the following steps: obtain multiple public data sets, where the public data sets contain multiple original data and the true values of the labels corresponding to the original data; randomly extract data from the multiple public data sets, and combine the extracted data into a mixed data set; use each data labeling sub-model to label the data of the mixed data set, and obtain the first labeling result of each data labeling sub-model; based on the first labeling result and the true value of the labeling of the data in the mixed data set, determine the generalization ability of each data labeling sub-model.
[0056] See also Figure 4 The diagram shows a generalization ability evaluation process. Generalization ability refers to the ability of a deep learning model to adapt to fresh samples outside the training data set. Figure 4 As shown in the figure, public dataset 1 and public dataset 2 refer to datasets such as KITTI, CityScapes, BDD100K, etc., which have original data and annotated true values (i.e., the category, location, and other information of the target in the original data). The same amount of data is randomly extracted from these datasets and combined to obtain a mixed dataset.
[0057] Use each data labeling sub-model to label the original data of the mixed data set, and then use the labeling truth value of the mixed data set to evaluate the first labeling result of each data labeling sub-model. Use indicators such as F1-socore. Different indicators can be used for evaluation for different types of deep learning models. Comprehensively consider the recall rate and precision rate of each data labeling sub-model to obtain the model generalization ability mentioned in this embodiment.
[0058] Among them, F1-score is a measurement indicator for classification problems. Some machine learning competitions for multi-classification problems often use F1-score as the final evaluation method. It is the harmonic mean of precision and recall, with a maximum of 1 and a minimum of 0.
[0059] like Figure 3 As shown, after the model is annotated, the annotation evaluation can be performed and the result can be published. Annotation evaluation is to select the appropriate annotation result, and result publishing is to output the optimal annotation result. For example, it can be performed through the following steps: input the target data into each data annotation sub-model to obtain the second annotation result of each data annotation sub-model; based on the second annotation result of each data annotation sub-model and the generalization ability of each data annotation sub-model, the final annotation result is output.
[0060] Each data labeling sub-model can perform data labeling separately to obtain multiple second labeling results. Based on the second labeling results of each data labeling sub-model and the generalization ability of each data labeling sub-model, an optimal second labeling result can be selected as the final labeling result output. For example: based on the second labeling results of each data labeling sub-model and the generalization ability of each data labeling sub-model, the confidence of each data labeling sub-model is determined; the second labeling result of the data labeling sub-model with the highest confidence is used as the final labeling result.
[0061] See also Figure 5 A schematic diagram of a model annotation is shown in FIG. Figure 5 As shown in the figure, the same data is input into multiple models (i.e., data annotation sub-models) for annotation at the same time. Figure 2 Model 1, Model 2, Model 3, etc. shown in the figure refer to different data annotation sub-models. These data annotation sub-models have been Figure 4 The methods shown in the figure have achieved their respective generalization capabilities. Figure 5 As shown in Figure 1, after the annotation of each model is completed, the annotation results are gathered together for annotation evaluation.
[0062] Integrated evaluation refers to taking the best annotation result from the annotation results of each model as the final output of this annotation. As for which model has the best effect, the present invention uses the Bayesian theorem: P(A|B)=P(B|A)×P(A) / P(B) to calculate based on the generalization ability of the data annotation sub-model and the second annotation results of each data annotation sub-model.
[0063] P(A) represents the probability that the data labeling sub-model predicts correctly, P(B) represents the generalization ability of the data labeling sub-model, and P(B|A) represents the confidence of the current prediction output by the data labeling sub-model. Assuming P(A) = 1, we can get the probability P(A|B) that the current data labeling sub-model predicts correctly. According to the Bayesian formula, we can get the conditional probability of each data labeling sub-model respectively. After normalization, we can get the confidence of the second labeling result of each data labeling sub-model. The one with the highest confidence is taken as the result of this integrated evaluation, that is, the final labeling result.
[0064] After obtaining the final annotation results, the target data of the collected real scene can be matched one by one with the final annotation results to obtain an annotated data set, which can be used as training data for the deep learning model.
[0065] In summary, manually annotated data has the problems of low annotation efficiency and high cost. The above method provided in this embodiment provides automatic annotation of self-collected panel data using a deep learning model, which greatly improves the annotation efficiency and reduces the cost while achieving a better annotation effect.
[0066] The above method provided by the embodiment of the present invention mainly includes a data cleaning algorithm, a deep learning generalization ability evaluation method, a model integration evaluation method, etc. Among them, the data cleaning method provided by the embodiment of the present invention can filter out more than 90% of useless data, greatly improving the utilization value of data.
[0067] The data annotation sub-model mentioned in the embodiment of the present invention can select an open source deep learning model or a self-training model. In actual use, a self-training model can obtain better results by adding a small amount of manually annotated data of real scenes during training. The integrated evaluation method provided in this embodiment can quickly obtain target data with good quality, and when the obtained target data is used for model training, a relatively good improvement effect can also be obtained.
[0068] Embodiment three:
[0069] Corresponding to the above method embodiment, the embodiment of the present invention provides a data labeling device, such as Figure 6 A structural schematic diagram of a data labeling device is shown, the data labeling device comprises:
[0070] A target data acquisition module 61 is used to acquire target data;
[0071] The labeling result output module 62 is used to input the target data into a pre-trained data labeling model and output the final labeling result; wherein the data labeling model includes multiple data labeling sub-models, and the data labeling model determines the final labeling result based on the generalization ability of the multiple data labeling sub-models.
[0072] A data labeling device provided by an embodiment of the present invention inputs the acquired target data into a pre-trained data labeling model and outputs the final labeling result. The data labeling model determines the final labeling result based on the generalization ability of multiple data labeling sub-models. In this way, using the data labeling model for data labeling can replace manual labeling, thereby improving the efficiency of data labeling and reducing the low cost of data labeling; using the data labeling model containing multiple data labeling sub-models for data labeling can obtain a better labeling effect.
[0073] The target data acquisition module is used to collect target data in a specified scene and perform data cleaning on the collected target data.
[0074] The above data cleaning includes at least one of the following: grayscale histogram processing, image information entropy processing, and image hash similarity processing.
[0075] The above-mentioned labeling result output module is used to determine the generalization ability of each data labeling sub-model; input the target data into the pre-trained data labeling model, and output the final labeling result based on the generalization ability.
[0076] The above-mentioned labeling result output module is used to obtain multiple public data sets, which include multiple original data and the labeling truth values corresponding to the original data; randomly extract data from multiple public data sets, and combine the extracted data into a mixed data set; use each data labeling sub-model to label the data of the mixed data set to obtain the first labeling result of each data labeling sub-model; based on the first labeling result and the labeling truth value of the data in the mixed data set, determine the generalization ability of each data labeling sub-model.
[0077] The above-mentioned labeling result output module is used to input the target data into each data labeling sub-model to obtain the second labeling result of each data labeling sub-model; based on the second labeling result of each data labeling sub-model and the generalization ability of each data labeling sub-model, output the final labeling result.
[0078] The above-mentioned labeling result output module is used to determine the confidence of each data labeling sub-model based on the second labeling result of each data labeling sub-model and the generalization ability of each data labeling sub-model; and take the second labeling result of the data labeling sub-model with the highest confidence as the final labeling result.
[0079] The data labeling device provided in the embodiment of the present invention has the same technical features as the data labeling method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0080] Embodiment 4:
[0081] The embodiment of the present invention also provides an electronic device for executing the above data labeling method; see Figure 7 A structural schematic diagram of an electronic device is shown, which includes a memory 100 and a processor 101, wherein the memory 100 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 101 to implement the above-mentioned data labeling method.
[0082] Further, Figure 7 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .
[0083] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0084] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.
[0085] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned data labeling method. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0086] The computer program products of the data labeling methods, devices, and electronic devices provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0087] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and / or device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0088] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0089] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0090] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0091] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A data annotation method, It is characterized in that The method comprises: Acquire target data; wherein the target data includes: an image, a laser radar point cloud or a millimeter wave radar point cloud; Input the target data into a pre-trained data annotation model, and output a final annotation result; wherein the data annotation model includes a plurality of data annotation sub-models, and the data annotation model determines the final annotation result based on the generalization capabilities of the plurality of data annotation sub-models; The step of inputting the target data into a pre-trained data annotation model and outputting a final annotation result comprises: Determine the generalization capabilities of each data annotation sub-model; Inputting the target data into a pre-trained data annotation model, and outputting a final annotation result based on the generalization capability; The steps to determine the generalization ability of each data annotation sub-model include: Acquire multiple public data sets, where the public data sets include multiple original data and annotated true values corresponding to the original data; randomly extracting data from the plurality of public data sets, and combining the extracted data into a mixed data set; Using each data annotation sub-model to annotate the data of the mixed data set, to obtain a first annotation result of each data annotation sub-model; Determining the generalization capability of each of the data annotation sub-models based on the first annotation result and the annotation truth value of the data in the mixed data set; The step of inputting the target data into a pre-trained data annotation model and outputting a final annotation result based on the generalization capability includes: Inputting the target data into each of the data annotation sub-models to obtain a second annotation result of each of the data annotation sub-models; Outputting a final annotation result based on the second annotation result of each of the data annotation sub-models and the generalization capability of each of the data annotation sub-models; The step of outputting a final annotation result based on the second annotation result of each of the data annotation sub-models and the generalization capability of each of the data annotation sub-models comprises: Determining the confidence of each of the data annotation sub-models based on the second annotation results of each of the data annotation sub-models and the generalization ability of each of the data annotation sub-models; The second annotation result of the data annotation sub-model with the highest confidence is used as the final annotation result; The step of determining the confidence of each of the data annotation sub-models based on the second annotation results of each of the data annotation sub-models and the generalization ability of each of the data annotation sub-models comprises: Based on the generalization ability of the data labeling sub-model and the second labeling results of each data labeling sub-model, the Bayesian theorem is used: P(A|B)=P(B|A)×P(A) / P(B) for calculation; the probability P(A|B) that the current data labeling sub-model predicts correctly is obtained, and the conditional probability of each data labeling sub-model is obtained according to the Bayesian formula. After normalization, the confidence of the second labeling result of each data labeling sub-model can be obtained; among them, P(A) is the probability that the data labeling sub-model predicts correctly, P(B) is the generalization ability of the data labeling sub-model, P(B|A) is the confidence of the current prediction output by the data labeling sub-model, and P(A)=1.
2. The method according to claim 1, It is characterized in that The steps to obtain target data include: Collect target data in a specified scene; The collected target data is cleaned.
3. The method according to claim 2, It is characterized in that The data cleaning includes at least one of the following: grayscale histogram processing, image information entropy processing, and image hash similarity processing.
4. A data annotation device, It is characterized in that The device comprises: A target data acquisition module, used to acquire target data; wherein the target data includes: an image, a laser radar point cloud or a millimeter wave radar point cloud; A labeling result output module, used to input the target data into a pre-trained data labeling model and output a final labeling result; wherein the data labeling model includes a plurality of data labeling sub-models, and the data labeling model determines the final labeling result based on the generalization capabilities of the plurality of data labeling sub-models; The labeling result output module is used to determine the generalization ability of each data labeling sub-model; input the target data into the pre-trained data labeling model, and output the final labeling result based on the generalization ability; The labeling result output module is used to obtain multiple public data sets, each of which contains multiple original data and the labeling truth values corresponding to the original data; randomly extract data from the multiple public data sets, and combine the extracted data into a mixed data set; use each data labeling sub-model to label the data of the mixed data set to obtain a first labeling result of each data labeling sub-model; based on the first labeling result and the labeling truth value of the data in the mixed data set, determine the generalization ability of each data labeling sub-model; A labeling result output module, used for inputting the target data into each of the data labeling sub-models to obtain a second labeling result of each of the data labeling sub-models; and outputting a final labeling result based on the second labeling result of each of the data labeling sub-models and the generalization capability of each of the data labeling sub-models; The labeling result output module is used to determine the confidence of each data labeling sub-model based on the second labeling result of each data labeling sub-model and the generalization ability of each data labeling sub-model; the second labeling result of the data labeling sub-model with the highest confidence is used as the final labeling result; the steps of determining the confidence of each data labeling sub-model based on the second labeling result of each data labeling sub-model and the generalization ability of each data labeling sub-model include: based on the generalization ability of the data labeling sub-model and the second labeling result of each data labeling sub-model, The result is calculated using the Bayesian theorem: P(A|B)=P(B|A)×P(A) / P(B); the probability P(A|B) that the current data labeling sub-model predicts correctly is obtained. According to the Bayesian formula, the conditional probability of each data labeling sub-model is obtained respectively. After normalization, the confidence of the second labeling result of each data labeling sub-model can be obtained; among them, P(A) is the probability that the data labeling sub-model predicts correctly, P(B) is the generalization ability of the data labeling sub-model, P(B|A) is the confidence of the current prediction output by the data labeling sub-model, and P(A)=1.
5. An electronic device, It is characterized in that It includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the data labeling method according to any one of claims 1 to 3.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the steps of the data labeling method described in any one of claims 1 to 3.
