# A Deep-Learning-Based Approach to the Classification of Fire Types
## 5 Discussion  
Based on the experiments outlined in the previous section, this work recommends following the two-level classification architecture. The reason for that is twofold. First was the potential time and power efficiency that results from refraining from proceeding with other classes once a _no-fire_ class is detected. Second, the two-level classification approach resulted in better accuracy performance, which can be explained by the fact that the task was split into two parts; the models first had to identify whether there was a fire. Then, in the case of a fire being present, the models could proceed to determine the type of fire. The more accurately the type of fire was identified, the more efficiently the response could be elicited from the concerned firefighting department, as it could readily and quickly identify the proper method and tools to put out the fire accordingly. It is also worth noting that the average score for the best-attained results for the binary and four-way classification in this setting was 97.85% accuracy, which was still better than the best scores achieved with the flat, five-way classification at 94.48% accuracy. Table 7 shows the five-way classification experiments' per-class precision and recall scores using the ResNet50 model. It can be seen that the _no-fire class_ had the highest precision and recall as compared to the rest of the classes. A possible explanation is that this was one of the biggest classes in our dataset, with more than 500 instances. Another justification for this performance is that the _no-fire class_ is a highly distinguishable class, as the models can easily learn how to detect the presence of such a fire or one of its features, like flame or smoke, compared to normal features with no fire. Similarly, the number of instances, i.e., the class size, clearly impacts the precision and recall rate of the oil-based fire class, which was the smallest class in our dataset. This probably has made it difficult for the models to be able to fetch images wherein the prominent features of oil-based fires, like dark smoke, were present. As such, future work will expand the dataset, which is anticipated to play a role in exposing the models to various features of each fire class, helping make further advances in increasing the per-class precision and recall scores. It is also interesting to see that, in the chemical-fire class, the models seemed to struggle to identify the instances in this class, which was reflected by the lowest precision rate in the table at 0.37, while attaining a reasonable recall rate at 0.73, probably reflecting a relatively \begin{table}
\begin{tabular}{l l l} \hline \hline
**Classification Algorithm** & **Accuracy** & **Avg. F1 Score** \\ \hline MobileNetV2 & 93.87\% & 0.938 \\ \hline InceptionV3 & 91.41\% & 0.914 \\ \hline VGG-16 & 90.18\% & 0.902 \\ \hline EfficientNetV2I & 54.60\% & 0.557 \\ \hline VGG-19 & 88.96\% & 0.889 \\ \hline ResNet-50 & 69.33\% & 0.695 \\ \hline Densenet121 & 95.09\% & 0.951 \\ \hline EfficientNet-b0 & **97.55\%** & **0.975** \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The results of using eight different classification algorithms for the four-way classification of solid-material fire vs. electric-based fire vs. oil-based fire vs. chemical fire. Bold values denote the best performance in each column. more straightforward task for the models to identify the presence of a chemical fire instance merely. Overall, augmenting the dataset with more high-quality instances is anticipated to impact the performance of the trained models positively. As for the issue of unbalanced classes, as shown in Table 2, it is interesting to observe the positive impact on the accuracy of detecting the _no-fire class_ as being the class with the most significant number of instances in the dataset. The relatively large size of this class is also clearly reflected in the precision and recall rate of the _no-fire_ class. However, while a factor with a significant influence, class size is not the only factor that affects it.