CN113011480A - Cambered surface defect image generation method based on cyclic generation countermeasure network - Google Patents

Cambered surface defect image generation method based on cyclic generation countermeasure network Download PDF

Info

Publication number
CN113011480A
CN113011480A CN202110253845.1A CN202110253845A CN113011480A CN 113011480 A CN113011480 A CN 113011480A CN 202110253845 A CN202110253845 A CN 202110253845A CN 113011480 A CN113011480 A CN 113011480A
Authority
CN
China
Prior art keywords
defect
image
arc
map
defects
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110253845.1A
Other languages
Chinese (zh)
Inventor
黄茜
朱轲信
胡志辉
师聪颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202110253845.1A priority Critical patent/CN113011480A/en
Publication of CN113011480A publication Critical patent/CN113011480A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention belongs to the technical field of defect image generation, and relates to a cambered surface defect image generation method based on a cyclic generation countermeasure network, which comprises the following steps: step 1, constructing a defect set and a non-defect set; step 2, initializing a loop to generate a countermeasure network; the cyclic generation countermeasure network includes a GAN for conversion from a defect-free arc image to a defect-containing arc imageB→AAnd a GAN for converting from a defect-containing arc image to a defect-free arc imageA→B,GANB→AAnd GANA→BThe network structure is completely consistent; step 3, training circulation to generate a confrontation network; and 4, generating a countermeasure network based on the trained cycle to generate a cambered surface image containing defects from the flawless cambered surface image. The method realizes the rapid generation of the arc surface defect image, the shape and the area of the generated defect have randomness, and the automation of a large number of defect samples can be realized only by a small amount of marking work at the early stageAnd (4) generating.

Description

Cambered surface defect image generation method based on cyclic generation countermeasure network
Technical Field
The invention relates to the technical field of defect image generation, in particular to a cambered surface defect image generation method based on a cyclic generation countermeasure network.
Background
The mobile phone shell is used as the most widely covered part in the mobile phone composition, and reflects the texture and experience of the mobile phone, so the importance of the quality problem of the mobile phone shell is self-evident. In the manufacturing process of the mobile phone shell, dozens of complex process flows such as rough milling, finish milling, polishing and the like are carried out, the cambered surface of the frame can generate dents, bruises or fine cracks, so a manual quality inspection process is added in the middle of the production process of the mobile phone shell, and the next process flow can be carried out when the product quality is over-critical. Therefore, if the detection automation can be realized, the manufacturing process of the mobile phone shell can be further efficient, and the frame defect detection technology based on deep learning is the technology with the greatest practicability and development prospect at present.
A good defect detection algorithm, particularly a defect automatic detection algorithm based on deep learning, needs a large number of defect samples as supports, and the low defective rate makes some defect samples difficult to collect in a large number. Therefore, a method for automatically generating a large number of simulated defect samples is needed to increase the number of defect samples.
At present, there are several methods for generating defect images. The first is a defect image generation method based on a CAD model, which requires designing a three-dimensional model of the defect, takes a long time, and cannot exhibit the diversity of the defect. The second method is a defect image generation method based on an image processing method, and the method needs to create various templates meeting requirements according to the characteristics of real defects, and then generates a defect image by the templates. Although the method is simple and suitable for generating a large number of images, the generated images have certain difference with real defect images, so that the detection accuracy of the detection algorithm is influenced to a certain extent. The third method is to generate defect samples based on a traditional image processing algorithm, but the method generally still results from synthesizing original defects, and the generalization capability of the detection algorithm is improved to a limited extent.
Disclosure of Invention
Aiming at the defects and shortcomings of the prior art, the invention provides a cambered surface defect image generation method based on a loop generation countermeasure network.
The invention is realized by adopting the following technical scheme:
a cambered surface defect image generation method based on a cycle generation countermeasure network comprises the following steps:
step 1, obtaining a cambered surface image containing defects and a cambered surface image without defects; marking out all positions with defects by using a rectangular frame for the cambered surface image containing the defects; for the arc surface image without defects, a rectangular frame is used for marking a plurality of positions where defects are likely to occur; extracting a marked region from the marked arc image to form a defect set and a non-defect set;
step 2, initializing a loop to generate a countermeasure network; the cycle generating countermeasure network includes two generating countermeasure networks: GANB→AAnd GANA→BWherein: GANB→AFor converting from defect-free arc image to defect-containing arc image, GANA→BFor converting from defect-containing to defect-free images, GANB→AAnd GANA→BThe network structure is completely consistent;
step 3, training circulation to generate a confrontation network;
and 4, generating a countermeasure network based on the trained cycle to generate a cambered surface image containing defects from the flawless cambered surface image.
Preferably, the arc-surface image without defects is labeled by adopting one of the following two labeling schemes:
firstly, manually and accurately marking out areas which are likely to generate defects;
firstly, roughly marking a larger area of the arc image without defects, wherein the larger area is a position where defects often occur; sub-regions are then randomly chosen over a larger area in a rectangular box of fixed resolution.
Preferably, the extracting the labeled region from the labeled arc image to form a defect set and a non-defect set comprises:
and cutting out a marked area from the marked arc image according to the rectangular frame, and normalizing the marked area to the same size by using a bilinear interpolation algorithm to form a defect set and a defect-free set.
Preferably, each generation countermeasure network is composed of a generator G for generating images and a discriminator D for discriminating the generated images, and the countermeasure training of the generator G and the discriminator D is the core of the generation countermeasure network to generate high-quality images.
Preferably, generating the countermeasure network weights is randomly initialized using a gaussian distribution.
Preferably, the generator G is a full convolutional network, and its specific structure includes:
firstly, 7 × 7 convolutional layers are formed, then downsampling operation is carried out by using convolution with stride being 2, then extraction and mapping of features are carried out by using 9 residual blocks, upsampling is carried out by using a nearest neighbor interpolation algorithm, and finally a generated defect image with the same size of an input image is obtained by using 7 × 7 convolution operation.
Preferably, the discriminator D maps the input to a feature map, which is a matrix, instead of a real number, using a PatchGan structure, where each position of the feature map corresponds to a certain block region of the input image.
Preferably, the discriminator D is a full convolution structure, and the output size is the input image size/16 feature map.
Preferably, step 3 comprises:
step 3.1, input Defect-free set image B into generator GB→AObtaining a cambered surface image A containing defects generated from the cambered surface image without defectsGenInputting the image A of the defect set into a generator GA→BObtaining a defect-free arc image B generated from the arc image containing defectsGen
Step 3.2, train the Generator, Generator loss function LGANComprises the following steps:
LGAN=LGc×Lcycleid×Lidentity
wherein: l isGFor generator losses, LcycleFor cyclic losses, LidentityLoss of consistency; lambda [ alpha ]cAnd λidIs a set parameter;
LG、Lcycle、Lidentitythe calculation formula is as follows:
Figure BDA0002966983300000031
Figure BDA0002966983300000041
Figure BDA0002966983300000042
wherein:
Figure BDA0002966983300000043
Figure BDA0002966983300000044
Figure BDA0002966983300000045
Figure BDA0002966983300000046
Figure BDA0002966983300000047
Figure BDA0002966983300000048
wherein: a is a defect map; b is a defect-free map; a. theGenA defect map generated from the defect-free map; b isGenA defect-free map generated from the defect map; dA、DBA discriminator for discriminating a defect image A and a defect-free image B; gA→B、GB→ARespectively "generating a defect-free map from a defect map" and "generating a defect from a defect-free mapThe generator of the graph "; l1_ Loss and L2_ Loss are L1 norm losses and L2 norm losses, respectively.
Step 3.3, training the arbiter, wherein the arbiter loss function is defined as follows:
Figure BDA0002966983300000049
Figure BDA00029669833000000410
and calculating a loss function of the discriminator in sequence, carrying out back propagation to obtain a gradient, and updating parameters of the discriminator by using an Adam optimization algorithm.
And 3.4, acquiring data from the data set, repeating the steps 3.1-3.3 until the quality of the generated defect map is higher or stopping training after sufficient times of iteration, and obtaining a trained loop generation countermeasure network.
Preferably, step 4 comprises:
step 4.1, marking a region to be generated on the non-defective cambered surface image;
step 4.2, inputting the trained generator G for generating the defect map from the defect-free map after cutting the area to be generatedB→AObtaining a generated defect block;
4.3, performing noise reduction treatment on each generated defect block by using bilateral filtering;
and 4.4, splicing the defect blocks subjected to noise reduction back to the original defect-free arc image to obtain a complete defect-containing arc image (arc defect image).
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) the method and the device realize the rapid generation of the arc surface defect image, the shape and the area of the generated defect have randomness, a large number of arc surface images containing the defect can be rapidly generated only by a small amount of marking work in the early stage, the shape, the type and the area of the generated defect have randomness, and the detection precision of the detection algorithm can be effectively improved by expanding the data set by the generated image.
(2) The effect of generating the defect image is very close to that of the real image.
(3) The invention can generate a great number of simulated defect images on the basis of a real defect sample, the generated defect images have diversity, and the shapes and the areas of the defects have randomness.
(4) The method can obviously reduce the artificial marking cost, and has randomness not only in the form of generating the defects, but also in the positions of generating the defects, and only needs a small amount of artificial marking cost.
(5) The invention can generate any number of defects in a full-automatic way at a fast speed.
(6) Compared with the traditional generation countermeasure network, the invention introduces a symmetrical double-generator structure, cycle loss and consistency loss, so that the training is easier to converge.
(7) The conversion of the two images can be completed by only dividing the defect and the defect-free data into two data sets without forming a one-to-one paired data set.
Drawings
FIG. 1 is a schematic diagram of a method for generating an arc defect image based on a cycle generation countermeasure network in one embodiment.
FIG. 2 is a diagram illustrating a method for automatically labeling a sub-region after a region to be generated is defined on a non-defective image in one embodiment.
Fig. 3 is a schematic diagram of the overall structure of the loop countermeasure generation network in one embodiment, in which: a: defective image, B: defect-free image, G: a generator, D: and a discriminator.
Figure 4 is a detailed block diagram of a generator network in one embodiment.
FIG. 5 is a diagram illustrating the detailed structure of the arbiter network in one embodiment.
FIG. 6 is a schematic loss function diagram of a generator network for generating a defect image A from a defect-free image B in one embodiment.
FIG. 7 is a diagram illustrating a penalty function of a discriminator network for determining a defect image, in one embodiment.
FIG. 8 is a comparison of a portion of a real defect map and a portion of a generated defect map using a data set in one embodiment.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the embodiments of the present invention are not limited thereto.
A cambered surface defect image generation method based on a cyclic generation countermeasure network mainly comprises the following steps: (1) labeling the cambered surface image data set to obtain a defect data set and a defect-free defect background data set; (2) extracting images according to the labels, and normalizing the images into the same size; (3) generating parameters of the countermeasure network using a gaussian distributed random initialization loop; (4) calculating a loss function, calculating a gradient by using a back propagation algorithm and updating parameters by using an Adam optimization algorithm; (5) and marking the area to be generated by using a non-defective arc image, acquiring the generated defect by using a trained defect image generator, and splicing the generated defect image back to the original image after bilateral filtering.
Fig. 1 is a schematic diagram of a method for generating an arc defect image based on a cycle generation countermeasure network, which is used for obtaining a new arc image with generation defects from a defect-free mobile phone shell arc image, and comprises the following steps:
step 1, constructing a data set.
Firstly, acquiring an image of a shell cambered surface with defects and an image of a shell cambered surface without defects. For the image with the defects, all positions with the defects are framed by using a rectangular frame, and the marking frame needs to cover the boundaries of the defects more accurately. For non-defective images, a rectangular frame is used to frame out several possible locations where defects may occur. And then extracting the marked region from the marked data set to form a defect set and a non-defect set.
The method specifically comprises the following steps:
and 1.1, acquiring a mobile phone shell arc image containing defects and a mobile phone shell arc image without defects.
And step 1.2, marking all positions with defects by using a rectangular frame for the cambered surface image of the mobile phone shell with the defects, wherein the rectangular frame needs to cover the defect boundary accurately.
Step 1.3, labeling the defect-free image by adopting one of the following two labeling schemes:
1. and manually and accurately marking the areas which can generate the defects.
2. The method can roughly mark a larger area for a non-defective image, and then randomly sample several rectangular frames with fixed resolution as marks, thereby being beneficial to improving the generalization capability and reducing the labor marking cost.
As shown in fig. 2, wherein: fig. 2(a) is a diagram of a defined region to be generated, and fig. 2(b) is a diagram of randomly selecting sub-regions in the defined region to be generated with several resolutions. Only the larger areas, which are locations where defects often occur, such as near voids, curved boundaries, surfaces, antenna strips for a cell phone case, are locations where defects are likely to occur, are roughly labeled, and sub-areas, such as 128 x 128, 256 x 256, 512 x 512, are randomly selected in these areas at several selected resolutions, the size of the resolution depending on the image size and the size of the actual defect possible. When a certain resolution exceeds the demarcated area size, the resolution is ignored. The number of regions generated for each resolution can be set by itself, depending on the size of the data set desired to be generated.
And step 1.4, cutting out a marked area from the marked data set according to the marked frame, and normalizing the marked area into the same size by using a bilinear interpolation algorithm to form a defect set and a defect-free set. In this embodiment, the normalized size is 256 × 256.
And 2, initializing a loop to generate a countermeasure network.
As shown in fig. 3, one cycle of generative countermeasure networks includes two generative countermeasure networks: GANB→AAnd GANA→BWherein: GANB→AFor converting from non-defective to defective images, GANA→BFor conversion from a defective image to a non-defective image, the two resulting antagonistic network structures are identical. Each generation countermeasure network consists of a generator G and a discriminator D, the generator is used for generating images, the discriminator is used for distinguishing the generated images, and the countermeasure training of the generator G and the discriminator is the core of the generation countermeasure network to generate high-quality images. All networksThe weight weights are initialized randomly using a gaussian distribution.
The generator G is a full convolution network, and its specific structure is shown in fig. 4. Firstly, a convolution layer of 7 × 7 is carried out, then, a convolution with stride being 2 is used for carrying out down-sampling operation, then, 9 residual blocks are used for carrying out feature extraction and mapping, the residual blocks are of a structure obtained on the basis of ResNet, then, nearest neighbor interpolation algorithm is used for up-sampling, and finally, a generated defect image with the same size of an input image is obtained by using convolution operation of 7 × 7. It should be noted that: the rectangular boxes in fig. 4 represent convolution operations, ignoring padding, which all convolution operations actually pad so that the size is relatively constant. The padding keeps the dimension constant when stride (step size) is 1 and the padding keeps the dimension at the original dimension 1/2 when stride is 2.
The discriminator D can map the input to a feature map instead of a real number by using a PatchGan structure, the feature map is a matrix, each position corresponds to a certain block region of the input, and compared with the condition that the input is simply mapped to the real number, the influence of different parts of the image is considered, so that the model can pay more attention to the image details.
The specific structure of the discriminator D is a full convolution structure as shown in fig. 5, and outputs a feature map (actually, a matrix) having a size of input image size/16, where each position of the feature map corresponds to a certain block region of the input image.
Step 3, training a loop to generate a confrontation network, and the steps are as follows:
step 3.1, input Defect-free set image B into generator GB→AObtaining a defect map A generated from the defect-free mapGenInputting the image A of the defect set into a generator GA→BObtaining a defect-free image B generated from the defect mapGen
Step 3.2, training a generator, wherein a generator loss function is as follows:
LGAN=LGc×Lcycleid×Lidentity
generator dependent loss function LGANThe medicine consists of three parts: l isGFor generator losses, LcycleTo be lost in circulation,LidentityIs a loss of consistency. Lambda [ alpha ]cAnd λidAre set parameters, 10.0 and 5.0 are taken in this example, respectively.
Cycle generating countermeasure network as GANA→B、GANB→AA symmetrical structure is formed, and the loss of two symmetrical transformation processes is averaged to obtain LG、Lcycle、Lidentity
Figure BDA0002966983300000091
Figure BDA0002966983300000092
Figure BDA0002966983300000093
Wherein:
Figure BDA0002966983300000094
Figure BDA0002966983300000095
Figure BDA0002966983300000096
Figure BDA0002966983300000097
Figure BDA0002966983300000098
Figure BDA0002966983300000099
wherein: a is a defect map, B is a defect-free map, AGenTo generate a defect map, BGenFor defect-free maps generated from defect maps, DA、DBDiscriminators G for defect map A and defect-free map BA→B、GB→AGenerators of "generating a defect-free map from a defect map" and "generating a defect map from a defect-free map", respectively. L1_ Loss and L2_ Loss are L1 norm losses and L2 norm losses, respectively.
With GB→AThe correlation loss function of the generator is taken as an example, and a schematic diagram is shown in fig. 6, wherein the network parameters of the arbiter are frozen in fig. 6 and are enclosed by a dashed line.
Determining a generator dependent loss function LGANThen, the gradient is obtained by back propagation, and the generator G is updated by using an Adam optimization algorithmB→AThe parameter (c) of (c).
And 3.3, training a discriminator. FIG. 7 shows a discriminator DASchematic diagram of the loss function of (c). The network parameters of the generator are frozen in fig. 7, enclosed by dashed lines.
The discriminant loss function is defined as follows (following the notation definition of step 3.1):
Figure BDA0002966983300000101
Figure BDA0002966983300000102
and calculating loss functions in sequence, reversely propagating to obtain gradients, and updating parameters of the discriminator by using an Adam optimization algorithm.
And 3.4, acquiring data from the data set, repeating the steps 3.1-3.3 until the quality of the generated defects is higher or the training is stopped after sufficient times of iteration, and obtaining a trained circularly generated countermeasure network.
And 4, obtaining an arc surface defect image containing the generated defects from the defect-free image.
And performing noise reduction processing on the generated defect block by using bilateral filtering, removing noise and keeping edge information. When the to-be-generated area is labeled from the non-defective image, a larger area can be roughly labeled on the non-defective image, then several rectangular frames with fixed resolution are randomly sampled from the non-defective image to serve as labels, the cost of manpower labeling is reduced, and a large number of random defect samples can be rapidly generated.
The method specifically comprises the following steps:
and 4.1, marking a region to be generated on the non-defective arc image, and if the defect needs to be automatically generated, adopting the method for randomly selecting the sub-region in the step 1, as shown in fig. 2.
Step 4.2, inputting the trained generator G from the non-defective image to the defective image after cutting the areasB→AAnd obtaining a generated defect block.
And 4.3, performing noise reduction on each generated defect block by using bilateral filtering.
And 4.4, splicing the defect blocks subjected to noise reduction back to the original defect-free arc image to obtain a complete defect-formed mobile phone shell arc image. The defect quality was examined in comparison with the real defect map, as shown in fig. 8, fig. 8(a) is the real defect map, and fig. 8(b) is the generated defect map, which was difficult to be distinguished by the naked eye.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (10)

1. A cambered surface defect image generation method based on a cycle generation countermeasure network is characterized by comprising the following steps:
step 1, obtaining a cambered surface image containing defects and a cambered surface image without defects; marking out all positions with defects by using a rectangular frame for the cambered surface image containing the defects; for the arc surface image without defects, a rectangular frame is used for marking a plurality of positions where defects are likely to occur; extracting a marked region from the marked arc image to form a defect set and a non-defect set;
step 2, initializing a loop to generate a countermeasure network; the cycle generating countermeasure network includes two generating countermeasure networks: GANB→AAnd GANA→BWherein: GANB→AFor converting from defect-free arc image to defect-containing arc image, GANA→BFor converting from defect-containing to defect-free images, GANB→AAnd GANA→BThe network structure is completely consistent;
step 3, training circulation to generate a confrontation network;
and 4, generating a countermeasure network based on the trained cycle to generate a cambered surface image containing defects from the flawless cambered surface image.
2. The arc surface defect image generation method according to claim 1, wherein the arc surface image without defects is labeled by one of the following two labeling schemes:
firstly, manually and accurately marking out areas which are likely to generate defects;
firstly, roughly marking a larger area of the arc image without defects, wherein the larger area is a position where defects often occur; sub-regions are then randomly chosen over a larger area in a rectangular box of fixed resolution.
3. The arc surface defect image generation method of claim 1, wherein extracting the labeled region from the labeled arc surface image to form a defect set and a defect-free set comprises:
and cutting out a marked area from the marked arc image according to the rectangular frame, and normalizing the marked area to the same size by using a bilinear interpolation algorithm to form a defect set and a defect-free set.
4. The arc surface defect image generation method of claim 1, wherein each generation countermeasure network is composed of a generator G and a discriminator D, the generator G is used for generating images, the discriminator D is used for discriminating the generated images, and the countermeasure training of the generator G and the discriminator D is the core of the generation countermeasure network to generate high-quality images.
5. The arc surface defect image generation method of claim 4, wherein generating the countermeasure network weights is randomly initialized using a Gaussian distribution.
6. The arc surface defect image generation method of claim 4, wherein the generator G is a full convolution network, and the specific structure thereof comprises:
firstly, 7 × 7 convolutional layers are formed, then downsampling operation is carried out by using convolution with stride being 2, then extraction and mapping of features are carried out by using 9 residual blocks, upsampling is carried out by using a nearest neighbor interpolation algorithm, and finally a generated defect image with the same size of an input image is obtained by using 7 × 7 convolution operation.
7. The arc defect image generation method of claim 4, wherein the discriminator D uses a PatchGan structure to map the input to a feature map instead of a real number, the feature map is a matrix, and each position of the feature map corresponds to a region of the input image.
8. The arc surface defect image generation method of claim 4, wherein the discriminator D is a full convolution structure, and the output size is the input image size/16 of the feature map.
9. The arc surface defect image generation method according to claim 1, wherein step 3 comprises:
step 3.1, input Defect-free set image B into generator GB→AObtaining a cambered surface image A containing defects generated from the cambered surface image without defectsGenInputting the image A of the defect set into a generator GA→BObtaining a defect-free arc image B generated from the arc image containing defectsGen
Step 3.2, train the Generator, Generator loss function LGANComprises the following steps:
LGAN=LGc×Lcycleid×Lidentity
wherein: l isGFor generator losses, LcycleFor cyclic losses, LidentityLoss of consistency; lambda [ alpha ]cAnd λidIs a set parameter;
LG、Lcycle、Lidentitythe calculation formula is as follows:
Figure FDA0002966983290000031
Figure FDA0002966983290000032
Figure FDA0002966983290000033
wherein:
Figure FDA0002966983290000034
Figure FDA0002966983290000035
Figure FDA0002966983290000036
Figure FDA0002966983290000037
Figure FDA0002966983290000038
Figure FDA0002966983290000039
wherein: a is a defect map; b is a defect-free map; a. theGenA defect map generated from the defect-free map; b isGenA defect-free map generated from the defect map; dA、DBA discriminator for discriminating a defect image A and a defect-free image B; gA→B、GB→AGenerators of "generating a defect-free map from a defect map" and "generating a defect map from a defect-free map", respectively; l1_ Loss and L2_ Loss are L1 norm Loss and L2 norm Loss, respectively;
step 3.3, training the arbiter, wherein the arbiter loss function is defined as follows:
Figure FDA00029669832900000310
Figure FDA00029669832900000311
calculating a loss function of the discriminator in sequence, carrying out back propagation to obtain a gradient, and updating parameters of the discriminator by using an Adam optimization algorithm;
and 3.4, acquiring data from the data set, repeating the steps 3.1-3.3 until the quality of the generated defect map is higher or stopping training after sufficient times of iteration, and obtaining a trained loop generation countermeasure network.
10. The arc surface defect image generation method according to claim 1, wherein the step 4 comprises:
step 4.1, marking a region to be generated on the non-defective cambered surface image;
step 4.2, after cutting the area needing to be generatedInputting a generator G which is trained to generate a defect map from a defect-free mapB→AObtaining a generated defect block;
4.3, performing noise reduction treatment on each generated defect block by using bilateral filtering;
and 4.4, splicing the defect blocks subjected to noise reduction back to the original defect-free arc image to obtain a complete defect-containing arc image.
CN202110253845.1A 2021-03-09 2021-03-09 Cambered surface defect image generation method based on cyclic generation countermeasure network Pending CN113011480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110253845.1A CN113011480A (en) 2021-03-09 2021-03-09 Cambered surface defect image generation method based on cyclic generation countermeasure network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110253845.1A CN113011480A (en) 2021-03-09 2021-03-09 Cambered surface defect image generation method based on cyclic generation countermeasure network

Publications (1)

Publication Number Publication Date
CN113011480A true CN113011480A (en) 2021-06-22

Family

ID=76409172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110253845.1A Pending CN113011480A (en) 2021-03-09 2021-03-09 Cambered surface defect image generation method based on cyclic generation countermeasure network

Country Status (1)

Country Link
CN (1) CN113011480A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114612468A (en) * 2022-05-09 2022-06-10 西南交通大学 Equipment external defect detection method based on positive sample
WO2023082760A1 (en) * 2021-11-15 2023-05-19 常州微亿智造科技有限公司 Defective picture generation method and apparatus applied to industrial quality inspection

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199531A (en) * 2019-12-27 2020-05-26 中国民航大学 Interactive data expansion method based on Poisson image fusion and image stylization
CN111415316A (en) * 2020-03-18 2020-07-14 山西安数智能科技有限公司 Defect data synthesis algorithm based on generation of countermeasure network
US20200394506A1 (en) * 2019-06-14 2020-12-17 Robert Bosch Gmbh Machine learning system
CN112102424A (en) * 2019-06-18 2020-12-18 顺丰科技有限公司 License plate image generation model construction method, generation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200394506A1 (en) * 2019-06-14 2020-12-17 Robert Bosch Gmbh Machine learning system
CN112102424A (en) * 2019-06-18 2020-12-18 顺丰科技有限公司 License plate image generation model construction method, generation method and device
CN111199531A (en) * 2019-12-27 2020-05-26 中国民航大学 Interactive data expansion method based on Poisson image fusion and image stylization
CN111415316A (en) * 2020-03-18 2020-07-14 山西安数智能科技有限公司 Defect data synthesis algorithm based on generation of countermeasure network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘华超等: "引入特征损失对CycleGAN的影响研究", 《计算机工程与应用》 *
刘清斌: "弧面缺陷检测技术和应用研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023082760A1 (en) * 2021-11-15 2023-05-19 常州微亿智造科技有限公司 Defective picture generation method and apparatus applied to industrial quality inspection
US11783474B1 (en) 2021-11-15 2023-10-10 Changzhou Microintelligence Co., Ltd. Defective picture generation method and apparatus applied to industrial quality inspection
CN114612468A (en) * 2022-05-09 2022-06-10 西南交通大学 Equipment external defect detection method based on positive sample
CN114612468B (en) * 2022-05-09 2022-07-15 西南交通大学 Equipment external defect detection method based on positive sample

Similar Documents

Publication Publication Date Title
CN113450307B (en) Product edge defect detection method
CN107358636B (en) Loose defect image generation method based on texture synthesis
CN112241997A (en) Three-dimensional model establishing and repairing method and system based on multi-scale point cloud up-sampling
Ji et al. B‐Mesh: a modeling system for base meshes of 3D articulated shapes
CN113011480A (en) Cambered surface defect image generation method based on cyclic generation countermeasure network
TW201732690A (en) Method of deep learning - based examination of a semiconductor specimen and system thereof
CN111553858B (en) Image restoration method and system based on generation countermeasure network and application thereof
Guo et al. Application of computer aided modeling design in the expression techniques of sculpture art space
CN105678712B (en) The improvement Criminisi image repair methods of combining adaptive gradient piecemeal and equilong transformation
Jiangsha et al. Data augmentation by a CycleGAN-based extra-supervised model for nondestructive testing
CN114842201A (en) Sandstone aggregate image segmentation method based on improved Mask _ Rcnn
CN116205876A (en) Unsupervised notebook appearance defect detection method based on multi-scale standardized flow
CN113240790B (en) Rail defect image generation method based on 3D model and point cloud processing
CN113724223B (en) YOLOv3 data set production method and system based on optical microscope
CN115661340B (en) Three-dimensional point cloud up-sampling method and system based on source information fusion
CN113487495B (en) Multi-scale high-resolution image anti-noise generation method based on deep learning
CN116402702A (en) Old photo restoration method and system based on deep neural network
Leung et al. Tileable btf
CN114119874A (en) Single image reconstruction high-definition 3D face texture method based on GAN
CN113222887A (en) Deep learning-based nano-iron labeled neural stem cell tracing method
CN106204721B (en) The non-complete face model restorative procedure in part based on photo
CN117292067B (en) Virtual 3D model method and system based on scanning real object acquisition
CN116228797B (en) Shale scanning electron microscope image segmentation method based on attention and U-Net
Yang et al. Simultaneous structure and geometry detail completion based on interactive user sketches
Zhan et al. High-Quality Graphic Rendering and Synthesis of Design Graphics Using Generating Adversarial Networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210622

WD01 Invention patent application deemed withdrawn after publication