Abstract
In industrial production, defect detection for automotive headlight lenses is an essential yet challenging task. Transparent glass defect detection faces several difficulties, including a wide variety of defect shapes and sizes, as well as the challenge of identifying transparent surface defects. To enhance the accuracy and efficiency of this process, we propose a computer vision-based inspection solution utilizing multi-angle lighting. For this task, we collected 2000 automotive headlight images to systematically categorize defects in transparent glass, with the primary defect types being spots, scratches, and abrasions. During data acquisition, we proposed a dataset augmentation method named SWAM to address class imbalance, ultimately generating the Lens Defect Dataset (LDD), which comprises 5532 images across these three main defect categories. Furthermore, we propose a defect detection network named the Transparent Glass Defect Network (TGDNet), designed based on common transparent glass defect types. Within the backbone of TGDNet, we introduced the TGFE module to adaptively extract local features for different defect categories and employed TGD, an improved SK attention mechanism, combined with a spatial attention mechanism to boost the network's capability in multi-scale feature fusion. Experiments demonstrate that compared to other classical defect detection methods, TGDNet achieves superior performance on the LDD, improving the average detection precision by 6.7% in mAP and 8.9% in mAP50 over the highest-performing baseline algorithm.