# Research on Vehicle Target Detection Method Based on Improved YOLOv8
## 3 Methods
### Lightweight Shared Convolutional Detection Head
At the same time, this design can take into account both detection accuracy and inference speed and is very suitable for efficient and accurate target detection in complex traffic environments. Figure 5 shows the YOLOv8 detection head and the LSC module. In our detection head design, group normalization is applied to facilitate the fusion of feature information across different branches. The feature maps output from the YOLOv8n backbone are first compressed using a \(1\times 1\) shared convolution. This enables different branches to share a common set of compressed features, improving training efficiency and promoting consistency across tasks. Next, two \(3\times 3\) shared convolutional layers are used to process the multiscale feature maps. These layers share weights across scales, enabling parameter sharing and feature reuse, and reducing redundancy in the detection head. The resulting feature map is then split into three scale-aware branches, each responsible for both classification and regression. Although operating on different scales, all branches start from the same shared features, ensuring that low-level details and high-level semantics are preserved and consistently used. For regression outputs, a scale layer is employed to project the results back to their original resolution. During this step, channel-wise weighting and  
Figure 4: Diagram of batch normalization algorithm and group normalization algorithm. normalization are applied to ensure effective information balance. This strategy improves the ability of the model to detect vehicles of various sizes and shapes while maintaining the lightweight and efficient nature of the detection head. The three-layer multiscale feature maps output by backbone and neck are as follows:  
\[F=\{F_{3},F_{4},F_{5}\},F_{i}\in R^{C_{i}\times H_{i}\times W_{i}} \tag{7}\]  
where \(i\) corresponds to different scales, such as P3, P4, and P5, \(C_{i}\) is the number of channels, and \(H_{i}\), \(W_{i}\) is the space size. Use \(1\times 1\) shared convolution to compress feature map channels of all scales to a unified dimension \(C^{\prime}\). The convolution kernel parameters are shared among all scales, reducing model parameters. \[F_{i}^{\prime}=\phi_{1\times 1}(F_{i}),\phi_{1\times 1}:R^{C_{i}\times H_{i} \times W_{i}}\to R^{C^{\prime}\times H_{i}\times W_{i}} \tag{8}\]  
Then, use two \(3\times 3\) shared convolutions to extract features. The parameters of the two convolution kernels are also shared across scales, and the output is a multiscale shared feature with a unified channel dimension. \[F_{i}^{\prime\prime}=\phi_{3\times 3}^{(2)}(\phi_{3\times 3}^{(1)}(F_{i}^{ \prime})) \tag{9}\]  
Each scale feature \(F_{i}^{\prime\prime}\) is fed into the classification and regression heads, respectively. \[Cls_{i}=\psi^{cls}(F_{i}^{\prime\prime}),Box_{i}=\psi^{reg}(F_{i}^{\prime \prime}) \tag{10}\]  
where \(Cls_{i}\) outputs the category probability of each anchor; \(Box_{i}\) outputs bounding box offset or center point coordinates. To adapt to different input resolutions, the regression output is scaled down using a scale module. ScaleNorm can include feature channel weighting, GN to enhance feature fusion on different scales, and upsampling or downsampling operations to restore spatial dimensions. \[\sigma_{\beta}^{2}=\frac{1}{m}\sum_{i=1}^{m}\left(x_{i}-\mu_{\beta}\right)^{2} \tag{4}\]0  
\[\sigma_{\beta}^{2}=\frac{1}{m}\sum_{i=1}^{m}\left(x_{i}-\mu_{\beta}\right)^{2} \tag{4}\]1 (a) YOLOv8 detection head. (b) LSC module. This strategy improves the model's capacity to detect vehicles of various sizes and shapes while maintaining the lightweight and efficient nature of the detection head.