Abstract
The liquid reservoir is a critical component of the automotive air conditioning system, while weld seams on its surface may exhibit different types of defects with various shapes and scales, meaning traditional detection methods struggle to detect them effectively. In this article, we propose a YOLOv8s-based algorithm to detect liquid reservoir weld defects. In order to improve feature fusion within the neck and enhance the model's capacity to detect defects showing substantial size variations, the neck is optimized through the integration of the improved Reparameterized Generalized Feature Pyramid Network (RepGFPN) and the addition of a small-object detection head. To further improve the capacity of identifying complex defects, the Spatial Pyramid Pooling Fast (SPPF) module in YOLOv8s is substituted with Focal Modulation Networks (FocalNets). Additionally, the Cascaded Group Attention (CGA) mechanism is incorporated into the improved neck to minimize the propagation of redundant feature information. Experimental results indicate that the improved YOLOv8s achieves a 6.3% improvement in mAP@0.5 and a 4.3% improvement in mAP@0.5:0.95 compared to the original model. The AP value for detecting craters, porosity, undercuts, and lack of fusion defects improves by 3.9%, 13.5%, 5.0%, and 2.5%, respectively. We conducted comparative experiments against other state-of-the-art models on the liquid reservoir weld dataset and the steel pipe weld defect dataset, and the results show that our model has outstanding detection performance.