# LW-FIRE: A Lightweight Wildfire Image Classification with a Deep Convolutional Neural Network
## 4 Results
### Multiclass Classification  
In this paper, we addressed the problem of wildfire image classification. We described a new deep learning-based model, and the dataset transformation on the example of two classes, namely \"fire\" and \"not fire\". In this subsection, we provide sufficient evidence that our solution can be extended to work on multiclass classification.  
The number of possible classes is typically related to a specific application domain. Since we addressed the classification of wildfire images, we believe that the extension of this problem to include the class \"smoke\" is a logical choice. To prepare the dataset for multiclass classification, we use the same image tessellation technique described in Section 3.2.1, but now we also define a third class: \"smoke\". The sub-images created in the image tessellation step need to be labeled with appropriate labels. Sub-images that are labeled as \"fire\" in the binary classification problem can still be used. On the other hand, sub-images that are labeled as \"not fire\" can contain information that is associated with smoke or not smoke or fire. Thus, we manually selected sub-images associated with smoke from the \"not fire\" class, and labeled them as \"smoke\". The rest of the images remained with the label \"not fire\". In Figure 7, we provide a visual representation of how an image can be divided into three classes. Next, the labels are encoded as categorical vectors. The same technique that is described here can be applied to other application domains. Once the dataset is prepared, the CNN model needs to be modified to support the multiclass classification.  
Figure 6: The overall performance of the LW-FIRE150\({}_{\text{2}}\) model with the highest accuracy on the testing set: training and validation accuracy (**left**) and loss (**right**).  
Figure 7: The process of image tessellation and labelling for multiclass classification is illustrated. Labeling of sub-images is shown in different colors in the upper left corner: (i) the image with a red diamond represents a sub-image with fire, (ii) the image with a green square represents a sub-image with no fire, and (iii) the image with a yellow circle represents a sub-image with smoke. (Best viewed in color.)Multiclass classification is demonstrated with the LW-FIRE150\({}_{42}\) model. The model is modified to generate three output signals instead of the one which is used for binary classification. During the training, the categorical cross-entropy function is used as a loss function. The same strategy is used to divide the samples, i.e., 70% of samples were used for training, 10% for validation, and 20% for testing. The model was trained for 50 epochs. The best validation accuracy was obtained after the 39 th epoch, and the accuracy was 95.3%. After testing our model on a testing subset, we noticed that the overall accuracy increased to 98.6%. This is because the sub-images from the \"not fire\" class are divided into two classes, which increased the differentiation between the \"not fire\" and \"smoke\" classes, and, subsequently, the \"fire\" class. Hence, the model identified sub-images with fire more easily. Analysis of results revealed the increase in true positives and the decrease in false negatives, which had a positive effect on the majority of metrics used in this paper.