Mask2Defect: A Prior Knowledge Based Data Augmentation Method for Metal Surface Defect Inspection
Benyi Yang,Zhenyu Liu,Guifang Duan,Jianrong Tan
DOI: https://doi.org/10.1109/tii.2021.3126098
IF: 12.3
2022-01-01
IEEE Transactions on Industrial Informatics
Abstract:For metal surface defect inspection, deep-learning-based methods have largely improved the inspection accuracy. However, insufficient data and the diversity of defects usually pose challenges for these methods. To solve these problems, traditional data augmentation methods often augment data by applying image-level geometric variations, usually without introducing new features of unknown defects, which yields limited improvements in defect inspection. Given such circumstances, in this article, a new data augmentation algorithm named Mask2Defect is proposed. Via prior knowledge-based data infusing, this method is able to generate defects with varied features. A large volume of defects with different shapes, severities, scales, rotation angles, spatial locations, and part numbers can be generated in a controllable manner. These generated defects will work as teacher samples to fine-tune the inspection model and automatically adapt it to a wider range of defects. To be specific, we first encode the prior knowledge into the teacher mask via the industrial prior knowledge encoder and render the defect details according to the mask with the mask-to-defect construction network. Then, the fake-to-real domain transformation GAN is used to transform the rendered samples from the fake domain into the real defect domain. Experiments reveal that the synthesized image quality of our method outperforms the state-of-the-art generative methods, and the performance of the inspection model in defect classification and localization has also been improved by fine-tuning with the generated samples.