Defect Image Generation Method for Deep Learning and System for Defect Image Generation Method for Deep Learning

By extracting defect areas from sample images, deforming and correcting shapes, and synthesizing them into object images to generate learning defect images, solving the problem of lack of various types of images in the prior art and improving the defect detection accuracy of artificial intelligence algorithms.

CN114445309BActive Publication Date: 2025-07-08DOOSAN HEAVY IND & CONSTR CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110948560.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-10-20
Filing Date
2021-08-18
Publication Date
2025-07-08
Estimated Expiration
2041-08-18

AI Technical Summary

Technical Problem

The prior art is difficult to generate various types of learning defect images, which leads to the lack of sufficient learning data in defect detection, which affects the detection accuracy.

Method used

By extracting defect areas from sample images, performing shape deformation and correction, synthesizing them into object images to generate learning defect images, using histogram correction to reduce heterogeneity, and using blur processing and other technologies to generate various types of defect images.

Benefits of technology

It realizes the rapid generation of a large number of learning defect images, ensures that artificial intelligence algorithms are fully learned and improves the accuracy of defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445309B_ABST
    Figure CN114445309B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for generating defective images for deep learning and a system for the method for generating defective images for deep learning. Specifically, the present invention relates to a method and a system for generating learning data (more precisely, learning defective images) required for learning an algorithm for identifying defects from inspection images by using an artificial intelligence algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for generating defective images for deep learning and a system for the method for generating defective images for deep learning. Specifically, the present invention relates to a method and a system for generating learning data (more precisely, learning defective images) required in the process of learning an algorithm for identifying defects from inspection images by using an artificial intelligence algorithm. Background Art

[0002] Currently, there are several theoretical methods for identifying whether there are defects in an object. The representative methods are as follows: An image of the object is taken and the taken image is analyzed to identify the existence of defects.

[0003] On the other hand, recently, when calculating some arbitrary data, especially when calculating data with a particularly large amount of calculation, most cases use an artificial intelligence algorithm. However, the application of this artificial intelligence algorithm can also be used when discriminating whether there are defects from inspection images. As long as appropriate learning can be implemented for the artificial intelligence algorithm, it can be expected that the defect discrimination ability of the artificial intelligence algorithm can similarly imitate the intelligent judgment ability of a human.

[0004] As described above, in order to improve the performance of an artificial intelligence algorithm, appropriate learning needs to be carried out first. Generally, however, a lot of various types of learning data are required for learning, and in reality, it is very difficult to generate or collect such learning data.

[0005] In the prior art, in order to ensure learning data, there are general image augmentation methods, that is, methods for rotating (Rotate), flipping (Flip), rescaling (Rescale, Resize), shearing (Shear), zooming (Zoom), and adding noise (Add Noise) to an image. However, only by using these methods, only simple transformation of defective (defective) images can be performed, so there is a limitation that new forms of defective (defective) images cannot be generated.

[0006] Therefore, in the related field, the demand for ensuring learning data for the use of enabling an artificial intelligence algorithm to fully learn, especially the demand for ensuring learning data for learning various types and shapes of defects, is gradually increasing, and the present invention is proposed in view of this situation.

[0007] The present invention is proposed in view of the above background. The invention to be described in detail not only can solve the technical problems mentioned above, but also provides additional technical elements that are not easy to invent for those skilled in the art. Summary of the Invention

[0008] An object of the present invention is to arbitrarily generate a very large number of various defective images for learning. Further, an object thereof is to generate such defective images for learning in large quantities and quickly.

[0009] In addition, an object of the present invention is to use the defective images for learning thus generated to make an artificial intelligence algorithm learn, thereby improving the defect detection accuracy in inspection images.

[0010] On the other hand, the technical problems of the present invention are not limited to the technical problems mentioned above, and those skilled in the art can clearly understand other technical problems not mentioned according to the description below.

[0011] The present invention is proposed to solve the above problems. The method for generating a defective image for learning according to the present invention includes: a step of extracting a defective area from a sample image; a step of determining an object area in an object image, where the object area is an area for synthesizing the defective area; a step of correcting the defective area with reference to the image information of the object area; and a step of generating a defective image for learning by synthesizing the corrected defective area into the object area in the object image.

[0012] In addition, in the method for generating a defective image for learning, after the step of extracting the defective area, it may further include: a step of deforming the shape of the defect in the defective area.

[0013] In addition, the method for generating a defective image for learning is characterized in that the object area in the step of determining the object area in the object image may include the shape of the deformed defect and the peripheral area around the deformed defect. At this time, at least one of the position and size of the object area in the object image may be randomly determined.

[0014] In addition, the method for generating a defective image for learning is characterized in that in the step of correcting the defective area, correction can be performed to reduce the difference in image information between the peripheral area in the defective area and the peripheral area in the object area.

[0015] In addition, the method for generating a defective image for learning is characterized in that in the step of correcting the defective area, histogram correction can be performed on at least one of the peripheral area in the defective area and the peripheral area in the object area.

[0016] In addition, the method for generating a defective image for learning is characterized in that the step of generating a defective image for learning by synthesizing the corrected defective area into the object area in the object image may further include: a step of performing image adjustment on the defective area.

[0017] In addition, the learning defect image generation method is characterized in that the image adjustment step may include: a step of blurring at least one of the edges of the defect in the defect area or the surrounding area.

[0018] On the other hand, the learning defect image generation method according to another embodiment of the present invention may include: a step of extracting a defect area from a sample image; a step of deforming the shape of the defect within the defect area; and a step of generating a learning defect image by synthesizing the defect with the deformed shape into an object image.

[0019] In addition, the learning defect image generation method is characterized in that the step of generating the learning defect image is a step of inserting the defect with the deformed shape into an arbitrary object area within the object image.

[0020] In addition, the learning defect image generation method is characterized in that the step of generating the learning defect image may further include a step of adjusting the image of the defect area after the step of inserting the defect with the deformed shape into the object area.

[0021] On the other hand, the learning defect image generation system according to another embodiment of the present invention may include: an extraction unit that extracts a defect area from a sample image; an object area determination unit that determines an object area within an object image, where the object area is an area for synthesizing the defect area; a correction unit that corrects the defect area with reference to the image information of the object area; and a synthesis unit that synthesizes the defect area corrected by the correction unit into the object area to generate a learning defect image.

[0022] In addition, the learning defect image generation system may further include: a deformation unit that deforms the shape of the defect within the defect area.

[0023] On the other hand, the learning defect image generation system according to another embodiment of the present invention may include: an extraction unit that extracts a defect area from a sample image; a deformation unit that deforms the shape of the defect within the defect area; and a synthesis unit that synthesizes the defect with the deformed shape into an object image to generate a learning defect image.

[0024] According to the present invention, there is an effect of being able to quickly and easily generate multiple types of learning defect images, and thus there is an effect of being able to ensure a sufficient amount of learning data.

[0025] In addition, according to the present invention, it is possible to fully learn an artificial intelligence algorithm through multiple types of learning defect images, so there is an effect of being able to improve the defect detection accuracy when applying the artificial intelligence algorithm in an actual situation.

[0026] On the other hand, the effects of the present invention are not limited to the effects mentioned above. Those skilled in the art can clearly understand other technical effects not mentioned according to the descriptions below. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 And Figure 2 is a diagram for explaining the functions of the artificial intelligence algorithm described in the present invention and the necessity of learning.

[0028] Figure 3 is a diagram showing a method for generating a learning defect image according to a first embodiment of the present invention.

[0029] Figure 4 is a diagram shown to facilitate understanding of the method for generating a learning defect image related to the above-mentioned first embodiment.

[0030] Figure 5 is a diagram showing a method for generating a learning defect image according to a second embodiment of the present invention.

[0031] Figure 6 is a diagram shown to facilitate understanding of the method for generating a learning defect image related to the second embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0032] Regarding the details of the present invention related to the purpose, technical concept, and the effects brought by them, it can be more clearly understood through the following detailed descriptions based on the drawings in the specification of the present invention. The embodiments of the present invention will be described in detail with reference to the drawings.

[0033] The embodiments disclosed in this specification should not be used to interpret or limit the scope of the present invention. It is natural that the descriptions including the embodiments in this specification bring various applications to those skilled in the art. Therefore, any embodiment described in the detailed description of the present invention is shown to better illustrate the present invention and is not intended to limit the scope of the present invention to the embodiment.

[0034] The functional blocks shown in the drawings and described in the following specification are only implementable examples. When implementing other embodiments, other functional blocks can be used without departing from the concept and scope of the detailed description. In addition, although one or more functional blocks of the present invention are shown as independent blocks, one or more of the functional blocks of the present invention can be a combination of various hardware and software structures that perform the same function.

[0035] In addition, the expression that a certain structural element is "open" means that the corresponding structural element exists and should not be understood as excluding additional structural elements.

[0036] Further, when referring to a structural element being "coupled" or "connected" to another structural element, it should be understood that it can be directly coupled or directly connected to the other structural element, but other structural elements may also exist therebetween.

[0037] Next, with reference to the accompanying drawings, a method for generating a defective image for learning and a system for the method for generating a defective image for learning proposed by the present invention will be described.

[0038] First, Figure 1 is a diagram for briefly explaining the artificial intelligence algorithm mentioned in the detailed description. The main functions of the artificial intelligence algorithm mentioned here are as follows: If an arbitrary inspection image (I) is input, it is determined whether a defect (Defect) exists in the inspection image (I), and finally, the defect of the object to be observed is detected from the inspection image.

[0039] The inspection image refers to image data created by photographing an object to be observed. At this time, there are no special restrictions on the object to be observed, that is, the object to be observed. It should be noted that the artificial intelligence algorithm in the present invention can also be understood as a non-destructive inspection. For example, by performing image analysis on a projection image such as an X-ray image, a defect can be detected.

[0040] As long as the inspection image input to the artificial intelligence algorithm has an arbitrary image data form, the artificial intelligence algorithm can identify and detect a defect through an image analysis process. At this time, various analysis methods that utilize the information possessed by the image data can be included in the image analysis process. For example, the difference in RGB values or HSV values between the pixels constituting the image can be used to extract a boundary line or the like.

[0041] On the other hand, the above artificial intelligence algorithm itself is premised on being executable by an arithmetic device having a central processing unit (CPU) and a memory. The artificial intelligence algorithm mentioned here is premised on being able to implement machine learning, and more precisely, deep learning.

[0042] Figure 1 is a diagram for explaining the main functions of the artificial intelligence algorithm, then Figure 2It is a diagram schematically showing the process of applying a lot of learning data to achieve learning for improving the performance of an artificial intelligence algorithm. Deep learning refers to learning that is used as a countermeasure when there is a functional relationship between x and y but no model that can accurately predict y from x. The data is represented in a form that can be processed by a computer, and the model of the data is learned. There are multiple types of deep learning implementation methods. If it is a method of stacking several neural networks to build a model, it can be understood as deep learning. In deep learning models, the following are representative: "Deep" neural networks with multiple hidden layers between the input layer and the output layer; "Convolutional" neural networks that form connection patterns between neurons, similar to the structure of the visual cortex of animals; "Recurrent" neural networks that stack neural networks at each moment over time; "Restricted Boltzmann machines" that can learn the probability distribution of the input set, etc.

[0043] An artificial intelligence algorithm that can implement such deep learning basically needs to go through a learning process because it is difficult for the artificial intelligence algorithm itself to learn causal relationships without any information provided at the beginning. On the other hand, there is the following problem, that is, a considerable amount of learning data is required in this learning process, but generally, compared with the computing scale that a computer device can execute, the amount of learning data that a person can provide is limited. In a state where the learning data is insufficient, the performance of the artificial intelligence algorithm will be greatly reduced. The present invention is proposed to be able to produce a huge amount of learning data for an artificial intelligence algorithm in multiple types in this process. More simply put, it relates to the Figure 2 method and system for generating the learning data listed on the left.

[0044] Figure 3It is a diagram showing a method for generating a defective image for learning according to the first embodiment of the present invention. It should be noted that the method for generating a defective image for learning can be executed by a system having a central processing unit and a memory. At this time, the central processing unit may also be referred to as a controller, a microcontroller, a microprocessor, a microcomputer, etc. In addition, the central processing unit can be implemented by hardware, firmware, software, or a combination thereof. When implemented by hardware, it can be configured as an ASIC (application specific integrated circuit), a DSP (digital signal processor), a DSPD (digital signal processing device), a PLD (programmable logic device), an FPGA (field programmable gate array), etc. When implemented by firmware or software, it can be configured to include modules, steps, or functions that execute the above-mentioned functions or actions. In addition, the memory can be configured as a ROM (Read Only Memory), a RAM (Random Access Memory), an EPROM (Erasable Programmable Read Only Memory), an EEPROM (Electrically Erasable Programmable Read-Only Memory), a flash memory, an SRAM (Static Random Access Memory), an HDD (Hard Disk Drive), an SSD (Solid State Drive), etc.

[0045] The method for generating a defective image for learning according to the first embodiment can generally be understood as the following process: a process of extracting a defect, a process of deforming the defect, a process of correcting a defective area including the defect, and a process of synthesizing the above-mentioned defective area into an object image. That is, it can include the following process: after extracting an arbitrary defect from an image as a sample, deforming the defect and synthesizing the deformed defect onto an image as an object. Next, refer to Figure 3 and Figure 4, a more detailed description of the learning defect image generation method involved in the first embodiment will be given.

[0046] The learning defect image generation method first starts with the step (S101) of extracting a defect region from a sample image. The sample image refers to an image obtained by photographing an observation object with a defect. This sample image can be understood as an image obtained by photographing an observation object with a defect without asking the reason. For example, an image obtained by photographing an observation object with a defect in an actual manufacturing process, an image obtained during the maintenance of the observation object, or an image obtained after deliberately causing a defect to the observation object. In addition, even if there is only one such sample image, a large number of learning defect images can be generated according to the present invention. However, by ensuring multiple sample images, the generation of learning defect images of various shapes can be achieved.

[0047] Regarding the defect region, the defect region mentioned in the detailed description can be roughly defined in two forms.

[0048] First, the defect region can be defined as a region that only includes the substantial defect itself. That is, when there is a defect on the observation object, the closed curve formed by the outer contour line of the defect can be defined as the defect region.

[0049] Second, the defect region can be defined as including, in addition to the substantial defect, a predetermined region surrounding the defect. That is, the substantial defect part and the surrounding region surrounding the defect together constitute a defect region. At this time, the defect region can be defined under the set conditions. For example, when the substantial defect part is recognized, a quadrilateral defined by drawing horizontal and vertical lines with the outermost points existing above / below, left / right of the defect as tangents is defined as the defect region. On the other hand, the above defect region can be defined by directly receiving the input of the user on the sample image. For example, on a system loaded with a sample image, when the user designates a region surrounding an arbitrary defect part through mouse input, stylus input, or touch input, etc., the designated region can be defined as the defect region. At this time, the defect region can also include the substantial defect part and the surrounding region surrounding the defect part. The substantial defect part in the defect region is for generating arbitrary defects of new shapes, and the surrounding region is for reducing the sense of foreignness when synthesizing with the object image, which will be described below.

[0050] At Figure 4 the upper left side, the process of extracting the defect region 20 from the sample image 10 is shown. When referring to Figure 4When there are defects, they can exist at any position on the sample image 10, and at least any area including the defect is recognized as the defect area 20 and extracted. At this time, the defect area may include the interior of the closed curve of the defect itself, or the defect itself and a predetermined peripheral area thereof.

[0051] After the step S101, a step of deforming the defect (S102) can be executed. This step is to generate more types of defective shapes. For example, the following shape deformations can be performed: changing the size of the defect, changing the outer contour shape of the defect, rotating the defect, flipping the defect, etc. In this way, in this step, various logics can be executed for the deformation of the defect, and by randomly determining the degree of deformation under various logics, more types of defective shapes can be created.

[0052] Among them, the step S102 may not be an essential step in the method for generating the learning defective image, and the defect deformation can be implemented only when necessary. If this step is omitted, the area having the same shape as the defect area 20 or the defect extracted from the sample image 10 is included in the finally generated learning defective image.

[0053] After the step S102, a step of determining the object area in the object image (S103) can be executed. The object image can be understood as an image representing the background of the defective image when finally generating the learning defective image, or an image representing the synthesis of the defect extracted from the sample image. In addition, the object area can be understood as the area for synthesizing the defect area or the defect extracted from the sample image. That is, the step S103 can also be understood as a step of determining at which position on the object image the defect is synthesized.

[0054] In this step, during the process of determining the object area, the above-extracted defect area or defect can be referred to. For example, the width, amplitude, and length of the defect area, the shape of the defect, the length and amplitude of the defect, the shape of the deformed defect, the length and amplitude, etc. can be referred to when determining the object area in the object image. The object area is preferably determined to have the same size and shape as the defect area or the defect, in order to prevent the error caused by heterogeneity after subsequently synthesizing the defect area or the defect into the object area. It should be noted that at least one of the position and size of the object area determined in the object image can be randomly determined. That is, during the process of determining the object area, the information regarding the defect area or the defect extracted above can be referred to, however, at least one of the position and size of the object area can be randomly determined.

[0055] When referring to Figure 4At this time, the upper right side shows the process of determining the object area 40 within the object image 30. At this time, it can be confirmed that the object area 40 refers to the defect area 20 or the defective area extracted from the sample image 10.

[0056] After the step S103, the step of correcting the defect area (S104) can be executed. This step can be understood as a process executed to reduce the sense of incongruity when synthesizing the extracted defect area or defect into the object area of the object image. Briefly speaking, when directly pasting the defect area or defect extracted from the sample image onto the object image, the finally generated defect image for learning may not be regarded as a normal defect image, which may lead to the problem of the loss of value as learning data. In the present invention, by setting the step of pre-correcting the defect area, a defect image as natural as possible can be generated.

[0057] Figure 4 shows the process of correcting the defect area 20 by comparing the defect area 20 and the object area 40 with each other. There can be various methods in the correction method, and it is preferably implemented by histogram correction. A histogram refers to a chart created with the brightness value of the image as the horizontal axis and the number of pixels having a size corresponding to the brightness value of the horizontal axis reaching within the image as the vertical axis. Thus, at least it can be judged how bright or dark the image to be analyzed is. In the step S104, the brightness of the defect area 20 can be corrected by referring to how many pixels with what degree of brightness value are included in the object area 40 part in the object image 30 as a whole. This process is shown in Figure 4 the histogram of. That is, the chart corresponding to the defect area 20 existing on the left side of the histogram is corrected to move toward the chart side corresponding to the object area 40.

[0058] On the other hand, the above has described the case where the defective area can be defined in two ways. One is to define the defect itself as the defective area, and the other is to define the defective area including the defect and the surrounding area. In either case, the correction process of step S104 above can be executed. In the case of the defective area involved in the first definition method, the color of the corresponding defective area is corrected to have a histogram similar to that of the object area. The correction at this time can be restricted to: only correcting in the direction similar to the histogram of the object area 40, and not correcting to the same extent as the histogram of the object area 40. If it is corrected to the same extent as the histogram of the object area 40, it may be difficult to identify the defective area 20 itself. In the case of the defective area involved in the first definition method, it is corrected in the direction similar to the histogram of the object area 40, and the degree of correction needs to be restricted. On the other hand, in the case of the defective area involved in the second definition method, in addition to correcting the defective part, the surrounding area can also be additionally corrected. Depending on the situation, the correction of the defective part can also be omitted, and only the surrounding area can be corrected. For the correction of the surrounding area in the defective area, a histogram correction similar to that of the object area or the surrounding area in the object area can be implemented. When synthesizing the defective area into the object image, one of the methods to minimize the sense of incongruity is to correct the periphery of the area where the defect is located more naturally. In the present invention, for this purpose, the surrounding area in the defective area is made to appear similar to the object area (or the surrounding area in the object area), that is, a correction is made to reduce the difference in image information between the two images, thereby intending to achieve this effect.

[0059] After step S104, a step (S105) of generating a learning defective image by synthesizing the corrected defective area into the object area in the object image can be executed. Briefly speaking, this step can also be understood as the step of pasting the corrected defective area onto the object area in the above steps. On the other hand, in the step of generating the learning defective image, the learning defective image can also be finally made into a more natural image by adding a step of image adjustment to the defective area. Various methods can be applied to the image adjustment. For example, methods such as blurring, interpolation, or harmonization processing of at least one of the edges of the defect in the defective area and the surrounding area can be applied.

[0060] At Figure 4 the lower end, the appearance of the defective area with pattern deformation synthesized onto the object image and finally generating the learning defective image 50 is shown.

[0061] As mentioned above with reference to Figure 3 and Figure 4The method for generating a defective image for learning according to the first embodiment of the present invention has been described.

[0062] Figure 5 And Figure 6 is a diagram related to the method for generating a defective image for learning according to the second embodiment of the present invention. The second embodiment is characterized in that, different from the above first embodiment, after extracting the defective region from the sample image, the shape of the defective region is deformed and then directly synthesized into the object image. That is, the second embodiment is characterized in that the correction process of the defective region is omitted, and instead, after synthesizing the defective region onto the object image, correction is performed in this state, thereby generating a defective image for learning.

[0063] First, when referring to Figure 5 the method for generating a defective image for learning according to the second embodiment can start with the step (S201) of extracting the defective region from the sample image. The description of the sample image and the defective region is substantially the same as that in the above first embodiment, but regarding the defective region, in the second embodiment, it can be defined that the defective region only includes the defect itself. That is, the defective region in the second embodiment can be the interior of the closed curve formed by the outer contour line of the defect.

[0064] After the step S201, the step (S202) of deforming the shape of the defect can be executed. This step is to generate more kinds of shaped defects. For example, the following shape deformations can be implemented: changing the size of the defect; deforming the shape of the outer contour line of the defect; rotating the defect; and flipping the defect, etc.

[0065] After the step S202, the step (S203) of generating a defective image for learning by directly synthesizing the deformed defect onto the object image can be executed. In this step, after inserting the defect with the shape deformation into the object region, it may further include the step of image adjustment for the defective region. However, this is a process to minimize the sense of heterogeneity that may be caused by the defective region in the defective image for learning. In the image adjustment step, the methods such as blurring, interpolation, or harmonization of the edge of the deformed defective region described in the above first embodiment can be applied. On the other hand, in the image adjustment step, an object region including the peripheral region of the deformed defective region can be set, and when adjusting the image, by separately adjusting the peripheral region, the sense of heterogeneity caused by the synthesis can be further reduced.

[0066] Figure 6The method for generating a defective image for learning according to the second embodiment is shown in order. The steps of first extracting the defect 21 from the sample image 10 and deforming the defect, the step of synthesizing the deformed defect 41 into the object image 30, the step of performing image adjustment on the object region 40 or the deformed defect 41 in the object image, etc. are shown.

[0067] As described above with reference to Figure 5 and Figure 6 the method for generating a defective image for learning according to the second embodiment has been described.

[0068] On the other hand, both the first and second embodiments described above are methods implemented by a computer device having a central processing unit and a memory. When the system capable of implementing each embodiment is divided according to the specific structure, the description is as follows.

[0069] First, the system 100 corresponding to the first embodiment may include: an extraction unit 110 that extracts a defective region from a sample image; an object region determination unit 130 that determines an object region in the object image, where the object region is a region for synthesizing the defective region; a correction unit 140 that corrects the defective region with reference to the image information of the object region; and a synthesis unit 150 that synthesizes the defective region corrected by the correction unit into the object region to generate a defective image for learning. In addition, it may further include a deformation unit 120 for deforming the shape of the defect in the defective region.

[0070] Next, the system 200 corresponding to the second embodiment may include: an extraction unit 210 that extracts a defective region from a sample image; a deformation unit 220 that deforms the shape of the defect in the defective region; and a synthesis unit 230 that synthesizes the defect with the deformed shape into the object image to generate a defective image for learning.

[0071] The method for generating a defective image for learning and the system for the method for generating a defective image for learning have been described above. The present invention is not limited to the embodiments and applications with the above features, and various deformation implementations can be carried out by those skilled in the art within the scope not departing from the gist of the present invention claimed in the claims. Such deformation implementations should not be distinguished from the technical concept or idea of the present invention.

Claims

1. A method for generating a defective image for learning, which is a method for generating a defective image for learning by a system having a central processing unit and a memory, comprising: A step of extracting a defective region from a sample image, wherein the defective region includes a first defect and a first peripheral region, and the first peripheral region forms a quadrilateral surrounding the first defect such that the boundary line of the first peripheral region intersects the outermost top point, bottom point, left point, and right point of the first defect; A step of deforming the shape of the first defect within the defective region; A step of determining an object region within the object image, where the object region is a region for synthesizing the defective region and includes a defect synthesis region and a second peripheral region surrounding the defect synthesis region; A step of correcting the defective region with reference to the image information of the object region, wherein correcting the defective region includes reducing the histogram difference between the first peripheral region and the second peripheral region and the histogram difference between the first defect and the defect synthesis region, and the reduction of the histogram difference between the first defect and the defect synthesis region is limited to a certain extent; and A step of generating a defective image for learning by synthesizing the corrected defective region into the object region within the object image.

2. The method for generating a defective image for learning according to claim 1, wherein, The deformation includes changing the size of the first defect or changing the outer contour shape of the first defect.

3. The method for generating a defective image for learning according to claim 2, wherein The object region in the step of determining the object region within the object image includes the shape of the deformed first defect and the first peripheral region around the deformed first defect.

4. The method for generating a defective image for learning according to claim 3, wherein At least one of the position and size of the object region within the object image is randomly determined.

5. The method for generating a defective image for learning according to claim 1, wherein The step of generating a defective image for learning by synthesizing the corrected defective region into the object region within the object image further includes: A step of performing image adjustment on the defective region.

6. The method for generating a defective image for learning according to claim 5, wherein The step of performing the image adjustment includes: A step of blurring the edge of at least one of the first defect or the first peripheral region in the defective region.

7. A method for generating a defective image for learning, which is a method for generating a defective image for learning by a system having a central processing unit and a memory, comprising: A step of extracting a defective region from a sample image, wherein the defective region includes a first defect and a first peripheral region, and the first peripheral region forms a quadrilateral surrounding the first defect such that the boundary line of the first peripheral region intersects the outermost top point, bottom point, left point, and right point of the first defect; A step of deforming the shape of the first defect within the defective region; A step of determining an object region within the object image, where the object region is a region for synthesizing the defective region and includes a defect synthesis region and a second peripheral region surrounding the defect synthesis region; A step of correcting the defective region with reference to the image information of the object region, wherein correcting the defective region includes reducing the histogram difference between the first peripheral region and the second peripheral region while maintaining the histogram difference between the first defect and the defect composite region; and A step of generating a defective image for learning by synthesizing the corrected and shape-deformed defective region into the object region in the object image.

8. A system for generating a defective image for learning, comprising a central processing unit and a memory, and including: An extraction unit that extracts a defective region from a sample image, wherein the defective region includes a first defect and a first peripheral region, and the first peripheral region forms a quadrilateral surrounding the first defect such that the boundary line of the first peripheral region intersects the outermost top point, bottom point, left point, and right point of the first defect; A deformation unit that deforms the shape of the first defect within the defective region; and An object region determination unit that determines an object region in the object image, the object region being a region for synthesizing the defective region and including a defect composite region and a second peripheral region surrounding the defect composite region; A correction unit that corrects the defective region with reference to the image information of the object region, wherein correcting the defective region includes reducing the histogram difference between the first peripheral region and the second peripheral region and the histogram difference between the first defect and the defect composite region, wherein the reduction of the histogram difference between the first defect and the defect composite region is limited to a certain extent; and A synthesis unit that synthesizes the defective region corrected by the correction unit into the object region to generate a defective image for learning.

9. A system for generating a defective image for learning, comprising a central processing unit and a memory, and including: An extraction unit that extracts a defective region from a sample image, wherein the defective region includes a first defect and a first peripheral region, and the first peripheral region forms a quadrilateral surrounding the first defect such that the boundary line of the first peripheral region intersects the outermost top point, bottom point, left point, and right point of the first defect; A deformation unit that deforms the shape of the first defect within the defective region; An object region determination unit that determines an object region in the object image, the object region being a region for synthesizing the defective region and including a defect composite region and a second peripheral region surrounding the defect composite region; A correction unit that corrects the defective region with reference to the image information of the object region, wherein correcting the defective region includes reducing the histogram difference between the first peripheral region and the second peripheral region while maintaining the histogram difference between the first defect and the defect composite region; and A synthesis unit that synthesizes the corrected and shape-deformed defective region into the object region in the object image to generate a defective image for learning.

Citation Information

Patent Citations

  • Deep learning-based sample generation method in industrial vision detection

    CN110853035A

  • Defect image sample generation method and device and panel defect detection method

    CN111524100A

  • Defect sample generation method and device, electronic equipment and storage medium

    CN111681162A