Background noise can easily lead to incorrect classification in anomaly detection, which is a crucial step in industrial product quality inspection. In this paper, we introduce Mask-Patchcore, a simple yet effective algorithm designed to mitigate the impact of background noise. Firstly, we employ a segmentation-based mask generator that integrates with the input image in the Mask-Patchcore detection network. This approach allows for the assignment of varying weights to different segments of the image, thereby enhancing focus on regions of interest. By dynamically adjusting attention across image regions via the mask generator, Mask-Patchcore significantly improves the anomaly detection algorithm’s ability to pinpoint and identify target areas. This enhancement boosts overall detection accuracy and robustness. We extensively evaluate Mask-Patchcore using public datasets such as MVTEC-AD, VISA, and MPDD. Experimental results demonstrate its superior performance compared to existing algorithms. Furthermore, we showcase its successful application in detecting map boundary anomalies.
|