A method and device for processing image data
By using the image annotation model to be labeled and the initial training sample set is updated according to the similarity, the problem of low efficiency of wrong label update in the prior art is solved, and the performance and labeling accuracy of the image annotation model are improved.
Patent Information
- Application Number
- CN202210235982.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-10
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-03-10
AI Technical Summary
In the process of image data, it is difficult to efficiently update and correct wrong labels in the initial training sample set, resulting in low label accuracy and affecting model performance.
By using the image annotation model trained by the initial training sample set, the to-process data set is obtained, the annotation result data set is calculated, the similarity between the annotation result data set and the initial training sample set is updated according to the similarity.
This method can efficiently update and correct wrong labels in the initial training sample, improve the labeling quality, and thus improve the performance and labeling accuracy of the image labeling model.
Smart Images

Figure CN114612699B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for processing image data. Background Art
[0002] With the continuous development of artificial intelligence technology, deep learning technology plays an increasingly important role in all walks of life. For example, it can be applied to the processing of image data. When training a deep learning model, a large amount of training data is required. The quality of the annotations in the training data will affect the performance of the model.
[0003] Existing technologies mainly use weak supervision and semi-supervised learning solutions to improve the speed and efficiency of data labeling. However, since it is difficult to efficiently update and correct the wrong labels of the original data, the labeling accuracy is low, which in turn leads to a low labeling accuracy of the trained model. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for image data processing, which can efficiently update and correct erroneous labels in the initial training sample set, improve the annotation quality of the updated initial training sample set, and further improve the performance of the trained image annotation model.
[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for processing image data is provided, comprising:
[0006] The image annotation model trained with the initial training sample set is used to annotate the dataset to be processed, and annotate the result dataset;
[0007] Determining the similarity between the labeled result data set and the initial training sample set;
[0008] The initial training sample set is updated according to the similarity.
[0009] Optionally, after obtaining the labeling result data set, the method further includes: correcting the labeling result data set.
[0010] Optionally, determining the similarity between the labeled result data set and the initial training sample set includes:
[0011] For any labeled result data in the labeled result data set, the similarity between the labeled result data and each sample data in the initial training sample set is calculated respectively.
[0012] Optionally, updating the initial training sample set according to the similarity includes:
[0013] For any of the labeled result data, a sample data subset whose similarity with any of the labeled result data meets a preset condition is selected from the initial training sample set;
[0014] The initial training sample set is updated according to the sample data subset corresponding to all the labeled result data and the labeled result data set.
[0015] Optionally, before updating the initial training sample set according to the sample data subset corresponding to all the labeled result data and the labeled result data set, the method further includes: correcting the sample data satisfying the preset conditions; and / or
[0016] De-duplicate the sample data that meets the preset conditions.
[0017] Optionally, calculating the similarity between the labeled result data and each piece of sample data in the initial training sample set includes:
[0018] Determine a sample feature corresponding to each of the sample data and a labeling result feature corresponding to any of the labeling result data;
[0019] The similarity between the annotation result data and each piece of sample data is determined according to the distance between the annotation result feature and each of the sample features.
[0020] Optionally, determining a sample feature corresponding to each sample data includes:
[0021] Using M preset models, respectively determine M sub-features corresponding to the sample data, where M is a positive integer greater than or equal to 1;
[0022] The M sub-features are concatenated to obtain a sample feature corresponding to each piece of sample data; or, the M sub-features are used as M sample features corresponding to each piece of sample data.
[0023] Another aspect of an embodiment of the present invention provides an apparatus for processing image data, including:
[0024] The model annotation module uses the image annotation model trained with the initial training sample set to annotate the dataset to be processed and obtain an annotation result dataset;
[0025] A determination module determines the similarity between the labeled result data set and the initial training sample set;
[0026] An updating module updates the initial training sample set according to the similarity.
[0027] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0028] one or more processors;
[0029] a storage device for storing one or more programs,
[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the image data processing method provided by the present invention.
[0031] According to another aspect of an embodiment of the present invention, a computer readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for processing image data provided by the present invention is implemented.
[0032] An embodiment of the above invention has the following advantages or beneficial effects: the method for processing image data provided by the embodiment of the present invention uses the image annotation model obtained by training the initial training sample set to annotate the data set to be processed to obtain the annotation result data set; then determines the similarity between the annotation result data set and the initial training sample set, and filters or searches for a sample data subset whose similarity meets the preset conditions from the initial training sample set; and updates the initial training sample set using the annotation result data set and the initial training sample set. The method of the embodiment of the present invention can efficiently update and correct the wrong labels in the initial training sample set, improve the annotation quality of the initial training sample set, and then improve the performance of the trained image annotation model and the annotation accuracy of the image annotation model.
[0033] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0035] Figure 1 is a schematic diagram of the main flow of a method for image data processing according to an embodiment of the present invention;
[0036] Figure 2 is a schematic diagram of the main flow of another method for processing image data according to an embodiment of the present invention;
[0037] Figure 3 is a main flow chart of another method for processing image data according to an embodiment of the present invention;
[0038] Figure 4 is a flowchart of a method for processing image data according to an embodiment of the present invention;
[0039] Figure 5 is a schematic diagram of main modules of an apparatus for image data processing according to an embodiment of the present invention;
[0040] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0041] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0043] Figure 1 is a schematic diagram of the main flow of a method for image data processing according to an embodiment of the present invention. Figure 1 As shown, the image data processing method, applied to the server, includes the following steps:
[0044] Step S101: annotate the dataset to be processed using the image annotation model trained with the initial training sample set to obtain an annotation result dataset;
[0045] Step S102: Determine the similarity between the labeled result data set and the initial training sample set;
[0046] Step S103: Update the initial training sample set according to the similarity.
[0047] In an embodiment of the present invention, the initial training sample set includes multiple sample data, each of which includes image data and annotation data (i.e., labels). The initial training sample set can be a purely manually annotated image data set, or a noise data set obtained through a semi-supervised or weakly supervised learning method. There will be wrong labels in the initial training sample set, and the annotation quality of the wrong labels is low, which in turn leads to poor performance of the image annotation model trained with the initial training sample set containing wrong labels, and low annotation accuracy, so it is necessary to update and correct the wrong labels in the initial training sample set.
[0048] The neural network model is trained using the initial training sample set to obtain an image annotation model, wherein the neural network model can be a CNN (convolutional neural network) model of resnet50 (an image recognition model structure) or other neural network models, such as EfficientNet, GoogLeNet and other neural network models.
[0049] The image annotation model can be used to annotate the unlabeled dataset to be processed to obtain an annotation result dataset, which includes multiple annotation result data, each of which includes image data and model annotation data obtained by the image annotation model. The source of the dataset to be processed is not particularly limited, and can be online data of certain businesses, or data crawled from a third party or the Internet.
[0050] In an optional implementation of the embodiment of the present invention, in step S101, after obtaining the labeling result data set, it also includes: correcting the labeling result data set. Since the model labeling data in the labeling result data set may be inaccurate, the wrong or inaccurate model labeling data can be corrected by correction. The correction can be a manual correction method or an automatic correction method to correct the wrong labels in the model labeling data.
[0051] Optionally, when correcting the annotation result data set, in order to improve the efficiency and accuracy of the correction, the annotation result data set may be sampled before correction, such as extracting part of the annotation result data from the annotation result data set for correction, so that the similarity between the annotation result data set and the initial training sample set may be determined based on the part of the annotation result data in the annotation result set. For example, 50 annotation result data are extracted from a annotation result data set containing 100 annotation result data for manual correction, and the 50 annotation result data after manual correction are used as the annotation result data set to determine the similarity between the 50 annotation result data and the initial training sample set.
[0052] In the embodiment of the present invention, in step S102, determining the similarity between the annotation result data set and the initial training sample set includes: for any annotation result data in the annotation result data set, respectively calculating the similarity between the annotation result data and each sample data in the initial training sample set.
[0053] When determining the similarity between the labeled result data set and the initial training sample set, for any labeled result data, the similarity between each sample data in the initial training sample set and the labeled result data is calculated. For example, if the initial training sample set contains K sample data, K is an integer greater than or equal to 1, then for any labeled result data, K similarity results can be calculated, and if the labeled result data set contains L labeled result data, then a total of L*K similarity results are calculated. The L*K similarity results calculated can be used as the similarity between the labeled result set and the initial training sample set.
[0054] In an optional implementation of the embodiment of the present invention, the similarity may be a distance, such as at least one of a cosine distance (also called cosine similarity), a Euclidean distance, and the like.
[0055] In the embodiment of the present invention, Figure 2 As shown, the initial training sample set is updated according to the similarity, including:
[0056] Step S201: for any labeled result data, a sample data subset whose similarity with any labeled result data meets a preset condition is selected from the initial training sample set;
[0057] Step S201: updating the initial training sample set according to the sample data subset corresponding to all the labeled result data and the labeled result data set.
[0058] In an embodiment of the present invention, for any annotation result data, after calculating the similarity between any annotation result data and each sample data in the initial training sample set, it is determined whether the similarity meets the preset conditions, and a sample data subset is formed according to the sample data that meets the preset conditions, wherein the similarity is the degree of similarity between the standard result data and the sample data, and different similarity expressions have different preset conditions. When the similarity is distance, the sample data whose distance to any annotation result data is less than a preset distance threshold (such as 0.1) is taken as the sample data that meets the preset conditions; the sample data that meets the preset conditions can also be: for any annotation result data, the distance between each sample data and any annotation result data is sorted in order from small to large, and the sample data corresponding to the first N distances are taken as the sample data that meets the preset conditions, wherein N is a positive integer greater than 1.
[0059] For each piece of labeled result data in the labeled result data set, there is a corresponding sample data subset. For a labeled result data set containing L pieces of labeled result data, L sample data subsets can be obtained, that is, the sample data subsets corresponding to all the labeled result data are obtained. The initial training sample set can be updated according to the sample data subsets and the labeled result data set corresponding to all the labeled result data, that is, the updated initial training sample set includes the sample data subsets and the labeled result data set corresponding to all the labeled result data. It is also possible to choose to update the initial training sample set according to part of the sample data in the sample data subset corresponding to all the labeled result data and all or part of the labeled result data.
[0060] In the embodiment of the present invention, before updating the initial training sample set according to the sample data subsets corresponding to all the labeled result data and the labeled result data set, it also includes: correcting the sample data that meets the preset conditions; and / or
[0061] De-duplicate the sample data that meets the preset conditions.
[0062] In order to further improve the accuracy of the annotation labels in the sample data subset, before updating the initial training sample set according to the sample data subset corresponding to all the annotation result data and the annotation result data set, the sample data that meets the preset conditions is corrected to obtain the corrected sample data subset, so as to correct the wrong labels. The initial training sample set is updated with the corrected sample data subset and the annotation result data set, which can improve the annotation quality of the updated initial training sample set and thus improve the performance of the image annotation model.
[0063] In an embodiment of the present invention, since each annotation result data corresponds to a sample data subset, the sample data subset contains sample data that meets preset conditions, all annotation result data correspond to multiple sample data subsets, and the same data may exist in multiple sample data subsets. Therefore, the same data in the sample data subsets corresponding to all annotation result data can be deduplicated to streamline the data.
[0064] In an optional implementation of the embodiment of the present invention, as Figure 3 As shown, the similarity between the labeled result data and each sample data in the initial training sample set is calculated, including:
[0065] Step S301: Determine a sample feature corresponding to each piece of sample data and a labeling result feature corresponding to any labeling result data;
[0066] Step S301: Determine the similarity between the annotation result data and each piece of sample data according to the distance between the annotation result feature and each sample feature.
[0067] In an embodiment of the present invention, when calculating the similarity between the annotation result data and each sample data in the initial training sample set, the annotation result features corresponding to the annotation result data and the sample features corresponding to each sample data can be extracted, wherein the annotation result features and the sample features can be represented by feature vectors, and the annotation result features and the sample features can be extracted using an image annotation model or other Panhua open source models.
[0068] Extract the annotation result features from the annotation result data set to form an annotation result feature set, extract the sample features from the initial training sample set to form a sample feature set, and use the similarity between the annotation result feature set and the sample feature set as the similarity between the annotation result data and the initial training sample set. For any annotation result feature, use the calculated distance between any annotation result feature and each sample feature as the similarity between any annotation result data and each sample data, and then determine the sample features whose distance from any annotation result feature meets the preset conditions, and then map the sample features that meet the preset conditions back to the initial training sample set to determine the corresponding sample data that meets the preset conditions, that is, a sample data subset that meets the preset conditions can be screened out from the initial training sample set.
[0069] In the embodiment of the present invention, the distance between the annotation result feature and the sample feature can be calculated by selecting the open source library faiss (open source library for clustering and similarity search) to implement it.
[0070] In the embodiment of the present invention, determining the sample feature corresponding to each piece of sample data includes:
[0071] Using M preset models, respectively determine M sub-features corresponding to the sample data, where M is a positive integer greater than or equal to 1;
[0072] The M sub-features are concatenated to obtain a sample feature corresponding to each piece of sample data; or, the M sub-features are used as the M sample features corresponding to each piece of sample data.
[0073] In an embodiment of the present invention, the M preset models may select an image annotation model trained by an initial training sample set, or may select one or more other generalized open source models, such as convolutional network models such as VGG, resnet, and inceptionV3. The extraction of annotation result features and sample features may be performed using one image annotation model or multiple preset models.
[0074] In an embodiment of the present invention, when determining the sample feature corresponding to each sample data, for each sample data, each preset model can extract a sample sub-feature corresponding to the sample data, and M sample sub-features can be obtained by using M preset models to extract them respectively.
[0075] In an implementation of the embodiment of the present invention, after M sample sub-features corresponding to the piece of sample data are determined, each sample sub-feature is used as a sample feature corresponding to the piece of sample data, that is, M sample features can be obtained for one piece of sample data.
[0076] Similarly, when determining the annotation result feature corresponding to any annotation result data, for each annotation result data, each preset model can extract a annotation result sub-feature, and M annotation result sub-features can be obtained by using M preset models to extract them respectively. Each annotation result sub-feature is used as the annotation result feature corresponding to the sample data, that is, M annotation result features can be obtained for one annotation result data.
[0077] In one implementation of an embodiment of the present invention, when determining sample features that meet preset conditions, for any annotation result feature, each preset model can determine N sample features that meet the preset conditions, then for M preset models, M*N sample features that meet the preset conditions can be determined, so that the sample data corresponding to the M*N sample features can be used as sample data that meet the preset conditions, so that a sample data subset can be determined, and then the initial training sample set can be updated based on the sample data subset and the annotation result data set.
[0078] In another implementation of the embodiment of the present invention, after determining the M sample sub-features corresponding to the sample data, the M sample sub-features are spliced into one sample feature as the sample feature corresponding to the sample data; for example, if M=3, for a certain sample data, the three sample sub-features extracted by the three preset models are (a, b), (c, d) and (e, f), then the three sample sub-features can be spliced into one sample feature (a, b, c, d, e, f) to obtain a sample data subset with higher similarity from the initial training sample set.
[0079] Similarly, M preset models are used to extract annotation result features. For each annotation result data, each preset model can extract a annotation result sub-feature, then M annotation result sub-features can be obtained, and the M annotation result sub-features are spliced into one annotation result feature as the annotation result feature corresponding to the annotation result data.
[0080] In another implementation of the embodiments of the present invention, when determining sample features that meet preset conditions, for one annotation result feature, N sample features that meet the preset conditions can be determined, so that the sample data corresponding to the N sample features that meet the preset conditions can be used as sample data that meet the preset conditions, so that a sample data subset can be determined, and then the initial training sample set is updated based on the sample data subset and the annotation result data set.
[0081] In an embodiment of the present invention, the updated initial training sample set includes a labeling result data set and a sample data subset. The image labeling model trained using the updated initial training sample set has better performance, and the accuracy of labeling using the image labeling model is higher.
[0082] like Figure 4 A method for processing image data according to an embodiment of the present invention is shown, the method comprising:
[0083] Step S401: obtaining an initial training sample set;
[0084] Step S402: using the initial training sample set to train and obtain an image annotation model;
[0085] Step S403: obtaining a data set to be processed, and annotating the data set to be processed using an image annotation model to obtain an annotation result data set;
[0086] Step S404: sampling and manually correcting the annotation result data set to obtain a corrected annotation result data set;
[0087] Step S405: extracting the annotation result features in the corrected annotation result data set using the image annotation model, and extracting the sample features in the initial training sample set;
[0088] Step S406: for any labeling result feature, calculating the cosine distance between each sample feature and any labeling result feature, and determining the sample data corresponding to the sample feature whose cosine distance is less than a preset distance threshold as the sample data satisfying the preset condition;
[0089] Step S407: constructing a sample data subset according to the sample data that meets the preset conditions corresponding to all the labeling result features;
[0090] Step S408: Manually correct the sample data subset to obtain a corrected sample data subset;
[0091] Step S409: Add the corrected sample data subset and the corrected annotation result data set to obtain an updated initial training sample set, and return to step S401.
[0092] The method for processing image data provided by the embodiment of the present invention uses the image annotation model obtained by training the initial training sample set to annotate the data set to be processed to obtain the annotation result data set; corrects the annotation result data set to correct the wrong labels in the annotation result data set; then determines the similarity between the annotation result data set and the initial training sample set, and filters or searches for a sample data subset whose similarity meets the preset conditions from the initial training sample set; and updates the initial training sample set using the annotation result data set and the initial training sample set. The method of the embodiment of the present invention can efficiently update and correct the wrong labels in the initial training sample set, improve the annotation quality of the initial training sample set, and further improve the performance of the trained image annotation model and the annotation accuracy of the image annotation model.
[0093] like Figure 5As shown, another aspect of the embodiment of the present invention provides an apparatus 500 for processing image data, comprising:
[0094] Model annotation module 501, annotating the dataset to be processed using the image annotation model trained with the initial training sample set to obtain an annotation result dataset;
[0095] Determining module 502, determining the similarity between the labeled result data set and the initial training sample set;
[0096] The updating module 503 updates the initial training sample set according to the similarity.
[0097] In the embodiment of the present invention, the model annotation module 501 is further used to: after obtaining the annotation result data set, calibrate the annotation result data set.
[0098] In the embodiment of the present invention, the determination module 502 is further used to: for any labeled result data in the labeled result data set, respectively calculate the similarity between the labeled result data and each sample data in the initial training sample set.
[0099] In an embodiment of the present invention, the updating module 503 is further used to: for any annotation result data, filter out a sample data subset whose similarity with any annotation result data meets preset conditions from the initial training sample set; and update the initial training sample set according to the sample data subsets corresponding to all the annotation result data and the annotation result data set.
[0100] In the embodiment of the present invention, the updating module 503 is further used to: before updating the initial training sample set according to the sample data subsets corresponding to all the labeled result data and the labeled result data set, correct the sample data that meets the preset conditions; and / or
[0101] De-duplicate the sample data that meets the preset conditions.
[0102] In an embodiment of the present invention, the determination module 502 is further used to: determine the sample feature corresponding to each sample data and the annotation result feature corresponding to any annotation result data; determine the similarity between the annotation result data and each sample data according to the distance between the annotation result feature and each sample feature.
[0103] In an embodiment of the present invention, the determination module 502 is further used to: use M preset models to respectively determine M sub-features corresponding to the sample data, where M is a positive integer greater than or equal to 1; concatenate the M sub-features to obtain sample features corresponding to each piece of sample data; or use the M sub-features as M sample features corresponding to each piece of sample data.
[0104] Another aspect of an embodiment of the present invention provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the image data processing method of an embodiment of the present invention.
[0105] The embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method for processing image data according to the embodiment of the present invention is implemented.
[0106] Figure 6 An exemplary system architecture 600 is shown to which the method or apparatus for image data processing according to the embodiment of the present invention may be applied.
[0107] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0108] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0109] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0110] The server 605 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0111] It should be noted that the method for processing image data provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device for processing image data is generally disposed in the server 605 .
[0112] It should be understood that Figure 6The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0113] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0114] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0115] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0116] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0117] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0119] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a model annotation module, a determination module and an update module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the update module may also be described as a "module for updating the initial training sample set according to similarity".
[0120] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: annotating the processing data set using the image annotation model trained with the initial training sample set to obtain an annotation result data set; determining the similarity between the annotation result data set and the initial training sample set; and updating the initial training sample set according to the similarity.
[0121] According to the technical solution of the embodiment of the present invention, the image annotation model trained by the initial training sample set is used to annotate the processing data set to obtain the annotation result data set; the annotation result data set is corrected to correct the wrong labels in the annotation result data set; then the similarity between the annotation result data set and the initial training sample set is determined, and a sample data subset whose similarity meets the preset conditions is screened out from the initial training sample set; the initial training sample set is updated using the annotation result data set and the initial training sample set. The method of the embodiment of the present invention can efficiently update and correct the wrong labels in the initial training sample set, improve the annotation quality of the initial training sample set, and then improve the performance of the trained image annotation model and the annotation accuracy of the image annotation model.
[0122] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for image data processing, characterized in that: include: The image annotation model trained with the initial training sample set is used to annotate the dataset to be processed, and annotate the result dataset; Determining the similarity between the labeled result data set and the initial training sample set; Updating the initial training sample set according to the similarity; After obtaining the labeling result data set, the method further includes: correcting the labeling result data set; Determining the similarity between the labeled result data set and the initial training sample set includes: for any labeled result data in the labeled result data set, respectively calculating the similarity between the labeled result data and each sample data in the initial training sample set; Updating the initial training sample set according to the similarity includes: for any of the annotation result data, screening out from the initial training sample set a sample data subset whose similarity with any of the annotation result data meets a preset condition; updating the initial training sample set according to the sample data subset corresponding to all the annotation result data and the annotation result data set; the preset condition is that the similarity is greater than a preset similarity threshold.
2. The method according to claim 1, characterized in that: Before updating the initial training sample set according to the sample data subset corresponding to all the labeled result data and the labeled result data set, the method further includes: correcting the sample data that meets the preset conditions; and / or De-duplicate the sample data that meets the preset conditions.
3. The method according to claim 1, characterized in that Calculating the similarity between the labeled result data and each sample data in the initial training sample set includes: Determine a sample feature corresponding to each piece of the sample data and a labeling result feature corresponding to any of the labeling result data; The similarity between the annotation result data and each piece of sample data is determined according to the distance between the annotation result feature and each of the sample features.
4. The method according to claim 3, characterized in that Determining the sample feature corresponding to each piece of the sample data includes: Using M preset models, respectively determine M sub-features corresponding to the sample data, where M is a positive integer greater than or equal to 1; The M sub-features are concatenated to obtain a sample feature corresponding to each piece of sample data; or, the M sub-features are used as M sample features corresponding to each piece of sample data.
5. A device for processing image data, characterized in that: include: The model annotation module uses the image annotation model trained with the initial training sample set to annotate the dataset to be processed and obtain an annotation result dataset; A determination module determines the similarity between the labeled result data set and the initial training sample set; An updating module, which updates the initial training sample set according to the similarity; Wherein, the model annotation module is further used to: after obtaining the annotation result data set, calibrate the annotation result data set; The determination module is further used to: for any labeled result data in the labeled result data set, respectively calculate the similarity between the labeled result data and each sample data in the initial training sample set; The updating module is further used to: for any of the annotation result data, screen out a sample data subset whose similarity with any of the annotation result data meets a preset condition from the initial training sample set; update the initial training sample set according to the sample data subset corresponding to all the annotation result data and the annotation result data set; the preset condition is that the similarity is greater than a preset similarity threshold.
6. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Sample data processing method and device and computer readable storage medium
CN108009589A
Neural network model training method and device and medical image processing system
CN110689038A
Data labeling method and device
CN111104479A