# A Lightweight TA-YOLOv8 Method for the Spot Weld Surface Anomaly Detection of Body in White
## 1 Introduction
Defects such as cracks, pores, and incomplete fusion cause localized temperature variations, which can be analyzed to infer defect location, size, and depth. However, its accuracy can be influenced by material thermal conductivity, surface emissivity, and excitation parameters. To overcome these limitations, many researchers have introduced classifiers to recognize spot weld quality in addition to manually developed features. [PERSON] et al. [12] described spot weld quality based on surface texture features using a gray-level co-occurrence matrix and developed a support vector machine (SVM)-based classifier to achieve the intelligent detection of spot weld quality. [PERSON] et al. [13] used unsupervised clustering to extract RGB color features from five positions of the spot weld surface representing the spot weld quality and built a 15-dimensional color feature and mechanical property model (Back Propagation Neural Network, BPNN) to predict spot weld quality. [PERSON] et al. [14] developed an experimental platform to detect weld defects and extracted surface morphology features using image segmentation and mathematical morphology methods and then applied fuzzy logic rules based on a knowledge base to predict spot weld quality. [PERSON] et al. [15] further improved the image processing algorithm to detect non-circular spot welds. They used least squares ellipse fitting to extract new geometric features of the spot welds and constructed a fuzzy SVM model for detecting weld defects and evaluating weld quality in automobile bodies. Benefitting from the excellent capabilities of Convolutional Neural Networks (CNNs) for representation and learning, deep learning (DL)-based visual recognition has shown outstanding performance in terms of precision and speed and has gradually become a standard technique. Supervised methods are commonly used in the visual inspection of weld quality, primarily utilizing classical network structures such as AlexNet [16], ResNet [17], MobileNet [18], Faster R-CNN [19] and YOLO [20] series models. For example, [PERSON] et al. [21] developed a model with two folding layers and one fully connected layer that is able to accurately predict the tensile shear strength and nugget diameter of cold-rolled and galvanized steel welds. [PERSON] et al. [22] proposed an improved Faster RCNN model to detect welding spots online. [PERSON] et al. [23] proposed a network model with a bottleneck structure of feature compression and expansion layers, which achieves high precision with fewer parameters. Since the images captured on site often contain multiple welds, the models must support both weld quality detection and localization. Detection networks that locate and simultaneously categorize defective welds typically distinguish between one-stage and two-stage methods, with speed and accuracy being the primary considerations. Single-stage methods such as YOLO are favored in industrial applications because of their fast inference speed and low operational costs. [PERSON] et al. [18] developed an efficient, lightweight weld detection network based on YOLO that is capable of localizing and evaluating welds under complex conditions. Similarly, [PERSON] used Tiny-YOLOv3 [24] to identify regions of interest, refining the detection accuracy by retaining only the weld contours and using a modified Hough transform for circle detection. In summary, CNN-based object recognition algorithms use annotated images to predict object positions and classes, mainly distinguishing between one-stage and two-stage methods. The two-stage approach, exemplified by Faster R-CNN, includes a region proposal network and a classifier, while one-stage methods such as YOLO omit the proposal network and provide faster, more compact models suitable for weld detection. The main contribution of this study lies in optimizing the structure of the conventional object detection algorithm and proposing a specific model for the detection of welds with small samples and objects.