  Image-based inspection systems have been widely deployed in manufacturing
production lines. Due to the scarcity of defective samples, unsupervised
anomaly detection that only leverages normal samples during training to detect
various defects is popular. Existing feature-based methods, utilizing deep
features from pretrained neural networks, show their impressive performance in
anomaly localization and the low demand for the sample size for training.
However, the detected anomalous regions of these methods always exhibit
inaccurate boundaries, which impedes the downstream tasks. This deficiency is
caused: (i) The decreased resolution of high-level features compared with the
original image, and (ii) The mixture of adjacent normal and anomalous pixels
during feature extraction. To address them, we propose a novel unified
optimization framework (F2PAD) that leverages the Feature-level information to
guide the optimization process for Pixel-level Anomaly Detection in the
inference stage. The proposed framework is universal and plug-and-play, which
can enhance various feature-based methods with limited assumptions. Case
studies are provided to demonstrate the effectiveness of our strategy,
particularly when applied to three popular backbone methods: PaDiM, CFLOW-AD,
and PatchCore.
