# An Improved Lightweight YOLOv8 Network for Early Small Flame Target Detection
## 5 Analysis of Results
### Comparative Experiment  
In order to validate the accuracy and lightweight design improvements proposed in this paper for the original model, the improvement methods proposed in Section 3 were compared separately. All algorithms used the same hardware device and trained with the same dataset to ensure the fairness of the experimental results. The first experiment explored the comparison of the accuracy of the model algorithm improved by different feature fusion algorithms in this paper and compared the FPN module and the BiFPN module of the original YOLOv8 model. The results of the experiment are presented in Table 1.  
The experimental results show that the use of the BiFPN module compared to the original FPN module achieved a higher detection accuracy improvement of about 6% and the parameter weight size compared to the original FPN module decreased by 32%, from 6.2 MB to 4.2 MB; compared to the original FPN module, the single-frame detection speed only slightly increased by 0.2 ms, which basically indicates no significant change in single-frame detection speed. Overall, the BiFPN feature fusion module achieved higher detection accuracy, indicating that the smaller model size has an advantage in edge deployment.  
Next, for its different attention mechanism models, still ensuring that it is in the same hardware environment and is using the same training set conditions for experiments, the original YOLOv8's CBAM, the SENET module, and the EMA module adopted in this paper were compared experimentally. The experimental results are shown in Table 2.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature Fusion Module** & **mAP0.5\%** & **Single-Sheet Detection Time/ms** & **Weight Size/MB** \\ \hline FPN module & 89.5 & 14.8 & 6.2 \\ BiFPN module & 90.4 & 15.0 & 4.2 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparative experiment of feature fusion architecture.  
From Table 2, it can be seen that the EMA module used in this paper has a more noticeable improvement in detection speed compared to its original attention mechanism, and it is also superior to the CBAM and SENET module in terms of accuracy. Even when multiple EMA modules are added, the weight size basically remains consistent with the original weight and overall, the effect is the best.  
In terms of improving the loss function, the original YOLOv8n was compared with the improved NWD's YOLOv8. The box_loss function was used to supervise the regression of the detection box. The smaller the value, the smaller the error between the prediction box and the calibration box and the more accurate the prediction. As can be seen from Figure 7, the box_loss data of the improved model have a faster convergence speed and a lower value, which is better than the original YOLOv8n model.  
In the following, the original YOLOv8 network and the improved YOLOv8 network were trained using the same hardware equipment and the same training set with identical training parameters. The mAP0.5 and mAP0.5-0.95 derived from the training of both networks were then compared, with the results displayed in Figure 8. The mAP0.5 data are improved by 2.7% compared with YOLOv8n. As illustrated in the figure, the enhanced YOLOv8 network has demonstrated enhanced detection accuracy in comparison to the preceding YOLOv8 network. Additionally, the majority of the flame targets within the training set are of a diminutive size, thereby substantiating the assertion that the enhanced YOLOv8 network has also exhibited an improvement in the detection accuracy of minute targets.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Attention Mechanism** & **mAP0.5/\%** & **Single-Sheet Detection Time/ms** & **Weight Size/MB** \\ \hline CBAM & 89.5 & 14.8 & 6.2 \\ SENET & 89.1 & 15.3 & 6.2 \\ EMA & 90.2 & 13.2 & 6.3 \\ \hline \end{tabular}
\end{table}
Table 2: Comparison experiment of attention mechanisms.  
Figure 7: Comparison of box loss data.