Research
Unsupervised Learning for Industrial Defect Detection: A Case Study on Shearographic Data
Overview Research area: Computer vision / unsupervised anomaly detection applied to industrial non-destructive testing (NDT), specifically shearographic (ESPSI) inspection of composite-like components
- arXiv
- 2511.02541
- Published
- 2025-11-04
- Authors
- Jessica Plassmann, Nicolas Schuler, Georg von Freymann, Michael Schuth
AI summary
Overview
- Research area: Computer vision / unsupervised anomaly detection applied to industrial non-destructive testing (NDT), specifically shearographic (ESPSI) inspection of composite-like components.
- Technical level: Intermediate — assumes familiarity with autoencoders, convolutional neural networks, transfer learning, and standard classification/detection metrics.
- Scope: A controlled case study comparing three unsupervised architectures (a fully connected autoencoder, a convolutional autoencoder, and a student–teacher feature matching model) trained only on defect-free shearographic images, benchmarked against a supervised YOLOv8 detector.
What This Paper Is About
Shearography can reveal subsurface defects in industrial parts with submicrometer sensitivity, but its phase images are hard to interpret: fringes indicate deformation, not necessarily defects, and global deformation can obscure localized anomalies. Because defective samples are rare, confidential, and expensive to annotate, the authors ask whether models trained exclusively on defect-free shearograms can still reliably flag and localize defects. They build a reproducible custom specimen and dataset to compare autoencoder-based reconstruction against a student–teacher feature matching approach.
Key Contributions
- A controlled shearographic dataset of 10,498 recordings from a purpose-built specimen (a 500 mm × 50 mm acrylic glass strip coated with a 1.2 mm thick, 45 mm wide rubber layer with embedded heat-shielding foil inserts), with defect locations verifiable from the transparent backside as ground truth.
- Two explicitly defined training subsets that separate idealized from realistic conditions: Subset A (2,020 training / 254 validation / 254 test images, undistorted defect-free only) and Subset B (4,582 / 584 / 697 images, adding globally deformed but defect-free recordings).
- A head-to-head comparison of three unsupervised models (AE, ConvAE, STFPM) in two STFPM scoring variants (Peaks and Means), evaluated with ROC/AUC and precision-recall/AP, plus t-SNE visualization of learned feature separability.
- An unsupervised localization benchmark in which STFPM's thresholded anomaly maps are scored with object-detection metrics (IoU, mAP, mAP@50, mAP@75, mAR@1, mAR@10) against a supervised YOLOv8 model trained on 3,523 annotated defective samples.
Main Findings
- Subset A classification is solved by STFPM: The STFPM Peaks and Means variants both reach AUC and AP of 1.0, matching the supervised YOLOv8 baseline. ConvAE reaches AUC 0.71 / AP 0.82 and the plain AE reaches AUC 0.57 / AP 0.70; the chance level for AP in this subset is 0.61, so only STFPM and ConvAE exceed random performance.
- Peaks scoring is more robust than Means: On Subset B, STFPM Peaks holds AUC 0.99 and AP 0.98, whereas STFPM Means drops to AUC 0.77 and AP 0.74. The two variants share identical model weights and differ only in whether the highest anomaly score or the average score is used.
- Autoencoders fail under realistic deformation: On Subset B, ConvAE scores AUC 0.30 / AP 0.34 and AE scores AUC 0.17 / AP 0.23 — below or near the chance level of 0.36 for AP. YOLOv8 again scores AUC and AP of 1.0.
- Feature representations are separable: t-SNE embeddings show clear defect-free/defective clustering in both subsets. Subset A has a pronounced separation with only one defect-free sample near the defective cluster and at least two well-separated defect-free sub-clusters; Subset B shows two defect-free samples near the defective cluster boundary and a more contiguous but low-density-varied defect-free cluster.
- Localization is promising but behind supervised detection: With a binarization threshold of 0.1 (Subset A) and 0.001 (Subset B) selected on validation data, STFPM reaches IoU 0.6965, mAP 0.3389, mAP@50 0.7421, mAP@75 0.1727, mAR@1 0.3209 and mAR@10 0.4782 on Subset A, and IoU 0.7113, mAP 0.3852, mAP@50 0.7832, mAP@75 0.2611, mAR@1 0.3703 and mAR@10 0.5127 on Subset B. YOLOv8 achieves IoU 0.8695, mAP 0.7435, mAP@50 0.9901, mAP@75 0.9195, mAR@1 0.5817 and mAR@10 0.7884.
- Fragmentation hurts localization metrics: STFPM tends to produce multiple smaller bounding boxes for a single larger defect, which is penalized by mAP and mAR; localization quality is also described as strongly dependent on the chosen threshold.
Methodology in Plain English
The authors built a test object with hidden, deliberately placed defects and scanned it automatically in 10 mm increments with a UR5e robot arm, matching the specimen dimensions to the shearography field of view. They acquired data under two regimes: rigidly fixed specimens that suppress global deformation, and specimens subject to varied thermal excitation that produces large-scale fringe patterns. Defective recordings were manually annotated by a domain expert, with each instance consisting of four temporally offset images of the same region plus bounding boxes for defect indications.
Three unsupervised models were then trained only on defect-free images. The AE resizes images from 1920×1050 to 96×50 pixels, flattens them to a 4800-dimensional vector, and compresses through fully connected layers of 256, 128, 64 and 10 units with dropout and ReLU. The ConvAE adapts a time-series autoencoder to 2D data using four convolutional layers with 96, 128 and 256 feature maps, 3×3 kernels, batch normalization and LeakyReLU, with a mirrored decoder. The student–teacher model (STFPM) uses two ResNet18 networks: a frozen, pre-trained Teacher and a trainable Student that learns to match the Teacher's multi-layer feature activations on defect-free inputs, producing a pixel-wise difference heatmap at test time. Evaluation used ROC/AUC and precision-recall/AP for binary classification, TorchMetrics for detection metrics, and t-SNE for feature-space inspection. Everything ran in Python 3.11 with PyTorch and CUDA on a Windows 11 desktop with a 13th Gen Intel Core i7-13700, 128 GB RAM and an NVIDIA RTX 4000 GPU with 16 GB VRAM.
Why This Matters
Impact on research: The study isolates the effect of realistic background variation by defining matched subsets, and shows that the failure of the autoencoder models appears to stem from architectural or training limitations rather than an absence of separable structure in the data — a conclusion supported by the t-SNE evidence. It also supplies a reusable, ground-truth-verifiable shearography dataset and a reference comparison against a supervised detector.
Real-world applications:
- Automated inspection of composite and rubber-lined industrial components where subsurface defects must be found without cutting or destructive testing.
- Quality control in serial production lines, where conforming parts vastly outnumber defective ones and labelled defect examples are scarce.
- Situations where companies hold large volumes of unlabelled inspection data that supervised methods cannot exploit.
- Deployments requiring spatial defect localization on the part surface, not just a pass/fail decision.
Industry relevance: The motivation is explicitly industrial: shearography is underused in serial applications because it requires expert interpretation, and confidentiality concerns make defective samples rarely accessible. Because STFPM is trained without any defect labels and still approaches a supervised YOLOv8 baseline on classification, it addresses a practical bottleneck in scaling automated NDT. The authors note that code and dataset will be made available, and the work was supported by the Ministry of Science and Health Rhineland-Palatinate and the BMWK Central Innovation Program for SMEs.
Future Directions
- Improving localization precision, since STFPM's tendency to fragment large defect regions into multiple boxes degrades mAP and mAR, and performance is sensitive to the binarization threshold.
- Investigating alternative model architectures or enhanced preprocessing to exploit the class separability that the t-SNE plots reveal but the autoencoders fail to use.
- Adapting the approach to varying defect types and materials to support broader deployment beyond the single specimen geometry used here.
- Determining how well the conclusions transfer from the controlled laboratory dataset to real industrial parts and inspection conditions.
Target Audience
Researchers and practitioners in industrial computer vision, anomaly detection, and non-destructive testing who are interested in label-efficient defect detection. It is also relevant to engineers evaluating whether unsupervised methods can replace or reduce supervised annotation pipelines for shearographic and similar optical inspection modalities, and to readers looking for a methodological template (matched training subsets, t-SNE feature analysis, unsupervised-vs-supervised localization benchmarking) for case studies on their own data.
Authors’ abstract
Shearography is a non-destructive testing method for detecting subsurface defects, offering high sensitivity and full-field inspection capabilities. However, its industrial adoption remains limited due to the need for expert interpretation. To reduce reliance on labeled data and manual evaluation, this study explores unsupervised learning methods for automated anomaly detection in shearographic images. Three architectures are evaluated: a fully connected autoencoder, a convolutional autoencoder, and a student-teacher feature matching model. All models are trained solely on defect-free data. A controlled dataset was developed using a custom specimen with reproducible defect patterns, enabling systematic acquisition of shearographic measurements under both ideal and realistic deformation conditions. Two training subsets were defined: one containing only undistorted, defect-free samples, and one additionally including globally deformed, yet defect-free, data. The latter simulates practical inspection conditions by incorporating deformation-induced fringe patterns that may obscure localized anomalies. The models are evaluated in terms of binary classification and, for the student-teacher model, spatial defect localization. Results show that the student-teacher approach achieves superior classification robustness and enables precise localization. Compared to the autoencoder-based models, it demonstrates improved separability of feature representations, as visualized through t-SNE embeddings. Additionally, a YOLOv8 model trained on labeled defect data serves as a reference to benchmark localization quality. This study underscores the potential of unsupervised deep learning for scalable, label-efficient shearographic inspection in industrial environments.