## 2 Methodology
### Spatial and Channel Reconstruction Convolution  
The YOLOv8n network structure includes numerous C2f modules, whose core function is to learn residual features. Consequently, the overall performance of the network is closely linked to the performance of the C2f modules in feature learning, given that PCB surface defects exhibit significant varieties in shape, location, and size--especially notches, multi-solder, and broken circuit defects. In this context, the original C2f module is insufficient for extracting PCB surface defect features, resulting in a substantial amount of redundant computation. The SCConv [16] module significantly enhances the operational efficiency and performance of the model. Its working mechanism leverages the effective utilization of spatial and channel redundancy between feature maps for CNN compression. This approach reduces redundant computations and enables the model to learn more representative features. The SCConv module comprises two core units: the Spatial Reconstruction Unit (SRU) and the Channel Reconstruction Unit (CRU). These units work in tandem to process feature maps efficiently. The overall structure, as shown in Figure 3, illustrates the interaction between the SRU and CRU and their crucial role in enhancing model performance. This improvement allows the model to achieve higher efficiency and accuracy in processing complex tasks. To enhance the network's learning efficiency and integrate multi-dimensional feature information, this paper proposes a novel module, C2f_SCConv. Its structure is shown in Figure 3.  
The C2f_SCConv structure replaces all the Bottleneck modules in the original C2f module with the more efficient Bottleneck_SCConv module. The Bottleneck_SCConv module improves the original Bottleneck module by substituting the Conymodule with the SCConv structure. This enhancement not only reduces redundant computations but also significantly improves the model's ability to learn PCB surface defect features. Figure 3: C2f_SCConv structure. n represents the number of Bottleneck_SCConv; Split refers to the splitting mechanism. Figure 2: Improved YOLOv8n network architecture. C2f_SCConv is the reconstructed feature extraction module, Triplet Attention serves as the adaptive feature selection module, and Detect_SLCD represents the improved detection layer structure. P1–P5 are the extracted features, and X3–X5 are the output features. The SCConv structure is illustrated in Figure 4. For the intermediate input feature \(X\) in the bottleneck residual block, the spatial refinement feature is first obtained by the SRU, and then the channel refinement feature \(Y\) is obtained by using the CRU. In the SCConv module, all the parameters are centralized in the transformation phase. Therefore, a reduction in theoretical memory usage is analyzed. The parameter \(Y=M\bullet X\) for the standard convolution can be calculated as:  
\[P_{S}=k\times k\times C_{1}\times C_{2}=k^{2}C_{1}C_{2} \tag{1}\]  
The number of parameters of the SCConv module can be calculated as:  
\[ \begin{split} p_{sc}=1\times 1\times\alpha C_{1}\times\frac{aC_{1}}{r}+k \times k\times\frac{aC_{1}}{gr}\times\frac{C_{2}}{g}\times g+1\times 1 \times\frac{aC_{1}}{r}\times C_{2}+(1-\alpha)C_{1}\times\frac{(1-\alpha)C_{1}}{ r}+\\ 1\times 1\times\frac{(1-\alpha)C_{1}}{r}\times\left(C_{2}-\frac{(1- \alpha)C_{1}}{r}\right)\end{split}  \tag{2}\]  
where \(k\) is the convolution kernel size; \(C_{1}\) and \(C_{2}\) are the number of input and output feature channels; \(\alpha\) denotes the segmentation ratio; \(r\) denotes the squeezing ratio; and \(g\) is the group size of the GWC operation. In the experiments, the general parameter set is \(\alpha=\frac{1}{2}\), \(g=3\), \(k=3\), \(C_{1}=C_{2}=C\), and the number of parameters is reduced by a factor of 5 for \(\frac{P_{s}}{P_{c}}\approx 5\). Therefore, this model outperforms the standard convolution.