Visual Anomaly Synthesis for Model Selection in Data Scarcity
Authors: Daniel Pröll, Thomas Kraxner, Tobias Schaefer, Sebastian Hegenbart
Organizations: Digital Factory Vorarlberg GmbH, Dornbirn, Austria · University of Salzburg, Salzburg, Austria · illwerke vkw AG, Bregenz, Austria · Vorarlberg University of Applied Sciences, Dornbirn, Austria
Defect detection systems for industrial condition monitoring can only be relied upon if they are validated, yet defective samples are rare and, for a specific asset, often nonexistent. We present a framework that synthesizes severity-graded defects on real non-defective images without any defect references for the target asset, that can be used for model selection and validation. A defect taxonomy for common failure modes is distilled from literature into prescriptive prompts at varying defect severities. Regions of interest are cropped from in defect-free images and edited with a pre-trained image generation model ("FLUX.2 [klein]"). Color-matching and blending are employed to improve structural coherence with the original image. Generations are filtered out by a scorer and by estimated detection difficulty. Model selection experiments on MVTecAD show image AUROC choice regret over model selection can be nearly halved compared to the best fixed model chosen with access to test data. Experiments show the need for severity-graded anomaly synthesis. A case study investigates the proposed method for in-situ monitoring of Pelton turbine runners in hydropower, where real defect images are rare and expensive to collect. A PatchCorebased anomaly detection model is fit on Pelton turbine images and selected and validated using synthetic images, showing strong detection performance (94 % correct detection at optimal threshold and AUROC 0.97). The model reliably detects moderate and advanced defects, while early-stage defects remain challenging, indicating the synthetic data meaningfully stresses detector sensitivity.
Figures & tables
Figure 1: Overview of the three steps of the proposed method: prompt and taxonomy creation (once per object), image editing and post-processing (once per image) and downstream use in evaluation and model selection. Pre-trained models shown in green.
Figure 2: Examples of generated images with increasing severity for two MVTec AD categories and the Pelton use-case.
I-AUC
Fix
Ours
O
1
0.918
0.927
0.952
2
0.926
0.945
0.961
4
0.938
0.951
0.965
8
0.956
0.969
0.977
mean
0.934
0.948
0.964
PRO
Fix
Ours
O
Table 1: Left: real anomaly detection scores of the model each rule selected, by training-set size n , for the best single model (Fix), from synthetic data (Ours) and by the oracle (O). Mean over categories and seeds; higher is better. Right: image AUROC choice regret, on a reduced model set, of the model selected with each generator’s synthetic data, for the best single model (Fix), our pipeline (Ours), DRAEM (DRA) and MIRAGE (MIR). Mean over shots and seeds; lower is better. Bold = best within each side; oracle not ranked.
Set
med.
mean
max
Fix
0.026
0.029
0.105
1
0.014
0.016
0.043
2
0.019
0.025
0.084
3
0.020
0.024
0.069
4
0.018
0.025
0.095
All
0.019
0.017
0.050
Table 2: Left: MVTec AD I-AUC choice regret for model selection based on different subsets, for the best fixed model (Fix) and synthetic anomalies of different severities from least (1) to most severe (4) and all severities (all). Median, mean and max over the per-category means (over shots and seeds); lower is better, bold = best in each column. Right: I-AUC of the synthetic Pelton defects of each mode (abr.: abrasive erosion, cav.: cavitation, crack: fatigue crack, imp.: stone impact) and severity, with synthetic negatives (defects vs. real crops + synthetic defect-free images), mean over four models, higher is better. Below: AUROC of synthetic negatives against real negatives. Near 0.5 is best.
School of Cyber Science and Technology, Shenzhen Campus of Sun Yat-sen University · School of Artificial Intelligence and Robotics, Hunan University · Department of Computer and Information Science, University of Macau +1