Abstract
This paper proposes the Segment Structure with Controllable Realistic Synthetic (SCRS) to address the challenge of detecting scratches on laser diode chip emitting facets, which can impair laser emitting and cause chip burnout. Scratch detection is critical for ensuring laser quality and stability, but low-contrast images hinder comprehensive dataset creation. SCRS leverages a mask-guided diffusion model to generate diverse, realistic synthetic scratch images, enabling robust training data synthesis. The generated dataset trains a novel TransCNN network, which combines vision transformer blocks and convolutional decoding for accurate scratch segmentation. Experimental results show that SCRS achieves mean Intersection over Union (mIoU) values of 74.4% for deep scratches and 75.8% for shallow scratches, demonstrating its significant potential for industrial applications.