A method and device for generating a data set, a training method, a medium, and a device
By performing semantic comparison and weight adjustment between data sets, the target data set is generated, and the problem of undesired fusion results caused by unlabeled data is solved, and the labeling integrity of the data set and the accuracy of the model are improved.
Patent Information
- Application Number
- CN202011207275.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-03
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2040-11-03
AI Technical Summary
During the fusion process of data sets, unlabeled data leads to unsatisfactory final results or failure to meet the model requirements, and the prior art is difficult to effectively deal with the problem of unlabeled data.
The first training model is obtained through training in the first data set, and the second data set is used to predict category annotations, identify and adjust the weight of different category annotations, generate ignore category annotations, and perform expansion operations on the ignore category data to generate the target data set to avoid the negative impact of unlabeled data.
The results of data set fusion and model training are optimized, the label category integrity of the data set is improved, the negative impact of unlabeled data on the results is avoided, and the accuracy and robustness of the data model are improved.
Smart Images

Figure CN114445673B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image analysis and processing, and in particular to a method and device for generating a data set, a method for training a data model, a storage medium, and a device. Background Art
[0002] In the process of semantic segmentation of a data set, in order to reduce the cost and improve the efficiency when generating the data set, for data sets generated for different tasks, the data in the data set may be represented by annotations of different categories. For different data sets, if the categories annotated in the data sets are different and it is desired to make full use of the data content of each data set, the following training methods can be carried out at present. Taking two different data sets as an example for illustration. Method 1: Select the overlapping annotation categories between two different data sets for training to obtain a training model, where the annotation categories of the training model are the intersection of the annotation categories of the two data sets. Method 2: Train a model for each of the two data sets, and then obtain two training models. The annotation categories of the two training models are the annotation categories corresponding to their respective data sets. Method 3: Forcefully fuse two data sets to obtain a new data set, and then train the fused data set to obtain a training model, where the annotation categories of the training model are the union of the categories of the two data sets. In the above methods, although the training model trained by Method 1 can well integrate and utilize the two data sets, and the effect of the training model is better than the generalization ability of the training model obtained by a single data set alone. Because only the overlapping annotation categories between the data sets are trained, the final training model often fails to meet the requirements of the required annotation categories, especially when there are few overlapping annotation categories between the two data sets. Although Method 2 can meet the annotation category requirements, when the annotation category requirements of the data set generated by a certain task overlap with those of other tasks, it is impossible to make full use of the two data sets, and the training models corresponding to multiple data sets will also double the relevant time during actual task use, thereby reducing the efficiency. In Method 3, multiple data sets are fused, and all annotation categories of multiple data sets can be represented by a single training model. However, during the training process of the fused data set, since there may be a situation where the content in the data set belongs to a certain annotation category but is not actually annotated, the result of the training model of the finally obtained fused data set is particularly unsatisfactory.
[0003] In a data set including multiple category annotations, it is relatively difficult to directly train multiple data sets into a semantic segmentation model including various different category annotations. And there is a situation where there is data content belonging to a certain category in the data set but no annotation is made. If the unannotated data in the data set is not properly processed and directly trained, it will cause great damage, making the finally obtained data model fail to meet the requirements of the model. Summary of the Invention
[0004] In view of the above technical problems in the prior art that when performing data processing such as data fusion of a data set, unlabeled data results in an unsatisfactory final data fusion result or the data model fails to meet the model requirements, the present application provides a data set generation method, apparatus, data model training method, storage medium, and device.
[0005] In one technical solution of the present application, a data set generation method is provided, which includes: training a first training model through a first data set, where the first training model includes first category annotation information of all category annotations of the data in the first data set; training the second data set through the first training model to obtain predicted category annotations of the second data set; and obtaining a target second data set based on the second data set and the predicted category annotations.
[0006] In another technical solution of the present application, a data set generation apparatus is provided, which includes: a model training module that trains a first training model through a first data set, where the first training model includes first category annotation information of the first data set; and trains the second data set through the first training model to obtain predicted category annotations of the second data set; and a target data set module that obtains a target second data set based on the second category annotations and the predicted category annotations of the second data set.
[0007] In another technical solution of the present application, a data model training method is provided, where the data model training method includes: obtaining at least two data set samples, where the at least two data set samples include data with original annotations; generating ignored category annotations for the data in the at least two data set samples, including: determining different category annotations that are included in the first category annotation but not included in the second category annotation according to the first category annotation used to represent all category annotations of the data in one first data set or all fused category annotations of the data in multiple first data sets, and the second category annotation used to represent all category annotations of the data in the second data set; and when there is an intersection between the semantic range represented by the second category annotation and the semantic range represented by the different category annotations, generating ignored category annotations for the data content corresponding to the intersection in the second data set; fusing the at least two data set samples with the ignored category annotations to obtain a target data sample, such that the annotations of the data in the target data sample include the original annotations of the at least two data set samples and the ignored category annotations of the at least two data set samples; and training the target data model with the data in the target data sample that does not belong to the ignored category annotations.
[0008] In another technical solution of the present application, a computer-readable storage medium is provided, which stores computer instructions, where the computer instructions are operated to execute the data set generation method in the first solution.
[0009] In another technical solution of the present application, a computer device is provided, which includes a processor and a memory. The memory stores computer instructions, and the processor operates the computer instructions to execute the dataset generation method in Solution 1.
[0010] The beneficial effects that can be achieved by the technical solution of the present application are as follows: appropriately annotating the data in the dataset that has not been relatedly annotated, making the annotation categories of the dataset more complete, and then avoiding the negative impact of the unannotated data in the dataset during subsequent dataset fusion or model training, and optimizing the results of data processing such as dataset fusion or data model training. Description of the Drawings
[0011] Figure 1 is a schematic flowchart of a specific implementation manner of the dataset generation method of the present application;
[0012] Figure 2 is a schematic flowchart of a specific embodiment of the dataset generation method of the present application;
[0013] Figure 3 is a schematic flowchart of an example of the dataset generation method of the present application;
[0014] Figure 4 is a specific example of the dataset generation method of the present application;
[0015] Figure 5 is a specific example of the dataset generation method of the present application;
[0016] Figure 6 is a schematic diagram of a specific implementation manner of the dataset generation device of the present application;
[0017] Figure 7 is a schematic flowchart of a specific implementation manner of the data model training method of the present application. Detailed Embodiments
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0019] In the description and claims of this application and the above-mentioned drawings, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments of this application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0020] Figure 1 A specific implementation manner of the data set generation method of this application is shown.
[0021] In Figure 1 The specific implementation manner shown, the data set generation method of this application includes process S101, process S102, and process S103.
[0022] In Figure 1 The specific implementation manner shown, S101 is to obtain a first training model by training with a first data set, and the first training model contains first category annotation information of all category annotations of the data in the first data set.
[0023] In this specific implementation manner, the model is trained according to the first data set to obtain a first training model corresponding to the first data set. Among them, the first data set contains first category annotations of all category annotations of the data in the first data set. Correspondingly, the first training model contains first category annotation information of all category annotations of the data in the first data set. Obtaining the first training model by training with the first data set and performing subsequent data set generation processes according to the first training model can improve the processing speed and efficiency.
[0024] In Figure 1 The specific implementation manner shown, S102 is to train the second data set through the first training model to obtain predicted category annotations of the second data set, and the second category annotations contain all category annotations of the data in the second data set.
[0025] In this specific implementation manner, the second data set with the second category annotations is input into the first training model, and the second data set is processed according to the first category annotation information of the first data set in the first training model to obtain predicted category annotations of the second data set. That is, the data in the second data set is correspondingly annotated using the first category annotation to obtain predicted category annotations of the second data set.
[0026] In a specific embodiment of the present application, the semantic comparison is performed between the first category annotation and the second category annotation to determine the different category annotation. By performing the semantic comparison between the first category annotation and the second category annotation, the annotation in the first category annotation that is semantically different from the second category annotation is determined as the different category annotation.
[0027] In an example of the present application, for example, there are a first dataset B and a second dataset A. Among them, the first category annotation of the first dataset B includes annotation ②, annotation ③, and annotation ④, and the second category annotation of the second dataset A includes annotation ①, annotation ②, and annotation ③. By determining the annotation in the first category annotation that is semantically different from the second category annotation as the ignored category annotation, among them, annotation ② and annotation ③ in the first dataset B have the same semantics as annotation ② and annotation ③ in the second dataset A, and they are annotations of the same category; there is no annotation with the same semantics as annotation ④ in the first dataset B in the second category annotation of the second dataset A. Therefore, annotation ④ is determined as the different category annotation of the first dataset B relative to the second dataset A.
[0028] In a specific embodiment of the present application, the process of training the second dataset through the first training model to obtain the predicted category annotation of the second dataset includes: traversing all the data in the second dataset according to the first category annotation information after weight adjustment, and using the first category annotation to annotate the data obtained by traversing to obtain the predicted category annotation.
[0029] In this specific embodiment, the first dataset and the second dataset respectively include multiple different data annotations. Among them, all the category annotations of the data in the first dataset are represented as the first category annotation, and all the category annotations used for the data in the second dataset are represented as the second category annotation. Traverse the second dataset using the first category annotation, and annotate the data in the second dataset that belongs to the data category corresponding to the first category annotation with the corresponding first category annotation to obtain the predicted category annotation with the first category annotation in the second dataset, where the predicted category annotation of the second dataset corresponds to the first category annotation of the first dataset.
[0030] In a specific embodiment of the present application, before training the second dataset through the first training model to obtain the predicted category annotation of the second dataset, it further includes increasing the weight of the different category annotation that belongs to the first category annotation but does not belong to the second category annotation in the second dataset in the first training model.
[0031] In this specific embodiment, the first data set includes various differently annotated data. Among them, the first category annotation of the first data set is compared with the second category annotation of the second data set to determine the different category annotations that are included in the first category annotation but not in the second category annotation. For example, there are the first data set B and the second data set A. Among them, the first category annotation of the data in the first data set B includes annotation ②, annotation ③, and annotation ④, and the second category annotation of the data in the second data set A includes annotation ①, annotation ②, and annotation ③. By comparing the first category annotation of the data in the first data set B and the second category annotation of the data in the second data set A, it is determined that the second data set A does not have annotation ④, thus obtaining the different category annotation ④.
[0032] In this specific embodiment, the second data set A and the first data set B are taken as examples for illustration. The first data set B corresponds to the training model b. The first category annotation of the first data set B includes annotation ②, annotation ③, and annotation ④, and the corresponding training model b contains the first category annotation information; the second category annotation of the second data set A includes annotation ①, annotation ②, and annotation ③. Among them, the semantic ranges represented by annotation ①, annotation ②, and annotation ③ in the second category annotation have an intersection with the semantic range represented by the different category annotation ④. Through the above description, the different category annotation of the first data set B relative to the second data set A is annotation ④. In the process of traversing the second data set A according to the first category annotation of the first data set B to obtain the predicted category annotation of the second data set A, the weight of the different category annotation ④ is increased. Thus, when performing a traversal operation on the data in the second data set A according to the first category annotation, the recall rate of the data in the second data set A that is the different category annotation ④ is increased, ensuring that all the data in the second data set A that belongs to the different category annotation ④ is correspondingly annotated.
[0033] In the process of testing the second data set according to the training model corresponding to the first data set, the weight of the different category annotation is increased, and then the data in the second data set that belongs to the different category annotation is labeled as the corresponding predicted category annotation. Thus, it is ensured that during the subsequent data set fusion process, the unlabeled data in the second data set that belongs to the different category annotation is prevented from having a negative impact, optimizing the results of data processing such as data set fusion or data model training, and thus ensuring the accuracy of the data set during fusion and training of the model.
[0034] In Figure 1 the specific embodiment shown, process S103 is to obtain the target second data set according to the second data set and the predicted category annotation.
[0035] Figure 2 A specific embodiment of the data set generation method of the present application is shown.
[0036] InFigure 2 In the specific embodiment shown, in process S103 of the present application, the target second data set obtained according to the second data set and the predicted class labels includes process S201, recording the discrimination class labels identified in the predicted class labels as ignored class labels; and process S202, fusing the second class labels and the predicted class labels with ignored class labels to obtain target class labels, and determining the second data set with the target class labels as the target second data set.
[0037] In Figure 2 In the specific embodiment shown, in process S201, the discrimination class labels identified in the predicted class labels are recorded as ignored class labels.
[0038] In an example of the present application, as described above, by traversing the second data set A through the first class labels included in the first training model b corresponding to the first data set B, including label ②, label ③, and label ④, the predicted class labels of the second data set A are obtained. For example, the obtained predicted class labels include label ②', label ③', and label ④'. Among them, the predicted class labels of the second data set A, label ②', label ③', and label ④' correspond to the first class labels of the first data set B, label ②, label ③, and label ④, and are of the same label type. The second class labels of the second data set A include label ①, label ②, and label ③, and label ④ is obtained as a discrimination class label by comparing with the labels in the first data set B. The labels in the predicted class labels of the second data set A that are the same as the discrimination class label ④, namely label ④', are recorded as ignored class labels, that is, the predicted class label ④' of the second data set A is re-labeled as the ignored label class ⑤ of the second data set A.
[0039] In Figure 2 In the specific embodiment shown, in process S202, the second class labels and the predicted class labels with ignored class labels are fused to obtain target class labels, and the second data set with the target class labels is determined as the target second data set.
[0040] In an example of the present application, the first category annotations of the first dataset B include annotation ②, annotation ③, and annotation ④, and the second category annotations of the second dataset A include annotation ①, annotation ②, and annotation ③. Through the above description, the predicted category annotations of the second dataset A are annotation ②', annotation ③', and annotation ④', where the annotation ④' that is the same as the discriminative category annotation ④ is denoted as the ignored category annotation ⑤. In the second dataset A, the second category annotations, annotation ①, annotation ②, and annotation ③, and the predicted category annotations with the ignored category annotation, annotation ⑤ are fused to obtain the target category annotations, denoted as annotation ①, annotation ②, annotation ③, and annotation ⑤. The second dataset with the target category annotations is determined as the target second dataset. Among them, compared with the second dataset, the data content of the target second dataset does not change, but the annotation of the data content is changed. The data in the second dataset that is not annotated is annotated, and according to the above description, the ignored category annotation is generated, so that the data with the ignored category annotation does not participate in the subsequent model training process, reducing the negative impact of such data on the training model, optimizing the results of data processing such as dataset fusion or data model training, and improving the accuracy and robustness of the trained data model.
[0041] In a specific embodiment of the present application, the dataset generation method of the present application further includes: performing a dilation operation on the data corresponding to the ignored category annotation in the second dataset, so as to expand the data range corresponding to the ignored category annotation.
[0042] In an example of the present application, the first dataset B and the second dataset A are taken as examples for this description. As described above, the first category annotations of the first dataset B include annotation ②, annotation ③, and annotation ④, and the second category annotations of the second dataset A include annotation ①, annotation ②, and annotation ③, where the discriminative annotation category obtained by comparing the datasets is annotation ④, and the semantic ranges represented by the second category annotations, annotation ①, annotation ②, and annotation ③, and the discriminative category annotation, annotation ④, have an intersection. Through the above process, the ignored category annotation ⑤ of the second data A is finally obtained. In the second dataset A, a dilation operation is performed on the data corresponding to the ignored category annotation ⑤ to expand the data content corresponding to the ignored category annotation ⑤.
[0043] By performing a dilation operation on the data corresponding to the ignored annotation category in the second dataset, the data content corresponding to the ignored annotation category is expanded, so that the influence of the marginal data of the content belonging to the ignored annotation category on the final data fusion and model training is further reduced. During the training process of the semantic segmentation model, the pixel content range belonging to the ignored annotation category is further expanded, so as to avoid misjudging some features of the ignored annotation category obtained from the pixel values participating in the training at the edge as the target of the pixel value, avoiding the influence on the final data model training, and improving the accuracy of the data model.
[0044] Figure 3 An example of the method for generating the data set of the present application is shown.
[0045] As Figure 3 shown, the second data set A and the first data set B are sets of relevant data in the speech segmentation process, where there are multiple image information in the second data set A and the first data set B, and the second data set A and the first data set B respectively include multiple annotation categories. The following will combine Figure 3 to illustrate the specific process of the data set fusion method of the present application.
[0046] As Figure 3 shown, training is performed according to the existing model training method to obtain the training model b corresponding to the data set B. The second category annotation of the second data set A is compared with the first category annotation of the first data set B to determine the different category annotation of the first data set B relative to the second data set A. Among them, the different category is included in the first category annotation but not included in the second category annotation.
[0047] There are multiple images in the data set A. First, select an image Ia from the data set A, as well as the relevant annotation La of this image. The selected image Ia in the data set A is tested according to the training model b corresponding to the first data set B to obtain the predicted category annotation of the image Ia La . Among them, in the process of testing the image Ia according to the model b, the weight of the different category annotation in the training model b is increased, so that the data content in the image Ia that conforms to the different category annotation is maximally extracted. After obtaining the predicted category annotation of the image Ia La , it is compared with the different category annotations of the second data set A and the first data set B, and the annotation in the predicted category annotation of the image Ia La that is the same as the different category annotation is recorded as the ignored category annotation. For example, in the semantic segmentation process, the annotation category of the image Ia can be represented by pixel values, such as [0 - 255]. When representing the ignored category annotation, the pixel values of the relevant content of the ignored category annotation can be set to 255. At this time, the predicted category annotation of the image Ia La includes the ignored category annotation. Subsequently, the annotation La of the image Ia and the predicted category annotation of the image Ia La including the ignored category annotation are fused to obtain a new annotation of the image Ia. Then, the data content annotated as the ignored category annotation in the image Ia is subjected to a dilation operation to expand the data range represented by the ignored category annotation, thereby completing the processing of the image Ia. The same processing is performed on other images in the second data set A, and finally a new data set corresponding to the second data set A is obtained AFuse multiple datasets for maximum utilization, avoid obtaining the dataset model categories in the smallest possible way, and improve the robustness of the final dataset model. By processing the dataset to generate a new dataset and then fusing the datasets, avoid the influence of the unlabeled category content in the dataset on the dataset fusion result, and improve the accuracy of the finally generated data model. Additionally, by comparing between datasets, obtain the differential annotation categories of the datasets, and then finally label the data content that is not annotated in the dataset but belongs to the differential annotation categories as the ignored annotation category. Thus, in the subsequent dataset fusion and data model training processes, avoid the negative impact of this type of data, thereby improving the accuracy of dataset fusion and generating the final data model. Additionally, during the process of generating a new dataset, increase the weight of the differential annotation categories, so that the finally ignored annotation category includes as much data content in the dataset as possible. And perform a dilation operation on the data content belonging to the differential annotation categories, further reducing the influence of the marginal data in the ignored annotation category in the dataset, and further improving the accuracy of dataset fusion and the finally generated data model.
[0048] Figure 4 and Figure 5 is a specific example of the dataset fusion method of this application.
[0049] As Figure 4 shown, for dataset A containing annotation categories a, b, c and dataset B containing annotations b, c, d, e, it is difficult to directly train a semantic segmentation model with five types of annotations including a, b, c, d, and e. As Figure 5 in (1) is the actual annotation situation of a picture in dataset A, where the annotations in dataset A include three categories a, b, and c. However, in actual situations, the data of categories b and c in dataset A may contain data with annotation categories d and e, as Figure 5 shown in (2) in, that is, the annotation categories d and e are the differential category annotations of dataset A. If dataset A is not processed and directly fused with dataset B and the fused new dataset is trained, it will cause great damage to the final training result and reduce the accuracy of the training result. Therefore, set the regions belonging to annotations d and e in Figure 5 in (2) as the ignored category annotation, and then perform the dataset fusion and subsequent training processes. For example, when performing semantic segmentation training, set the regions of annotations d and e as the ignored category annotation, then the data in this region does not participate in the training of the network and will not have a negative impact on the result of the model.
[0050] In the method for generating a data set of the present application, a basic segmentation model b can be trained according to data set B, and then the model is used to predict the annotations in data set A to obtain the predicted class annotations of data set A, and then the ignored class annotations d and e in data set A are obtained. In the process of obtaining the predicted class annotations of data set A, the prediction weights of the ignored class annotations d and e can be increased to ensure the accuracy of the prediction. In the actual process, even if there are some misidentifications, it has no impact because the misidentified part will not participate in the subsequent data set fusion and training processes. At the same time, the data content represented by the ignored class annotations d and e in data set A is subjected to a dilation operation to expand the data range of the ignored class annotations d and e, so that the targets at the edges of d and e do not participate in the training either. The result of the dilation operation is as shown in Figure 5 shown in (3) of []. By the dilation operation, the negative impact generated by the data at the edges of the ignored class annotations d and e during the training process is avoided. As shown in Figure 5 (2) and (3) of []. After the dilation operation, as shown in Figure 5 the area of the ignored class annotations d and e represented by (3) will be larger than Figure 5 the actual area of the ignored class annotations d and e represented by (2).
[0051] In an example of the present application, in the method for generating data set annotations of the present application, the first class annotation in the first data set can be the annotation of one data set or the annotation of the data set after fusing the annotations of multiple data sets.
[0052] Figure 6 Shows a specific implementation manner of the data set generation device of the present application.
[0053] In this specific implementation manner, the data set generation device of the present application includes: a different class annotation determination module, which determines the different class annotations included in the first class annotation but not included in the second class annotation according to the first class annotation for representing all class annotations of the data in one first data set or all fused class annotations of the data in multiple first data sets, and the second class annotation for representing all class annotations of the data in the second data set; and an ignored class annotation determination module, when there is an intersection between the semantic range represented by the second class annotation and the semantic range represented by the different class annotations, generates an ignored class annotation for the data content corresponding to the intersection in the second data set.
[0054] In a specific implementation manner of the present application, the modules 601 and 602 in the data set generation device of the present application can be directly in hardware, in a software module executed by a processor, or in a combination of both.
[0055] A software module may reside in a RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The exemplary storage medium is coupled to the processor such that the processor can read information from and write information to the storage medium.
[0056] The processor may be a central processing unit (CPU), or may also be any other general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic, discrete hardware component, or any combination thereof. The general-purpose processor may be a microprocessor, but in an alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. In an alternative, the storage medium may be integral with the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in the user terminal as discrete components.
[0057] Figure 7 A specific embodiment of the data model training method of the present application is shown.
[0058] In Figure 7 In the specific embodiment shown, the data model training method of the present application includes process S701 of obtaining a target first data set of the first data set and a target second data set of the second data set, including: respectively training a first training model and a second training model through the first data set and the second data set; respectively training the first data set through the second training model and training the second data set through the first training model to obtain a first predicted class label of the first data set and a second predicted class label of the second data set, and obtaining the target first data set and the target second data set according to the first class label and the first predicted class label of the first data set and the second class label and the second predicted class label of the second data set.
[0059] In this specific embodiment, the target first data set corresponding to the first data set and the target second data set corresponding to the second data set are generated according to the data set generation method of the present application. The target first data set includes the first category annotations of all category annotations of the data in the first data set, and the ignored category annotations determined according to the second data set; the target second data set includes the second category annotations of all category annotations of the data in the second data set, and the ignored category annotations determined according to the first data set.
[0060] In Figure 7 the specific embodiment shown, the data model training method of the present application includes process S702, where the target first data set and the target second data set are fused to obtain a third data set, and a third data model is trained through the third data set.
[0061] In this specific embodiment, the target first data set and the target second data set are fused to obtain a third data set. The third data set includes the first category remarks and the ignored category annotations in the target first data set, and the second category annotations and the ignored category annotations in the target second data set. When training the third data set to obtain the third data model, the data in the third data set that does not belong to the ignored category annotations is used to train the data model to obtain the third data model. Among them, the data labeled as the ignored category annotations is excluded to avoid the negative impact of such data during the model training process and improve the accuracy of the target data model.
[0062] By fusing each data set and then training the model, the generalization ability of the data model is improved, and data loss is avoided. In addition, ignored category annotations are generated in each data set, so that the data with ignored category annotations does not participate in the subsequent model training process, reducing the negative impact of such data on the training model and improving the accuracy and robustness of the trained data model.
[0063] In a specific embodiment of the present application, a computer-readable storage medium stores computer instructions, and the computer instructions are operated to execute the data set generation method described in any embodiment.
[0064] In a specific embodiment of the present application, a computer device includes a processor and a memory, and the memory stores computer instructions, where: the processor operates the computer instructions to execute the data set generation method described in any embodiment.
[0065] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be electrical, mechanical or other forms.
[0066] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0067] The above are only the embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A method for generating a dataset, characterized in that, Including: Training a basic semantic segmentation model with a first data set including multiple pieces of first image information to obtain a first training model, where the first training model includes information on first category annotations for all category annotations of the data in the first data set; Training a second data set including multiple pieces of second image information through the first training model to obtain predicted category annotations for the second data set, where the predicted category annotations include discrimination category annotations, the discrimination category annotations are determined by performing semantic comparison between the first category annotations and the second category annotations, and the second category annotations include information on all category annotations of the data in the second data set; and Obtaining a target second data set based on the second data set and the predicted category annotations, where the annotation information identified as the discrimination category annotation in the predicted category annotations is recorded as ignored category annotations; and fusing the second category annotations and the predicted category annotations with the ignored category annotations to obtain target category annotations, and determining the second data set with the target category annotations as the target second data set; Using the target second data set for subsequent training of the semantic segmentation model, such that data with the ignored category annotations does not participate in the subsequent training process of the semantic segmentation model.
2. The data set generation method according to claim 1, wherein Before training the second data set through the first training model to obtain the predicted category annotations for the second data set, it further includes: In the first training model, increasing the weight of the discrimination category annotations that belong to the first category annotations but do not belong to the second category annotations in the second data set.
3. The dataset generation method according to claim 1, characterized in that The process of training the second data set through the first training model to obtain the predicted category annotations for the second data set includes: Traversing all the data in the second data set according to the first category annotation information after weight adjustment, and using the first category annotations to annotate the traversed data to obtain the predicted category annotations.
4. The dataset generation method according to claim 1, wherein It further includes: Performing a dilation operation on the data corresponding to the ignored category annotations in the target second data set, so as to expand the data range corresponding to the ignored category annotations.
5. A data set generation device, characterized in that, Including: A model training module that trains a basic semantic segmentation model with a first data set including multiple pieces of first image information to obtain a first training model, where the first training model includes information on first category annotations of the first data set; And training a second data set including multiple pieces of second image information through the first training model to obtain predicted category annotations for the second data set, where the predicted category annotations include discrimination category annotations, the discrimination category annotations are determined by performing semantic comparison between the first category annotations and the second category annotations, and the second category annotations include information on all category annotations of the data in the second data set; and A target dataset module, which obtains a target second dataset according to the second category annotation of the second dataset and the predicted category annotation, wherein the annotation information identified as the different category annotation in the predicted category annotation is recorded as an ignored category annotation; and the second category annotation and the predicted category annotation with the ignored category annotation are fused to obtain a target category annotation, and the second dataset with the target category annotation is determined as the target second dataset; the target second dataset is used for subsequent semantic segmentation model training, so that the data with the ignored category annotation does not participate in the subsequent semantic segmentation model training process.
6. A method for training a data model, characterized in that, Including: Obtaining a target first dataset of the first dataset and a target second dataset of the second dataset, including: Training a first training model through the first dataset including multiple first picture information, and training a second training model through the second dataset including multiple second picture information, wherein the first training model and the second training model are trained from a basic semantic segmentation model; Training the first dataset through the second training model to obtain a first predicted category annotation of the first dataset, and training the second dataset through the first training model to obtain a second predicted category annotation of the second dataset, and According to the first category annotation and the first predicted category annotation of the first dataset, obtaining the target first dataset, the first predicted category annotation includes a first different category annotation, wherein the annotation information identified as the different category annotation in the first predicted category annotation is recorded as a first ignored category annotation, and the first category annotation and the first predicted category annotation with the first ignored category annotation are fused to obtain a first target category annotation, and the first dataset with the first target category annotation is determined as the target first dataset; and, According to the second category annotation and the second predicted category annotation of the second dataset, obtaining the target second dataset, the second predicted category annotation includes a second different category annotation, wherein the annotation information identified as the different category annotation in the second predicted category annotation is recorded as a second ignored category annotation, and the second category annotation and the second predicted category annotation with the second ignored category annotation are fused to obtain a second target category annotation, and the second dataset with the second target category annotation is determined as the target second dataset; Fusing the target first dataset and the target second dataset to obtain a third dataset, and training a third data model through the third dataset, so that the data with the first ignored category annotation and the second ignored category annotation does not participate in the subsequent semantic segmentation model training process.
7. A computer-readable storage medium storing computer instructions, wherein the computer instructions are operated to execute the dataset generation method according to any one of claims 1-4.
8. A computer device, comprising a processor and a memory, the memory storing computer instructions, wherein the processor operates the computer instructions to execute the dataset generation method according to any one of claims 1-4.
Citation Information
Patent Citations
Classification model fusion method and device and storage medium
CN111275133A