Single-Layer Distillation with Fourier Convolutions for Texture Anomaly Detection

Simon Thomine, Hichem SnoussiWACV 2025

TL;DR

This paper introduces SingleNet, a novel knowledge distillation approach for texture anomaly detection that uses only a single layer from a pre-trained network and fast Fourier convolutions (FFC) to achieve state-of-the-art performance with significantly faster inference speeds. It addresses the challenge of efficient and accurate anomaly detection in industrial settings by focusing on texture-specific characteristics.

What Problem Does This Paper Address?

Industrial quality control heavily relies on detecting anomalies in visual textures to ensure product quality and operational efficiency. Traditional methods often require extensive expert parameterization. While deep learning has offered automated solutions, many current unsupervised anomaly detection methods depend on complex architectures involving multiple pre-trained models and layers, leading to slow inference times. Furthermore, these methods often treat textures uniformly with objects, which is suboptimal. A key challenge is the "normality forgetting" issue in knowledge distillation, where student models become proficient at reconstructing defects, hindering anomaly detection. This paper aims to develop a specialized, efficient, and accurate method for texture anomaly detection that overcomes these limitations.

Methods

The core of SingleNet is a knowledge distillation framework that leverages a single layer from a pre-trained network (specifically, the second block of a ResNet-18) as the "teacher." The "student" network is designed to reconstruct a degraded version of the teacher's feature map.

Key novelties include:

  • Single-Layer Focus: Instead of using multiple layers or models, SingleNet uses features from a single, well-chosen layer, simplifying the architecture.
  • Fast Fourier Convolutions (FFC): FFC layers are employed to efficiently capture global information within the texture. This is crucial because texture anomalies often manifest as deviations from repetitive patterns, requiring a broad receptive field. The FFC allows for direct access to global context early in the reconstruction process.
  • Transposed FFC: A transposed version of FFC is used to reconstruct the feature map, enabling the integration of both local and global information.
  • Frequency-Aware Filtering: To mitigate reconstruction artifacts and noise arising from architectural disparities between the teacher and student models, a low-pass Butterworth filter is applied in the frequency domain to the feature maps before anomaly scoring. This smooths out high-frequency noise and emphasizes structural components.
  • Simplified Anomaly Scoring: The anomaly score is calculated by comparing the filtered student and teacher features, upsampled and smoothed with a Gaussian filter.

Datasets

The paper evaluates SingleNet on four distinct texture datasets:

  • MVTEC AD [5]: A comprehensive dataset with five texture categories, ranging from homogeneous to random patterns, including defect-free training images and various defect types for testing.
  • TILDA [10]: A dataset featuring a diverse range of textiles, including homogeneous textures and patterns with motifs.
  • AITEX [26]: Another dataset of textile images.
  • DAGM [34]: A synthetic texture dataset with high-quality images representing various textured surfaces.

Key Insights and Ideas

  • Single Layer Sufficiency: The research demonstrates that a single layer from a pre-trained network can capture sufficient information for effective texture anomaly detection, challenging the common practice of using multiple layers.
  • FFC for Global Context: Fast Fourier Convolutions are highly effective for capturing global texture information, which is critical for identifying anomalies that might be missed by purely local feature extractors.
  • Frequency Domain Filtering for Robustness: Applying low-pass filtering in the frequency domain is a powerful technique to reduce noise and artifacts introduced by architectural differences in knowledge distillation, leading to more reliable anomaly scores.
  • Specialization for Textures: By focusing on texture-specific characteristics and employing FFC, the method achieves superior performance and speed compared to general-purpose anomaly detection techniques.

Key Results

  • State-of-the-Art Performance: SingleNet achieves performance comparable to or exceeding state-of-the-art methods on the MVTEC AD, TILDA, AITEX, and DAGM datasets, often outperforming methods that use multiple layers or more complex architectures.
  • Significant Speedup: The proposed method achieves inference speeds more than four times faster than comparable state-of-the-art methods, making it highly suitable for real-time industrial applications. For example, on a RTX 3080ti, SingleNet achieves a latency of 3.1ms, significantly lower than other methods like Zero-Shot (1320ms) or CFA (172ms).
  • Mitigation of "Normality Forgetting": The approach effectively addresses the "normality forgetting" issue by reconstructing a degraded teacher feature map and using frequency-domain filtering, leading to more accurate anomaly scores.
  • Robustness to Defect Size: The FFC-based approach is shown to be effective in identifying small global defects that might be missed by classic approaches.

Limitations and Future Work

  • DAGM Dataset Limitation: The authors acknowledge a limitation in handling fine-grained, randomized textures on the DAGM dataset, suggesting that the constrained scope of a single layer might be a factor.
  • Future Work: The paper suggests that refinement is needed to handle such challenging textures more effectively. Further exploration of parameter tuning, such as the cutoff frequency for the low-pass filter, could also be beneficial. The authors also note that the filtering methodology is specifically tailored for processing the output of the second block of a ResNet and may require adjustments for other architectures or feature levels.

Summary updated

BibTeX
@inproceedings{thomine2025single,
  author = {Simon Thomine and Hichem Snoussi},
  title = {{Single-Layer Distillation with Fourier Convolutions for Texture Anomaly Detection}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
}
Figure