Method and apparatus for correcting label of image sample, electronic device, and storage medium
By dividing image samples into N parts and performing model training and prediction, identifying and correcting inconsistent image sample labels, the problem of low label correction efficiency in the prior art is solved, and resource conservation and efficiency improvement are achieved.
Patent Information
- Application Number
- PCT/CN2024/114587
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-09
- Filing Date
- 2024-08-26
- Publication Date
- 2025-04-17
AI Technical Summary
The label correction method for image samples in the prior art has the problem of wasting human resources and low correction efficiency.
By dividing multiple image samples into N parts, and using N-1 image samples to train model N times, predicting an unused image sample, finding an image sample with inconsistent prediction labels and label labels and performing manual correction.
Reduce the number of image samples that do not require manual correction, improve the correction efficiency and save human resources.
Smart Images

Figure CN2024114587_17042025_PF_FP_ABST
Abstract
Description
Image sample label correction method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on October 9, 2023, with application number 202311300880.X and application name “Label correction method, device, electronic device and storage medium for image samples”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of image processing technology, and in particular to a method, device, electronic device, and storage medium for label correction of image samples. Background Art
[0004] Supervised learning in deep learning has a great demand for high-quality labeled image samples. The quality of image sample annotation directly affects the effectiveness of the model obtained by supervised learning.
[0005] In related technologies, a large number of image samples are pre-labeled using a priori algorithm models. This is followed by a first round of manual label optimization. All manually labeled image samples are then manually corrected (reviewed). Image samples that fail the correction are then manually re-labeled until all image samples pass the label correction. This means that even some correctly labeled image samples will undergo at least one round of manual correction, wasting human resources and inefficiently.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a label correction method, device, electronic device, and storage medium for image samples, which are used to solve the problems of waste of human resources and low correction efficiency in the label correction method of image samples in the related art.
[0008] In a first aspect, an embodiment of the present application provides a label correction method for an image sample, comprising:
[0009] Acquire a plurality of image samples, wherein an error rate of annotated labels of the plurality of image samples is lower than a set value;
[0010] Dividing the plurality of image samples into N parts, where N is a predetermined integer;
[0011] Cycle N times: Use N-1 image samples to train the model, use the trained model to predict the unused image sample, and obtain the predicted label. The unused image sample in different cycles is different.
[0012] Determine whether a correction stop condition is met based on the number of image samples whose predicted labels are inconsistent with the annotated labels;
[0013] If not, the inconsistent image sample is recorded to correct the annotation label of the inconsistent image sample.
[0014] In some embodiments, each image sample also has a category, and dividing the plurality of image samples into N parts includes:
[0015] According to the rule that the difference between the number of samples of the same category in different image samples is less than a preset value, the multiple image samples are divided into N parts.
[0016] In some embodiments, N is determined according to the following steps:
[0017] The number of samples of each category of image samples is used as a reference value;
[0018] If the reference value is not a multiple of the specified value, replacing the reference value with a multiple of the specified value that has the smallest difference with the reference value;
[0019] The greatest common divisor of each reference value is determined as N.
[0020] In some embodiments, determining whether a correction stop condition is satisfied based on the number of image samples whose predicted labels are inconsistent with the annotated labels includes:
[0021] If the proportion of the number of inconsistent image samples in the total number of samples exceeds a preset proportion, it is determined that the correction stop condition is not satisfied; or,
[0022] If the number of the inconsistent image samples exceeds a preset number, it is determined that the correction stop condition is not satisfied.
[0023] In some embodiments, after recording the inconsistent image samples, the method further includes:
[0024] Obtaining a corrected annotation label for the inconsistent image sample;
[0025] Dividing the inconsistent image samples into N parts;
[0026] Execute a loop N times: use N-1 image samples to perform model training, use the trained model to predict an unused image sample, and obtain a predicted label, until it is determined that the correction stop condition is met, and stop correcting the label.
[0027] In a second aspect, an embodiment of the present application provides a label correction device for an image sample, comprising:
[0028] An acquisition module, configured to acquire a plurality of image samples, wherein an error rate of annotated labels of the plurality of image samples is lower than a set value;
[0029] a dividing module, configured to divide the plurality of image samples into N parts, where N is a predetermined integer;
[0030] A loop module is used to loop N times: use N-1 image samples to train the model, use the trained model to predict the unused image sample, and obtain the predicted label, wherein the unused image sample in different loops is different;
[0031] A determination module, configured to determine whether a correction stop condition is satisfied based on the number of image samples whose predicted labels are inconsistent with the annotated labels;
[0032] The recording module is configured to record the inconsistent image sample if the condition is not satisfied, so as to correct the annotation label of the inconsistent image sample.
[0033] In some embodiments, each image sample also has a category, and the classification module 402 is specifically used to:
[0034] According to the rule that the difference between the number of samples of the same category in different image samples is less than a preset value, the multiple image samples are divided into N parts.
[0035] In some embodiments, N is determined according to the following steps:
[0036] The number of samples of each category of image samples is used as a reference value;
[0037] If the reference value is not a multiple of the specified value, replacing the reference value with a multiple of the specified value that has the smallest difference with the reference value;
[0038] The greatest common divisor of each reference value is determined as N.
[0039] In some embodiments, the determining module is specifically configured to:
[0040] If the proportion of the number of inconsistent image samples in the total number of samples exceeds a preset proportion, it is determined that the correction stop condition is not satisfied; or,
[0041] If the number of the inconsistent image samples exceeds a preset number, it is determined that the correction stop condition is not satisfied.
[0042] In some embodiments, the system further includes a control module for:
[0043] Obtaining a corrected annotation label for the inconsistent image sample;
[0044] Dividing the inconsistent image samples into N parts;
[0045] Execute a loop N times: use N-1 image samples to perform model training, use the trained model to predict an unused image sample, and obtain a predicted label, until it is determined that the correction stop condition is met, and stop correcting the label.
[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:
[0047] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the above-mentioned label correction method for image samples.
[0048] In a fourth aspect, an embodiment of the present application provides a storage medium. When a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can perform the above-mentioned label correction method for image samples.
[0049] In an embodiment of the present application, a plurality of image samples are obtained, and the error rate of the annotation labels of these plurality of image samples is lower than a set value. These plurality of image samples are divided into N parts, and the cycle is repeated N times: N-1 parts of image samples are used for model training, and the trained model is used to predict an unused part of the image sample to obtain a predicted label, wherein the unused part of the image sample in different cycles is different, and based on the number of image samples whose predicted labels are inconsistent with the annotation labels, it is determined whether the correction stop condition is met. If not, the inconsistent image samples are recorded to correct the annotation labels of the inconsistent image samples. In this way, the majority of image samples are used for model training, and the trained model is used to predict a small portion of image samples. The inconsistency between the predicted labels and the annotation labels is used to find image samples that need to be corrected for the annotation labels and perform the correction. It is not necessary to correct all image samples, which can save human resources and improve correction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0051] FIG1 is a flow chart of a label correction method for an image sample provided by an embodiment of the present application;
[0052] FIG2 is a flowchart of another method for label correction of an image sample provided in an embodiment of the present application;
[0053] FIG3 is a flowchart of another method for label correction of an image sample provided in an embodiment of the present application;
[0054] FIG4 is a schematic diagram of a label correction process for an image sample provided in an embodiment of the present application;
[0055] FIG5 is a schematic structural diagram of a label correction device for an image sample provided in an embodiment of the present application;
[0056] FIG6 is a schematic diagram of the hardware structure of an electronic device for implementing a label correction method for image samples provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to solve the problems of waste of human resources and low correction efficiency in the label correction method of image samples in the related art, the embodiments of the present application provide a label correction method, device, electronic device and storage medium for image samples.
[0058] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application can be combined with each other if there is no conflict.
[0059] Supervised learning in deep learning has a great demand for high-quality labeled image samples, and the quality of the labeling of image samples directly affects the effect of the model. In the related art, the main labeling methods are manual labeling and multiple rounds of manual correction. The manual correction stage is performed on all labeled samples. Referring to Figure 1, Figure 1 is a schematic diagram of a label correction process provided by an embodiment of the present application. First, the image samples are pre-labeled using a priori algorithm model, followed by a first round of manual labeling optimization, and then all manually labeled image samples are manually corrected. Image samples that fail the manual correction are manually re-labeled until all image samples pass the correction. In this way, the following problems will arise: (1) Some correctly labeled image samples will also undergo at least one round of correction, wasting resources; (2) Due to the subjectivity of the labelers themselves, even after multiple rounds of correction, there may still be relatively obvious incorrect labeling.
[0060] To this end, the present invention proposes a solution that eliminates the need for manual correction of all image samples. Specifically, the image samples are pre-labeled using a priori algorithm models, followed by a first round of manual labeling. The image samples are then divided into N parts, and the cycle repeats N times: each time, the model trained on N-1 of the image samples is used to predict the remaining image samples. Then, image samples where the predicted labels are inconsistent with the labeled labels are found and manually corrected. This way, some correctly labeled image samples no longer need manual correction, significantly reducing the number of samples requiring manual correction. Furthermore, the sample labeling method is simple, versatile, and of relatively high quality.
[0061] It should be noted that the solution provided in the embodiment of the present application is applicable to all scenarios where the annotation labels of image samples need to be corrected, such as scenarios for recognizing license plates, identifying pedestrians, identifying vehicles, etc.
[0062] The label correction method for image samples proposed in this application is described below with reference to a specific embodiment. FIG2 is a flow chart of a label correction method for image samples provided in an embodiment of this application, which includes the following steps.
[0063] In step 201 , a plurality of image samples are obtained, wherein the error rate of the annotation labels of the plurality of image samples is lower than a set value.
[0064] Generally, the number of image samples is huge. In order to improve the labeling efficiency, the prior algorithm model (a model that is similar to but different from the current model task) can be used to pre-label these multiple image samples. Since the labeling accuracy of the prior algorithm model is insufficient, the pre-labeled labels of these multiple image samples can be manually optimized. That is, the labeling labels of these multiple image samples can be obtained by first pre-labeling using the prior algorithm model and then manually optimizing the labeling. However, due to human eye fatigue, the image samples will still have an error rate after manual labeling optimization, but the error rate will generally be lower than the set value such as 20%. The solution of the embodiment of the present application is to perform label correction on image samples that still have labeling errors.
[0065] In step 202 , the plurality of image samples are divided into N parts, where N is an integer greater than 1.
[0066] In some embodiments, the plurality of image samples may be randomly divided into N parts, and N may be determined by a technician based on the image processing task of the model and the number of image samples.
[0067] In some embodiments, each image sample may also have a category for characterizing the captured scene, such as the number of objects contained in the image sample, the brightness level of the image sample, the shooting angle of the image sample, etc.
[0068] Taking license plate recognition as an example, the categories of license plate image samples may include {large highway intersection, small highway intersection, rural road intersection}, {daytime shooting, nighttime shooting}, and {low-angle shooting, frontal shooting}.
[0069] Assume that there are two categories of license plate image samples {taken during the day, taken at night}, and the number of image samples taken during the day is 10, and the number of image samples taken at night is 5. Assume that all image samples are divided into 3 parts evenly, and the 10 image samples taken during the day are divided into the first two parts, and the 5 image samples taken at night are divided into the third part. Subsequently, the error rate of the model trained using the first two image samples to predict the third image sample will obviously be higher.
[0070] To avoid this, we can divide the image samples into N parts, ensuring that the difference in the number of samples of the same category in each part is less than a preset value. This ensures that the number of image samples of the same category in different parts is similar, that is, the image samples of each category are distributed as evenly as possible across the N parts, thus avoiding errors in subsequent model training.
[0071] In this case, N can be determined according to the following steps:
[0072] The number of image samples of each category is used as a reference value. If it is determined that the reference value is not a multiple of the specified value, the reference value can be replaced by a multiple of the specified value with the smallest difference from the reference value. Then, the greatest common divisor of each reference value is determined to be N.
[0073] Still taking license plate recognition as an example, assume that there are two categories of license plate image samples {shot during the day, shot at night}, and the number of image samples shot during the day is 13, the number of image samples shot at night is 7, and assume that the specified value is 3. Then, the array consisting of reference values is [13, 7]. Since 13 is not a multiple of 3, 13 is replaced with 12, the closest multiple of 3 to 13. Similarly, since 7 is not a multiple of 3, 7 is replaced with 6, the closest multiple of 3 to 7. In this way, the array [13, 7] is modified to [12, 6]. Since the greatest common divisor of 12 and 6 is 6, N = 6.
[0074] In step 203, the process repeats N times: using N-1 sets of image samples to train the model, and using the trained model to predict an unused set of image samples to obtain a predicted label, wherein the unused set of image samples in different cycles is different.
[0075] Assuming there are three image samples: 1, 2, and 3, the loop can be performed as follows:
[0076] First: Use the first and second image samples to train the model, and use the trained model to predict the third image sample;
[0077] Second time: Use the second and third image samples to continue training the model obtained in the first time, and use the trained model to predict the first image sample;
[0078] The third time: Use the first and third image samples to continue training the model obtained for the second time, and use the trained model to predict the second image sample.
[0079] That is to say, except for the first time, each time the model is trained again after the last training, and the unused image sample in each cycle is different.
[0080] In step 204 , based on the number of image samples whose predicted labels are inconsistent with the labeled labels, it is determined whether a correction stop condition is satisfied.
[0081] For example, if the number of inconsistent image samples accounts for more than a preset proportion of the total number of samples, such as 1% or 0.5%, it is determined that the correction stop condition is not met. For another example, if the number of inconsistent image samples exceeds a preset number, such as 100, it is determined that the correction stop condition is not met.
[0082] In step 205 , if the conditions are not met, the inconsistent image samples are recorded to correct the annotation labels of the inconsistent image samples.
[0083] Subsequently, the labeling labels of image samples whose predicted labels are inconsistent with the labeling labels can be manually corrected based on the records, without having to correct all image samples. Since the number of inconsistent image samples has been greatly reduced compared to the original image samples, manual correction can be completed more quickly and accurately, which not only saves human resources but also greatly improves correction efficiency.
[0084] In some embodiments, after manually correcting the annotated labels of image samples whose predicted labels are inconsistent with the annotated labels, the annotated labels of these image samples can also be automatically corrected. Figure 3 is a flowchart of another image sample label correction method provided by an embodiment of the present application, which includes the following steps.
[0085] In step 301 , a plurality of image samples are obtained, wherein the error rate of the annotation labels of the plurality of image samples is lower than a set value.
[0086] In step 302 , the plurality of image samples are divided into N parts, where N is an integer greater than 1.
[0087] The implementation of this step can be referred to step 202 and will not be described in detail here.
[0088] In step 303, the process repeats N times: using N-1 sets of image samples to train the model, and using the trained model to predict an unused set of image samples to obtain a predicted label, wherein the unused set of image samples in different cycles is different.
[0089] The implementation of this step can be referred to step 203 and will not be described in detail here.
[0090] In step 304 , based on the number of image samples whose predicted labels are inconsistent with the labeled labels, it is determined whether a correction stop condition is met. If not, the process proceeds to step 305 ; if so, the process proceeds to step 308 .
[0091] In step 305 , inconsistent image samples are recorded to correct the annotation labels of the inconsistent image samples.
[0092] Subsequently, humans can manually correct the annotation labels of inconsistent image samples based on the records.
[0093] In step 306 , the rectified annotation labels of the inconsistent image samples are obtained.
[0094] In step 307 , the inconsistent image samples are divided into N parts, and the process returns to step 303 .
[0095] Since the inconsistent image samples are significantly reduced in number compared to the original image samples, they may not cover all types of samples. However, the model obtained after step 303 has learned the features of all types of image samples. Therefore, the inconsistent image samples can be randomly divided into N parts.
[0096] In step 308 , the correction of the annotation labels is stopped.
[0097] The following describes the solution of the embodiment of the present application by taking the image sample of a license plate as an example.
[0098] Referring to FIG4 , the solution of the embodiment of the present application mainly includes the following steps:
[0099] ① Use a priori algorithm model to pre-label image samples of license plates, wherein the priori algorithm model can be a model for vehicle detection.
[0100] ② Manual labeling (i.e. label correction).
[0101] ③ Divide the manually labeled image samples into N parts.
[0102] Assume that image samples are classified into n categories based on factors such as image size, number of license plates, brightness, and camera angle. Count the number of image samples in each category to obtain an array A = [A1, A2, A3, ..., An], where Ai represents the number of image samples in the i-th category, and i ranges from 1 to n. If Ai is not a multiple of 3, replace it with the closest multiple of 3. Then, determine the greatest common divisor of all values in array A as N.
[0103] Afterwards, according to the set N, the image samples of each category are distributed to the N image samples relatively evenly (for example, the difference in the number of image samples of the same category in the N image samples is less than 2).
[0104] ④ Select N-1 image samples to train the license plate recognition model, use the trained license plate recognition model to predict the remaining image sample to obtain the predicted label, and repeat this cycle N times, where the remaining image sample is different in different cycles.
[0105] ⑤ Based on the number of image samples whose predicted labels are inconsistent with the annotated labels, determine whether the correction stop condition is met. If not, go to ⑥; if so, go to ⑦.
[0106] It is determined whether the proportion of image samples whose predicted labels are inconsistent with the annotated labels to the total image samples is less than a preset proportion α, where α can be preset, such as 1% or 0.5%.
[0107] ⑥Select image samples whose predicted labels are inconsistent with the annotated labels and perform manual correction, then go to ②.
[0108] Here, the image samples whose predicted labels are inconsistent with the labeled labels can be randomly divided into N parts.
[0109] ⑦Stop calibration.
[0110] The above process can be implemented as follows:
[0111] Step 1: Set N to 3, α to 1% or β to 100;
[0112] Step 2: Use the prior algorithm model to pre-label the image samples of the license plate;
[0113] Step 3: Manually label the pre-labeled image samples;
[0114] Step 4: Divide all image samples into 3 parts;
[0115] Step 5: Each time, two image samples are used to train the license plate recognition model, and then the trained license plate recognition model is used to predict another image sample. This cycle is repeated three times, and the predicted image sample is different in each cycle.
[0116] Step 6: Determine whether the number of image samples with inconsistent labels between the manually annotated labels and the labels predicted by the license plate recognition model is less than 100 or the proportion of them in the total samples is less than 1%. If so, go to step 7; if not, go to step 8.
[0117] Step 7: Select inconsistent image samples, manually correct their labels, divide them into three parts, and go to step 5;
[0118] Step 8: Complete the annotation.
[0119] In the above embodiment, N may also be 5, α may also be 0.5%, and β may also be 100. The specific values may be determined by technicians according to actual needs and will not be elaborated here.
[0120] In the embodiment of this application, the image samples are first pre-labeled using a priori algorithm models, followed by a first round of manual labeling. The image samples are then divided into N parts, and the cycle repeats N times: each time, the model trained on N-1 of the image samples is used to predict the other image samples. Then, image samples with inconsistent predicted and labeled labels are found and manually corrected. This way, some correctly labeled image samples do not need to be manually corrected, significantly reducing the number of samples requiring manual correction. In addition, the sample labeling method is simple, versatile, and has relatively high labeling quality.
[0121] Based on the same technical concept, an embodiment of the present application also provides a label correction device for image samples. The principle of solving the problem by the label correction device for image samples is similar to that of the above-mentioned label correction method for image samples. Therefore, the implementation of the label correction device for image samples can refer to the implementation of the label correction method for image samples, and the repeated parts will not be repeated.
[0122] FIG5 is a schematic structural diagram of a label correction device for an image sample provided in an embodiment of the present application, which includes an acquisition module 501 , a division module 502 , a circulation module 503 , a determination module 504 , and a recording module 505 .
[0123] An acquisition module 501 is configured to acquire a plurality of image samples, wherein the error rate of the annotation labels of the plurality of image samples is lower than a set value;
[0124] A division module 502 is configured to divide the plurality of image samples into N parts, where N is a predetermined integer;
[0125] A loop module 503 is configured to loop N times: use N-1 image samples to perform model training, use the trained model to predict an unused image sample, and obtain a predicted label, wherein the unused image sample in different loops is different;
[0126] A determination module 504 is configured to determine whether a correction stop condition is satisfied based on the number of image samples whose predicted labels are inconsistent with the annotated labels;
[0127] The recording module 505 is configured to record the inconsistent image sample if the condition is not satisfied, so as to correct the annotation label of the inconsistent image sample.
[0128] In some embodiments, each image sample also has a category, and the classification module 502 is specifically used to:
[0129] According to the rule that the difference between the number of samples of the same category in different image samples is less than a preset value, the multiple image samples are divided into N parts.
[0130] In some embodiments, N is determined according to the following steps:
[0131] The number of samples of each category of image samples is used as a reference value;
[0132] If the reference value is not a multiple of the specified value, replacing the reference value with a multiple of the specified value that has the smallest difference with the reference value;
[0133] The greatest common divisor of each reference value is determined as N.
[0134] In some embodiments, the determining module 504 is specifically configured to:
[0135] If the proportion of the number of inconsistent image samples in the total number of samples exceeds a preset proportion, it is determined that the correction stop condition is not satisfied; or,
[0136] If the number of the inconsistent image samples exceeds a preset number, it is determined that the correction stop condition is not satisfied.
[0137] In some embodiments, a control module 506 is further included for:
[0138] Obtaining a corrected annotation label for the inconsistent image sample;
[0139] Dividing the inconsistent image samples into N parts;
[0140] Execute a loop N times: use N-1 image samples to perform model training, use the trained model to predict an unused image sample, and obtain a predicted label, until it is determined that the correction stop condition is met, and stop correcting the label.
[0141] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated into one processor, or may exist physically separately, or two or more modules may be integrated into one module. The coupling between the modules can be achieved through some interfaces, which are usually electrical communication interfaces, but it is not ruled out that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0142] After introducing the label correction method and apparatus for image samples according to an exemplary embodiment of the present application, an electronic device according to another exemplary embodiment of the present application is introduced next.
[0143] The electronic device 130 implemented according to this embodiment of the present application is described below with reference to Figure 6. The electronic device 130 shown in Figure 6 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present application.
[0144] As shown in Figure 6, electronic device 130 is a general electronic device. Components of electronic device 130 may include, but are not limited to, at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).
[0145] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, and a processor or local bus using any of a variety of bus architectures.
[0146] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .
[0147] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0148] The electronic device 130 may also communicate with one or more external devices 134 (e.g., a keyboard, pointing device, etc.), one or more devices that enable a user to interact with the electronic device 130, and / or any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., a router, a modem, etc.). Such communication may occur via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules of the electronic device 130 via a bus 133. It should be understood that, although not shown, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0149] In an exemplary embodiment, a storage medium is also provided. When a computer program stored in the storage medium is executed by a processor of an electronic device, the electronic device can perform the above-described label correction method for image samples. Optionally, the storage medium can be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0150] In an exemplary embodiment, the electronic device of the present application may include at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor may execute the steps of the label correction method for any image sample provided in the embodiments of the present application.
[0151] In an exemplary embodiment, a computer program product is further provided. When the computer program product is executed by an electronic device, the electronic device can implement any exemplary method provided in this application.
[0152] Furthermore, the computer program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, RAM, ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0153] In the embodiments of the present application, the program product for label correction of image samples may be implemented as a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0154] A readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries readable program code. Such a transmitted data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0155] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0156] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0157] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.
[0158] Furthermore, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0159] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0160] The present application is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0161] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0163] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0164] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application also includes these modifications and variations.
Claims
1. A label correction method for an image sample, characterized in that: include: Acquire multiple image samples, wherein the error rate of the annotation labels of the multiple image samples is lower than a set value; Dividing the plurality of image samples into N parts, where N is a predetermined integer; Cycle N times: Use N-1 sets of image samples to train the model, and use the trained model to predict the unused set of image samples to obtain the predicted label. The unused set of image samples in different cycles are different. Based on the number of image samples whose predicted labels are inconsistent with the annotated labels, determining whether a correction stop condition is met; If not, the inconsistent image sample is recorded to correct the annotation label of the inconsistent image sample.
2. The method according to claim 1, characterized in that Each image sample also has a category, and the multiple image samples are divided into N parts, including: According to the rule that the difference between the number of samples of the same category in different image samples is less than a preset value, the multiple image samples are divided into N parts.
3. The method according to claim 2, characterized in that Determine N according to the following steps: The number of samples of each category of image samples is used as a reference value; If the reference value is not a multiple of the specified value, replacing the reference value with a multiple of the specified value having the smallest difference with the reference value; The greatest common divisor of each reference value is determined as N.
4. The method according to claim 1, characterized in that Based on the number of image samples whose predicted labels are inconsistent with the labeled labels, determine whether the correction stop condition is met, including: If the proportion of the number of the inconsistent image samples in the total number of samples exceeds a preset proportion, it is determined that the correction stop condition is not satisfied; or, If the sample quantity of the inconsistent image samples exceeds a preset quantity, it is determined that the correction stop condition is not satisfied.
5. The method according to any one of claims 1 to 4, characterized in that: After recording the inconsistent image samples, the method further includes: Obtaining a corrected annotation label of the inconsistent image sample; Dividing the inconsistent image samples into N parts; Execute a loop N times: use N-1 sets of image samples to perform model training, use the trained model to predict an unused set of image samples, and obtain a predicted label step, until it is determined that the correction stop condition is met, then stop correcting the label.
6. A label correction device for an image sample, characterized in that: include: An acquisition module is used to acquire multiple image samples, wherein the error rate of the labeling labels of the multiple image samples is lower than a set value; A division module, used for dividing the plurality of image samples into N parts, where N is a predetermined integer; A loop module is used to loop N times: use N-1 sets of image samples to train the model, use the trained model to predict an unused set of image samples, and obtain a predicted label, wherein the unused set of image samples in different loops are different; A determination module, used for determining whether a correction stop condition is satisfied based on the number of image samples whose predicted labels are inconsistent with the annotated labels; The recording module is used to record the inconsistent image sample if the condition is not satisfied, so as to correct the annotation label of the inconsistent image sample.
7. The device according to claim 6, characterized in that Each image sample also has a category, and the classification module is specifically used for: According to the rule that the difference between the number of samples of the same category in different image samples is less than a preset value, the multiple image samples are divided into N parts.
8. The device according to claim 7, characterized in that Determine N according to the following steps: The number of samples of each category of image samples is used as a reference value; If the reference value is not a multiple of the specified value, replacing the reference value with a multiple of the specified value having the smallest difference with the reference value; The greatest common divisor of each reference value is determined as N.
9. The device according to claim 6, characterized in that The determination module is specifically used for: If the proportion of the number of the inconsistent image samples in the total number of samples exceeds a preset proportion, it is determined that the correction stop condition is not satisfied; or, If the sample quantity of the inconsistent image samples exceeds a preset quantity, it is determined that the correction stop condition is not satisfied.
10. The device according to claim 6, characterized in that Also included is a control module for: Obtaining a corrected annotation label of the inconsistent image sample; Dividing the inconsistent image samples into N parts; Execute a loop N times: use N-1 sets of image samples to perform model training, use the trained model to predict an unused set of image samples, and obtain a predicted label step, until it is determined that the correction stop condition is met, then stop correcting the label.
11. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores a computer program executable by the at least one processor, wherein the computer program is The at least one processor is executed so that the at least one processor can execute the method according to any one of claims 1 to 5.
12. A storage medium, characterized in that: When the computer program in the storage medium is executed by a processor of an electronic device, the electronic device can execute the method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Expression recognition method based on label confidence estimation and multi-network joint training
CN116229534A
Robust image classification method on label noisy data
CN116468938A
Image sample label correction method and device, electronic equipment and storage medium
CN117372754A
Data labeling for training artificial intelligence systems
US20220335311A1
Cited By
Image annotation intelligent analysis system and method based on multi-modal fusion
CN120852940A
Analysis system and method for AI intelligent labeling and error correction platform
CN120910490A
Analysis system and method for ai intelligent labeling and correction platform
CN120910490B