## 2 Methodology
### Introduction of Shared Lightweight Convolutional Heads  
YOLOv8 has the most changes in its Head section compared to YOLOv5, as shown in Figure 6.  
YOLOv8 introduces a new head structure diverging from YOLOv5's Anchor-Based coupling to an Anchor-Free decoupling design. This innovation separates classification and detection tasks entirely, eliminating the traditional objectiveness branch in favor of a decoupled classification and regression approach employing Distribution Focal Loss (DFL). Figure 5: Triplet Attention. The first branch performs interaction between channel \(C\) and dimension \(H\), the second branch performs interaction between channel \(C\) and dimension \(W\), and the third branch does not perform any interaction. Figure 6: Comparison of YOLOv5 and YOLOv8 Detection Heads. Conv and Conv2d refer to convolution operations. Bbox.Loss stands for the bounding box regression loss, and CIoU and DFL are regression loss functions. CIs.Loss represents the classification loss, and BCE is a classification loss function. To optimize model efficiency without compromising accuracy, this paper proposes the Shared Lightweight Convolutional Detection (SLCD) Head, integrated into YOLOv8n's Detect layer, as depicted in Figure 7.  
The network receives output feature maps (P3, P4, P5) from YOLOv8n at three different stages and scales. Each feature map then undergoes 1 \(\times\) 1 convolution with Group Normalization (GN) [18] with a stride of 1. This convolution compresses the number of channels of the feature map to mix features before further processing, preserving the spatial dimensions of the feature maps. This allows features from three different scales to undergo shared convolutional operations. Following the initial 1 \(\times\) 1 convolution, the processed features pass through a shared convolutional layer for additional feature processing. This layer consists of two 3 \(\times\) 3 Convolutional layers with GN (Conv_GN). The first Conv_GN extracts spatial features while maintaining the receptive field size. The processed feature maps then pass through two 3 \(\times\) 3 Conv_GN layers for deeper feature extraction. Subsequently, each feature map stream splits into two paths: Conv_Reg for bounding box regression (estimating object locations) and Conv_Cls for category prediction (object classification). It is noteworthy that both Conv_Reg and Conv_Cls utilize shared convolutional designs, further enhancing model efficiency. Finally, the Scale layer scales the output of the Conv_Reg layer in the detection branch. This layer defines a learnable scaling factor applied to the output feature map in an element-wise manner, adjusting feature magnitudes and subsequently impacting subsequent convolutional layers. This adjustment stabilizes regression outputs, thereby improving bounding box prediction accuracy during training. Furthermore, this paper proposes an optimization strategy for weight sharing among convolutional layers in the Detect layer for classification and regression operations. The original YOLOv8 Head layer design, shown in Figure 8, processes features at three different scales (P3, P4, and P5) through independent branches. Each branch includes two 3 \(\times\) 3 convolutional layers and one 1 \(\times\) 1 convolutional layer. While this design enhances detection accuracy, it also significantly increases the number of convolutional layer parameters. To address the aforementioned issue, this paper introduces the concept of shared convolution in the detection head, illustrated in Figure 9. Specifically, the original design disperses two 3 \(\times\) 3 convolutional layers across multiple branches, along with convolutional layers for classification and regression, which are now consolidated for shared usage. This sharing mechanism significantly reduces model parameters, lowers complexity, and is anticipated to enhance computational efficiency. Figure 7: SLCD structure.