Data enhancement and device, data enhancement equipment and storage medium

By fusing defect areas with defective and defect-free workpiece images, more training images are generated, which solves the problem of poor generalization performance of deep learning models in wafer defect detection and improves detection accuracy.

CN112884691BActive Publication Date: 2024-09-10SKYVERSE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202110260102.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-10
Publication Date
2024-09-10
Estimated Expiration
2041-03-10

AI Technical Summary

Technical Problem

Existing template detection algorithms have problems with over-inspection and low recognition accuracy in wafer defect detection. The deep learning model has poor generalization performance, resulting in low detection accuracy.

Method used

By acquiring defective workpiece images and defect-free workpiece images, the defective areas are identified and intercepted, and fused to generate training images, increasing the diversity of training data and improving model generalization performance.

Benefits of technology

It improves the generalization performance and defect detection effect of the target detection model, ensures that the number of training images for different types of defects is basically the same, and improves the detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112884691B
    Figure CN112884691B
Patent Text Reader

Abstract

A data enhancement method, a data enhancement device, a data enhancement equipment and a non-volatile computer-readable storage medium. The data enhancement method includes obtaining a first workpiece image with defects; identifying and intercepting the image area where the defects are located in the first workpiece image as a first fused image; obtaining a second workpiece image without defects as a second fused image; and fusing the first fused image and the second fused image to obtain a training image. The number of training images corresponding to the type of defects with a lower probability of occurrence can be increased, so that the number of training images with different types of defects is basically the same, and the training effect of the target detection model when training with a large number of training images is better in the subsequent training, which can improve the generalization performance of the target detection model and improve the detection effect of the target detection model on defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of detection technology, and in particular to a data enhancement method, a data enhancement apparatus, a data enhancement device, and a non-volatile computer-readable storage medium. Background Art

[0002] At present, the defects of workpieces are generally detected through template detection algorithms, but template detection algorithms have problems such as over-inspection and low recognition accuracy. In comparison, neural network models with higher detection accuracy are gradually gaining popularity. However, during the training of neural network models, the probability of occurrence of different types of defects is extremely uneven, resulting in poor model generalization performance when using deep learning methods for wafer defect recognition or detection, which directly affects the final detection accuracy. Summary of the invention

[0003] The present application provides a data enhancement method, a data enhancement apparatus, a data enhancement device and a non-volatile computer-readable storage medium.

[0004] The data enhancement method of the embodiment of the present application includes acquiring a first workpiece image with defects; identifying and intercepting an image area where the defects are located in the first workpiece image as a first fused image; acquiring a second workpiece image without defects as a second fused image; and fusing the first fused image and the second fused image to obtain a training image.

[0005] The data enhancement device of the embodiment of the present application includes a first acquisition module, a recognition module, a second acquisition module and a fusion module. The first acquisition module is used to acquire a first workpiece image with defects; the recognition module is used to identify and intercept the image area where the defects are located in the first workpiece image as a first fused image; the second acquisition module is used to acquire a second workpiece image without defects as a second fused image; the fusion module fuses the first fused image and the second fused image to obtain a training image.

[0006] The data enhancement device of the embodiment of the present application includes a processor. The processor is used to: obtain a first workpiece image with a defect; identify and intercept an image region where the defect is located in the first workpiece image as a first fused image; obtain a second workpiece image without a defect as a second fused image; and fuse the first fused image and the second fused image to obtain a training image.

[0007] A non-volatile computer-readable storage medium containing a computer program according to an embodiment of the present application, when the computer program is executed by one or more processors, causes the processors to perform the data enhancement method. The data enhancement method includes acquiring a first workpiece image having a defect; identifying and intercepting an image region where the defect is located in the first workpiece image as a first fused image; acquiring a second workpiece image without a defect as a second fused image; and fusing the first fused image and the second fused image to obtain a training image.

[0008] The data enhancement method, data enhancement apparatus, data enhancement device and non-volatile computer-readable storage medium of the present application generate more workpiece images with defects by fusing the image area where the defects are located in the first workpiece image with defects and the second workpiece image without defects, thereby obtaining a sufficient number of training images, and can increase the number of training images corresponding to types of defects with a lower probability of occurrence, so that the number of training images with different types of defects is basically the same. When the target detection model is subsequently trained with a large number of training images, the training effect is better, the generalization performance of the target detection model can be improved, and the detection effect of the target detection model on defects can be improved.

[0009] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 is a flowchart of a data enhancement method in certain embodiments of the present application;

[0012] Figure 2 is a schematic diagram of a module of a data enhancement device according to some embodiments of the present application;

[0013] Figure 3 is a plan view of a data enhancement device and a detection device in some embodiments of the present application;

[0014] Figures 4 to 9 is a flowchart of a data enhancement method in certain embodiments of the present application;

[0015] Figures 10 to 14is a schematic diagram of the principle of a data enhancement method in certain embodiments of the present application; and

[0016] Fig.15 It is a connection diagram of a processor and a computer-readable storage medium in certain embodiments of the present application. DETAILED DESCRIPTION

[0017] The following is a further description of the embodiments of the present application in conjunction with the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements or elements with the same or similar functions from beginning to end. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the present application.

[0018] See also Figures 1 to 3 The data enhancement method of the embodiment of the present application comprises the following steps:

[0019] 011: Acquire a first workpiece image having defects;

[0020] 012: Identify and capture an image region where a defect is located in the first workpiece image to serve as a first fused image;

[0021] 013: Acquire a second workpiece image without defects as a second fused image; and

[0022] 014: Fuse the first fused image and the second fused image to obtain a training image.

[0023] The data enhancement device 10 of the embodiment of the present application includes a first acquisition module 11, an identification module 12, a second acquisition module 13 and a fusion module 14. The first acquisition module 11 is used to acquire a first workpiece image with defects; the identification module 12 is used to identify and intercept the image area where the defects are located in the first workpiece image as a first fused image; the second acquisition module 13 is used to acquire a second workpiece image without defects as a second fused image; the fusion module 14 is used to fuse the first fused image and the second fused image to obtain a training image. That is to say, step 011 can be implemented by the first acquisition module 11, step 012 can be executed by the identification module 12, step 013 can be executed by the second acquisition module 13, and step 014 can be executed by the fusion module 14.

[0024] The data enhancement device 100 of the embodiment of the present application includes a processor 20. The processor 20 is used to: obtain a first workpiece image with defects; identify and intercept the image area where the defects are located in the first workpiece image as a first fused image; obtain a second workpiece image without defects as a second fused image; and fuse the first fused image and the second fused image to obtain a training image. That is, step 011, step 012, step 013 and step 014 can be executed by the processor 20.

[0025] Specifically, the data enhancement device 100 is connected to the detection device 200, the sensor 210 of the detection device 200 photographs the workpiece 300 to obtain image data, and the processor 20 reads the image data from the sensor 210 to obtain a workpiece image. For example, when the workpiece 300 is detected, the workpiece 300 is placed on the motion platform 220, and the sensor 210 collects information of the workpiece 300 to generate a workpiece image.

[0026] The motion platform 220 may be used to carry the workpiece 300 . The motion platform 220 moves to drive the workpiece 300 to move, so that the sensor 210 collects information of the workpiece 300 .

[0027] For example, the motion platform 220 includes an XY motion platform 221 and a Z motion platform 222, and the sensor 210 is set on the motion platform 220, specifically: the sensor 210 is set on the Z motion platform 222, wherein the XY motion platform 221 is used to control the movement of the workpiece 300 along the horizontal plane, and change the relative position of the workpiece 300 and the sensor 210 in the horizontal plane, and the Z motion platform 222 is used to control the movement of the sensor 210 in the direction perpendicular to the horizontal plane. In this way, the three-dimensional position of the sensor 210 relative to the workpiece 300 (that is, the relative position in the horizontal plane and the relative position in the direction perpendicular to the horizontal plane) is changed through the cooperation of the XY motion platform 221 and the Z motion platform 222.

[0028] It is understandable that the motion platform 220 is not limited to the above structure, and only needs to be able to change the three-dimensional position of the sensor 210 relative to the workpiece 300.

[0029] The sensor 210 may be one or more sensors, and the multiple sensors 210 may be sensors 210 of different types. For example, the sensor 210 may include a visible light camera, a depth camera, etc. In this embodiment, the sensor 210 is a visible light camera.

[0030] When capturing an image of the workpiece, the processor 20 may adjust the distance between the sensor 210 and the workpiece 300 according to the field of view of the sensor 210, so that the workpiece 300 is within the field of view, thereby obtaining an image of the entire workpiece 300 by capturing an image once; or, the field of view of the sensor 210 may cover only a portion of the workpiece 300 each time it captures the image, and the motion platform 220 may be moved to capture different regions of the workpiece 300, thereby obtaining multiple images of the workpiece. In this embodiment, the sensor 210 captures only a portion of the workpiece 300 each time to obtain multiple images of the workpiece.

[0031] This embodiment is described by taking the workpieces 300 as wafers as an example. The defects of wafers generally include foreign matter, residual adhesive, oxidation, bubbles, wrinkles, cracks, etc.

[0032] After acquiring multiple workpiece images, the first workpiece image with defects and the second workpiece image without defects can be accurately determined through the detection model or manual assistance. Then, the image area with defects in the first workpiece image is identified and cut out as the first fused image. The first workpiece image contains various types of defects, and the identified and cut out first fused image is a defect image of different types or the same type but with different characteristics (such as size, color, etc.).

[0033] Defects can be identified manually. For common types of defects, inspectors can generally identify them accurately. After identification, edge lines can be drawn on the edges of the defects to achieve defect capture, so as to obtain a first fused image. Alternatively, defect identification can also be achieved through the processor 20. The processor 20 identifies the location and type of the defect based on a preset detection model, thereby capturing the image area where the defect is located according to the location of the defect, so as to obtain a first fused image.

[0034] In order to improve the training effect, when acquiring the second workpiece image, the wafer pattern or the second workpiece images of multiple wafers with different wafer background patterns can be selected, so as to obtain multiple second workpiece images with different image backgrounds, so as to improve the diversity of the second workpiece images and the training effect. It can reduce the influence of the image background on the trained target detection model, reduce the influence of the complex image background on the accuracy of defect detection, and enable the target detection model to accurately perform defect detection even under different image backgrounds.

[0035] Then, the first fused image and the second workpiece image as the second fused image are fused to obtain multiple training images with defects, thereby enhancing the training images in terms of quantity, type, etc., so as to improve the detection effect of the training images on the target detection model. Among them, the target detection model can be a second-order detection algorithm (such as Faster R-CNN and its variants), a first-order detection algorithm (such as YOLOV3 and its variants), an anchor-free detection algorithm (such as CenterNet and its variants), etc., which are not limited here.

[0036] The data enhancement method, data enhancement device 10 and data enhancement equipment 100 of the present application generate more workpiece images with defects by fusing the image area where the defects are located in the first workpiece image with defects and the second workpiece image without defects, thereby obtaining a sufficient number of training images, and can increase the number of training images corresponding to types of defects with a lower probability of occurrence, so that the number of training images with different types of defects is basically the same. When the target detection model is subsequently trained with a large number of training images, the training effect is better, the generalization performance of the target detection model can be improved, and the detection effect of the target detection model on defects can be improved.

[0037] Please refer to 2. Figure 3 and Figure 4 In some embodiments, before step 013, the detection algorithm further includes:

[0038] 015: Before fusing the first fused image and the second fused image, transform the first fused image, where the transform includes at least one of mirroring, translation, rotation, shearing and deformation.

[0039] In some embodiments, the data enhancement device 10 further includes a transformation module 15. The transformation module 15 is used to perform a transformation process on the first fused image before fusing the first fused image with the second fused image, and the transformation process includes at least one of mirroring, translation, rotation, shearing and deformation. That is, step 015 can be performed by the transformation module 15.

[0040] In some embodiments, the processor 20 is further configured to perform a transformation process on the first fused image before fusing the first fused image with the second fused image, wherein the transformation process includes at least one of mirroring, translation, rotation, shearing, and deformation. That is, step 015 can be performed by the processor 20.

[0041] Specifically, it can be understood that the number of first fused images is limited. In order to improve the diversity of the first fused images, before the first fused image and the second fused image are fused, the first fused image can be transformed. By performing operations such as mirroring, translating, rotating, shearing, and deforming on the defects of the first fused image, different first fused images can be generated to improve the diversity of the training images obtained by fusion.

[0042] For example, the processor 20 mirrors, translates, rotates, shears or deforms the first fused image; of course, the processor 20 may also simultaneously translate and rotate the first fused image; or simultaneously translate, rotate and mirror it; or simultaneously translate, rotate, mirror it and shear it; or simultaneously translate, rotate and mirror it, and the translation, rotation and mirroring are performed multiple times at different distances, different angles and different axes of symmetry, etc., which are not listed one by one here.

[0043] When performing transformation processing, the processor 20 can randomly generate a transformation processing method to transform the first fused image; or, the processor 20 can record the transformation processing method that has been executed on each first fused image, and each time the first fused image is transformed, first determine a transformation processing method that is different from the previous transformation processing method, and then transform the first fused image, so that the first fused image after each transformation processing is different from the first fused image generated previously, thereby further improving the diversity of the first fused image to improve the training effect.

[0044] See also Figure 2 , Figure 3 and Figure 5 In some embodiments, the first fused image is multiple, and step 014 includes:

[0045] 0141: Selecting a target fused image from a plurality of first fused images; and

[0046] 0142: Fuse the target fused image with the second fused image to obtain a training image.

[0047] In some embodiments, the fusion module 14 is further used to select a target fusion image from the plurality of first fusion images and fuse the target fusion image with the second fusion image to obtain a training image. That is, step 0141 and step 0142 can be performed by the fusion module 14.

[0048] In some embodiments, the processor 20 is further configured to select a target fused image from the plurality of first fused images and fuse the target fused image with the second fused image to obtain a training image. That is, step 0141 and step 0142 can be executed by the processor 20.

[0049] Specifically, since there are generally fewer wafers with defects, the number of first fused images is generally small. In order to ensure the training effect, the selected first fused images at least include images of all types of defects. For example, corresponding to each defect, a typical first workpiece image corresponding to the type is selected from the first workpiece image to obtain the first fused image corresponding to the type; or, corresponding to each defect, multiple (such as two, three, etc.) typical first workpiece images corresponding to the type are selected from the first workpiece image to obtain multiple first fused images corresponding to the type.

[0050] When fusing the first fused image and the second fused image, the first fused image is first transformed, and then one or more of the first fused images after the transformation are selected as the target fused image, and then the target fused image is fused with the second fused image; or, one or more of the first fused images are first randomly selected as the target fused image, and then the target fused image is transformed, and finally fused with the second fused image. So that each second fused image is fused with a different first fused image. For example, if there are 1,000 second fused images, 1,000 different training images can be generated. In this way, the diversity of the generated training images can be improved.

[0051] See also Figure 2 , Figure 3 and Figure 6 In some embodiments, the data enhancement method further comprises:

[0052] 016: All training images are used as training sets and input into the target detection model for training so that the target detection model converges.

[0053] In some embodiments, the data enhancement device further includes a training module 16. The training module 16 is used to input all training images as training sets into the target detection model for training so that the target detection model converges. In other words, step 016 can be implemented by the training module 16.

[0054] In some embodiments, the processor 20 is further configured to use all training images as training sets and input them into the target detection model for training so that the target detection model converges. In other words, step 016 can be implemented by the processor 20.

[0055] Specifically, after obtaining the training images, all the training images can be input into the target detection model for training until the target detection model converges, thereby realizing the training of the target detection model. The target detection model convergence means that when the target detection model trained with the training images can accurately detect the defects of the workpiece 300, the target detection model can be considered to have converged, such as when the detection accuracy of the defects of the workpiece 300 reaches a predetermined accuracy (such as 90%, 95%, 98%, etc.).

[0056] See also Figure 2 , Figure 3 and Figure 7 In some embodiments, step 016 includes:

[0057] 0161: marking the type and location of defects in the training image corresponding to the first fused image to generate a verification image;

[0058] 0162: Input the training set to the target detection model to output the detection results;

[0059] 0163: Determine the loss value based on the verification image and the detection result; and

[0060] 0164: Adjust the target detection model according to the loss value so that the target detection model converges.

[0061] In some embodiments, the training module 16 is further used to annotate the type and location of defects in the training image corresponding to the first fused image to generate a verification image; input the training set to the target detection model to output a detection result; determine a loss value based on the verification image and the detection result; and adjust the target detection model based on the loss value to make the target detection model converge. That is, steps 0161 to 0164 can be performed by the training module 16.

[0062] In some embodiments, the processor 20 is further configured to annotate the type and location of defects in the training image corresponding to the first fused image to generate a verification image; input the training set to the target detection model to output a detection result; determine a loss value based on the verification image and the detection result; and adjust the target detection model based on the loss value to make the target detection model converge. That is, steps 0161 to 0164 can be performed by the processor 20.

[0063] Specifically, after obtaining the training image, the defects in the training image can be annotated in advance. For example, when fusing, the processor 20 can obtain the position of the first fused image in the second fused image and the type of defect corresponding to the first fused image; at this time, the processor 20 can automatically annotate the defects in the training image, such as annotating the type and position of the defect in the training image. After all the training images are annotated, a verification image corresponding to each training image can be generated, and the processor 20 generates a training set based on the training images and the verification images, such as taking the set of all training images and all verification images as the training set.

[0064] During training, the training image is first input into the target detection model, and then the target detection model outputs the detection result, which includes the type and location of the defect in the training image. The detection result is then compared with the corresponding verification image to determine whether the defect type of the detection result is the same as that of the corresponding verification image, and to determine the position deviation, thereby determining the loss value.

[0065] The processor 20 adjusts the target detection model according to the loss value so that the target detection model converges. For example, the defect type detection parameter is adjusted according to whether the defect type of the detection result and the corresponding verification image is the same, and the defect position detection parameter is adjusted according to the defect position deviation of the detection result and the corresponding verification image. The target detection model is trained by a training set including training images and verification images, so that the target detection model converges and the detection effect of the target detection model is guaranteed.

[0066] See also Figure 2 , Figure 3 and Figure 8 In some embodiments, step 0163 includes:

[0067] 01631: Compare the defect type in the detection result with the defect type in the corresponding verification image to determine the type loss value;

[0068] 01632: Compare the position of the defect in the test result with the position of the defect in the corresponding verification image in the verification set to determine the position loss value;

[0069] 01633: Determine the loss value based on the type loss value and the position loss value.

[0070] In some embodiments, the second acquisition module 13 is further used to compare the type of defects in the detection result with the type of defects in the corresponding verification image to determine the type loss value; compare the position of the defects in the detection result with the position of the defects in the corresponding verification image in the verification set to determine the position loss value; and determine the loss value according to the type loss value and the position loss value. That is, steps 1631 to 01633 can be performed by the second acquisition module 13.

[0071] In some embodiments, the processor 20 is further configured to compare the type of the defect in the detection result with the type of the defect in the corresponding verification image to determine the type loss value; compare the position of the defect in the detection result with the position of the defect in the corresponding verification image in the verification set to determine the position loss value; and determine the loss value according to the type loss value and the position loss value. That is, step 01631 and step 01633 can be executed by the processor 20.

[0072] Specifically, when determining the loss value, the type of defect in the detection result and the type of defect corresponding to the corresponding verification image can be compared to determine the type loss value. If the two types are the same, the loss value is determined to be 0; if the two types are different, the loss value is determined to be 1.

[0073] Then, the position of the defect in the test result can be compared with the position of the defect in the corresponding verification image to determine the position loss value. If the position of the defect in the test result is marked by a first defect frame, and the corresponding defect in the verification image is marked by a second defect frame, and both the first defect frame and the second defect frame are rectangular, the difference in the position coordinates of the two (such as the difference in the position coordinates of the center of the first defect frame and the second defect frame) can be calculated, and then the position loss value can be determined based on the difference. The larger the difference, the larger the position loss value.

[0074] Since the judgment of defect type is of high importance, when determining the loss value according to the type loss value and the position loss value, the type loss value may be given a larger weight, such as loss value = a*type loss value + b*position loss value, where a is greater than b. This ensures that the processor 20 can detect the defect type accurately after adjusting the target detection model according to the loss value.

[0075] See also Figure 2 , Figure 3 and Fig. 9 In some embodiments, 016 further includes:

[0076] 0165: When the loss value is less than a preset threshold, it is determined that the target detection model converges;

[0077] 0166: When the loss value is greater than the preset threshold, the training set is transformed, and the target detection model is trained again based on the transformed training set until the target detection model converges.

[0078] In some embodiments, the training module 16 is further configured to determine that the target detection model converges when the loss value is less than a preset threshold; when the loss value is greater than the preset threshold, transform the training set, and train the target detection model again based on the transformed training set until the target detection model converges. That is, step 0165 and step 0166 can be performed by the second acquisition module 13.

[0079] In some embodiments, the processor 20 is further configured to determine that the target detection model converges when the loss value is less than a preset threshold; when the loss value is greater than the preset threshold, transform the training set, and train the target detection model again based on the transformed training set until the target detection model converges. That is, steps 0165 and 0166 can be executed by the processor 20.

[0080] Specifically, after adjusting the target detection model according to the loss value, it is necessary to determine whether the target detection model has converged. After inputting the training set into the target detection model, the target detection model outputs a loss value. For example, if a loss value is output for each training image, the average of the loss values ​​corresponding to all training images is calculated as the final output loss value. At this time, the processor 20 determines whether the loss value is greater than a preset threshold. If the loss value is less than or equal to the preset threshold, it means that the detection loss is small and the detection accuracy has met the requirements. It can be determined that the target detection model has converged.

[0081] If the loss value is greater than the preset threshold, it means that the detection loss is too large and the detection accuracy still does not meet the requirements. At this time, it can be determined that the target detection model has not converged and needs to be trained. At this time, the training set can be transformed first. The transformation of the training image is as follows:

[0082] See also Fig.10 For example, the processor 20 performs mirror processing on each training image P1 to obtain a mirror image P2 of each training image P1 and uses it as a new training image P1. The mirror image P2 after mirror processing is mirror-symmetrical with the training image P1, and the axis of symmetry can be arbitrary, such as taking any side of the training image P1 as the axis of symmetry for mirror processing ( Fig.10 The rightmost side of the training image P1 is used as the axis of symmetry for mirror processing), or the diagonal line of the training image P1 or the line connecting the midpoints of any two sides is used as the axis of symmetry for mirror processing, so as to obtain multiple new training images through mirror processing.

[0083] See also Fig.11For another example, the processor 20 performs translation processing on each training image P1 to obtain a translation image P3 of each training image P1 and use it as a new training image P1. Specifically, the training image P1 is first used to determine a predetermined image area (i.e., the area occupied by the training image P1), and then the training image P1 is translated, such as left translation, right translation, upper left translation, etc. ( Fig.11 The image of the predetermined image area (ie, the translated image P3) is then used as a new training image P1. The position of the defect in the image after the translation changes, thereby obtaining a plurality of new training images P1.

[0084] See also Fig.12 For another example, the processor 20 performs a rotation process on each training image P1 to obtain a rotated image P4 of each training image P1 and use it as a new training image P1. Specifically, the training image P1 is first used to determine a predetermined image area, and then the training image P1 is rotated, such as rotating 10 degrees, 30 degrees, 60 degrees, 90 degrees, 140 degrees, etc. clockwise or counterclockwise ( Fig.12 The image of the predetermined image area (and the rotated image P4) is then used as a new training image P1. The position of the defect in the image changes after the rotation, thereby obtaining a plurality of new training images P1.

[0085] See also Fig.13 For another example, the processor 20 performs a shearing process on each training image P1 to obtain a sheared image P5 of each training image and use it as a new training image P1. Specifically, the training image P1 is first used to determine a predetermined image area, and then the training image P1 is sheared, such as shearing 1 / 4, 1 / 3, 1 / 2, etc. of the training image P1 ( Fig.13 The training image P5 is cut out by cutting out 1 / 2 of the training image, and then the image of the predetermined image area (ie the cut out image P5) is used as the new training image P1, thereby obtaining a plurality of new training images P1.

[0086] See also Fig.14 For another example, the processor 20 performs deformation processing on each training image P1 to obtain a deformed image P6 of each training image P1 and use it as a new training image P1. Specifically, the predetermined image area is first determined by the training image P1, and then the training image P1 is deformed, such as compressing the training image horizontally so that the originally rectangular training image P1 becomes a rectangle with a gap, and then the image of the predetermined image area (i.e., the deformed image P6) is used as the new training image P1. The position and shape of the deformed defect in the image are changed, thereby obtaining multiple new training images P1.

[0087] Of course, the processor 20 can also perform translation and rotation processing on the training image at the same time; or perform translation processing, rotation processing and mirror processing at the same time; or perform translation processing, rotation processing, mirror processing and shearing processing at the same time; or perform translation processing, rotation processing and mirror processing at the same time, and the translation processing, rotation processing and mirror processing are performed multiple times at different distances, different angles and different symmetry axes, etc., which are not listed one by one here.

[0088] Similarly, when the training images are transformed, the verification images corresponding to the training images can be transformed synchronously, and the transformation processing method of the training images corresponding to the verification images is the same, so as to ensure that after the training set is transformed, the training images and the verification images still correspond to each other, thereby ensuring the subsequent training effect of the target detection model.

[0089] Then, the processor 20 performs a second round of training on the target detection model based on the transformed training set. After the training, it determines whether the target detection model has converged based on the loss value again. If it has not converged, the training set is transformed again, and a third round of training is performed based on the transformed training set. This cycle is repeated until the trained target detection model converges.

[0090] In other embodiments, in order to ensure the accuracy of the judgment on the convergence of the target detection model, after the target detection model is trained according to the training set, a preset verification set is input so that the target detection model outputs a loss value, and the images in the verification set are different from the training images in the training set, so that the verification set can accurately verify whether the target detection model converges. For example, if there are multiple training images, some of them are used as training images of the training set, and the other part are used as images of the verification set; or the verification set is obtained based on the transformation processing of the training set.

[0091] See also Figure 2 and Figure 3 In some embodiments, the processor 20 is also used to detect the image of the workpiece 300 according to the converged target detection model to determine the type, location and confidence of the defect; when the confidence is greater than the confidence threshold corresponding to the type of defect, the type, location and confidence of the defect are output.

[0092] Specifically, after the target detection model training is completed, the sensor 210 acquires the image of the workpiece 300 to be detected, and then the processor 20 detects the image of the workpiece 300 according to the target detection model to determine the type, location and confidence of the defect. When the confidence is greater than the confidence threshold corresponding to the type of the current defect, it can be determined that the current defect detection is accurate, and the type, location and confidence of the current defect are output as the detection result.

[0093] Among them, the confidence threshold corresponds to the type of defect, and different types of defects correspond to different confidence thresholds, thereby specifically improving the detection accuracy of different types of defects. The target detection model of the present application is an end-to-end model. The end-to-end model only uses one model and one objective function. Compared with the multi-module model, the training objectives may have slight differences, which may make it difficult to achieve the optimal training effect, and the errors between different modules will affect each other and affect the final detection accuracy. The implementation and maintenance of the end-to-end model are relatively simple, and the trained model can achieve the optimal effect, with better detection effect and lower engineering complexity.

[0094] See also Fig.15 One or more non-volatile computer-readable storage media 300 containing a computer program 302 of an embodiment of the present application, when the computer program 302 is executed by one or more processors 20, enables the processor 20 to execute the calibration method of any of the above-mentioned embodiments.

[0095] For example, please combine Figures 1 to 3 , when the computer program 302 is executed by one or more processors 20, the processor 20 performs the following steps:

[0096] 011: Acquire a first workpiece image having defects;

[0097] 012: Identify and capture an image region where a defect is located in the first workpiece image to serve as a first fused image;

[0098] 013: Acquire a second workpiece image without defects as a second fused image; and

[0099] 014: Fuse the first fused image and the second fused image to obtain a training image.

[0100] For another example, please combine Figure 2 , Figure 3 and Figure 4 When the computer program 302 is executed by one or more processors 20, the processor 20 may further perform the following steps:

[0101] 015: Before fusing the first fused image and the second fused image, transform the first fused image, where the transform includes at least one of mirroring, translation, rotation, shearing and deformation.

[0102] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0103] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0104] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A data enhancement method, characterized in that: include: Acquire a first workpiece image having a defect; Identifying and capturing an image region where the defect is located in the first workpiece image as a first fused image; Acquire a second workpiece image without defects as a second fused image; and fusing the first fused image and the second fused image to obtain a training image; The first fused image is a plurality of images, and fusing the first fused image and the second fused image to obtain a training image includes: Selecting a target fused image from the plurality of first fused images; and fusing the target fused image with the second fused image to obtain the training image; The selecting a target fused image from the plurality of first fused images comprises: performing transformation processing on a plurality of the first fused images, and selecting one or more of the first fused images after the transformation processing as the target fused image; or, One or more of the first fused images are randomly selected and transformed to serve as the target fused image.

2. The data enhancement method according to claim 1, characterized in that: Also includes: Before fusing the first fused image and the second fused image, a transformation process is performed on the first fused image, where the transformation process includes at least one of mirroring, translation, rotation, shearing and deformation.

3. The data enhancement method according to any one of claims 1 to 2, characterized in that: Also includes: All the training images are used as training sets and input into the target detection model for training, so that the target detection model converges.

4. The data enhancement method according to claim 3, characterized in that: The step of taking all the training images as a training set and inputting them into the target detection model for training so that the target detection model converges includes: marking the type and location of the defect in the training image corresponding to the first fused image to generate a verification image; Inputting the training set into the target detection model to output a detection result; Determining a loss value according to the verification image and the detection result; and The target detection model is adjusted according to the loss value so that the target detection model converges.

5. The data enhancement method according to claim 4, characterized in that: The determining the loss value according to the verification image and the detection result includes: Comparing the type of the defect in the detection result with the type of the defect in the corresponding verification image to determine a type loss value; Comparing the position of the defect in the detection result with the position of the defect in the corresponding verification image in the verification set to determine a position loss value; The loss value is determined according to the type loss value and the position loss value.

6. The data enhancement method according to claim 4 or 5, characterized in that: The step of taking all the training images as training sets and inputting them into the target detection model for training so that the target detection model converges further includes: When the loss value is less than a preset threshold, determining that the target detection model converges; When the loss value is greater than the preset threshold, the training set is transformed, and the target detection model is trained again according to the transformed training set until the target detection model converges.

7. The data enhancement method according to claim 1, characterized in that: There are a plurality of second workpiece images, and the image backgrounds of the plurality of second workpiece images are different from each other.

8. The data enhancement method according to claim 1, characterized in that: The workpiece includes a wafer, and the defect includes at least one of foreign matter, residual glue and oxidation.

9. A data enhancement device, characterized in that: include: A first acquisition module, used for acquiring a first workpiece image having defects; an identification module, used for identifying and capturing an image region where the defect is located in the first workpiece image as a first fused image; A second acquisition module, used for acquiring a second workpiece image without defects as a second fused image; a fusion module, configured to fuse the first fused image and the second fused image to obtain a training image; There are multiple first fused images, and the fusion module is used to select a target fused image from the multiple first fused images; and fuse the target fused image with the second fused image to obtain the training image; The fusion module is also used to: perform transformation processing on multiple first fused images, and select one or more of the first fused images after the transformation processing as the target fused image; or randomly select one or more of the multiple first fused images and perform transformation processing as the target fused image.

10. A data enhancement device, characterized in that: comprising a processor configured to: Acquire a first workpiece image having a defect; Identifying and capturing an image region where the defect is located in the first workpiece image as a first fused image; Acquire a second workpiece image without defects as a second fused image; and fusing the first fused image and the second fused image to obtain a training image; There are multiple first fused images, and the processor is used to select a target fused image from the multiple first fused images; and fuse the target fused image with the second fused image to obtain the training image; The processor is also used to perform transformation processing on the multiple first fused images, and select one or more of the first fused images after the transformation processing as the target fused image; or randomly select one or more of the multiple first fused images and perform transformation processing on them as the target fused image.

11. A non-volatile computer-readable storage medium containing a computer program, wherein when the computer program is executed by a processor, the processor executes the data enhancement method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Defect classification and recognition method and device, computer equipment and storage medium

    CN109583489A

  • Product defect detection method and computer storage medium

    CN111640091A

  • Container defect detection method and device

    CN111709948A

  • Defect detection model training method, defect detection method and related device

    CN111814867A

  • Method of and device for inspecting images to detect defects

    US20020054293A1