# DGBL-YOLOv8s: An Enhanced Object Detection Model for Unmanned Aerial Vehicle Imagery
## 3 Methods
### Introduction of DGBL-YOLOv8 Object Detection Algorithm
#### 3.1.3 Lightweight Shared Convolutional Detection Head  
The general YOLOv8 model's detection head employs a decoupled architecture, isolating classification and regression tasks to enable distinct feature extraction for each objective. This design reduces mutual interference between tasks and improves detection accuracy. Additionally, YOLOv8 employs an anchor-free detection strategy, replacing the traditional anchor-based approach, thereby reducing computational complexity, enhancing detection speed, and improving the detection capability for small and densely packed objects. However, the detection head of YOLOv8 includes three detection scales: 80 \(\times\) 80, 40 \(\times\) 40, and 20 \(\times\) 20. During multi-scale detection, the independent use of convolutional operations in each detection head significantly increases computational load and model parameters. Moreover, the batch normalization (BN) operation in the detection head, which relies on batch size, can lead to unstable normalization effects when trained with small batch sizes. This also results in suboptimal handling of sparse small-object features. To address these problems, this study introduces a lightweight shared convolutional detection head (LSCDH) based on the principles of shared convolutions and group normalization. Additionally, to accommodate the characteristics of UAV-captured scenes, which often feature numerous small and distant targets, the LSCDH incorporates an extra detection head with a 160 \(\times\) 160 scale to further enhance detection accuracy. The architecture of the LSCDH is illustrated in Figure 6.  
As illustrated in the figure, the LSCDH first processes the four layers of features output from the neck through independent convolutional operations before feeding them into a shared convolutional layer. The shared convolutional layer facilitates information transfer across detection layers, leveraging multi-level features to predict target locations and categories. Subsequently, a Scale Layer adjusts the output features to meet the requirements of the four detection heads of different sizes. Notably, the LSCDH replaces batch normalization (BN) with group normalization (GN) in the convolutional operations to eliminate dependency on batch size. Group normalization (GN) partitions the channel dimension of input feature maps into several groups, calculating the mean and variance for normalization within each group. This method effectively mitigates the instability associated with normalization processes and improves the preservation of sparse features corresponding to small objects. Consequently, it enhances both the accuracy and robustness of the detection head. The computation process of group normalization (GN) is formulated as Equation (8):  
\[\hat{e}_{h}=\frac{1}{\lambda_{h}}(e_{h}-\theta_{h}) \tag{8}\]  
In the equation, \(e\) represents the computed feature of a layer, and h denotes the index. For a 2D image, \(h=(h_{R},h_{S},h_{T},h_{U})\) is a four-dimensional index following the order (\(R\), \(S\), \(T\), \(U\)), where \(R\) delegates the batch size, \(S\) denotes the number of channels, and \(T\) and \(U\) correspond to the spatial height and width, respectively. In Equation (8), \(\theta\) and \(\lambda\) represent the mean and standard deviation, respectively. Their computation is defined by Equations (9) and (10):  
\[\theta_{h}=\frac{1}{n}\sum_{j\in V_{h}}e_{j} \tag{9}\]  
\[\lambda_{h}=\sqrt{\frac{1}{n}\sum_{j\in V_{h}}\left(e_{j}-\theta_{h}\right)^{2 }+\omega} \tag{10}\]  
In the equations, \(\omega\) represents a small constant to ensure numerical stability. \(V_{h}\) denotes the set of pixels used for computing the mean and standard deviation, while \(n\) represents the size of this set. Figure 6: Architecture of the LSCDH.