Active learning based industrial image annotation recommendation method and system

By employing an active learning approach that combines segmentation and reconstruction learners, regions with large reconstruction errors in industrial images are selected for labeling. This solves the problem of low efficiency in industrial data labeling and achieves efficient data storage and labeling.

CN116363419BActive Publication Date: 2025-12-19HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310243866.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2025-12-19
Estimated Expiration
2043-03-09

AI Technical Summary

Technical Problem

In industrial production, existing technologies struggle to quickly select and label the most valuable data from massive datasets, leading to a waste of human and material resources and an increase in storage space.

Method used

An active learning-based approach is adopted, which combines segmentation learners and reconstruction learners. The most valuable data is selected for labeling based on reconstruction error and surrogate loss. This includes training the reconstruction learner to restore the normal image and calculating the reconstruction error, and selecting the parts with large reconstruction errors for fine labeling.

Benefits of technology

It enables rapid processing of industrial field data, reduces storage requirements and labeling costs, improves labeling effectiveness, and prioritizes the storage and labeling of the most valuable data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116363419B_ABST
    Figure CN116363419B_ABST
Patent Text Reader

Abstract

The application discloses an industrial image labeling recommendation method and system based on active learning, which comprises the following steps: inputting each original image into a segmentation learner and a reconstruction learner respectively, using the segmentation learner to predict the defect area of each original image, and using the reconstruction learner to reconstruct each original image to obtain a reconstructed image; calculating the reconstruction error of the reconstructed image and the corresponding original image in the defect area; selecting part of the original images with larger reconstruction error for fine labeling; wherein the training method of the reconstruction learner is as follows: obtaining normal images and defect images; replacing the images labeled as defect areas in the defect images with the images of the same areas in the normal images to construct training target images; inputting the defect images into the reconstruction learner for training to make the reconstructed image output by the reconstruction learner approach the corresponding training target image. Through the above screening method, the storage space can be saved, the labeling cost can be controlled, and the labeling effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of image labeling, and more particularly relates to an industrial image labeling recommendation method and system based on active learning. BACKGROUND

[0002] Defect segmentation plays a crucial role in quality control of industrial production. In recent years, the rapid development of neural networks has made them widely used in defect segmentation. However, it is difficult to quickly obtain and annotate sufficient defect data for neural network training in industrial scenarios.

[0003] In existing methods, manual labeling is usually employed. However, due to the control of product pass rate in industrial data, most of the data are normal data that do not need to be labeled, which results in a great waste of manpower and resources. Moreover, storing all the data for manual labeling also occupies a large amount of data storage space.

[0004] Therefore, how to select the most valuable data from a large amount of industrial data for storage and rapid labeling has become a problem to be solved in industrial production lines. SUMMARY

[0005] In view of the above defects or improvement needs of the prior art, the present application provides an industrial image labeling recommendation method and system based on active learning, which aims to select the most valuable data from industrial field data for storage and labeling, so as to control the labeling cost, improve the labeling effect, and save storage space.

[0006] To achieve the above-mentioned purpose, according to one aspect of the present application, an industrial image labeling recommendation method based on active learning is provided, and the industrial image labeling recommendation process comprises:

[0007] Obtaining a group of unlabeled original images, inputting each original image into a segmentation learner and a reconstruction learner respectively, predicting the defect area of each original image by using the segmentation learner, and reconstructing each original image by using the reconstruction learner to obtain a reconstructed image;

[0008] Calculating the loss of the reconstructed image and the corresponding original image in the defect area as a reconstruction error;

[0009] Selecting part of the original images with larger reconstruction error for fine labeling;

[0010] The reconstruction learner is obtained by training the following method:

[0011] Obtaining a training set, including normal images labeled as no defects and defect images with defects;

[0012] constructing a training target image corresponding to the defect image, the training target image being obtained by replacing the image marked as a defect region in the defect image with an image of the same region in a normal image;

[0013] inputting the defect image into the reconstruction learner for training, so that the reconstructed image output by the reconstruction learner approaches the corresponding training target image.

[0014] In one embodiment, the calculation formula of the reconstruction error is:

[0015]

[0016] H and W are the height and width of the original image respectively, P ij is the image loss of the pixel point [i][j] in the original image, where when the pixel point [i][j] is located in the defect region, the image loss P ij is the square of the image difference value of the pixel point [i][j] between the original image and the reconstructed image, and when the pixel point [i][j] is located in the region outside the defect region, the image loss P ij =0.

[0017] In one embodiment, the calculation method of the image loss P ij includes:

[0018] constructing a mask image G1 according to the prediction result of the segmentation learner, where the value of the mask image in the defect region is 1, and the value in the remaining region is 0;

[0019] calculating the image loss P ij according to the mask image:

[0020] P ij =[(G1⊙G(I;θ g )-G1⊙I) 2 ] ij

[0021] where G1 is the mask image, I is the original image input into the reconstruction learner, G(I;θ g ) represents the reconstructed image obtained according to the original image I, θ g is the weight parameter of the reconstruction learner, and [] ij represents the value at the pixel point [i][j].

[0022] In one embodiment, before the industrial image labeling recommendation, the reconstruction learner is further trained, and the acquisition method of the training set used includes:

[0023] collecting an unmarked original image to train the agent learner so that the agent image output by the agent learner approaches the input original image;

[0024] inputting the original image into the trained agent learner to obtain a corresponding agent image, calculating a loss between the original image and the corresponding agent image as an agent loss, and selecting a part of the original image with a larger agent loss to obtain a normal image labeled as no defect and a defect image with defects after fine labeling.

[0025] In one of the embodiments,

[0026] When training the agent learner, the agent learner reconstructs according to the input original image in a manner of random mask image reconstruction to output an agent image;

[0027] Using the trained agent learner to obtain an agent image and calculating a loss between the original image and the corresponding agent image as an agent loss, comprising:

[0028] The agent learner reconstructs according to the input original image in a manner of one-by-one mask image reconstruction to output a plurality of agent images, wherein the one-by-one mask image is obtained by dividing the input original image into a plurality of regions and reconstructing according to a different region one by one to obtain a plurality of agent images;

[0029] Calculating an image loss between each output agent image and the input original image and taking the maximum image loss as the agent loss of the corresponding original image.

[0030] In one of the embodiments, the structure of the reconstruction learner is obtained by replacing the convolution in the UNet network model with a dilated convolution.

[0031] In one of the embodiments, before the industrial image labeling recommendation, further comprising:

[0032] Training the segmentation learner to enable the segmentation learner to segment the defect region in the input original image.

[0033] In one of the embodiments, during the industrial image labeling recommendation, further comprising:

[0034] Continuing to train the segmentation learner according to the newly added labeled image to update the network parameters.

[0035] According to another aspect of the present application, an industrial image labeling recommendation system based on active learning is provided, comprising:

[0036] The segmentation learner is used to predict the defect region of the original image without label;

[0037] The reconstruction learner is used to obtain a reconstructed image according to the input original image without label;

[0038] a reconstruction error calculation unit configured to calculate a loss between the reconstructed image and the input original image in the marked defect region as a reconstruction error;

[0039] a selection unit configured to select part of the original images with larger reconstruction errors for fine marking after obtaining the reconstruction errors corresponding to the plurality of original images;

[0040] wherein the reconstruction learner is trained by the following method:

[0041] obtaining a training set including normal images marked as defect-free and defect images with defects;

[0042] constructing a training target image corresponding to the defect image, the training target image being obtained by replacing the image marked as the defect region in the defect image with an image of the same region in the normal image;

[0043] inputting the defect image into the reconstruction learner for training so that the reconstructed image output by the reconstruction learner approaches the corresponding training target image.

[0044] In one embodiment, the method further comprises:

[0045] an agent learner configured to obtain a corresponding agent image according to the input original image;

[0046] an agent loss calculation unit configured to calculate a loss between the original image and the corresponding agent image as an agent loss;

[0047] an allocation unit configured to select part of the original images with larger agent losses for fine marking to obtain the normal images marked as defect-free and the defect images with defects as the training set for training the reconstruction learner;

[0048] wherein the agent learner is trained by the following method:

[0049] collecting unmarked original images to train the agent learner so that the agent image output by the agent learner approaches the input original image.

[0050] Overall, compared with the prior art, the above technical solutions conceived by the present application can achieve the following beneficial effects:

[0051] The active learning-based industrial image labeling recommendation method and system provided by the application realize rapid processing of industrial field data, combine a segmentation learner and a reconstruction learner, the reconstruction learner is a learner capable of restoring a normal image according to input obtained through a specific training method, the segmentation learner is used to segment a defect area, the reconstruction learner is used to reconstruct a proxy image close to the normal image, then the reconstruction loss of the proxy image and the original image in the defect area is judged, the greater the reconstruction loss, the greater the difference between the original image and the normal image restored by the reconstruction learner in the defect area, the less likely the original image is a normal image, that is, the greater the probability of the original image having defects, the higher the value of defect labeling, the most valuable data is selected preferentially for storage and labeling, thereby greatly reducing the storage requirement of industrial field data and saving labeling cost. BRIEF DESCRIPTION OF DRAWINGS

[0052] Figure 1 A step flow chart of the active learning-based industrial image labeling recommendation method of an embodiment;

[0053] Figure 2 A schematic diagram of the reconstruction learner restoring a normal image based on input of an original image of an embodiment;

[0054] Figure 3 A step flow chart of the training method of the reconstruction learner of an embodiment;

[0055] FIG. 4(a) is a schematic diagram of constructing a training target image of an embodiment;

[0056] FIG. 4(b) is a training schematic diagram of the reconstruction learner of an embodiment;

[0057] FIG. 4(c) is a schematic diagram of reconstructing an image by using the trained reconstruction learner and screening an original image of an embodiment;

[0058] Figure 5 A step flow chart of introducing a proxy learner to obtain a training data set of an embodiment;

[0059] Figure 6 A schematic diagram of the construction method of a random mask of an embodiment;

[0060] Figure 7 A schematic diagram of the construction method of a one-by-one mask of an embodiment;

[0061] Figure 8 A framework diagram of the active learning-based industrial image labeling recommendation system of an embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0063] As shown in Figure 1 The step flow chart of the industrial image annotation recommendation method based on active learning is shown, and the main steps are introduced as follows.

[0064] Step S110: Obtain a set of original images without labels, input each original image into a segmentation learner and a reconstruction learner respectively, use the segmentation learner to predict the defect area of each original image, and use the reconstruction learner to reconstruct each original image to obtain a reconstructed image.

[0065] Step S120: Calculate the loss of the reconstructed image and the corresponding original image in the defect area as the reconstruction error.

[0066] Step S130: Select some original images with larger reconstruction error for fine labeling.

[0067] Among them, the segmentation learner and the reconstruction learner are obtained by pre-training. The segmentation learner can be trained by conventional methods to realize the function of defect segmentation. The essence of training the reconstruction learner is to restore a normal image based on the input original image, as shown in Figure 2 .

[0068] As shown in Figure 3 , the reconstruction learner is specifically trained in the following specific way:

[0069] Step S101: Obtain an initial training set, including normal images labeled as defect-free and defect images with defects.

[0070] Specifically, the labeled data in the training set can be data after fine labeling.

[0071] Step S102: Construct a training target image corresponding to the defect image, which is obtained by replacing the image labeled as a defect area in the defect image with the image of the same area in the normal image.

[0072] For each defect image, the defect area has been labeled, which is divided into a defect area and a normal area. The training target image is obtained by removing the defect area from the defect image, extracting the image of the defect area from the normal image, and filling the defect area removed from the defect image. The new image obtained by combining the two.

[0073] In an embodiment, as shown in FIG. 4(a), assuming that the defect image is I in , the normal image is I0, and the constructed training target image is I target , for each defect image, the construction of the corresponding training target image can be achieved by constructing a mask image. The specific process is as follows:

[0074] Based on the defect image I in , the corresponding mask image G0is constructed, where the value of the mask image in the defect area is 1, and the value in the remaining area is 0;

[0075] The corresponding training target image I target is constructed by the following formula:

[0076] I target = I in ⊙(1-G0)+I0⊙G0

[0077] Where ⊙ represents dot product calculation, 1-G0is the inverse mask image of the mask image G0, that is, the value of the normal area is 1, and the value of the defect area is 0, I in ⊙(1-G0) represents extracting the normal area in the defect image I in , I0⊙G0represents extracting the image of the corresponding defect area in the normal image I0, and the two are spliced to obtain the corresponding training target image I target .

[0078] Further, the normal image I0used can be the average of multiple normal images labeled as normal images, that is:

[0079]

[0080] Where X i is the i-th normal image, and B is the number of normal images.

[0081] Step S103: inputting the defect image into the reconstruction learning device for training to make the reconstructed image output by the reconstruction learning device tend to the corresponding training target image.

[0082] As shown in FIG. 4(b), the defect data I in is input into the reconstruction learning device, the constructed training target I target is used as the training target of the reconstruction learning device, the supervised reconstruction learning device G is trained, so that the output I out of the reconstruction learning device G and the corresponding training target I target converge to a certain extent. Wherein, the training loss can adopt MSE loss.

[0083] Therefore, before the industrial image labeling recommendation is performed, that is, before step S110, the reconstruction learner can be trained through steps S101-S103.

[0084] Specifically, the reconstruction learner can also be selected or designed according to its own needs, such as ViT, MAE, UNet, etc. In this embodiment, a reconstruction learner designed based on the UNet structure is used, and the ordinary convolution in Unet is replaced with a dilated convolution to reduce the ability of the reconstruction learner to recover the original image from the surrounding image. Through steps S101-S103, the trained reconstruction learner can be obtained and used for industrial image labeling recommendation, as shown in FIG. 4(c). The original image I without label is input into the trained reconstruction learner, and the output I out is obtained. out The reconstruction error ε sdrr between the output I pre and the input I is calculated. The greater the reconstruction loss is, the greater the difference between the normal image recovered by the reconstruction learner and the original image in the defect area is, the greater the probability that the original image has defects is, the higher the value of labeling is, and the recommendation of the part of data for fine labeling can save the labeling cost.

[0085] For example, taking the commutator cylindrical defect data as an example, the commutator is an important part in the motor, and the periodic and non-periodic texture features are left on the outer surface due to the external turning and grinding in the production process. At the same time, the surface defect features leave different defect features due to the change of the processing tool and mold, and present different contrast characteristics. The invention can effectively select the defect data in the production line collected data of the commutator.

[0086] In an embodiment, when the reconstruction error is calculated in step S120, the following steps can be used to calculate the reconstruction error:

[0087] Step S121: constructing a mask image G1 according to the prediction result of the segmentation learner, wherein the value of the mask image in the defect area is 1, and the value in the remaining area is 0.

[0088] The trained segmentation learner is used to predict the unlabeled data to obtain the corresponding pseudo label of each unlabeled data, and a mask image is constructed, wherein the value of the mask image in the defect area is 1, and the value in the remaining area is 0. The specific construction method is as follows:

[0089]

[0090] Wherein, I pre [i][j] represents the image of pixel point [i][j].

[0091] Step S122: calculating the image loss P ij.

[0092] P ij = [(G1 G(I; 0 g ) - G1 I) 2 ] ij

[0093] wherein G1 is a mask image, I is an original image input to a reconstruction learner, G(I; 0 g ) represents a reconstructed image obtained from the original image I, 0 g is a weight parameter of the reconstruction learner, G1 G(I; 0 g ) represents extracting features of a defective region of the mask image corresponding to the reconstructed image, G1 I represents extracting features of the defective region of the mask image corresponding to the original image, and P ij is an image loss, which is a square of an image difference value of the pixel point [i][j] of the original image and the reconstructed image, wherein when the pixel point [i][j] is located in the defective region, the image loss P ij is a square of an image difference value of the pixel point [i][j] of the original image and the reconstructed image, and when the pixel point [i][j] is located in a region other than the defective region, the image loss P ij = 0.

[0094] Step S123: calculating a reconstruction error e ij according to the image loss P sdrr .

[0095] The calculation formula is:

[0096]

[0097] H and W are height and width of the original image respectively, and P ij is the image loss of the pixel point [i][j] located at the height i and the width j in the original image.

[0098] In an embodiment, step S130 selects a part of the original image with a larger reconstruction error e sdrr for fine labeling, and the proportion for fine labeling can be close to the probability of production defects. The image for fine labeling is stored in a labeling data pool for subsequent fine labeling operations, such as manual labeling. Through fine labeling, labels are added to the stored images to distinguish normal images and defective images. On the one hand, since only selected samples are stored instead of all samples, the storage space can be greatly saved. On the other hand, since the selection is performed through steps S110-S130, the number of defective samples in the labeling data pool is greatly improved, so that the value of fine labeling is higher, the labeling cost is controlled, and the labeling effect is improved.

[0099] In an embodiment, during the industrial image labeling recommendation, the segmentation learner can be continuously trained according to the newly added label data in the labeled data pool to improve the accuracy of the learning segmenter. By performing steps S110-S130 multiple times, a large number of original images are screened for fine labeling.

[0100] In an embodiment, the training set used to train the reconstruction learner can be obtained by directly fine labeling of randomly extracted industrial images, or can be obtained by introducing an agent learner to select images with higher labeling value for fine labeling, as shown in Figure 5 The specific process is as follows:

[0101] Step S001: Collect unlabeled original images and train an agent learner to make the agent images output by the agent learner approach the input original images.

[0102] An image data set is collected from an industrial site and is denoted as an unlabeled original image data set. Since the control of product qualification rate in industrial data, most of the data are normal image data.

[0103] The agent learner is trained using the unlabeled data set. The agent learner can use various self-supervised learning methods, such as coloring, rotation, jigsaw, and random mask reconstruction.

[0104] Step S002: Input the original image into the trained agent learner to obtain the corresponding agent image, and calculate the loss between the original image and the corresponding agent image as the agent loss.

[0105] Step S003: Select the original images with larger agent loss for fine labeling to obtain normal images labeled as defect-free and defect images with defects.

[0106] Since the data used to train the agent learner are mostly normal images, the agent learner learns more features of normal images, so the agent image reconstructed by the agent learner based on the original image is closer to the normal image. Therefore, if the original image is a normal image, the difference between the input and output is small, and if the original image is a defect image, the difference between the input and output is large. Therefore, the K original images with larger agent loss can be selected for fine labeling and placed in the labeled data pool, and the last V data with the smallest loss value are assigned normal labels and placed in the assigned label pool, which further improves the labeling effect while controlling the labeling cost.

[0107] In an embodiment, in step S001, the agent learner uses the random mask image reconstruction method to reconstruct the input original image to output the agent image. As shown in Figure 6As shown in the construction method of the random mask, the input original image is divided into multiple regions, each region is randomly valued as 0 or 1, the mask is multiplied with the original image, and the region features with a value of 1 in the original image are retained and reconstructed. Correspondingly, in step S002 includes:

[0108] The agent learner adopts the way of reconstructing the mask image one by one to reconstruct according to the input original image to output multiple agent images, such as Figure 7 As shown, the mask image one by one is to divide the input original image into multiple regions and reconstruct according to a different region respectively to obtain multiple agent images;

[0109] The square of the difference between each output agent image and the input original image is calculated, and the maximum difference square is taken as the agent loss ε of the corresponding original image msmr , the specific calculation formula is as follows:

[0110] ε msmr =max{l1,...,l Z}

[0111] Wherein, l k is the image loss calculated according to the kth mask image, and the calculation formula is:

[0112]

[0113] Wherein, J ij is the square of the image difference value of the agent image and the input image at pixel [i][j], and the calculation formula is:

[0114] J ij =((M(Q(y z );θ m ) ij -y zij )) 2

[0115] Wherein, M represents the agent learner, Q represents the mask, θ m is the weight parameter of the agent learner, y zij is the input original image y z at pixel [i][j], (M(Q(y z );θ m ) ij represents the agent image obtained by the agent learner M reconstructing the input original image y z using the mask Q at pixel [i][j].

[0116] In an embodiment, before the industrial image annotation recommendation is performed, that is, before step S110, it further includes:

[0117] Step S104: training the segmentation learner to enable the segmentation learner to segment the defect region in the input original image.

[0118] Specifically, the segmentation learner can be selected or designed according to the needs of itself, such as Unet, PSPNet, DeepLab, etc. In the embodiment, Unet structure is adopted as the segmentation learner.

[0119] The segmentation learner is used to segment the defect region, which can be trained by a traditional training method, and the labeled image is input into the segmentation learner as training data, so that the output of the segmentation learner is an image with a defect label and tends to be close to the actual defect label. In an embodiment, the training data of the segmentation learner can be obtained by the above proxy learner, that is, in step S003, the part of the original image with a larger proxy loss is selected for fine labeling to obtain the normal image labeled as non-defective and the defect image with defects, and the remaining original image with a smaller reconstruction loss is directly assigned a normal label as a non-defective normal image. All labeled data can be used as training data for the segmentation learner. Specifically, the segmentation loss can be combined with the BCE loss and the Dice loss, and the formula is as follows:

[0120]

[0121] β and γ are weight values, which are set to 0.5 and 1 in this paper.

[0122] It should be noted that the training sequence of the segmentation learner and the reconstruction learner is not limited, and they can be trained separately or simultaneously.

[0123] Correspondingly, the application also relates to an industrial image labeling recommendation system based on active learning, which comprises:

[0124] The segmentation learner is used to predict the defect region of the original image without a label.

[0125] The reconstruction learner is used to obtain a reconstructed image according to the input original image without a label.

[0126] The reconstruction error calculation unit is used to calculate the loss of the reconstructed image and the input original image in the labeled defect region as the reconstruction error.

[0127] The selection unit is used to select part of the original image with a larger reconstruction error for fine labeling after obtaining the reconstruction error corresponding to a plurality of original images.

[0128] The reconstruction learner is obtained by the following method:

[0129] Obtaining a training set, including normal images labeled as no defects and defect images with defects;

[0130] Constructing a training target image corresponding to the defect image, the training target image being obtained by replacing the image labeled as a defect region in the defect image with an image of the same region in the normal image;

[0131] Inputting the defect image into the reconstruction learner for training to make the reconstructed image output by the reconstruction learner approach the corresponding training target image.

[0132] Further, it further comprises:

[0133] The agent learner is configured to obtain a corresponding agent image according to the input original image;

[0134] The agent loss calculation unit is configured to calculate the loss between the original image and the corresponding agent image as the agent loss;

[0135] The distribution unit is configured to select part of the original images with larger agent loss for fine labeling to obtain normal images labeled as no defects and defect images with defects and as a training set for training the reconstruction learner;

[0136] The agent learner is trained by the following method:

[0137] The unmarked original image is collected to train the agent learner so that the agent image output by the agent learner approaches the input original image.

[0138] As Figure 8 The figure shows an active learning-based industrial image annotation recommendation system framework in an embodiment, and the complete framework includes three major blocks of the agent learner, the segmentation learner and the reconstruction learner, and the three types of learners all need to be trained.

[0139] The agent learner realizes that the output agent image approaches the input original image through training. Since the data used to train the agent learner is mostly normal images, the agent learner learns more features of normal images, and thus the agent image reconstructed based on the original image by the agent learner is closer to the normal image. Therefore, if the original image is a normal image, the difference between the input and the output is small, and if the original image is a defective image, the difference between the input and the output is large. In combination with the agent learner, the agent loss calculation unit and the distribution unit, the original image with a high value of fine marking can be selected and stored in the marking data pool for manual marking, and the others are directly distributed with normal labels and put into the distribution label pool. The data in the marking data pool is divided into defective data and true normal data after manual marking, and the data in the distribution label pool is pseudo-normal data, which can be used for subsequent training of the reconstruction learner and the segmentation learner. That is, the agent learner provides training data for the reconstruction learner and the segmentation learner. The reconstruction learner obtains the marked data in the marking data pool for training, and through training, the reconstruction learner can recover the input image into a normal image. The segmentation learner can obtain the marked data in the marking data pool and the distribution label pool for training, and through training, the segmentation learner can predict the defect area of the original image without a label.

[0140] After the reconstruction learner and the segmentation learner are trained, new unmarked data are input into the reconstruction learner and the segmentation learner respectively, the segmentation learner predicts the defect area and stores it in the pseudo-label pool, and the reconstruction learner recovers it into a normal image. Through the reconstruction error calculation unit and the selection unit, the original image used for fine marking is finally selected and stored in the marking data pool.

[0141] In summary, by combining the segmentation learner and the reconstruction learner, the reconstruction learner is a learner obtained through a specific training method and can recover a normal image according to the input. The defect area is segmented by the segmentation learner, the agent image approaching the normal image is reconstructed by the reconstruction learner, and then the reconstruction loss of the agent image and the original image in the defect area is judged. The greater the reconstruction loss, the greater the difference between the original image and the normal image recovered by the reconstruction learner in the defect area, the less likely the original image is a normal image, and the greater the probability of the original image having defects, the higher the value of defect marking, and the most valuable data is selected for storage and marking, which greatly reduces the storage demand of industrial site data and saves marking cost.

[0142] Those skilled in the art will readily understand that the above is only a preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An active learning-based industrial image annotation recommendation method, characterized by, The industrial image labeling recommendation process comprises: obtaining a set of original images without labels, inputting each original image into a segmentation learner and a reconstruction learner respectively, predicting the defect area of each original image by using the segmentation learner, and reconstructing each original image by using the reconstruction learner to obtain a reconstructed image; calculating the loss of the reconstructed image and the corresponding original image in the defect area as a reconstruction error; selecting part of the original images with larger reconstruction errors for fine labeling; wherein the reconstruction learner is obtained by training the following method: obtaining a training set, including normal images labeled as no defects and defect images with defects; constructing a training target image corresponding to the defect image, the training target image being obtained by replacing the image labeled as a defect area in the defect image with an image of the same area in the normal image; inputting the defect image into the reconstruction learner for training to make the reconstructed image output by the reconstruction learner approach the corresponding training target image; the calculation formula of the reconstruction error is: , These are the height and width of the original image, respectively. For the original image located at high Width pixel Image loss, where when pixel points If located in a defect area, then image loss occurs. For the original image and the reconstructed image at the pixel level The square of the image difference, when the pixel point The image is lost in areas outside the defect region. ; Image loss The calculation method comprises: Constructing a mask image according to a prediction result of the segmentation learner wherein the mask image has a value of 1 in the defect region and a value of 0 in the remaining region Computing an image loss from a mask image : wherein, is a mask image, is an original image input to the reconstruction learner, represents a reconstructed image obtained according to the original image is a weight parameter of the reconstruction learner, represents a value of a pixel point in the reconstructed image. in the mask image. 2.The industrial image annotation recommendation method based on active learning of claim 1, wherein, Before the industrial image labeling recommendation, the reconstruction learner is also trained, and the acquisition method of the training set used comprises: collecting unmarked original images to train the agent learner so that the agent image output by the agent learner approaches the input original image; inputting the original image into the trained agent learner to obtain the corresponding agent image, calculating the loss between the original image and the corresponding agent image as the agent loss, and selecting part of the original images with larger agent losses for fine labeling to obtain normal images labeled as no defects and defect images with defects.

3. The active learning-based industrial image labeling recommendation method of claim 2, wherein when training the agent learner, the agent learner reconstructs the input original image in a random mask image reconstruction manner to output an agent image; using the trained agent learner to obtain an agent image and calculating the loss between the original image and the corresponding agent image as the agent loss comprises: the agent learner reconstructs the input original image in a one-by-one mask image reconstruction manner to output a plurality of agent images, the one-by-one mask image being obtained by dividing the input original image into a plurality of regions and reconstructing according to a different region of each region to obtain a plurality of agent images; calculating the image loss between each output agent image and the input original image and taking the maximum image loss as the agent loss of the corresponding original image. 4.The industrial image annotation recommendation method based on active learning of claim 1, wherein, The structure of the reconstruction learner is obtained by replacing the convolution in the UNet network model with a dilated convolution. 5.The industrial image annotation recommendation method based on active learning according to claim 1, wherein, Before the industrial image labeling recommendation, it further comprises: training the segmentation learner to enable the segmentation learner to segment the defect area in the input original image. 6.The industrial image annotation recommendation method based on active learning according to claim 1, wherein, During the industrial image labeling recommendation, it further comprises: continuing to train the segmentation learner according to the newly added labeled images to update the network parameters.

7. An active learning based industrial image annotation recommendation system, characterized in that, comprises: a segmentation learner for predicting the defect area of an original image without labels; a reconstruction learner for obtaining a reconstructed image according to an input original image without labels; The reconstruction error calculation unit is configured to calculate a loss of the reconstructed image and the input original image marked as the defective area as the reconstruction error; The selection unit is configured to select part of the original images with larger reconstruction errors for fine marking after obtaining the reconstruction errors corresponding to the plurality of original images; The reconstruction learning device is trained by the following method: Obtain a training set including normal images marked as non-defective and defective images with defects; Construct a training target image corresponding to the defective image, wherein the training target image is obtained by replacing the image marked as the defective area in the defective image with an image of the same area in the normal image; Input the defective image into the reconstruction learning device for training to make the reconstructed image output by the reconstruction learning device approach the corresponding training target image; The calculation formula of the reconstruction error is: , These are the height and width of the original image, respectively. For the original image located at high Width pixel Image loss, where when pixel points If located in a defect area, then image loss occurs. For the original image and the reconstructed image at the pixel level The square of the image difference, when the pixel point The image is lost in areas outside the defect region. ; Image loss The calculation method comprises: Constructing a mask image according to a prediction result of the segmentation learner wherein the mask image has a value of 1 in the defect region and a value of 0 in the remaining region Computing an image loss from a mask image : wherein, is a mask image, is an original image input to the reconstruction learner, represents a reconstructed image obtained according to the original image , is a weight parameter of the reconstruction learner, represents a value of the pixel point .

8. The active learning based industrial image annotation recommendation system of claim 7, wherein, Further comprising: The agent learning device is configured to obtain a corresponding agent image according to the input original image; The agent loss calculation unit is configured to calculate a loss between the original image and the corresponding agent image as the agent loss; The allocation unit is configured to select part of the original images with larger agent losses for fine marking to obtain the normal images marked as non-defective and the defective images with defects and use them as the training set for training the reconstruction learning device; The agent learning device is trained by the following method: Collect unmarked original images to train the agent learning device to make the agent image output by the agent learning device approach the input original image.

Citation Information

Patent Citations

  • Defect detection method and system for metal processing surface of camshaft

    CN119784673A

  • Computer implemented method for defect detection in an imaging dataset of a wafer, corresponding computer-readable medium, computer program product and systems making use of such methods

    US20250216842A1