Siamese network with change awareness for surface defect segmentation in complex backgrounds
Despite the significant advancements made by deep visual networks in detecting surface defects at a regional level, the challenge of achieving high-quality pixel-wise defect detection persists due to the varied appearances of defects and the limited availability of data. To address the over-reliance on defect appearance and enhance the accuracy of defect segmentation, we proposed a Transformer-based Siamese network with change awareness, which formulates the defect segmentation under a complex background as change detection to mimic the human inspection process. Specifically, we introduced a novel multi-class balanced contrastive loss to guide the Transformer-based encoder, enabling it to encode diverse categories of defects as a unified, class-agnostic difference between defective and defect-free images. This difference is represented through a distance map, which is then skip-connected to the change-aware decoder, assisting in localizing pixel-wise defects. Additionally, we developed a synthetic dataset featuring multi-class liquid crystal display (LCD) defects set within a complex and disjointed background context. In evaluations using our proposed and two public datasets, our model outperforms leading semantic segmentation methods while maintaining a relatively compact model size. Furthermore, our model achieves a new state-of-the-art performance compared to semi-supervised approaches across various supervision settings. Our code and dataset are available at https://github.com/HATFormer/CADNet .
Authors
- Zhou Huang (ORCID: https://orcid.org/0000-0002-7653-0476)
- Sijie Luo (ORCID: https://orcid.org/0000-0001-7726-7297)
- Huaixin Chen
- Biyuan Liu (ORCID: https://orcid.org/0009-0008-6019-2944)
- Yicheng Zhou (ORCID: https://orcid.org/0000-0001-8034-6850)
- Huiyao Zhan
Institutions
- University of Electronic Science and Technology of China (CN)
- South China Normal University (CN)
- Changhong (China) (CN)
Publication Details
- Journal
- Scientific Reports
- Published
- 2025-04-07
- DOI
- https://doi.org/10.1038/s41598-025-94733-4
- Citations
- 5
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 6.21