Cross-domain Transfer of defect features in technical domains based on partial target data

Tobias Schlagenhauf, Tim ScheurenbrandarXiv 2022 · DOI · OpenReview

Abstract

A common challenge in real-world classification scenarios is the "cold start" problem, where target domain data is sequentially appended, leading to insufficient training datasets—specifically, missing defect classes. Conventional deep learning and transfer learning classifiers often fail when individual classes are not represented at the outset. This paper proposes a classification approach based on a CNN encoder trained with a modified triplet loss function. By utilizing a labeled source domain dataset alongside a non-defective target domain dataset, the model learns to transfer relevant defect features across highly different domains. Benchmarks in technical and non-technical domains demonstrate that this architecture improves domain generalization and classification accuracy even with significant domain shifts.

The "Cold Start" Problem in Industrial AI

In many industrial applications, such as the launch of a new production line or mechanical component, manufacturers face a data imbalance: they have an abundance of "non-defective" data but zero examples of "defective" parts because failures have not yet occurred. This creates a significant barrier for standard supervised learning models.

Visualizing the domain shift: Training images from the source domain (Severstal steel) versus classification images from the target domain (Ball Screw Drive).

Existing solutions like Domain Generalization (DG) often struggle when the visual gap between the source (e.g., flat steel) and target (e.g., machined spindles) is too large. Domain Adaptation (DA) typically requires at least some target defect samples. The proposed method addresses the scenario where we have a fully labeled source dataset and only non-defective target data.

Methodology: Contrastive Learning with Modified Triplet Loss

The core of the approach is a CNN encoder trained using contrastive learning. The goal is to map images into a feature space where similar classes are clustered together regardless of their domain of origin.

The proposed architecture showing the training phase with modified contrastive loss and the inference phase using distance-based classification.

Modified Triplet Loss

Standard triplet loss uses an Anchor, a Positive (same class), and a Negative (different class). However, using standard loss in this cross-domain scenario can lead the model to focus on domain-specific background features (e.g., material texture) rather than defect features.

The authors introduced a modified loss function that forces the encoder to ignore domain-specific context and isolate universal "defect features" like cracks or pitting by:

  1. Minimizing the distance between non-defective samples across both domains.
  2. Maximizing the distance between the target's non-defective samples and the source's defective samples.

Experimental Results

The researchers evaluated the model across two distinct scenarios: transferring features from Severstal strip steel to Ball Screw Drive (BSD) components, and transferring disease features from Apple leaves to Bean leaves.

Key Findings

  • High Accuracy: In the steel-to-spindle transfer, the model achieved 100% accuracy on non-defective parts and 95% accuracy on defective parts in the target domain, despite never seeing a defective spindle during training.
  • Robustness: The model outperformed state-of-the-art R-CNN object detectors, which failed completely (0% detection) when moved to the new domain without target-specific defect training.
  • Efficiency: The approach proved effective even with small datasets, as contrastive learning leverages a high number of triplet combinations to build robust feature representations.

Conclusion and Future Work

This framework allows for the deployment of defect detection systems before defects are even observed in a new process. While currently limited to binary classification (defect vs. no-defect), future work aims to extend this to multi-class defect categorization and integrate the logic into object detection frameworks for precise defect localization.

Summary updated

Abstract

A common challenge in real world classification scenarios with sequentially appending target domain data is insufficient training datasets during the training phase. Therefore, conventional deep learning and transfer learning classifiers are not applicable especially when individual classes are not represented or are severely underrepresented at the outset. In many technical domains, however, it is only the defect or worn reject classes that are insufficiently represented, while the non-defect class is often available from the beginning. The proposed classification approach addresses such conditions and is based on a CNN encoder. Following a contrastive learning approach, it is trained with a modified triplet loss function using two datasets: Besides the non-defective target domain class 1st dataset, a state-of-the-art labeled source domain dataset that contains highly related classes e.g., a related manufacturing error or wear defect but originates from a highly different domain e.g., different product, material, or appearance = 2nd dataset is utilized. The approach learns the classification features from the source domain dataset while at the same time learning the differences between the source and the target domain in a single training step, aiming to transfer the relevant features to the target domain. The classifier becomes sensitive to the classification features and by architecture robust against the highly domain-specific context. The approach is benchmarked in a technical and a non-technical domain and shows convincing classification results. In particular, it is shown that the domain generalization capabilities and classification results are improved by the proposed architecture, allowing for larger domain shifts between source and target domains.
BibTeX
@misc{schlagenhauf2022cross,
  author = {Tobias Schlagenhauf and Tim Scheurenbrand},
  title = {{Cross-domain Transfer of defect features in technical domains based on partial target data}},
  year = {2022},
  eprint = {2211.13662},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.13662},
}

Loading related content...

Figure