Introduction
Automated visual inspection is a cornerstone of modern manufacturing, yet training robust deep learning models for this task remains a significant challenge. The primary obstacle is the extreme scarcity of defective samples; high-quality manufacturing processes ensure that defects are rare, leading to severe data imbalance. Furthermore, traditional semantic segmentation requires pixel-level annotations, which are labor-intensive and expensive to produce, especially for microscopic flaws in semiconductors.
This paper introduces a weakly-supervised framework that performs defect segmentation using only image-level labels ("defective" vs. "normal"). By leveraging the inherent structure of periodic textures, the proposed method bypasses the need for manual pixel-perfect masks.
Methodology
Golden Template Generation
The core of the framework is the generation of a "golden template"—a defect-free version of the input image. The authors employ a CycleGAN to translate images from the defective domain to the defect-free domain. To ensure the periodic background remains unchanged during translation, an identity mapping loss is added to the standard CycleGAN objective. This constraint forces the generator to preserve the texture and color of normal regions, isolating changes only to the anomalous areas.
Defect Segmentation and Data Augmentation
Once the golden template is generated, the defect is isolated by calculating the patch-wise Sum of Absolute Differences (pSAD) between the original image and the template, followed by hysteresis thresholding.
To address data scarcity, the authors developed a multi-stage GAN-based augmentation pipeline:
- Synthetic Defects: Created using DCGAN and refined via a super-resolution CycleGAN.
- Synthetic Non-Defects: Generated using PatchMatch to "heal" real defects and PSGAN (Periodic Spatial GAN) to synthesize large, normal periodic texture patches.
Experimental Setup and Datasets
The framework was evaluated on two distinct types of periodic textures:
- Private Semiconductor Dataset: 264 grayscale SEM images of wafers with seven defect types (e.g., bridges, broken lines).
- TILDA Dataset: A public textile database used to test generalization across different materials.
Key Results
Performance and Speed
On the semiconductor dataset, the framework achieved a mean Intersection over Union (mIoU) of 82.33% when trained with the fully augmented synthetic dataset. This significantly outperformed other weakly-supervised methods based on Class Activation Mapping (CAM), which peaked at 60.84% mIoU. Remarkably, the model performed competitively against fully supervised networks like FCN (86.15% mIoU) despite having no access to pixel-level labels during training.
In terms of efficiency, the system recorded an inference time of 17.84 ms per image, making it twice as fast as supervised baselines and highly suitable for real-time industrial applications.
Generalization Challenges
While successful on rigid semiconductor grids, the model's performance dropped on the TILDA textile dataset (12-14% mIoU). The complex global and local variations in fabric patterns proved difficult for the synthetic generator to replicate accurately, highlighting a limitation in handling "loosely" periodic textures.
Conclusion
This research demonstrates that framing defect segmentation as an image-to-image translation problem is a viable path for weakly-supervised industrial inspection. By combining identity-preserving CycleGANs with robust synthetic data augmentation, the system achieves high accuracy and real-time speeds on periodic textures. Future work will focus on improving post-processing techniques and adapting the framework to handle the natural warping found in non-rigid materials like textiles.
Summary updated