🤖 AI Summary
This work addresses the challenge in industrial anomaly detection where existing feature reconstruction methods are prone to shortcut learning, often erroneously restoring anomalous regions as normal. To mitigate this issue, the authors propose TFA-Net, which introduces a novel multi-level feature aggregation mechanism guided by normal templates, deliberately avoiding direct reconstruction of anomalous features and thereby effectively suppressing information inconsistent with the normal template. The model’s robustness is further enhanced through a random masking strategy, while precise defect localization is achieved via feature refinement and difference map generation. Extensive experiments on multiple real-world industrial datasets demonstrate that TFA-Net achieves state-of-the-art detection performance while meeting the stringent real-time requirements of industrial deployment.
📝 Abstract
Industrial anomaly detection plays a crucial role in ensuring product quality control. Therefore, proposing an effective anomaly detection model is of great significance. While existing feature-reconstruction methods have demonstrated excellent performance, they face challenges with shortcut learning, which can lead to undesirable reconstruction of anomalous features. To address this concern, we present a novel feature-reconstruction model called the \textbf{T}emplate-based \textbf{F}eature \textbf{A}ggregation \textbf{Net}work (TFA-Net) for anomaly detection via template-based feature aggregation. Specifically, TFA-Net first extracts multiple hierarchical features from a pre-trained convolutional neural network for a fixed template image and an input image. Instead of directly reconstructing input features, TFA-Net aggregates them onto the template features, effectively filtering out anomalous features that exhibit low similarity to normal template features. Next, TFA-Net utilizes the template features that have already fused normal features in the input features to refine feature details and obtain the reconstructed feature map. Finally, the defective regions can be located by comparing the differences between the input and reconstructed features. Additionally, a random masking strategy for input features is employed to enhance the overall inspection performance of the model. Our template-based feature aggregation schema yields a nontrivial and meaningful feature reconstruction task. The simple, yet efficient, TFA-Net exhibits state-of-the-art detection performance on various real-world industrial datasets. Additionally, it fulfills the real-time demands of industrial scenarios, rendering it highly suitable for practical applications in the industry. Code is available at https://github.com/luow23/TFA-Net.