# Improved YOLOv7 Algorithm for Small Object Detection in Unmanned Aerial Vehicle Image Scenarios
## 5 Experiments
### Ablation Study  
As shown in Table 2, the ablation experiments were completed on VisDrone2019 to validate the effects of the main methods in YOLOv7-UAV. The first row shows the performance of the traditional YOLOv7. From the second row to the last row, [EMAIL_ADDRESS] gradually increases from 41.4% to 45.3%, and the parameters decrease to 26.77M.  
The effect of removing the P5 prediction head. Removing the deep-level P5 from the traditional structure of YOLOv7 reduces the number of layers and parameters in the network. The accuracy of the model is improved by 1.84% due to a reduction in the effect of excessive down-sampling on small object detection, demonstrating the effectiveness of removing the P5 prediction head.  
The effect of adding the P2 prediction head. Adding the extra prediction head increases the number of layers and model parameters, but the P5 prediction head that we removed is deeper, so it actually reduces the total model parameters. P2 makes the detector more sensitive to small objects, and the increased mean average precision demonstrates the effectiveness of the additional low-level prediction head.  
The effect of using the BiFPN-like structure. The BiFPN-like structure uses cross-level connections with weight parameters to enhance the fusion performance of multi-scale features, and it retains edge nodes that contain rich feature information of small objects. The results demonstrate the validity of the BiFPN-like structure compared to the PANnet structure.  
The effect of using the SIOU loss function. Incorporating the angle cost into the SIOU loss function facilitates a more efficient adjustment of the prediction box toward the ground-truth box compared to the traditional CIoU loss function. As shown in Table 2, this new SIOU loss function increases accuracy and demonstrates validity.  
The effect of the method ensemble. As shown in Table 2, the proposed YOLOv7-UAV algorithm consists of all the above innovative methods, achieving a 3.9% improvement in [EMAIL_ADDRESS] and a 10.52 M reduction in parameters compared to the traditional YOLOv7. The above experiments clearly indicate that the proposed scheme in this paper exhibits advantages in both [EMAIL_ADDRESS] and parameter optimization. Although YOLOv7-UAV adds the prediction head P2 and its feature extraction network, a commensurate reduction in overall system complexity is achieved through the design with the removal of the deep-level prediction head P5. This streamlined configuration renders the algorithm better suited for subsequent deployment on FPGA.  
Some detection results on the VisDrone dataset. As shown in Figure 9, we use different colors for the bounding box for different categories and show the corresponding confidence.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **[EMAIL_ADDRESS] (\%)** & **Parameters (M)** \\ \hline YOLOv7 & 41.40 & 37.29 \\ YOLOv7 + removeP5 & 43.24 (\(\uparrow\)1.84) & 26.21 \\ YOLOv7 + removeP5 + P2 & 44.13 (\(\uparrow\)0.89) & 26.77 \\ YOLOv7 + removeP5 + P2 + SIoU & 44.70 (\(\uparrow\)0.57) & 26.77 \\ YOLOv7 + removeP5 + P2 + SIoU + BiFPN-like & 45.30 (\(\uparrow\)0.60) & 26.77 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Ablation study on VisDrone2019-DET-VAL dataset.  
The results clearly show that our proposed YOLOv7-UAV algorithm is more effective in detecting small objects, and it can find more objects and has a higher confidence level.