# Lightweight Insulator and Defect Detection Method Based on Improved YOLOv8
## 3 Improved YOLOv8 Lightweight Object Detection Network  
### Depthwise Separable Convolution  
In the original YOLOv8s network architecture, the convolutional layer sequentially performs convolution operations across all channels of the input. While this approach enables the simultaneous extraction of both channel and spatial features, it also substantially escalates the computational complexity of the network. Specifically, each convolutional kernel must conduct convolution operations on every input channel, leading to a significant increase in computational and parameter overhead. This heightened complexity not only  
Figure 2: Added color-changing label. The red squares highlight the visual characteristics of the actual whitening defects. demands more computational resources but also results in a larger model size, potentially hindering the network's efficiency and suitability for deployment in resource-constrained environments. The trade-off between feature extraction capability and computational efficiency presents a critical challenge in optimizing the network for practical applications, particularly where real-time processing and lower computational demands are essential. To reduce the computational complexity, a depthwise separable convolutional algorithm [34; 35; 36] can be used. It reduces the computational and parameter count by decomposing the regular convolutional computation into two separate steps. The first is deep convolution, which performs the convolution operation independently on each input channel, thus focusing on extracting the spatial features of each channel. Then, this is followed by point-by-point convolution, which combines information from different channels by blending these feature maps across channels with a 1\(\times\)1 convolution kernel. This approach not only significantly reduces the amount of computation and the number of parameters but also achieves a lighter model and improves the efficiency and speed of the network while maintaining the performance of the model. As illustrated in Figure 3, the left side depicts the traditional convolutional approach, while the right side presents the depthwise separable convolutional method, which has been integrated into the MobileNetv3 model. This comparison effectively highlights the distinctions between the two convolutional operations. The conventional approach involves performing convolution operations across all input channels simultaneously, resulting in substantial computational and parameter overhead. In contrast, the depthwise separable convolutional approach, as applied in MobileNetv3, separates the convolution process into two distinct stages: depthwise convolution and pointwise convolution. This separation reduces the computational complexity and parameter count by focusing on individual channels separately before combining them, thereby optimizing both efficiency and performance. The differences in computational complexity between depthwise separable convolution and conventional convolution can be analyzed as follows. Assume that the input feature map size is \(D_{F}\times D_{F}\times M\) and the output feature map size is \(D_{F}\times D_{F}\times N\), where \(D_{F}\) is the width and height of the same input and output feature maps. Figure 3: A comparison of the structure of depthwise separable convolution with that of conventional convolution, indicating two distinct stages, depthwise and pointwise.