# Binocular Vision-Based Pole-Shaped Obstacle Detection and Ranging Study
## 4 Analysis of Results
### Ablation Experiment  
To verify the effectiveness of the proposed multiscale feature hybrid attention algorithm, this experiment was conducted on the homemade PSO 2023 dataset for ablation experiments of the MFMAM-YOLOv5s algorithm. The experimental results are shown in Table 6.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**MKS** & **CBAM** & **GFPN** &
\begin{tabular}{c} **Rep-** \\ **GFPN** \\ \end{tabular} & **mAP\_0.5/\%** & **Volume/MB** & **FPS/f\_s\({}^{-1}\)** \\ \hline \(\times\) & \(\times\) & \(\times\) & \(\times\) & 94.3 & 14.4 & 303.0 \\ \(\surd\) & \(\times\) & \(\times\) & \(\times\) & 95.6 & 13.7 & 454.5 \\ \(\surd\) & \(\surd\) & \(\times\) & \(\times\) & 96.2 & 14.7 & 454.5 \\ \(\surd\) & \(\times\) & \(\surd\) & \(\times\) & 95.8 & 14.8 & 416.7 \\ \(\surd\) & \(\times\) & \(\times\) & \(\surd\) & 96.1 & 15.0 & 434.8 \\ \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & 96.9 & 18.6 & 384.6 \\ \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) & 97.4 & 19.0 & 400.0 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Results of ablation experiments.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Method** & **Volume/MB** & **Parameters/M** & **FLOPs/G** & **FPS/f\_s\({}^{-1}\)** & **mAP\_0.5/\%** \\ \hline YOLOv5s & 14.4 & 7.04 & 16.0 & 303.0 & 94.3 \\ GAM & 17.1 & 8.77 & 17.2 & 416.7 & 95.1 \\ ECA & 13.9 & 7.08 & 16.2 & 434.8 & 95.0 \\ MCA & 16.7 & 7.82 & 16.8 & 439.4 & 95.6 \\ CBAM & 14.8 & 7.55 & 16.6 & 454.5 & 96.2 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Comparison of the experimental results of different attention mechanisms.  
From the above experimental results, it is evident that utilizing the enhanced loss function results in enhancements in both the mAP value and the image detection rate when compared to the original model. Meanwhile, the size of the model has also been reduced. The main reason for this is that the improved loss function incorporates an optimal matching method. This method addresses the issue of the overlapping and mismatching of multiple bounding boxes in the original model. As a result, it significantly accelerates the matching process of predicted boxes and reduces the model size, making it more lightweight.  
However, after solving the problem of optimal matching boxes, this paper introduces a hybrid attention mechanism to further improve the detection accuracy. This attention mechanism not only suppresses interference caused by complex environments and enhances the extraction of important features by allocating different weights spatially but also learns which channels are more important for the task. It focuses on important feature information, reduces background noise, and eliminates redundant features in the channel dimension. Through ablation experiments, it has further been proven that the incorporation of a hybrid attention mechanism allows the model to concentrate on significant features in both channels and mitigate the interference from intricate backgrounds in both channels.  
To address the issue of multi-scale features, this paper introduces a multi-scale feature pyramid module. However, the original feature pyramid GFPN, due to its complex convolutions, increases the computational complexity and slows down the training and inference speed. Therefore, this paper utilizes an enhanced multi-scale feature pyramid known as Rep-GFPN. To evaluate the performance of the original GFPN and the enhanced Rep-GFPN, we conducted ablation experiments. From Table 6, it can be observed that the improved feature pyramid outperforms the original GFPN in terms of detection accuracy and speed. In summary, when compared to the YOLOv5s model, the enhanced model demonstrates a 3.1% increase in the mAP value and a 97 f.s\({}^{-1}\) improvement in the detection speed. Although the model size has increased, the algorithm's overall performance is the best, fully meeting the detection requirements of ADAS systems.