Texture surface defect detection based on positive example learning
[Objective]This research focuses on addressing the issue of insufficient defect samples in deep learning for texture surface defect detection.While deep learning methods have shown remarkable accuracy in defect detection on textured surfaces,their effectiveness is often hindered by the scarcity of available defect samples.To overcome this limitation,we introduce an algorithm for texture surface defect detection that relies on positive example learning.By focusing on learning from a smaller set of positive examples,our approach aims to enhance the efficiency and effectiveness of defect detection,thereby potentially improving the robustness and generalization capabilities of the system.[Methods]A texture surface defect detection method based on positive learning was proposed.It utilized an autoencoder to design a reconstruction model that generates defect-free reconstructed images.Additionally,it employed a difference search strategy between the test images and the reconstructed images to achieve defect recognition and segmentation.A gray-scale adaptive transformation based on texture surface features could balance color-type texture defect preservation with recognition speed.Moreover,a strategy of channel importance was adopted to prominently highlight defect features.Amplification of adversarial loss in defect regions was achieved by modifying label values,enabling the detection of subtle defects.[Results]The results of the ablation experiments in this study demonstrate that the proposed grayscale adaptive and defect-aware module based on texture surface features can effectively improve the accuracy of defect detection on five texture data subsets of the MVTec dataset.For example,using conventional grayscale methods alone can often weaken the overall characteristics of color-type defects,making the weakened defects closely resemble the background and difficult for the model to detect,leading to missed detections of defects.However,employing the texture surface gray-scale adaptive transformation method proposed in this paper can enhance the model's ability to recognize and segment color-type defects.After applying the proposed grayscale adaptive transformation method on the Carpet dataset,the overall accuracy increased by 1.91%.Specifically,the false alarm rate remained unchanged,while the miss detection rate decreased by 2.53%.This indicates an improvement in the recognition rate of defect samples.Similarly,in the Tile and Wood datasets,the overall accuracy improved by 1.91%and 2.99%,respectively,while the false alarm rate remained unchanged.The miss detection rates decreased by 2.7%and 4%,respectively.This indicates a notable performance advantage of the proposed method in both classifying samples and segmenting defects.For instance,in the Carpet dataset,the PaDiM method achieves the highest sample classification accuracy,followed by our proposed method.However,in terms of defect segmentation,our method achieves the highest mIoU of 51.64%.As for the Grid dataset,MemSeg exhibits the lowest false negative rate,indicating superior defect recognition capability.In the Leather dataset,our method outperforms MemSeg in both sample classification and defect segmentation,with an improvement of 1.79%in accuracy and 4.91%in mIoU.In the Tile dataset,our method achieves the same classification results as MemSeg,with both methods reaching an accuracy of 99.05%.but our method shows a slight decrease in mIoU by 3.01%.In the Wood dataset,MemSeg exhibits the lowest classification accuracy,while the remaining three methods achieve the same accuracy.Specifically,PaDiM demonstrates the lowest miss detection rate for defects,STPM exhibits the lowest false alarm rate for normal samples,and concerning defect segmentation,the proposed method outperforms others.[Conclusions]The texture defect detection method proposed in this article,based on positive example learning,presents advantages over current mainstream approaches.It does not require a large number of defect samples,thereby offering faster processing and higher accuracy in classifying samples.Additionally,it achieves segmentation results closer to real labels.Overall,this method shows promise for more efficient and accurate defect detection in various industries,although further validation through experiments and practical applications is necessary.
textured surfacedefect detectiondeep learningpositive example learninggenerative adversarial network