406 2.forest Fire Detection Using Machine Learning
406 2.forest Fire Detection Using Machine Learning
Abstract: - Detection of forest fire should be fast and ● loss of biodiversity and extermination of flora
accurate as they may cause damage and destruction and fauna
at a large scale. Recently, Amazon forest confronted
a devastating forest fire which remained obscured ● loss of wildlife habitation and exhaustion of
for over 15 days. Hence resulting in huge loss of wildlife
ecosystem and adversely affecting the global ● global warming
conditions. As the technology is developing, Wireless
The forest fire has become a threat to not only to the
Sensor Networks (WSN) is gaining importance in
forest wealth but also flora and fauna and ecology of the
recent research areas as it has shown its usefulness
environment of the region. The main cause of forest fires
in warning disasters and save lives[1]. As soon as an
can be categorized under natural and man-made classes.
unusual event is noticed in the networks, an event is
High atmospheric temperature, lightening and dryness
detected through the sensor devices placed at
(low humidity) offer positive environment for a fire to
distributed locations. This event detection
start which are the natural causes for forest fire. The fire
information is passed to the base station and decision
is also caused by Man-made sources like naked flame,
is taken. Due to the static configuration of such
cigarette, electric spark, etc [3].
sensor data in WSN generally lead to false alarm
Forest fire poses a great threat as they remain unnoticed
generation [2]. In such a scenario we can use
for a long period till the effects comes to city. WSN is a
machine learning algorithms to prevent false alarm
technology which can be employed in real time to detect
since they get configured efficiently in dynamic
or predict such hazards. . A WSN generally consists of
nature, that too automatically .Therefore for
spatially disseminated autonomous sensors to keep
eliminating the static essence of WSN, we present a
watch on physical or environmental conditions such as
machine learning algorithm imbibed with WSN. In
temperature, sound, pressure, CO, CO2, smoke or
this paper, we propose a decision tree machine
pollutants etc. and transfer the data to base station. WSN
learning approach for detecting events.
consists of hundreds of nodes. Each sensor node is
Keywords-- PIC Microcontroller, Speed, Distance, capable of sensing, computing and communicating. Each
L293D Motor Driver, Ultrasonic sensor, LED Display, sensor node has several elements which are a)
microcontroller, b) interfacing circuit of sensors, and c)
Buzzer.
battery (energy source). Through the
I INTRODUCTION intercommunication between these nodes and the base
station, the message of event detection is reported.
Forest fires are a matter of concern because they cause Event detection by WSN can be used in various
extensive damage to environment, property and human applications requiring spatially disseminated sensor
life. Hence, it is crucial to detect the forest fire at an nodes to transmit information about events to the base
earlier stage. This can help in saving flora and fauna of station at particular periods as the event is detected. The
the region along with the resources. Also, it may help to performance of event detection methodology will rely on
control the spread of fire at initial phase. The task of the hardware and software capabilities of the small yet
monitoring the forests is difficult because of the vast powerful nodes placed in robust environment [5].
territory and dense forest. In this paper we propose a decision tree machine
The wide ranging adverse ecological, economic and learning approach for event detection. Various models
social impacts of forest fires including forest have been generated. The performance of the proposed
degradation are: approach is determined in terms of complexity and
● loss of valuable wood resources accuracy [4].
● deterioration of catchment areas
WWW.IJASRET.CO 1
Volume 4 || Special Issue 12 || ICCEME 2019-2020 || ISSN (Online) 2456-0774
INTERNATIONAL JOURNAL OF ADVANCE SCIENTIFIC RESEARCH
AND ENGINEERING TRENDS
II OBJECTIVES
IV PRESENT SCENARIO
The objective of the project is:
● To devise an algorithm which can help to detect forest In these days numbers of approaches have been proposed
fire in its early stage. by various researchers which deal in distributed event
Internet detection by using WSN. The primary idea for
● To implement forest fire detection system using small detection of event is to define a threshold value for given
and cheap sensor nodes. parameters like temperature, pressure etc [4]. An alarm
● To make the probability of false alarms reduced. or signal is generated when major difference is recorded
between threshold value and sensor recorded value.
● To build a system which is energy efficient in
Another type of Base Station Sensors methodology in
distributed environment and also efficient in
performance. event detection makes use of pattern matching or
machine learning techniques. Pattern matching is
III LITERATURE SURVEY conducted at the base station of the sensor networks in
order to make the decision.
Forest fire detection and prevention are real problems
Support Vector Machines, feed forward Neural
faced by a number of countries. Different methods have
Networks and Naive Bayes method are few approaches
been stated for monitoring the emergence of fires.
which have been proposed by various researchers for
A. Watch Towers event detection on individual sensor nodes. The Cougar
In earlier days, the forest fires were detected by manual approach uses declarative queries to get back the
observations with watch towers installed in the isolated information from WSN. In this approach each individual
areas of forest. Though this method was accurate, it was node process the data before sending back the fetched
not preferred due to manual restrictions. information to the base station .A query outputs data into
a tabular form that represents the gathered data in the
B. Satellite—Based Systems specified time quantum. Whole operation is applied on
Earth orbiting satellites have been used for detection of the data transferred to the base station. Later an
forest fires. Unfortunately, these satellites can provide improvement was done by giving an array of algorithms
the images of regions of the earth’s surface every two that efficiently measures the join queries over static data
days which is a very long time for fire scanning. Also in the network.
the weather conditions can affect the quality of satellite Approaches discussed above mark the problem of
images. collection of data to process offline from various sensor
C. Optical Sensors and Digital Camera nodes located at distant locations and introduced the
techniques for storing data online for later use [4].
The use of optical sensors only provides a line of sight
vision, where the vision can be blocked by high trees or V SYSTEM SPECIFICATIONS
hills. The Camera surveillance systems were also
A. Hardware Specifications
inefficient for forest fire detection because of short
distance ranges. 1) MQ2 Gas Sensor
D. Wireless Sensor Networks 2) DHT22 Humidity and Temperature Sensor
3) NodeMCU ESP8266 Microcontroller
The sensors sense physical as well as chemical
parameters. The sensors can operate in a self-healing
TABLE 1 HARDWARE SPECIFICATIONS
and self-organizing wireless networking environment.
The major problem with this system is that there are Sr. Component Specifications
high chances of false alarms due to lack of proper No. Name
processing of the sensor data. 1. MQ2 Gas Operating Voltage: 5V
In this paper, we propose a method which processes the
Sensor Preheat Duration: 20 seconds
sensor data to predict fire accurately. The sensor nodes
Sensitivity of Digital pin can be
are provided with Wi-Fi devices and tested on grassy
varied using potentiometer.
areas to sense temperature, humidity, pressure and
Detection Gas: Hydrogen, CO,
various other physical parameters and send this data
methane, Alcohol etc.
back to the base station. At the base station, the data is
The enveloped MQ2 have 6
processed by a machine learning agent to give alarm.
pins, 4 of them are used to
fetch signals, and other 2 used
for providing heating current.
WWW.IJASRET.CO 2
Volume 4 || Special Issue 12 || ICCEME 2019-2020 || ISSN (Online) 2456-0774
INTERNATIONAL JOURNAL OF ADVANCE SCIENTIFIC RESEARCH
AND ENGINEERING TRENDS
WWW.IJASRET.CO 3
Volume 4 || Special Issue 12 || ICCEME 2019-2020 || ISSN (Online) 2456-0774
INTERNATIONAL JOURNAL OF ADVANCE SCIENTIFIC RESEARCH
AND ENGINEERING TRENDS
outputs, and the algorithm must find a method to
then split the dataset according the values of these
determine how to reach at those inputs and outputs. In
features such that the target feature values are as pure as
our experiments, we compared two algorithms namely
possible at the resulting nodes. The most informative
Support Vector Machine (SVM) and Decision Tree. feature separates the uncertainty from information
1) Support Vector Machine (SVM) — In the SVM about the target feature. The search process for a most
algorithm, we have to maximize the margin between informative feature goes on until we end up with pure
the data points and the hyper plane. The hinge loss leaf nodes. To decide more informative feature in our
helps to maximize the margin [7]. dataset we have used attribute Gini index.
(3)
The loss function for SVM
(4)
Gradients
The model accurately predicts the class of data
points i.e. no misclassification, from regularization
parameter we have to update only gradient.
(5)
Gradient Update—No misclassification
(6)
Gradient Update—Misclassification
2) Decision Tree Classification – The main idea of a
decision tree is to identify the features which contain
WWW.IJASRET.CO 4
Volume 4 || Special Issue 12 || ICCEME 2019-2020 || ISSN (Online) 2456-0774
INTERNATIONAL JOURNAL OF ADVANCE SCIENTIFIC RESEARCH
AND ENGINEERING TRENDS
Gini Index= 1— (P(x=k))2 (7)
WWW.IJASRET.CO 5
Volume 4 || Special Issue 12 || ICCEME 2019-2020 || ISSN (Online) 2456-0774
INTERNATIONAL JOURNAL OF ADVANCE SCIENTIFIC RESEARCH
AND ENGINEERING TRENDS
VIII RESULT
A. SVM Algorithm
The result of SVM algorithm is discussed below:
No Fire
Fire Present
The classification report generated by the SVM Figure 6 Classification Report for Decision Tree
algorithm gives an idea about accuracy of the algorithm.
The decision tree model’s accuracy is 99%.
C. Calculations
Parameters calculated to check performance of
algorithms
a. Accuracy – Accuracy can tell us immediately
whether a model is being trained correctly.
(8)
(9)
Figure 4 Classification Report for SVM
The accuracy of the model is 62%. c. Recall – Recall helps when the cost of false
negatives is high.
B. Decision Tree Algorithm
The model generated by this algorithm is as follows: (10)
WWW.IJASRET.CO 6
Volume 4 || Special Issue 12 || ICCEME 2019-2020 || ISSN (Online) 2456-0774
INTERNATIONAL JOURNAL OF ADVANCE SCIENTIFIC RESEARCH
AND ENGINEERING TRENDS
d. F1 score – F1 is an overall measure of a
model’s accuracy that combines precision specific meteorological data in the dataset for generating
and recall. model for prediction. The nodes can be improved by
making them efficient enough to have a better sensing
distance, resistant to the harsh forest conditions, energy
efficient. A focused research can be done in devising
ways of forest coverage with the nodes.
(11)
ACKNOWLEDGMENT
IX PERFORMANCE EVALUATION
We express our sincere gratitude towards the faculty
In this project, as of now, we have worked with two members who made this project successful. We would
different machine learning models. We calculated like to express our thanks to our guide Prof.Anjali
the accuracy of these models. The comparison of Askhedkar for her whole hearted co-operation and
these models is as follows: valuable suggestions, technical guidance throughout the
project work. Special thanks to our H.O.D. Prof.Sunil
SVM Decision Tree Somani for his kind official support and encouragement.
Accuracy 0.62 0.99 We are also thankful to our project co-coordinator
Precision 0 0.54 0.98 Prof.R.D.Komati for his valuable guidance. Finally, we
Precision 1 0.76 1 would like to thank all staff members and faculty
members of E&TC Department who helped us directly
Recall 0 0.78 0.99
or indirectly to complete this work successfully.
Recall 1 0.51 0.98
WWW.IJASRET.CO 7
Volume 4 || Special Issue 12 || ICCEME 2019-2020 || ISSN (Online) 2456-0774
INTERNATIONAL JOURNAL OF ADVANCE SCIENTIFIC RESEARCH
AND ENGINEERING TRENDS
Computer Science and Engineering New Mexico
Tech Socorro, USA {hss, ksudan,
amishra}@nmt.edu
[7]https://towardsdatascience.com/support-vector-
machine-introduction-to-machine-learning-
algorithms- 934a444fca47
[8]https://s3.amazonaws.com/baypath/files/resources/m
achine-learning-primer-108796.pdf
[9]https://www.sas.com/es_pe/insights/articles/analytics
/machi ne-learning-algorithms-guide.html
[10]http://www.aun.edu.eg/suger/project/projectobjout.
htm
[11] https://sites.google.com/a/stanford.edu/rcpedia/jupy
ter-notebook
[12] https://blog.clairvoyantsoft.com/entropy-
information-gain-and-gini-index-the-crux-of-
a- decision-tree-99d0cdc699f4
WWW.IJASRET.CO 8