The invention discloses an industrial finished product microdefect detection method based on a
generative adversarial network, and the method comprises the following steps: S1, collecting a high-resolution image of the surface of an industrial finished product, and constructing a
data set of a normal image and a defect image; s2, extracting an image
feature vector, splicing the image
feature vector with a defect type vector, and inputting the spliced image
feature vector and the defect type vector into a generator network containing a geometric structure transformation module to generate a defect
candidate image; s3, inputting the defect
candidate image into a
discriminator network containing a topological
structure analysis module, and outputting an authenticity discrimination result, a structure
connectivity characteristic index and a defect type prediction
label; s4, jointly training a generator and
discriminator network; s5, inputting a to-be-detected image, and obtaining a defect
candidate image and a prediction result; s6, generating a defect probability graph, a saliency graph and a binary
mask, and positioning a defect area; and S7, outputting a microdefect detection and
classification result in combination with the prediction
label, the
saliency map and the
mask. According to the method, the detection precision and the classification capability of the micro-defects under the complex background are improved.