## 1 Introduction  
The detection of surface defects of automotive engine parts is an important step in manufacturing quality assurance. If the automobile has defects that may cause personal injury and property damage, the automobile manufacturer will recall the products. The State Administration for Market Regulation (SAMR) of China statistics indicate that 3.71 million automobiles were recalled because of engine defects in 2021 alone, accounting for 42.5% of all recalls that year [1]. The detection of surface defects is often performed manually with the aid of special equipment by workers trained to recognize surface defects. However, this type of inspection can be inefficient and lacks stability, which directly affects the manufacturing quality. Although the classical machine vision methods can solve these problems to a certain extent [2, 3], with the emergence of Industry 4.0, conventional machine vision methods have become unable to meet flexibility requirements. In the classical machine vision methods, features are processed manually to adapt to a specific field, but their performances depend on the operator's experience. For this reason, deep learning-based methods with an automatic feature selection have attracted great attention recently. A convolutional neural network (CNN) is one of the basic deep learning models, and it was proposed in 1995 by [PERSON] [4]. In CNN, a number of convolution layers and pooling layers are used to process the input data. The CNN training is typically performed using the backpropagation (BP) algorithm, and the classification task is completed by a fully connected (FC) layer. In 2006, [PERSON] et al. [5] formally proposed the concept of deep learning and paved a path to the research on deep learning in the detection field. In 2012, the Alex Net proposed by [PERSON] et al. [6] excelled in the Image Net LSVRC-2012 competition with a top-five error rate of 15.3%. However, a large size of the convolution kernel of this network causes high computation complexity and further restricts an increase in the network layer number. To address this problem, [PERSON] et al. [7] further investigated network depth and proposed a deeper VGG Net model. This model uses multiple small convolution kernels instead of one large convolution kernel and ensures the feature extraction performance of the network by deepening the network layers. This model performed well in the 2014 Image Net competition, but a further increase in the network depth was limited by a gradient phenomenon. To further increase the network depth, [PERSON] et al. [8] proposed the Res Net model, where the output of the previous network layer is mapped to the next layer by identity mapping, forming a shortcut connection; this model won in the classification task of the ILSVRC-2015 competition and achieved good results in detection and segmentation tasks. To apply the various models to different applications of flaw detection and defect classification, many in-depth studies of different network structures have been conducted, and promising research results have been achieved. [PERSON] et al. [9] published their seminal work on deep learning and R-CNN-based target detection. They used a selective search algorithm to generate candidate regions, and using the CNN, they achieved a mean average precision (MAP) of 53.3% on the VOC2012 dataset. They also proposed a Fast R-CNN containing a region of interest (Rol) pooling layer [10]. This method has further improved the detection precision, but the detection framework of this method could not achieve the end-to-end training, which limited further improvement in the detection rate. To that end, [PERSON] [11; 12] and [PERSON] et al. [13] proposed the YOLO (You Only Look Once) series network, which uses a grid to divide an image into regions where the target is detected independently. Although this allows inverse propagation of the loss function through the network and increases the training and detection speeds, it results in poor adaptability to intensive and small object detection.