Computer Vision Based Early Fire Detection Using Machine Learning
Computer Vision Based Early Fire Detection Using Machine Learning
The project aimed to detect fire by using the image processing technology that will
alert people by early detection of fire. As there are many automatic fire alarm
systems already existed like the sensor method, that has some limitations and
designed to sense fire with the smoke, limited areas. To reduce limitations and to
optimize with new technology, the project is proposed. The project is implemented by
using pycharm IDE and to connect the webcam as hardware.Webcam is taken as an
input source, which captures the video feed from the surrounding and feeds into the
system for analysis. The entire code is written in pure python language using the
open CV library for image processing. The theoretical parts emphasize more in
computer vision, machine learning, image processing, color model, and the working
algorithm of the project to detect the fire. The project gives a better understanding of
object detection with the computer and the use of these technologies in different
forms and uses.
TITLE PAGE
NUMBER NUMBER
ABSTRACT v
LIST OF TABLES ix
1 INTRODUCTION 1
1.1 OVERVIEW 1
1.4 OBJECTIVES 3
2 LITERATURE SURVEY 4
3 SYSTEM ANALYSIS 7
4 SYSTEM DESIGN 9
4.4.2 CNN 17
vi
5 SYSTEM IMPLEMENTATION 19
5.1 MODULES 19
5.2.1 RESULTS 23
6 CONCLUSION 31
6.1 CONCLUSION 31
REFERENCES 33
APPENDIX 35
A. SOURCE CODE 35
Chapter 1
1.1 INTRODUCTION
Computer Vision based fire detection using image processing has the potential to be
useful in conditions in which conventional methods cannot be adopted. The fire
detection algorithm uses visual characteristics of fires like brightness, color, spectral
texture, spectral flicker, and edge trembling to discriminate them from other visible
stimuli.There are various fire detection techniques such as infrared sensor, a thermal
detector, smoke detector, flame detector, and optical smoke detector. These methods
are not always reliable as they do not always detect the fire itself but detect one or
more phenomena resulting from fire, such as smoke, heat, infrared, ultraviolet light
radiation or gas, which could be produced in other ways and hence, produces many
false alarms.By the help of computer vision and image processing techniques, it is
possible to get better results than conventional systems because images can provide
more reliable information. In recent times, research on detection of flame and smoke
using surveillance cameras with machine vision has gained momentum. The image
processing approach involves the extraction of the smoke-plume or flame from the
background by using frame difference technologies. In the case of the segmentation of
fire features, color processing scores over gray-scale processing. Color processing can
avoid the generation of false alarms due to variations in the lighting conditions, e.g.
natural background illumination, better than gray-scale processing. Further, a video
camera is a volume sensor, and potentially monitors a larger area. The traditional
point sensor looks at a point in space. Since the point sensor may not be affected by
smoke or flame, fire would be undetected. However, vision-based flame and smoke
detection still has great technical challenges, since flame and smoke are
non-rigid objects, with none of the primitive image features and variability in density,
lighting, etc.
Machine learning (ML) is a type of artificial intelligence (AI) that allows software
applications to become more accurate at predicting outcomes without being explicitly
programmed to do so. Machine learning algorithms use historical data as input to
predict new output values. an algorithm would be trained with pictures of dogs and
other things, all labeled by humans, and the machine would learn ways to identify
pictures of dogs on its own. Supervised machine learning is the most common type
used today.
The main motivation for fire prediction is to provide proper resource allocation
and to help in best possible way to firefighters of Fire Management team.
The main factors of fire are Meteorological conditions. the climatic information is
gotten from nearby sensors which are fused in the closest meteorological stations.
Land with a possible high fire risk has many indicators that can be used to
measure the forecast by closely evaluating the indications.
Every year, fire destroys millions of hectares of land. These fires have burned
vast areas and generate more carbon monoxide than total vehicle traffic.
Monitoring potential danger areas and early warning of fire can greatly reduce
response time, as well as the potential for damage and firefighting costs.
1.4 Objective
The four ways your fire alarm system works to protect your property and its
occupants from the dangers of fire are by detecting fire, alerting occupants, managing
risk, and notifying the fire department.
Chapter 2
LITERATURE REVIEW:
Fire is an abnormal event which can cause significant damage to lives and property.
In this paper, we propose a deep learning-based fire detection method using a video
sequence, which imitates the human fire detection process. The proposed method uses
Faster Region-based Convolutional Neural Network (R-CNN) to detect the suspected
regions of fire (SRoFs) and of non-fire based on their spatial features. Then, the
summarized features within the bounding boxes in successive frames
are accumulated by Long Short-Term Memory (LSTM) to classify whether there is a
fire or not in a short-term period. The decisions for successive short-term periods are
then combined in the majority voting for the final decision in a long-term period. In
addition, the areas of both flame and smoke are calculated and their temporal changes
are reported to interpret the dynamic fire behavior with the final fire decision.
Experiments show that the proposed long-term video-based method can
successfully improve the fire detection accuracy compared with the still image-based
or short-term video-based method by reducing both the false detection's and the
misdetections.
Introduction
Fire is an abnormal event which can quickly cause significant injury and property
damage. According to the National Fire Protection Association (NAPA), the United
States fire department responded to an estimated 1,319,500 fires during 2017, which
resulted in 3,400 civilian fire fatalities, 14,670 civilian fire injuries, and an estimated
$23 billion in direct property loss. In order to reduce such disasters, fire detection
without a false alarm at an early stage is crucial. Accordingly, various automatic fire
detection technologies are being developed, and are widely used in real life. In
general, two broad categories of technologies can be identified: traditional fire alarm
and fire detection by computer vision. Traditional fire alarm technology is based on
smoke or heat sensors that require proximity for activation. These sensors need
human involvement to confirm a fire in case of alarm. Furthermore, such systems
require various equipment to provide information on the size, location, and burning
degree of the fire. To overcome these limitations, researchers have been investigating
computer vision-based methods combined with various types of supplementary
sensors. This category of technologies gives larger surveillance coverage and offers
the advantage of less human intervention with a faster response, as a fire can be
confirmed without requiring a visit to the fire location, and provides detailed fire
information such as location, size, and degree. Despite these advantages, however,
some issues remain concerning the system complexity, and false detection according
to diverse reasons. Therefore, researchers have invested significant effort to address
these issues in terms of computer vision technology. Early research on computer
vision-based fire detection was focused on the color of a fire within the framework of
a rule-based system, which is often sensitive to environmental conditions such as
illumination and weather. So, further studies added supplementary features to the
color of a fire, including area, surface, boundary, and motion of the suspected region,
with other types of decision-making algorithms, such as Bayes classifier and multi-
expert systems, in order to make a robust decision. Nevertheless, almost all the
research tries to detect the flame and smoke in a single frame of Closed-Circuit
Television (CCTV) or a limited number of frames in a short period. In general, it is
not an easy task to explore the static and dynamic characteristics of diverse flame and
smoke to be exploited in a vision system, as it requires a large amount of domain
knowledge. In the deep learning approach however, these exploration and exploitation
processes can be replaced by the training of an appropriate neural network with a
sufficient amount of data in order to avoid overfitting. This approach, therefore,
becomes convenient once a dataset with many flame and smoke images or video clips
has been built. In this paper, we propose a deep-learning-based fire detection method,
which imitates the human detection process and which we call the detection and
temporal accumulations (DTA) for the fire decision. Usually, a human can detect a
suspected fire object in a scene, continuously monitor it, and accumulate the temporal
behaviors to finally decide whether it is a fire or not. We assume that this DTA
process can greatly reduce erroneous fire detection. In the proposed method, the
suspected region of fire (SRoF) is detected with its spatial features against non-fire
objects by the Faster Region-based Convolutional Neural Network (R-CNN). Then,
the features summarized from the object detection model in successive frames are
accumulated by Long Short-Term Memory (LSTM) to classify whether there is a fire
or not in a short-term period, which can be treated as a person’s glance for fire
detection. The decisions for successive short-term periods are then combined in the
majority voting for the final decision in a long-term period. In addition, the areas of
SRoFs, including both flame and smoke, are calculated and their temporal changes are
reported to interpret the dynamic fire behavior with the final fire decision.
Experiments show that the proposed long-term video-based method can successfully
improve the fire detection accuracy compared with the still image-based or short-term
video-based method by reducing both the false detections and the misdetections. The
method discriminates fires from fire-like video sequences especially well. For
example, chimney smoke, sunset, and clouds often induce errors in conventional
computer vision-based fire detection. Also, the method reflects the temporal behavior
of real fire situations well by providing area information of SRoFs. Therefore, our key
contributions can be summarized as follows:
(1) We propose a deep learning-based fire detection method that avoids the time-
consuming efffforts to explore hand-crafted features. Because it automatically
generates a set of useful features after training, it is sufficient to construct the proper
deep learning model and to gather a sufficient amount of training data. Therefore, we
have constructed a large fire dataset which contains diverse still images and video
clips, including the data from well-known public datasets. Not only is the dataset used
for the training and testing of our experiment, but it also could be an asset for future
computer vision-based fire detection research.
(2) Our deep learning-based method emulates a human process of fire detection called
DTA, in that SRoFs are detected in one scene and the temporal behaviors are
continuously monitored and accumulated to finally decide whether it is a fire or not.
In the method, Faster R-CNN is used to detect SRoFs against non-fire objects with
their spatial features, and LSTM temporally accumulates the summarized spatial
features by using the weighted Global Average Pooling (GAP), where the weight is
given by the confidence score of a bounding box. The initial decision is made in a
short period, and the final decision is made by the majority voting of the series of
decisions in a long period.
(3) The proposed method has been experimentally proven to provide excellent fire
detection accuracy by reducing the false detections and misdetections. Also, it
successfully interprets the temporal SRoF behavior, which may reduce false dispatch
of firemen
Related Work