Surface defect inspection is necessary for the production of magnetic tiles. Automated inspection based on machine vision and artificial intelligence can greatly improve the efficiency. However, collecting sufficient defect samples… Click to show full abstract
Surface defect inspection is necessary for the production of magnetic tiles. Automated inspection based on machine vision and artificial intelligence can greatly improve the efficiency. However, collecting sufficient defect samples and marking them require a long preparation time. To address this, an unsupervised defect segmentation method based on attention enhanced flexible U-Net (FUNet) is proposed in this article. Normal samples are utilized to train FUNet to inpaint tile images and then use a fixed threshold to segment defects in the residual space. The flexible shortcuts enhanced by an attention mechanism are used to fuse the encoding feature maps and decoding features maps to improve the details of the reconstructed image, as well as suppress the interference of shallow features of defect region. To solve the severe area imbalance between the defect and the background, a novel focal variance loss (FVL) is proposed, weighting the attention to the regions with severe texture changes. Experiments on the texture dataset verify that the proposed FVL can inpainting the image in more detail. In the magnetic tile defect segmentation experiment, the pixelwise intersection over union (IoU) of defect reaches 83%, which is higher than the alternative unsupervised algorithm. The samplewise recall rate reached 97.5%, which is better than the supervised method.
               
Click one of the above tabs to view related content.