## 4 Experimental Results and Analysis
### Comparison Experiment
#### 4.3.3 YOLOv5 Ablation Experiment  
In this experiment, the extended dataset was partitioned into training and testing sets in an 8:2 ratio. A sequence of ablation experiments was conducted to validate the effectiveness of three proposed enhancements. Ghostnet, DIoU-NMS, and CA modules were incrementally incorporated to analyze their benefits. The experiments were conducted without utilizing pre-trained weights, and the parameters were uniformly configured as described in Table 1. The experimental outcomes are presented in Table 4.  
In this experiment, the extended dataset is split into a training set and a test set in an 8:2 ratio. To verify the effectiveness of the two proposed improvements, ablation experiments are conducted on the dataset, and GhostNet, DIoU-NMS, and CA modules are sequentially added to analyze their benefits. The experiments do not use pre-training weights, and the parameters are uniformly set as shown in Table 1. The experimental results demonstrate that the original YOLOv5-s achieves a mean precision, recall, and average precision of 0.9215, 0.9263, and 0.9427, respectively. The CA module performs the best,  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & \(\mathbf{Pr}\) & \(\mathbf{Re}\) & \(\[EMAIL_ADDRESS]}\) & \(\[EMAIL_ADDRESS]\oplus 0.95}\) & _Model Size_ \\ \hline YOLOv5-s & 0.9215 & 0.9263 & 0.9527 & 0.8174 & 13.7 MB \\ YOLOv5-s + GhostNet & 0.9263 & 0.9292 & 0.9536 & 0.8214 & 10.1 MB \\ YOLOv5-s + DIoU-NMS & 0.9377 & 0.9366 & 0.972 & 0.8286 & 13.7 MB \\ YOLOv5-s + CA & 0.9541 & 0.9498 & 0.9729 & 0.8339 & 14.4 MB \\ YOLOv5-s + Above Three & **0.966** & **0.951** & **0.987** & **0.843** & 10.8 MB \\ \hline \hline \end{tabular}
\end{table}
Table 4: YOLOv5 ablation experiment.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & \(\mathbf{Pr}\) & \(\mathbf{Re}\) & \(\[EMAIL_ADDRESS]}\) \\ \hline YOLOv5-s & 0.9215 & 0.9263 & 0.9527 \\ YOLOv5-B & 0.9277 & 0.9166 & 0.962 \\ YOLOv5-N & **0.9541** & **0.9498** & **0.9729** \\ YOLOv5-H & 0.9138 & 0.9199 & 0.941 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of results of fusion CA.  
significantly improving the precision and average precision. The improvement effect of DIoU-NMS is slightly weaker, and the GhostNet module does not improve the detection performance but reduces the network parameters. Therefore, the three improvement methods have different focuses. The attention mechanism can enhance the network's feature extraction ability and focus on extracting essential features. GhostNet reduces the redundancy of the feature map in the convolution operation. DIoU-NMS accurately selects the prediction frame, which can solve the problem of missed detection in the case of vehicle occlusion. Moreover, the introduction of GhostNet, DIoU-NMS, and CA can reduce the number of network parameters, improve inference speed, and enhance the three indicators simultaneously.  
To visualize the optimization of DIoU-NMS for detection results, we used the original YOLOv5-s algorithm and the algorithm with the addition of DIoU-NMS to visualize some of the test results using the expanded dataset under the uniform configuration described above. The results are shown in Figure 10.  
Figure 9a displays the partial detection results of the original YOLOv5-s algorithm. Missed detection occurs at markers 1 and 2 when there is vehicle obstruction or when the vehicle outline is incomplete. False detection occurs at markers 3, 4, and 5, and the NMS fails to return the correct position of the vehicle, resulting in some detection frames having low accuracy and failing to completely cover the vehicle or exceeding the boundary of the image. Figure 9b shows partial detection results with the addition of the DIoU-NMS structure, which effectively resolves missed detection and false detection in complex vehicle scenarios while ensuring high detection accuracy.