Table of Contents
Fetching ...

Sequential PatchCore: Anomaly Detection for Surface Inspection using Synthetic Impurities

Runzhou Mao, Juraj Fulir, Christoph Garth, Petra Gospodnetić

TL;DR

This work targets impurity-induced degradation in automated surface inspection and tackles memory bottlenecks in PatchCore by introducing Sequential PatchCore, which builds and updates the coreset sequentially, reducing memory from $O(NP)$ to $O(|\mathcal{M}|)$ and enabling training on consumer hardware. It also introduces coreset melding to enable transfer learning across datasets, leveraging coresets trained on different versions to form a refined model without reprocessing large datasets. A photorealistic water-stain generation method based on Perlin noise and jittered sampling creates synthetic impurities, enabling impurity-aware pre-training with two dataset variants: Synth and Synth$_{WS}$. Empirical evaluation on a dual aluminum-plate dataset shows that impurities can lower pixel-wise recall, but defect-wise recall remains informative; finetuning on real data substantially improves performance, and coreset melding offers fast, scalable transfer learning. Overall, the paper demonstrates that synthetic impurities, when paired with memory-efficient coresets and transfer learning, enable practical high-resolution anomaly detection with meaningful industrial metrics and insights into impurity effects.

Abstract

The appearance of surface impurities (e.g., water stains, fingerprints, stickers) is an often-mentioned issue that causes degradation of automated visual inspection systems. At the same time, synthetic data generation techniques for visual surface inspection have focused primarily on generating perfect examples and defects, disregarding impurities. This study highlights the importance of considering impurities when generating synthetic data. We introduce a procedural method to include photorealistic water stains in synthetic data. The synthetic datasets are generated to correspond to real datasets and are further used to train an anomaly detection model and investigate the influence of water stains. The high-resolution images used for surface inspection lead to memory bottlenecks during anomaly detection training. To address this, we introduce Sequential PatchCore - a method to build coresets sequentially and make training on large images using consumer-grade hardware tractable. This allows us to perform transfer learning using coresets pre-trained on different dataset versions. Our results show the benefits of using synthetic data for pre-training an explicit coreset anomaly model and the extended performance benefits of finetuning the coreset using real data. We observed how the impurities and labelling ambiguity lower the model performance and have additionally reported the defect-wise recall to provide an industrially relevant perspective on model performance.

Sequential PatchCore: Anomaly Detection for Surface Inspection using Synthetic Impurities

TL;DR

This work targets impurity-induced degradation in automated surface inspection and tackles memory bottlenecks in PatchCore by introducing Sequential PatchCore, which builds and updates the coreset sequentially, reducing memory from to and enabling training on consumer hardware. It also introduces coreset melding to enable transfer learning across datasets, leveraging coresets trained on different versions to form a refined model without reprocessing large datasets. A photorealistic water-stain generation method based on Perlin noise and jittered sampling creates synthetic impurities, enabling impurity-aware pre-training with two dataset variants: Synth and Synth. Empirical evaluation on a dual aluminum-plate dataset shows that impurities can lower pixel-wise recall, but defect-wise recall remains informative; finetuning on real data substantially improves performance, and coreset melding offers fast, scalable transfer learning. Overall, the paper demonstrates that synthetic impurities, when paired with memory-efficient coresets and transfer learning, enable practical high-resolution anomaly detection with meaningful industrial metrics and insights into impurity effects.

Abstract

The appearance of surface impurities (e.g., water stains, fingerprints, stickers) is an often-mentioned issue that causes degradation of automated visual inspection systems. At the same time, synthetic data generation techniques for visual surface inspection have focused primarily on generating perfect examples and defects, disregarding impurities. This study highlights the importance of considering impurities when generating synthetic data. We introduce a procedural method to include photorealistic water stains in synthetic data. The synthetic datasets are generated to correspond to real datasets and are further used to train an anomaly detection model and investigate the influence of water stains. The high-resolution images used for surface inspection lead to memory bottlenecks during anomaly detection training. To address this, we introduce Sequential PatchCore - a method to build coresets sequentially and make training on large images using consumer-grade hardware tractable. This allows us to perform transfer learning using coresets pre-trained on different dataset versions. Our results show the benefits of using synthetic data for pre-training an explicit coreset anomaly model and the extended performance benefits of finetuning the coreset using real data. We observed how the impurities and labelling ambiguity lower the model performance and have additionally reported the defect-wise recall to provide an industrially relevant perspective on model performance.
Paper Structure (16 sections, 5 figures, 2 tables, 1 algorithm)

This paper contains 16 sections, 5 figures, 2 tables, 1 algorithm.

Figures (5)

  • Figure 1: Examples of surface defects and impurities in metal sheets. Defects: (a) scratch, (b) bump, (c) dent. Impurities: (d) water stain, (e) fingerprint, (f) sticker. The water stain depicted in (d) exhibits characteristics similar to the dent shown in (c), indicating potential challenges in distinguishing between them.
  • Figure 2: Water stains of different shapes and sizes. Real water stain images (top); synthetic water stain images (middle); water stain segmentation masks (bottom).
  • Figure 3: Differences in two groups of texture and water stain distribution patterns under different lighting conditions. The first row in each group displays different illumination patterns, the second row shows the effects of adding water stains, and the third row presents water stain masks on a black background, with red areas indicating water stains. The images on the left exhibit one texture and water stain distribution pattern, while the images on the right show another pattern.
  • Figure 4: Examples of common effects lowering the model performance. Green pixels are true-positives, red-pixels are false-positives and blue pixels are false-negatives. Best viewed in color.
  • Figure 5: Differences in per-class and mean defect-wise recall depending on the percentage of defect considered as detection. Classes in order are: backgorund, bump, dent, fingerprint, scratch, sticker, water stain