# Light-YOLOv5: A Lightweight Algorithm for Improved YOLOv5 in Complex Fire Scenarios
## 4 Experiment
### Result Analysis and Ablation Experiments  
To verify the model's validity further, we performed a series of ablation experiments in this section. As shown in Table 1, we compared the effects of different versions of YOLOv5. YOLOv5n has good accuracy with fewer parameters and computations than YOLOv5s and YOLOv5m; therefore, we selected it as the baseline. Furthermore, we conducted comparison experiments on LeakyReLu, Mish, and HSwish activation functions and CIoU, as well as SIoU with YOLOv5n as the baseline. As shown in Table 2, LeakyReLu and HSwish were faster than Mish but worse in accuracy, and SIoU was better than CIoU; therefore, we selected the combination of the Mish activation function and SIoU loss. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Params (M)** & **FLOPs (G)** & **[EMAIL_ADDRESS] (\%)** & **FPS** \\ \hline YOLOv5n & 1.77 & 4.2 & 67.6 & 111.1 \\ YOLOv5s & 7.02 & 15.9 & 69.3 & 100.0 \\ YOLOv5m & 20.87 & 48.0 & 70.4 & 87.78 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance comparison of different YOLOv5 models. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Activation/IoU Loss** & **Params (M)** & **[EMAIL_ADDRESS] (\%)** & **FPS** \\ \hline \multirow{6}{*}{YOLOv5n} & [PERSON]/CIoU & 1.77 & 67.8 & 107.3 \\  & HSwish/CIoU & 1.77 & 67.3 & 109.2 \\ \cline{1-1}  & [PERSON]/CIoU & 1.77 & 68.0 & 95.3 \\ \cline{1-1}  & LeakyReLu/SIoU & 1.77 & 68.3 & 107.5 \\ \cline{1-1}  & HSwish/SIoU & 1.77 & 67.6 & 109.4 \\ \cline{1-1}  & [PERSON]/SIoU & 1.77 & 68.7 & 95.6 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The comparison results of different activation functions and IoU loss under the same model. To validate the effectiveness of Light-BiFPN further, we used the latest method of replacing the backbone with a lightweight network to conduct comparative experiments. We observed that ShuffleNetv2 had the fastest detection speed, but this was hardly satisfying in terms of its accuracy. In contrast, Light-BiFPN had the second-fastest detection speed after ShuffleNetv2 and a much higher accuracy than the other lightweight networks. The results are presented in Table 3.  
Finally, we compared all of the improved methods for the ablation experiments, and the results are presented in Table 4. Compared with the original algorithm, Light-YOLOv5 presented a 3.3% improvement in mAP, a 2% increase in the F1 score, a 27.1% reduction in the parameters, and a 19.1% reduction in FLOPs. Although the detection speed was slower than that of the original algorithm, it also satisfied real-time detection needs. We also compared these results with the most advanced detectors, at this stage, to further verify the effectiveness of the methods, and the comparison results are presented in Table 5. It can be observed that although Light-YOLOv5 was inferior to YOLOv7-tiny and YOLOv3-tiny in terms of its detection speed, it was much better than these detectors in other parameters, where the mAP and F1 values were 6.8% and 5% higher, respectively, compared with the latest YOLOV7-tiny model, further proving the effectiveness of the method in this paper. The detection effect graph is presented in Figure 6(b). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Params (M)** & **FLOPs (G)** & **F1 (\%)** & **[EMAIL_ADDRESS] (\%)** & **FPS** \\ \hline Baseline (YOLOv5n) & 1.77 & 4.2 & 66.0 & 67.6 & 111.1 \\ Baseline + Light-BiFPN & 1.25 & 3.3 & 66.5 & 68.6 & 128.6 \\ Baseline + Light-BiFPN + SepViT & 1.26 & 3.3 & 67.0 & 69.8 & 120.4 \\ Baseline + Light-BiFPN + SepViT + GAM & 1.29 & 3.4 & 67.0 & 70.3 & 106.5 \\ Baseline + Light-BiFPN + SepViT, Mish, SloU & 1.29 & 3.4 & 68.0 & 70.9 & 91.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of ablation experiments with different modified methods.