# DeepFire: A Novel Dataset and Deep Transfer Learning Benchmark for Forest Fire Detection

Authors: Ali Khan; Bilal Hassan; Somaiya Khan; Ramsha Ahmed; Adnan Abuassba
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Forest fires pose a potential threat to the ecological and environmental systems and natural resources, impacting human lives. However, automated surveillance system for early forest fire detection can mitigate such calamities and protect the environment. Therefore, we propose a UAV-based forest fire fighting system with integrated artificial intelligence (AI) capabilities for continuous forest surveillance and fire detection. The major contributions of the proposed research are fourfold. Firstly, we explain the detailed working mechanism along with the key steps involved in executing the UAV-based forest fire fighting system. Besides, a robust forest fire detection system requires precise and efficient classification of forest fire imagery against no-fire. Moreover, we have curated a novel dataset (DeepFire) containing diversified real-world forest imagery with and without fire to assist future research in this domain. The DeepFire dataset consists of 1900 colored images with 950 each for fire and no-fire classes. Next, we investigate the performance of various supervised machine learning classifiers for the binary classification problem of detecting forest fire. Furthermore, we propose a VGG19-based transfer learning solution to achieve improved prediction accuracy. We assess and compare the performance of several machine learning approaches such ask-nearest neighbors, random forest, naive Bayes, support vector machine, logistic regression, and the proposed approach for accurately identifying fire and no-fire images in the DeepFire dataset. The simulation results demonstrate the efficacy of the proposed approach in terms of accurate classification, where it achieves the mean accuracy of 95% with 95.7% precision and 94.2% recall.


---

## Body

## 1. Introduction

Forests are one of the vital natural resources in the world. They provide materials and minerals which are used in production, and, in the meantime, it has a significant role in preventing sandstorms, maintaining balance in ecological system, and water conservation [1]. In recent years, forest fire cases have increased due to the dry climate and man-made causes. Forest fire causes harm to the environment, wildlife, and human lives equally [2–4]. Governments all around the globe attach great significance to protect the forest from fire. In response to protecting the forests from fire, there has been increasing interest in developing and adopting strategies for automated surveillance and detection of forest fires. At the same time, traditional human monitoring affects reliability and leads to delayed alarms.Artificial intelligence (AI) technology has risen for an automated surveillance system. While discussing AI technologies in surveillance systems, one cannot ignore the advancements in machine learning algorithms for detection and recognition [5, 6], which has developed to be the integral part of computer vision technology [7, 8]. Researchers’ interest in machine learning has recently increased in other domains as well [9–11] due to the development of inexpensive data storage technology and high-performing GPUs. However, there is still a major obstacle when developing better algorithms for solving the practical tasks of machine learning that require large datasets.With the recent advancements in internet technologies, UAV networks have emerged as the driving force in the information technology industry [12, 13]. Unmanned aerial vehicles (UAVs) or drones are widely used in different fields of life due to low operating and maintenance costs, easy deployment, and better access to remote and challenging areas [14, 15]. The connected UAV networks will generate a large amount of surveillance-related data that can help UAVs intelligently optimize their operations. UAVs with vision capabilities can significantly reduce the risks of any major disaster by continuous monitoring and timely extinguishing the forest fire. Moreover, UAV deployment can lower the cost compared to installing numerous closed-circuit television (CCTV) cameras for the surveillance of the same area as investigated in [16]. UAVs can be deployed quickly, can get to difficult terrain, map the area for potential fire, and transmit information to all relevant departments efficiently. These advantages of UAVs make them useful for forest fire detection.As fire seriously impacts human lives, various researches have been conducted towards early detection of fire, including urban and rural environments [17]. The scope of these works covers all the settings from wildfires to forests and the urban. Conversely, the databases for forest fire are still progressing, as currently, there are limited datasets for this task. However, this research direction is recently gaining much attention, and some notable contributions have been proposed in the literature. The research varies from sensor networks to computer vision-based forest fire detection mechanisms.The main objective of this work is to propose a novel solution of UAV-based forest fire fighting system to further help in the development of forest fire detection and monitoring systems. The use of intelligent systems for automatic detection can help fire brigades and disaster relief teams to respond quickly and reduce the impact of forest fires on the environment, society, and economy. Therefore, the rapid detection of a forest fire can improve the efficiency of the first response, thereby preventing bigger disasters.


### 1.1. Related Works

There are several researches in the literature on forest fire detection mechanisms by using satellite imagery. Guangmeng and Mei [18] used the Moderate-Resolution Imaging Spectroradiometer (MODIS) images for forest fire detection. In [19], Li et al. detected the fire using the Advanced Very High-Resolution Radiometer (AVHRR) images. However, the images from satellites are acquired after every one or two days, which is not suitable for real-time forest fire detection. Moreover, the weather influences the satellite image quality [20].Another method of detecting forest fire is through a wireless sensor network (WSN). This method collects information by sensors deployed in the forest [21]. The fire is detected by monitoring different parameters such as humidity and temperature. In [22], WSN is designed to detect fire by continuously analyzing the Fire Weather Index (FWI). Although the WSN method is much faster than satellite imagery for fire detection, the high expense of powering the sensors is still an issue. With the advancements in computer vision technology, image processing has become widely explored for detecting forest fires [23–25]. It detects the fire accurately and effectively by using image feature information. It has benefits in real-time performance as well as the cost of the detection system. Several researchers use different methods to classify flame pixels based on RGM color models [26–29].While many other approaches use temporal and spatial wavelet analysis as described in [30, 31], in [32], the authors proposed a method for classifying fire based on the color model established in the color space of YCbCr and RGB. They defined seven rules, and when a pixel fulfills these rules, it is recognized as a target. The authors in [33] proposed a mechanism for detecting fire using video sequences. The proposed scheme reduces the algorithm complexity; however, it causes a lot of false predictions.There have been researches on forest fire detection based on machine learning. In [34], the authors proposed ensemble-based fire detection mechanism by using the information of color, flame movement, and shape. Muhammad et al. [35] proposed a framework of fire detection based on the fine-tuning the convolutional neural network, while many other methods [36–39] used neural networks for classifying the forest fire for early fire detection system. These methods show good results in classifying fire in different landscapes. Table 1 gives the comparative analysis of these forest fire classification methods.Table 1
Comparison of forest fire classification works.
MetricsFoggia et al. [34]Muhammadet al. [35]Sousaet al. [36]Govilet al. [37]Tanget al. [38]Sunet al. [39]Accuracy0.93550.94390.93600.91200.92000.9410TPR1.00000.97870.93130.8600—0.9063TNR0.88420.90930.94070.9467—0.9718FPR0.11580.09070.05930.0533—0.0282FNR00.02130.06870.1400—0.0937Machine learning methods have proved to be effective in dealing with many problems. The limitation of the forest fire dataset is still the main challenge for using machine learning and a major hurdle in solving real-world problems. The previous research on wildfire detection also faced a similar issue, where the authors considered the dataset composed of fire instances such as the fire in urban areas, riots, indoor fire, fire in the open fields, and industrial fire. However, such datasets lack the representation of only forest landscapes. Consequently, using these datasets may perform suboptimally against the real-world problem of forest fire detection. Although these researches show a high success rate, using imbalanced and video-based datasets can only provide limited variance among the samples, thereby undermining the importance of results.At the core of this research, we presume that intelligent systems for automatic fire detection can help fire brigades and disaster relief teams to respond quickly and reduce the impact of forest fires on the environment, society, and economy. To demonstrate this, we propose a novel solution of UAV based-forest fire fighting system that utilizes state-of-the-art artificial intelligence and computer vision techniques. The proposed research is believed to strengthen further development of efficient and robust forest fire detection and monitoring systems.


### 1.2. Key Contributions

The major contributions of this work are fourfold, as summarized:(i)
To propose the novel idea of using UAVs for forest fire fighting, which details the concept along with its working mechanism. This research also elucidates the key steps involved in executing the UAV-based forest fire fighting system(ii)
We introduce the DeepFire dataset for the detection of forest fire. It consists of diversified real-world forest imagery. The DeepFire dataset is labeled and grouped into two classes: fire and no-fire. The DeepFire dataset can serve as a basis for a large-scale training of deep neural networks for the task of forest fire image classification(iii)
The accurate classification of the forest fire images is essential to implementing a robust forest fire fighting system. In this context, we provide benchmarks for the proposed dataset using various machine learning methods. Next, to achieve better prediction accuracy, we propose a VGG19-based transfer learning benchmark for classification of images as fire and no-fire(iv)
Further, a comparative performance analysis is presented between the machine learning methods and the proposed VGG19-based transfer learning approach to validate the effectiveness of a convolutional neural network method over machine learning algorithms for the investigated forest fire detection problemThe paper is structured as follows: Section2 has the proposed UAV-based forest fire fighting system, Section 3 details the newly created DeepFire dataset, Section 4 has the overview of benchmarking methods for forest fire classification, Section 5 explains the DeepFire dataset benchmarking and performance evaluation, and Section 6 concludes this research paper.


## 1.1. Related Works

There are several researches in the literature on forest fire detection mechanisms by using satellite imagery. Guangmeng and Mei [18] used the Moderate-Resolution Imaging Spectroradiometer (MODIS) images for forest fire detection. In [19], Li et al. detected the fire using the Advanced Very High-Resolution Radiometer (AVHRR) images. However, the images from satellites are acquired after every one or two days, which is not suitable for real-time forest fire detection. Moreover, the weather influences the satellite image quality [20].Another method of detecting forest fire is through a wireless sensor network (WSN). This method collects information by sensors deployed in the forest [21]. The fire is detected by monitoring different parameters such as humidity and temperature. In [22], WSN is designed to detect fire by continuously analyzing the Fire Weather Index (FWI). Although the WSN method is much faster than satellite imagery for fire detection, the high expense of powering the sensors is still an issue. With the advancements in computer vision technology, image processing has become widely explored for detecting forest fires [23–25]. It detects the fire accurately and effectively by using image feature information. It has benefits in real-time performance as well as the cost of the detection system. Several researchers use different methods to classify flame pixels based on RGM color models [26–29].While many other approaches use temporal and spatial wavelet analysis as described in [30, 31], in [32], the authors proposed a method for classifying fire based on the color model established in the color space of YCbCr and RGB. They defined seven rules, and when a pixel fulfills these rules, it is recognized as a target. The authors in [33] proposed a mechanism for detecting fire using video sequences. The proposed scheme reduces the algorithm complexity; however, it causes a lot of false predictions.There have been researches on forest fire detection based on machine learning. In [34], the authors proposed ensemble-based fire detection mechanism by using the information of color, flame movement, and shape. Muhammad et al. [35] proposed a framework of fire detection based on the fine-tuning the convolutional neural network, while many other methods [36–39] used neural networks for classifying the forest fire for early fire detection system. These methods show good results in classifying fire in different landscapes. Table 1 gives the comparative analysis of these forest fire classification methods.Table 1
Comparison of forest fire classification works.
MetricsFoggia et al. [34]Muhammadet al. [35]Sousaet al. [36]Govilet al. [37]Tanget al. [38]Sunet al. [39]Accuracy0.93550.94390.93600.91200.92000.9410TPR1.00000.97870.93130.8600—0.9063TNR0.88420.90930.94070.9467—0.9718FPR0.11580.09070.05930.0533—0.0282FNR00.02130.06870.1400—0.0937Machine learning methods have proved to be effective in dealing with many problems. The limitation of the forest fire dataset is still the main challenge for using machine learning and a major hurdle in solving real-world problems. The previous research on wildfire detection also faced a similar issue, where the authors considered the dataset composed of fire instances such as the fire in urban areas, riots, indoor fire, fire in the open fields, and industrial fire. However, such datasets lack the representation of only forest landscapes. Consequently, using these datasets may perform suboptimally against the real-world problem of forest fire detection. Although these researches show a high success rate, using imbalanced and video-based datasets can only provide limited variance among the samples, thereby undermining the importance of results.At the core of this research, we presume that intelligent systems for automatic fire detection can help fire brigades and disaster relief teams to respond quickly and reduce the impact of forest fires on the environment, society, and economy. To demonstrate this, we propose a novel solution of UAV based-forest fire fighting system that utilizes state-of-the-art artificial intelligence and computer vision techniques. The proposed research is believed to strengthen further development of efficient and robust forest fire detection and monitoring systems.


## 1.2. Key Contributions

The major contributions of this work are fourfold, as summarized:(i)
To propose the novel idea of using UAVs for forest fire fighting, which details the concept along with its working mechanism. This research also elucidates the key steps involved in executing the UAV-based forest fire fighting system(ii)
We introduce the DeepFire dataset for the detection of forest fire. It consists of diversified real-world forest imagery. The DeepFire dataset is labeled and grouped into two classes: fire and no-fire. The DeepFire dataset can serve as a basis for a large-scale training of deep neural networks for the task of forest fire image classification(iii)
The accurate classification of the forest fire images is essential to implementing a robust forest fire fighting system. In this context, we provide benchmarks for the proposed dataset using various machine learning methods. Next, to achieve better prediction accuracy, we propose a VGG19-based transfer learning benchmark for classification of images as fire and no-fire(iv)
Further, a comparative performance analysis is presented between the machine learning methods and the proposed VGG19-based transfer learning approach to validate the effectiveness of a convolutional neural network method over machine learning algorithms for the investigated forest fire detection problemThe paper is structured as follows: Section2 has the proposed UAV-based forest fire fighting system, Section 3 details the newly created DeepFire dataset, Section 4 has the overview of benchmarking methods for forest fire classification, Section 5 explains the DeepFire dataset benchmarking and performance evaluation, and Section 6 concludes this research paper.


## 2. Proposed UAV-Based Forest Fire Fighting System

Forest fire is a major problem for the ecological and environmental systems. Due to rapid climate change, forest fire disasters frequently occur, polluting the environment and destroying natural resources. This work proposes a novel concept of intelligent UAVs as flying firefighters for detecting and fighting a forest fire. For better monitoring and managing the forest fire disaster, we propose UAV-based forest fire fighting system where a UAV or swarm of UAVs with artificial intelligence (AI) capabilities will detect and fight such disasters, as illustrated in Figure1.Figure 1
UAV-based forest fire fighting system model.


### 2.1. Working Mechanism

A UAV or swarm of UAVs will fly over the forest for surveillance to detect any fire accident. Every UAV in the forest fire fighting system has a visual sensor and the other various sensors mounted on it. The UAVs are responsible for continuous surveillance to detect forest fires. The working flow of the proposed system is depicted in Figure2.Figure 2
Working mechanism of forest fire fighting system.When there is some fire incident, either natural or manufactured, the continuous surveillance of the forest will help the UAVs detect fire from afar in real time. When the UAV perceives a fire event, it will estimate the exact location of the fire and communicate with the other UAVs nearby. In addition, the UAV will transmit the information to the remote forest fire disaster management center (FDMC). If the UAV is near the location of the fire, then it will proceed to the site to extinguish the fire. Moreover, if a UAV cannot control the fire on its own, it will coordinate and collaborate with other UAVs in its vicinity for assistance in extinguishing the fire. The UAV will continue to extinguish the fire until it is extinguished. After extinguishing the fire, the UAV sends the information to the remotely located FDMC and pulls back. The remote FDMC monitors the situation in real time and can dispatch heavy machinery (including fire trucks or helicopters) to extinguish the fire when necessary.


### 2.2. Steps Involved in UAV-Based Forest Fire Fighting System

The main task of our proposed system is to detect the fire early and then overcome it with the resources at its disposal. As the primary and essential task is fire detection, the forest fire fighting system can be regarded as an example of machine vision. Nonetheless, it is the main task of the proposed system, but there are various steps involved to execute the forest fire fighting system, as depicted in Figure3.Figure 3
Steps involved for executing the UAV-based forest fire fighting system.


#### 2.2.1. Network of UAVs

The swarm of UAVs is deployed for the forest fire fighting system as a single UAV has limited resource capabilities to transmit the real-time forest fire-related information to the remotely located forest monitoring center. The UAVs will form a network to collaborate and communicate in an ad-hoc manner that saves the limited battery resources and minimizes the delay in using other intermediary mediums such as satellites.


#### 2.2.2. Fire Detection

The most important part of the proposed system is detecting the fire disaster as early as possible. The UAVs with visual sensor capabilities will detect the fire and take action accordingly. The accurate detection of forest fire requires machine learning methods, where a model is trained on the dataset under various conditions to achieve optimal accuracy in detecting and recognizing the fire.


#### 2.2.3. Location Identification

After the fire is detected, accurately identifying the location of the fire source is crucial for the UAVs to proceed with the fire extinguishing mission. The UAVs can perform the location identification task and measure the distance through visual sensors using photogrammetry.


#### 2.2.4. Obstacle Avoidance

The obstacle avoidance mechanism is an essential step as the UAVs will encounter hurdles such as tree branches while moving towards the fire. The UAV can detect such obstacles through an embedded visual sensor to avoid them and maintain its path towards the fire site.


#### 2.2.5. Fire Fighting

The UAV, in its capacity, will try to fight the fire using its small tanks of fire extinguishers. If the fire is not easily controllable for the UAV, it can call for help from the other UAVs in the network collaborating to extinguish the fire. Further, if the fire is still spreading, the UAVs will transmit the information to the forest fire monitoring center, sending the heavy machinery to control the disaster.


#### 2.2.6. Self-Monitoring System

Every UAV is equipped with several sensors to monitor its system. Due to the very high temperature close to the fire, the electronic equipment or fuselage of the UAV may be burnt. Therefore, maintaining a safe distance is essential for the UAV to operate without damaging itself. For this purpose, the UAV will continuously monitor and record the readings (such as a battery or high temperature) in its system. The UAV can pull back and let the other UAVs complete the tasks in case of any change in its readings beyond the threshold specified.


## 2.1. Working Mechanism

A UAV or swarm of UAVs will fly over the forest for surveillance to detect any fire accident. Every UAV in the forest fire fighting system has a visual sensor and the other various sensors mounted on it. The UAVs are responsible for continuous surveillance to detect forest fires. The working flow of the proposed system is depicted in Figure2.Figure 2
Working mechanism of forest fire fighting system.When there is some fire incident, either natural or manufactured, the continuous surveillance of the forest will help the UAVs detect fire from afar in real time. When the UAV perceives a fire event, it will estimate the exact location of the fire and communicate with the other UAVs nearby. In addition, the UAV will transmit the information to the remote forest fire disaster management center (FDMC). If the UAV is near the location of the fire, then it will proceed to the site to extinguish the fire. Moreover, if a UAV cannot control the fire on its own, it will coordinate and collaborate with other UAVs in its vicinity for assistance in extinguishing the fire. The UAV will continue to extinguish the fire until it is extinguished. After extinguishing the fire, the UAV sends the information to the remotely located FDMC and pulls back. The remote FDMC monitors the situation in real time and can dispatch heavy machinery (including fire trucks or helicopters) to extinguish the fire when necessary.


## 2.2. Steps Involved in UAV-Based Forest Fire Fighting System

The main task of our proposed system is to detect the fire early and then overcome it with the resources at its disposal. As the primary and essential task is fire detection, the forest fire fighting system can be regarded as an example of machine vision. Nonetheless, it is the main task of the proposed system, but there are various steps involved to execute the forest fire fighting system, as depicted in Figure3.Figure 3
Steps involved for executing the UAV-based forest fire fighting system.


### 2.2.1. Network of UAVs

The swarm of UAVs is deployed for the forest fire fighting system as a single UAV has limited resource capabilities to transmit the real-time forest fire-related information to the remotely located forest monitoring center. The UAVs will form a network to collaborate and communicate in an ad-hoc manner that saves the limited battery resources and minimizes the delay in using other intermediary mediums such as satellites.


### 2.2.2. Fire Detection

The most important part of the proposed system is detecting the fire disaster as early as possible. The UAVs with visual sensor capabilities will detect the fire and take action accordingly. The accurate detection of forest fire requires machine learning methods, where a model is trained on the dataset under various conditions to achieve optimal accuracy in detecting and recognizing the fire.


### 2.2.3. Location Identification

After the fire is detected, accurately identifying the location of the fire source is crucial for the UAVs to proceed with the fire extinguishing mission. The UAVs can perform the location identification task and measure the distance through visual sensors using photogrammetry.


### 2.2.4. Obstacle Avoidance

The obstacle avoidance mechanism is an essential step as the UAVs will encounter hurdles such as tree branches while moving towards the fire. The UAV can detect such obstacles through an embedded visual sensor to avoid them and maintain its path towards the fire site.


### 2.2.5. Fire Fighting

The UAV, in its capacity, will try to fight the fire using its small tanks of fire extinguishers. If the fire is not easily controllable for the UAV, it can call for help from the other UAVs in the network collaborating to extinguish the fire. Further, if the fire is still spreading, the UAVs will transmit the information to the forest fire monitoring center, sending the heavy machinery to control the disaster.


### 2.2.6. Self-Monitoring System

Every UAV is equipped with several sensors to monitor its system. Due to the very high temperature close to the fire, the electronic equipment or fuselage of the UAV may be burnt. Therefore, maintaining a safe distance is essential for the UAV to operate without damaging itself. For this purpose, the UAV will continuously monitor and record the readings (such as a battery or high temperature) in its system. The UAV can pull back and let the other UAVs complete the tasks in case of any change in its readings beyond the threshold specified.


## 2.2.1. Network of UAVs

The swarm of UAVs is deployed for the forest fire fighting system as a single UAV has limited resource capabilities to transmit the real-time forest fire-related information to the remotely located forest monitoring center. The UAVs will form a network to collaborate and communicate in an ad-hoc manner that saves the limited battery resources and minimizes the delay in using other intermediary mediums such as satellites.


## 2.2.2. Fire Detection

The most important part of the proposed system is detecting the fire disaster as early as possible. The UAVs with visual sensor capabilities will detect the fire and take action accordingly. The accurate detection of forest fire requires machine learning methods, where a model is trained on the dataset under various conditions to achieve optimal accuracy in detecting and recognizing the fire.


## 2.2.3. Location Identification

After the fire is detected, accurately identifying the location of the fire source is crucial for the UAVs to proceed with the fire extinguishing mission. The UAVs can perform the location identification task and measure the distance through visual sensors using photogrammetry.


## 2.2.4. Obstacle Avoidance

The obstacle avoidance mechanism is an essential step as the UAVs will encounter hurdles such as tree branches while moving towards the fire. The UAV can detect such obstacles through an embedded visual sensor to avoid them and maintain its path towards the fire site.


## 2.2.5. Fire Fighting

The UAV, in its capacity, will try to fight the fire using its small tanks of fire extinguishers. If the fire is not easily controllable for the UAV, it can call for help from the other UAVs in the network collaborating to extinguish the fire. Further, if the fire is still spreading, the UAVs will transmit the information to the forest fire monitoring center, sending the heavy machinery to control the disaster.


## 2.2.6. Self-Monitoring System

Every UAV is equipped with several sensors to monitor its system. Due to the very high temperature close to the fire, the electronic equipment or fuselage of the UAV may be burnt. Therefore, maintaining a safe distance is essential for the UAV to operate without damaging itself. For this purpose, the UAV will continuously monitor and record the readings (such as a battery or high temperature) in its system. The UAV can pull back and let the other UAVs complete the tasks in case of any change in its readings beyond the threshold specified.


## 3. DeepFire Dataset Acquisition

We collected and arranged the forest fire and no-fire images for the classification problem to facilitate the researchers in proposing new methodologies in the domain of forest fire detection. We collected images from various online sources using keywords like forest fire, mountain fire, forest, and mountains. We have equally divided the DeepFire dataset into two classes of fire and no-fire, where the fire class contains images of forest and mountains with visible fire flames or fire flames with smoke clouds. On the contrary, the no-fire class contains images of forest and green mountains with different angles.


### 3.1. Dataset Classification

We have considered the binary classification problem, so the images in the DeepFire dataset belong to two classes. The DeepFire dataset has images of multiple angles of view and diversified range of scenery to better train the model in terms of discriminating the images with and without the fire. The newly created DeepFire dataset has a total of 1900 images, where 950 images are of the fire instance, and the remaining 950 images belong to no-fire.


### 3.2. Preprocessing the Data

The DeepFire dataset is created by downloading the images from various search engines using different keywords, as mentioned earlier. In addition to forest and mountain landscapes, many images contained undesirable objects, including persons and extinguishing machinery. Refining the dataset is essential for optimal model training and achieving better results. Therefore, we performed the necessary preprocessing steps on our DeepFire dataset, where we scanned through all the images to crop only the relevant region of interest (forest part). We purposely omitted the irrelevant objects in the images. After cropping, we resized all the images to a common resolution of250×250. These preprocessing steps enabled the algorithm to easily and quickly learn the features for the classification problem. Figure 4 shows some images of both classes in the DeepFire dataset.Figure 4
Images of fire and no-fire classes.


### 3.3. Dataset Splitting

Our DeepFire dataset consists of total 1900 images, the fire class has 950 images, and the rest 950 are of no-fire class. We considered 80% of the data for training purposes and 20% for testing. Table2 summarizes the data splitting used for training and testing purposes.Table 2
Dataset splitting.
DatasetTrainingTestingTotalFire760190950No-fire760190950Total15203801900


## 3.1. Dataset Classification

We have considered the binary classification problem, so the images in the DeepFire dataset belong to two classes. The DeepFire dataset has images of multiple angles of view and diversified range of scenery to better train the model in terms of discriminating the images with and without the fire. The newly created DeepFire dataset has a total of 1900 images, where 950 images are of the fire instance, and the remaining 950 images belong to no-fire.


## 3.2. Preprocessing the Data

The DeepFire dataset is created by downloading the images from various search engines using different keywords, as mentioned earlier. In addition to forest and mountain landscapes, many images contained undesirable objects, including persons and extinguishing machinery. Refining the dataset is essential for optimal model training and achieving better results. Therefore, we performed the necessary preprocessing steps on our DeepFire dataset, where we scanned through all the images to crop only the relevant region of interest (forest part). We purposely omitted the irrelevant objects in the images. After cropping, we resized all the images to a common resolution of250×250. These preprocessing steps enabled the algorithm to easily and quickly learn the features for the classification problem. Figure 4 shows some images of both classes in the DeepFire dataset.Figure 4
Images of fire and no-fire classes.


## 3.3. Dataset Splitting

Our DeepFire dataset consists of total 1900 images, the fire class has 950 images, and the rest 950 are of no-fire class. We considered 80% of the data for training purposes and 20% for testing. Table2 summarizes the data splitting used for training and testing purposes.Table 2
Dataset splitting.
DatasetTrainingTestingTotalFire760190950No-fire760190950Total15203801900


## 4. Benchmarking Methods for Fire Detection

Detecting forest fire is inherently tricky because remote areas such as forests on the mountains are not easy to access. In addition, the atmospheric conditions in such locations are dynamic, and the environment is volatile. These factors greatly impact an automated algorithm development for detecting forest fires at an early stage. Subsequently, machine learning algorithms require substantial data to achieve high detection accuracy. First, we have different machine learning algorithm-based solutions for forest fire classification. Second, to have better results in terms of classification prediction accuracy, we propose the VGG19-based transfer learning solution for an effective forest fire detection system.


### 4.1. Machine Learning Algorithms

For this research, the machine learning algorithmsk-nearest neighbors (KNN), random forest (RF), support vector machine (SVM), naïve Bayes (NB), and logistic regression (LR) are considered for comparative study.


#### 4.1.1. KNN

k-nearest neighbors (KNN) is a nonparametric algorithm used for classification and recognition problems. It uses a local approximation of the input parameters’ generalized vector in space to assign data to the class. For the image classification problem, the value of k>1 increases the classification accuracy. In general, a larger k value can decrease the noise effect of classification.There is an essential assumption of this algorithm called the compactness hypothesis. This hypothesis states that if the object similarity measurement is defined enough, similar objects are most likely to be placed in the same class rather than different because the boundary between classes has distinctive localized regions and reasonably simple shapes.


#### 4.1.2. SVM

Support vector machine (SVM) is a supervised learning algorithm used for regression and classification problems. Typical SVM is a nonprobabilistic linear classifier that distinguishes two different types of objects. The main work of the SVM algorithm is that it translates the original vectors into higher dimension space. Then, it searches the separating hyperplane with maximum gap and constructs two parallel hyperplanes on both sides of the hyperplane separating the classes.We used a linear kernel to implement the SVM for the forest fire classification problem. The kernel of linear operatorL is a set of all operands v for which Lv=0; i.e., if L:V⟶W, then kernelL=v∈V:Lv=0, where 0 is a null vector in W. The kernel of L is the linear subspace of domain V.


#### 4.1.3. RF

Random forest (RF) is an ensemble learning algorithm used for regression and classification problems. The decision tree comprises root, splitting, decision nodes, and leaf, which combine to form a decision tree structure used for problem area identification. By combining multiple decision trees, a random forest algorithm is constructed. In RF, each decision tree is independently taught, reducing overfitting probability with the increase in the number of decision trees.


#### 4.1.4. LR

Logistic regression (LR) is a learning algorithm used for regression and classification problems. LR predicts the probability of a specific event by adjusting the data according to the logistic curve. LR classifier is given byhθx=θTx; a linear function is used as input to another function g which is a sigmoid function, so the equation becomes hθx=1/1+e−θTx.The sigmoid curve divides the class into negative or positive. The output comes out to be under the positive class if the probability is between 0 and 1.


#### 4.1.5. NB

Naïve Bayes (NB) is a supervised learning algorithm used for classification and regression problems. NB is based on the Bayes theorem with the naïve assumption of independence between every set of features.It predicts the probability of class on the basis of the idea that a given tuple belongs to a certain class. It is a probabilistic approach for solving classification problems by considering each class label and attribute as a random variable.


### 4.2. Proposed VGG19-Based Transfer Learning Approach

To answer the accuracy constraints of the machine learning algorithm, we propose a convolutional neural network- (CNN-) based solution for accurate forest fire classification. CNN, a deep neural network (DNN) category, is used to categorize and cluster data based on similarity and object recognition in a scene [40]. CNN is the driving force behind rapid growth of deep learning, since it is enabling substantial breakthroughs in computer vision [41]. In this section, we present VGG19-based transfer learning approach where the pretrained VGG19 model [42] (which is trained on ImageNet [43]) is used by freezing the weights of its convolutional base and adding fully connected dense layers with activation functions known as a rectified linear unit (ReLU) and sigmoid.Transfer learning [44] is a deep learning method that has benefits twofold: saving the time and computational resources to train the model from scratch. Secondly, neural networks require a large dataset for training. To overcome dataset limitations, transfer learning can help by freezing the model’s weights, trained on other larger datasets, and using it to learn with different datasets for the completely new task.


#### 4.2.1. ReLU and Sigmoid

Activation functions are essential for the optimization process and add nonlinearity to a neural network. In our proposed approach, we used ReLU and sigmoid activation functions. The ReLU is easy to compute and does not saturate. The ReLU (R) learns the complex features of the data and returns the element-wise maximum 0 and the input x. The sigmoid function (σ), also called logistic function, gives the prediction probability of the output with a value between 0 and 1. In our proposed method, we used the prediction threshold of 0.5. If the probability is less than 0.5, the output is 0; otherwise, the output is 1.
(1)Rx=max0,x,σx=11+e−x.


#### 4.2.2. Hyperparameter Selection

In our proposed approach, we used Stochastic Gradient Descent (SGD) and binary crossentropy as optimization and loss functions, respectively. SGD is a first-order optimization and the widely used optimization method for training neural networks. For hyperparameter selection, we tested ten different learning rate values from 0.000001 to 0.1 and with varying sizes of batch such as 16, 32, 64, and 100. After the comprehensive testing, we selected the hyperparameters: batch size 64, learning rate 0.01, 50 epochs, and steps per epochs to be 100 with 100 validation steps.


## 4.1. Machine Learning Algorithms

For this research, the machine learning algorithmsk-nearest neighbors (KNN), random forest (RF), support vector machine (SVM), naïve Bayes (NB), and logistic regression (LR) are considered for comparative study.


### 4.1.1. KNN

k-nearest neighbors (KNN) is a nonparametric algorithm used for classification and recognition problems. It uses a local approximation of the input parameters’ generalized vector in space to assign data to the class. For the image classification problem, the value of k>1 increases the classification accuracy. In general, a larger k value can decrease the noise effect of classification.There is an essential assumption of this algorithm called the compactness hypothesis. This hypothesis states that if the object similarity measurement is defined enough, similar objects are most likely to be placed in the same class rather than different because the boundary between classes has distinctive localized regions and reasonably simple shapes.


### 4.1.2. SVM

Support vector machine (SVM) is a supervised learning algorithm used for regression and classification problems. Typical SVM is a nonprobabilistic linear classifier that distinguishes two different types of objects. The main work of the SVM algorithm is that it translates the original vectors into higher dimension space. Then, it searches the separating hyperplane with maximum gap and constructs two parallel hyperplanes on both sides of the hyperplane separating the classes.We used a linear kernel to implement the SVM for the forest fire classification problem. The kernel of linear operatorL is a set of all operands v for which Lv=0; i.e., if L:V⟶W, then kernelL=v∈V:Lv=0, where 0 is a null vector in W. The kernel of L is the linear subspace of domain V.


### 4.1.3. RF

Random forest (RF) is an ensemble learning algorithm used for regression and classification problems. The decision tree comprises root, splitting, decision nodes, and leaf, which combine to form a decision tree structure used for problem area identification. By combining multiple decision trees, a random forest algorithm is constructed. In RF, each decision tree is independently taught, reducing overfitting probability with the increase in the number of decision trees.


### 4.1.4. LR

Logistic regression (LR) is a learning algorithm used for regression and classification problems. LR predicts the probability of a specific event by adjusting the data according to the logistic curve. LR classifier is given byhθx=θTx; a linear function is used as input to another function g which is a sigmoid function, so the equation becomes hθx=1/1+e−θTx.The sigmoid curve divides the class into negative or positive. The output comes out to be under the positive class if the probability is between 0 and 1.


### 4.1.5. NB

Naïve Bayes (NB) is a supervised learning algorithm used for classification and regression problems. NB is based on the Bayes theorem with the naïve assumption of independence between every set of features.It predicts the probability of class on the basis of the idea that a given tuple belongs to a certain class. It is a probabilistic approach for solving classification problems by considering each class label and attribute as a random variable.


## 4.1.1. KNN

k-nearest neighbors (KNN) is a nonparametric algorithm used for classification and recognition problems. It uses a local approximation of the input parameters’ generalized vector in space to assign data to the class. For the image classification problem, the value of k>1 increases the classification accuracy. In general, a larger k value can decrease the noise effect of classification.There is an essential assumption of this algorithm called the compactness hypothesis. This hypothesis states that if the object similarity measurement is defined enough, similar objects are most likely to be placed in the same class rather than different because the boundary between classes has distinctive localized regions and reasonably simple shapes.


## 4.1.2. SVM

Support vector machine (SVM) is a supervised learning algorithm used for regression and classification problems. Typical SVM is a nonprobabilistic linear classifier that distinguishes two different types of objects. The main work of the SVM algorithm is that it translates the original vectors into higher dimension space. Then, it searches the separating hyperplane with maximum gap and constructs two parallel hyperplanes on both sides of the hyperplane separating the classes.We used a linear kernel to implement the SVM for the forest fire classification problem. The kernel of linear operatorL is a set of all operands v for which Lv=0; i.e., if L:V⟶W, then kernelL=v∈V:Lv=0, where 0 is a null vector in W. The kernel of L is the linear subspace of domain V.


## 4.1.3. RF

Random forest (RF) is an ensemble learning algorithm used for regression and classification problems. The decision tree comprises root, splitting, decision nodes, and leaf, which combine to form a decision tree structure used for problem area identification. By combining multiple decision trees, a random forest algorithm is constructed. In RF, each decision tree is independently taught, reducing overfitting probability with the increase in the number of decision trees.


## 4.1.4. LR

Logistic regression (LR) is a learning algorithm used for regression and classification problems. LR predicts the probability of a specific event by adjusting the data according to the logistic curve. LR classifier is given byhθx=θTx; a linear function is used as input to another function g which is a sigmoid function, so the equation becomes hθx=1/1+e−θTx.The sigmoid curve divides the class into negative or positive. The output comes out to be under the positive class if the probability is between 0 and 1.


## 4.1.5. NB

Naïve Bayes (NB) is a supervised learning algorithm used for classification and regression problems. NB is based on the Bayes theorem with the naïve assumption of independence between every set of features.It predicts the probability of class on the basis of the idea that a given tuple belongs to a certain class. It is a probabilistic approach for solving classification problems by considering each class label and attribute as a random variable.


## 4.2. Proposed VGG19-Based Transfer Learning Approach

To answer the accuracy constraints of the machine learning algorithm, we propose a convolutional neural network- (CNN-) based solution for accurate forest fire classification. CNN, a deep neural network (DNN) category, is used to categorize and cluster data based on similarity and object recognition in a scene [40]. CNN is the driving force behind rapid growth of deep learning, since it is enabling substantial breakthroughs in computer vision [41]. In this section, we present VGG19-based transfer learning approach where the pretrained VGG19 model [42] (which is trained on ImageNet [43]) is used by freezing the weights of its convolutional base and adding fully connected dense layers with activation functions known as a rectified linear unit (ReLU) and sigmoid.Transfer learning [44] is a deep learning method that has benefits twofold: saving the time and computational resources to train the model from scratch. Secondly, neural networks require a large dataset for training. To overcome dataset limitations, transfer learning can help by freezing the model’s weights, trained on other larger datasets, and using it to learn with different datasets for the completely new task.


### 4.2.1. ReLU and Sigmoid

Activation functions are essential for the optimization process and add nonlinearity to a neural network. In our proposed approach, we used ReLU and sigmoid activation functions. The ReLU is easy to compute and does not saturate. The ReLU (R) learns the complex features of the data and returns the element-wise maximum 0 and the input x. The sigmoid function (σ), also called logistic function, gives the prediction probability of the output with a value between 0 and 1. In our proposed method, we used the prediction threshold of 0.5. If the probability is less than 0.5, the output is 0; otherwise, the output is 1.
(1)Rx=max0,x,σx=11+e−x.


### 4.2.2. Hyperparameter Selection

In our proposed approach, we used Stochastic Gradient Descent (SGD) and binary crossentropy as optimization and loss functions, respectively. SGD is a first-order optimization and the widely used optimization method for training neural networks. For hyperparameter selection, we tested ten different learning rate values from 0.000001 to 0.1 and with varying sizes of batch such as 16, 32, 64, and 100. After the comprehensive testing, we selected the hyperparameters: batch size 64, learning rate 0.01, 50 epochs, and steps per epochs to be 100 with 100 validation steps.


## 4.2.1. ReLU and Sigmoid

Activation functions are essential for the optimization process and add nonlinearity to a neural network. In our proposed approach, we used ReLU and sigmoid activation functions. The ReLU is easy to compute and does not saturate. The ReLU (R) learns the complex features of the data and returns the element-wise maximum 0 and the input x. The sigmoid function (σ), also called logistic function, gives the prediction probability of the output with a value between 0 and 1. In our proposed method, we used the prediction threshold of 0.5. If the probability is less than 0.5, the output is 0; otherwise, the output is 1.
(1)Rx=max0,x,σx=11+e−x.


## 4.2.2. Hyperparameter Selection

In our proposed approach, we used Stochastic Gradient Descent (SGD) and binary crossentropy as optimization and loss functions, respectively. SGD is a first-order optimization and the widely used optimization method for training neural networks. For hyperparameter selection, we tested ten different learning rate values from 0.000001 to 0.1 and with varying sizes of batch such as 16, 32, 64, and 100. After the comprehensive testing, we selected the hyperparameters: batch size 64, learning rate 0.01, 50 epochs, and steps per epochs to be 100 with 100 validation steps.


## 5. Dataset Benchmarking and Performance Evaluation

The DeepFire dataset is classified in our research, and results are analyzed on different machine learning algorithms such as KNN, GNB, SVM, RF, and LR. Moreover, the proposed VGG19-based transfer learning approach is evaluated on the DeepFire dataset to prove the effectiveness of CNN-based solution over the machine learning algorithms. The simulation environment is Anaconda Python 3.7 with Keras/TensorFlow libraries with the system configurations of Dell i5-1135G7, 12 GB DDR4, Intel Iris Xe 6 GB. Subsequent subsections present the detailed performance evaluation of the proposed approach.


### 5.1. Simulation Parameter Selection

The input for the proposed method was set to128×128 image size. We also performed k-fold cross-validation for different values of k varied from 1 to 10 to ensure the best performance results. After extensive testing, we selected the values of each parameter for training our proposed method specified in Table 3.Table 3
Simulation parameters.
ParametersValueInput size128×128k-fold10k neighbors in KNN5Kernel in SVMLinearNumber of estimators in RF100Logistic regression solverlbfgs


### 5.2. Feature Extraction

Machine learning algorithms require prior feature extraction before training on these algorithms. The method for feature extraction we used in our research is the pixel features. The image size is the product of its rows, columns, and channels. The number of pixels in an image is the same as the image size; therefore, the number of features in every image of our dataset is128×128×3, equal to 49,152 pixels or features.


### 5.3. Performance Metrics

The performances for correct classification of fire and no-fire images are evaluated using various metrics such as training accuracy, prediction accuracy, precision, recall, F1 score, and error rate. The metrics are defined as(2)Predictionaccuracy=TP+TNTP+TN+FP+FN,Precision=TPTP+FP,Recall=TPR=TPTP+FN,ER=FP+FNTP+TN+FP+FN,F1score=2∗precision∗recallprecision+recall.The algorithm identifiesTN and TP as true negatives (correctly classified as no-fire) and true positives (correctly classified as fire). False positive FP is that no-fire image labeled as fire, and false negative FN is that fire image classified as no-fire. ER is the error rate calculated by the false predicted images to the total testing images. Precision is the ratio of correct positive outcomes to positive outcomes predicted by the method where recall is the ratio of correct positive outcomes to all samples that should be predicted positive. F1score is the harmonic mean of recall and precision, which indicates how well the classifier predicts.


### 5.4. Performance of Machine Learning Algorithms

The training performance of the machine learning algorithms on the DeepFire dataset in terms of accuracy, recall, precision, error rate, F1 score, and prediction accuracy is presented in Tables4 and 5.Table 4
Training performance of algorithms.
AlgorithmAccuracyKNN0.8651±0.0296NB0.8223±0.0311SVM0.9210±0.0088RF0.8868±0.0278LR0.9289±0.0113Table 5
Comparative evaluation of machine learning algorithms.
ModelTPTNFPFNPrediction AccuracyPrecisionRecallERF1KNN17515238150.86050.82150.92100.13940.8684NB14915337410.79470.80100.78420.20520.7924RF16617020240.88420.89240.87360.11570.8829LR17017317200.90260.90900.89470.09730.9017SVM17617119140.91310.90250.92630.08680.9158From Table5, it can be observed that all machine learning algorithms performed well for classification problems to discriminate fire and no-fire images in the dataset. From the results, it can be noticed that NB performs worst in classification for our newly created forest fire dataset compared to the other machine learning algorithms. It might be because our dataset has some close covariance in the features of images such as sunset on the mountain, sunlight on trees, and yellow leaves, which the classifier took as fire images instead of no-fire. The same happened with fire images labeled as belonging to the fire class. At the same time, the best performing algorithm is SVM with 0.9131 prediction accuracy, 0.9025 precision, and 0.9263 recall. Figure 5 shows the confusion matrices of machine learning algorithms for comparative study.Figure 5
Confusion matrix of (a) NB, (b) KNN, (c) LR, (d) RF, and (e) SVM.
(a)(b)(c)(d)(e)


### 5.5. Performance of the Proposed Approach

The proposed VGG19-based transfer learning approach has predicted the images based on the presence or absence of fire instances around the trees or mountainous areas. Moreover, the results confirm that the CNN-based approach has superiority over the machine learning algorithms in classifying the DeepFire dataset. Figure6 illustrates the confusion matrix of the proposed approach. It can be noted that the CNN-based approach has resulted in 179 TP and 182 TN while the falsely classified images are 11 and 8 belonging to the FN and FP, respectively.Figure 6
Confusion matrix of the VGG19-based transfer learning approach.We have also plotted the receiver operating characteristic (ROC) curve for the performance evaluation of the proposed approach. This graphical representation is achieved by plotting TPR against FPR by varying the prediction threshold. The FPR is the false-positive rate which is the probability of the false alarm when the ground truth is negative, and it is given by equation (3). The ROC curve shows the overall performance of the proposed method in classifying both the classes by varying the prediction thresholds. When there is a change in class distribution, the ROC curve has no change while PR curve does show the change. The proposed approach shows 0.9421 and 0.0421 TPR and FPR, respectively. Figure 7 shows the ROC curve and area under the curve (AUC) to be 0.9889, which means the model has a 98.89% chance to distinguish correctly between fire and no-fire classes.
(3)FPR=FPFP+TN.Figure 7
(a) ROC curve and (b) zoomed ROC curve (AUC).
(a)(b)We also have plotted the precision-recall curve, which is the graphical representation of recall on thex-axis and precision on the y-axis to evaluate the classification performance of the proposed approach. The precision-recall curve is different than the ROC curve because it does not include true negatives for evaluation. For forest fire detection system, it is important to detect fire which is the main aim of the system; the precision-recall curve gives clear pictures of how well the proposed method performs in classifying the fire. The curve in Figure 8 is closer to the upper right corner that means the proposed method has good performance in predicting the two classes. The proposed approach has 0.9572 precision and 0.9421 recall with 0.9496 F1 score.Figure 8
(a) Precision-recall curve and (b) its scaled representation.
(a)(b)The most crucial and integral part of the forest fire detection system is to keep minimum false classifications, showing the applicability and reliability of the VGG19-based transfer learning approach in the real world. The reason for misclassifications of images without fire (FP) might be due to the color of leaves that is too close or similar to that of fire, and the classifier misinterpreted them as fire images. It can be because of the lack or limited representation of such images with different angles in the training dataset. Observing the falsely classified fire images (FN), there could be multiple possibilities of fire being misclassified as no-fire images. The fire on top of the mountain gave a similar effect to sunlight at dawn on top of the mountain. Moreover, the fire color looked similar to autumn leaves. This might be due to two reasons: (1) the image quality can hinder accurate classification and (2) the lack of representation of similar images with different angles in the training dataset. We curated the DeepFire dataset by retrieving images from online resources where the spatial resolution of some images was very low. Further resizing the images to a common size also deteriorated the image quality.


### 5.6. Comparative Evaluation

The machine learning algorithms show promising results in the classification of the forest fire problem. While SVM has the best prediction accuracy of 0.9131 among the other considered machine learning algorithms, the LR shows the best precision of 0.9090. The proposed VGG19-based transfer learning approach achieves higher performance than the machine learning algorithms with 0.95 prediction accuracy, 0.05 error rate, 0.94 precision, and 0.96 recall. The comparative evaluation of the proposed approach with SVM and LR is presented in Table6.Table 6
Comparative evaluation.
MetricsLRSVMProposed approachPrediction accuracy0.90260.91310.9500ER0.09730.08680.0500Precision0.90900.90250.9572Recall0.89470.92630.9421F10.90170.91580.9496We have also compare the performance of our proposed approach on the DeepFire dataset with the previous works in the literature for forest fire classification. Table7 shows the comparative evaluation of the methods in terms of accuracy, true-negative rate (TNR), true-positive rate (TPR), false-negative rate (FNR), and false-positive rate (FPR). Our proposed VGG19-based transfer learning approach achieved the best accuracy of 0.9500 as compared to the other methods followed by Sun et al. with 0.9410 accuracy. The proposed approach on our DeepFire dataset shows better TPR and FNR as compared to other methods while the method proposed by Sun et al. has better TNR and FPR. The reason for the lower performance of our proposed approach in terms of TNR and FPR is the greater number of false positives.Table 7
Comparative evaluation with other works.
MetricsProposed approachSousaet al. [36]Govilet al. [37]Tanget al. [38]Sunet al. [39]Accuracy0.95000.93600.91200.92000.9410TPR0.94210.93130.8600—0.9063TNR0.95790.94070.9467—0.9718FPR0.04210.05930.0533—0.0282FNR0.05790.06870.1400—0.0937


## 5.1. Simulation Parameter Selection

The input for the proposed method was set to128×128 image size. We also performed k-fold cross-validation for different values of k varied from 1 to 10 to ensure the best performance results. After extensive testing, we selected the values of each parameter for training our proposed method specified in Table 3.Table 3
Simulation parameters.
ParametersValueInput size128×128k-fold10k neighbors in KNN5Kernel in SVMLinearNumber of estimators in RF100Logistic regression solverlbfgs


## 5.2. Feature Extraction

Machine learning algorithms require prior feature extraction before training on these algorithms. The method for feature extraction we used in our research is the pixel features. The image size is the product of its rows, columns, and channels. The number of pixels in an image is the same as the image size; therefore, the number of features in every image of our dataset is128×128×3, equal to 49,152 pixels or features.


## 5.3. Performance Metrics

The performances for correct classification of fire and no-fire images are evaluated using various metrics such as training accuracy, prediction accuracy, precision, recall, F1 score, and error rate. The metrics are defined as(2)Predictionaccuracy=TP+TNTP+TN+FP+FN,Precision=TPTP+FP,Recall=TPR=TPTP+FN,ER=FP+FNTP+TN+FP+FN,F1score=2∗precision∗recallprecision+recall.The algorithm identifiesTN and TP as true negatives (correctly classified as no-fire) and true positives (correctly classified as fire). False positive FP is that no-fire image labeled as fire, and false negative FN is that fire image classified as no-fire. ER is the error rate calculated by the false predicted images to the total testing images. Precision is the ratio of correct positive outcomes to positive outcomes predicted by the method where recall is the ratio of correct positive outcomes to all samples that should be predicted positive. F1score is the harmonic mean of recall and precision, which indicates how well the classifier predicts.


## 5.4. Performance of Machine Learning Algorithms

The training performance of the machine learning algorithms on the DeepFire dataset in terms of accuracy, recall, precision, error rate, F1 score, and prediction accuracy is presented in Tables4 and 5.Table 4
Training performance of algorithms.
AlgorithmAccuracyKNN0.8651±0.0296NB0.8223±0.0311SVM0.9210±0.0088RF0.8868±0.0278LR0.9289±0.0113Table 5
Comparative evaluation of machine learning algorithms.
ModelTPTNFPFNPrediction AccuracyPrecisionRecallERF1KNN17515238150.86050.82150.92100.13940.8684NB14915337410.79470.80100.78420.20520.7924RF16617020240.88420.89240.87360.11570.8829LR17017317200.90260.90900.89470.09730.9017SVM17617119140.91310.90250.92630.08680.9158From Table5, it can be observed that all machine learning algorithms performed well for classification problems to discriminate fire and no-fire images in the dataset. From the results, it can be noticed that NB performs worst in classification for our newly created forest fire dataset compared to the other machine learning algorithms. It might be because our dataset has some close covariance in the features of images such as sunset on the mountain, sunlight on trees, and yellow leaves, which the classifier took as fire images instead of no-fire. The same happened with fire images labeled as belonging to the fire class. At the same time, the best performing algorithm is SVM with 0.9131 prediction accuracy, 0.9025 precision, and 0.9263 recall. Figure 5 shows the confusion matrices of machine learning algorithms for comparative study.Figure 5
Confusion matrix of (a) NB, (b) KNN, (c) LR, (d) RF, and (e) SVM.
(a)(b)(c)(d)(e)


## 5.5. Performance of the Proposed Approach

The proposed VGG19-based transfer learning approach has predicted the images based on the presence or absence of fire instances around the trees or mountainous areas. Moreover, the results confirm that the CNN-based approach has superiority over the machine learning algorithms in classifying the DeepFire dataset. Figure6 illustrates the confusion matrix of the proposed approach. It can be noted that the CNN-based approach has resulted in 179 TP and 182 TN while the falsely classified images are 11 and 8 belonging to the FN and FP, respectively.Figure 6
Confusion matrix of the VGG19-based transfer learning approach.We have also plotted the receiver operating characteristic (ROC) curve for the performance evaluation of the proposed approach. This graphical representation is achieved by plotting TPR against FPR by varying the prediction threshold. The FPR is the false-positive rate which is the probability of the false alarm when the ground truth is negative, and it is given by equation (3). The ROC curve shows the overall performance of the proposed method in classifying both the classes by varying the prediction thresholds. When there is a change in class distribution, the ROC curve has no change while PR curve does show the change. The proposed approach shows 0.9421 and 0.0421 TPR and FPR, respectively. Figure 7 shows the ROC curve and area under the curve (AUC) to be 0.9889, which means the model has a 98.89% chance to distinguish correctly between fire and no-fire classes.
(3)FPR=FPFP+TN.Figure 7
(a) ROC curve and (b) zoomed ROC curve (AUC).
(a)(b)We also have plotted the precision-recall curve, which is the graphical representation of recall on thex-axis and precision on the y-axis to evaluate the classification performance of the proposed approach. The precision-recall curve is different than the ROC curve because it does not include true negatives for evaluation. For forest fire detection system, it is important to detect fire which is the main aim of the system; the precision-recall curve gives clear pictures of how well the proposed method performs in classifying the fire. The curve in Figure 8 is closer to the upper right corner that means the proposed method has good performance in predicting the two classes. The proposed approach has 0.9572 precision and 0.9421 recall with 0.9496 F1 score.Figure 8
(a) Precision-recall curve and (b) its scaled representation.
(a)(b)The most crucial and integral part of the forest fire detection system is to keep minimum false classifications, showing the applicability and reliability of the VGG19-based transfer learning approach in the real world. The reason for misclassifications of images without fire (FP) might be due to the color of leaves that is too close or similar to that of fire, and the classifier misinterpreted them as fire images. It can be because of the lack or limited representation of such images with different angles in the training dataset. Observing the falsely classified fire images (FN), there could be multiple possibilities of fire being misclassified as no-fire images. The fire on top of the mountain gave a similar effect to sunlight at dawn on top of the mountain. Moreover, the fire color looked similar to autumn leaves. This might be due to two reasons: (1) the image quality can hinder accurate classification and (2) the lack of representation of similar images with different angles in the training dataset. We curated the DeepFire dataset by retrieving images from online resources where the spatial resolution of some images was very low. Further resizing the images to a common size also deteriorated the image quality.


## 5.6. Comparative Evaluation

The machine learning algorithms show promising results in the classification of the forest fire problem. While SVM has the best prediction accuracy of 0.9131 among the other considered machine learning algorithms, the LR shows the best precision of 0.9090. The proposed VGG19-based transfer learning approach achieves higher performance than the machine learning algorithms with 0.95 prediction accuracy, 0.05 error rate, 0.94 precision, and 0.96 recall. The comparative evaluation of the proposed approach with SVM and LR is presented in Table6.Table 6
Comparative evaluation.
MetricsLRSVMProposed approachPrediction accuracy0.90260.91310.9500ER0.09730.08680.0500Precision0.90900.90250.9572Recall0.89470.92630.9421F10.90170.91580.9496We have also compare the performance of our proposed approach on the DeepFire dataset with the previous works in the literature for forest fire classification. Table7 shows the comparative evaluation of the methods in terms of accuracy, true-negative rate (TNR), true-positive rate (TPR), false-negative rate (FNR), and false-positive rate (FPR). Our proposed VGG19-based transfer learning approach achieved the best accuracy of 0.9500 as compared to the other methods followed by Sun et al. with 0.9410 accuracy. The proposed approach on our DeepFire dataset shows better TPR and FNR as compared to other methods while the method proposed by Sun et al. has better TNR and FPR. The reason for the lower performance of our proposed approach in terms of TNR and FPR is the greater number of false positives.Table 7
Comparative evaluation with other works.
MetricsProposed approachSousaet al. [36]Govilet al. [37]Tanget al. [38]Sunet al. [39]Accuracy0.95000.93600.91200.92000.9410TPR0.94210.93130.8600—0.9063TNR0.95790.94070.9467—0.9718FPR0.04210.05930.0533—0.0282FNR0.05790.06870.1400—0.0937


## 6. Conclusion

In this research work, we explored AI-based surveillance for forest fire detection. Forest fire poses a significant threat to the ecological and environmental system and the natural resources, impacting human lives. In this research, we proposed a UAV-based forest fire fighting system where UAVs with AI capabilities do continuous forest surveillance to detect fire. Further, we explained the detailed working mechanism and the key steps involved in executing the UAV-based forest fire fighting system. Besides, a robust forest fire detection system requires precise and efficient classification of forest fire imagery against no-fire. Moreover, we curated a new dataset (DeepFire) for the forest fire binary problem to help the prospective researchers in this domain. The DeepFire dataset consists of 1900 diverse colored images with 950 each for fire and no-fire classes. Further, we explored computer vision technology for forest fire classification based on machine learning algorithms and proposed the VGG19-based transfer learning approach. For DeepFire dataset classification, we evaluated and compared the performance of machine learning algorithms such ask-nearest neighbors (KNN), naïve Bayes (NB), random forest (RF), support vector machine (SVM), and logistic regression (LR) and the proposed VGG19-based transfer learning approach. The simulation results demonstrated that the proposed approach performed better than machine learning algorithms, achieving 95% prediction accuracy with 94.2% recall and 95.7% precision. Overall, the performance of the proposed approach on the DeepFire dataset showed promising outcomes for the forest fire classification. In the future work, we will improve the images in the DeepFire dataset in terms of spatial resolution and decrease the false alarms by proposing a CNN-based model for forest fire detection problem. Moreover, we will explore other transfer learning-based models on our DeepFire dataset in the future.



---

*Source: 5358359-2022-04-28.xml*