# Dense Small Object Detection Based on an Improved YOLOv7 Model
## 4 Experiments and Analysis of Results
### Ablation Experiments  
In this experiment, we conducted an ablation study to evaluate the impact of various modifications to the baseline YOLOv7 model. These changes include adding a P2 detection head, removing the P5 detection layer, and replacing the feature fusion module under 16x downsampling with C3R2N, introducing SPD Conv, and doubling the number of channels for the first ELAN_1 module in the backbone network.  
As can be seen from the ablation experiment results in Table 6, adding the P2 detection layer improved the [EMAIL_ADDRESS]% to 50.5% and [EMAIL_ADDRESS]:0.95% to 29.9% with a slight increase in parameters to 37.10 M. Removing the P5 detection layer from the model in step B resulted in a slight increase in both [EMAIL_ADDRESS]% (51.4) and [EMAIL_ADDRESS]:0.95% (30.0), with a significant reduction in parameters to 11.31 M. Incorporating the C3R2N module improved the [EMAIL_ADDRESS]% to 51.9% and [EMAIL_ADDRESS]:0.95% to 30.3% while reducing parameters further to 9.3 M. Introducing SPD Conv provided a significant boost, raising the [EMAIL_ADDRESS] to 53.8% and [EMAIL_ADDRESS]:0.95 to 31.8%. This configuration maintained a relatively low parameter count of 10.1 M, making it an efficient and effective modification. Finally, doubling the number of channels in the first ELAN-1 module (our method) achieved the highest [EMAIL_ADDRESS] of 55.1% and [EMAIL_ADDRESS]:0.95 of 32.5%, demonstrating the effectiveness of this combination of modifications.  
The ablation study demonstrated that each modification had a positive impact on the model's performance to varying degrees. The final model showed the most significant improvement in detection precision while maintaining a smaller number of parameters. This suggests that our proposed method effectively enhances the YOLOv7 model's performance and efficiency.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Method** & **[EMAIL_ADDRESS]\%** & **[EMAIL_ADDRESS]:0.95\%** & **Parameters/M** \\ \hline A & YOLOv7 & 48.8 & 27.6 & 36.53 \\ B & A+P2 & 50.5 & 29.9 & 37.10 \\ C & B-P5 & 51.4 & 30.0 & 11.31 \\ D & C+C3R2N & 51.9 & 30.3 & 9.30 \\ E & D+SPD Conv & 53.8 & 31.8 & 10.10 \\ F & E+Channel(Ours) & 55.1 & 32.5 & 10.89 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Ablation experiment results.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Experiment** & **mAP(s)\%** & **mAP(m)\%** & **mAP(l)\%** & **[EMAIL_ADDRESS]\%** & **Parameters/M** \\ \hline Baseline & 23.0 & 43.3 & 46.8 & 53.8 & 10.10 \\
1 & 24.2 & 43.3 & 49.6 & 55.1 & 10.89 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Experiment with channel adjustment.  
As can be seen from the training process of [EMAIL_ADDRESS] (Figure 12) and [EMAIL_ADDRESS]:0.95 (Figure 13), between our method and the baseline (YOLOv7), the improved model showed a higher accuracy growth rate at the early stage of training and maintained higher [EMAIL_ADDRESS] and [EMAIL_ADDRESS]:0.95 levels than the baseline throughout the training process. This result shows that our improvement of the model structure is effective. In the comparison graph of the Loss training process (Figure 14), the improved model shows a lower Loss value and faster convergence speed. This means that the improved model can better fit the training data during the training process, thus improving the generalization ability