The automatic defect detection technology based on digital image processing and machine vision has become a hot research direction in the field of industrial production at present,because it has the advantages of fast detection speed and low labor cost and its detection result more stable and reliable.While detecting the defect of some products,due to their complex structure,the traditional machine vision technology is difficult to extract the feature vector from their image,so the detection result of them is not good.In this case,neural network technology is a better choice.By designing deep convolution neural network structure,the neural network has great learning ability and feature expression ability.The convolution neural network can extract the abstract feature of the images,so the accuracy of defect detection is greatly increased.This paper chooses the convolution neural network as the main method to detect the defect of the workpiece and design the detection system,in order to realize the automation of defect detection,and it has great academic and applied value.In order to accurately detect the various defects of the workpiece surface,this paper designs the hardware and software of the whole defect detection system.The part of hardware guarantees the quality of the images of the workpiece,while the part of software includes the defect area segmentation of the workpiece image,the feature extraction of the segmented workpiece image and determining whether the workpiece is qualified.The defect area segmentation algorithm is the most important part in the whole system design,but the traditional image segmentation algorithm is difficult to meet the design requirements of the project,so we propose the method that using the semantic segmentation network to process the image,and designs the Defect Segmentation Network based on the feature of the workpiece image.The network's purpose is to mark the defect area in the original image of workpiece as a specific pixel value,while the non-defect area remains unchanged.Then the training framework,Generative Adversarial Network,is used to train the Defect Segmentation Network to make it to get better image processing performance.Finally,through the comparison experiment,we prove the Defect Segmentation Network that trained by condition Generative Adversarial Networks framework has the ability to detect the defect is efficient and finally decide the most suited network structure for the defect detection system. |