Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
53 views

Computer Vision Based Early Fire Detection Using Machine Learning

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
0% found this document useful (0 votes)
53 views

Computer Vision Based Early Fire Detection Using Machine Learning

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
You are on page 1/ 11

ABSTARCT

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 FIGURES viii

LIST OF TABLES ix

1 INTRODUCTION 1

1.1 OVERVIEW 1

1.2 PURPOSE OF MACHINE LEARNING 2

1.3 PROBLEM STATEMENT 2

1.4 OBJECTIVES 3

2 LITERATURE SURVEY 4

3 SYSTEM ANALYSIS 7

3.1 DRAWBACKS OF EXISTING SYSTEM 7

3.2 PROPOSED SYSTEM 7

3.3 SYSTEM REQUIREMENTS 8

3.3.1 HARDWARE REQUIREMENTS 8

3.3.2 SOFTWARE REQUIREMENTS 8

4 SYSTEM DESIGN 9

4.1 PROPOSED WORK 9

4.2 ARCHITECTURE DIAGRAM 11

4.3 DATA SET 13

4.4 ALGORITHMS AND METHODS 14

4.4.1 DECISION TREE 14

4.4.2 CNN 17

vi
5 SYSTEM IMPLEMENTATION 19

5.1 MODULES 19

5.1.1 PRE-PROCESSING OF AN IMAGE 19

5.1.2 SEGMENTATION OF AN IMAGE 20

5.1.3 FEATURE EXTRACTION OF AN IMAGE 21

5.1.4 MACHINE LEARNING CLASSIFIER 22

5.2 RESULTS AND DISCUSSION 23

5.2.1 RESULTS 23

5.3 EXPERIMENTAL RESULTS 29

6 CONCLUSION 31

6.1 CONCLUSION 31

6.2 FUTURE ENHANCEMENT 32

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.

1.2 Purpose of machine learning

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.

1.3 Problem statement

 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:

2.1 A Video-Based Fire Detection Using Deep


Learning Models
Abstract:

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

Computer Vision-Based Fire Detection


In conventional fire detection, much research has continuously focused on finding out
the salient features of fire images. Chen analyzed the changes of fire using an RGB
and HSI color model based on the difffference between consecutive frames and
proposed a rule-based approach for fire decision. Celik and Demirel proposed a
generic rule-based flame pixel classification using the YCbCr color model to separate
chrominance components from luminance ones. In addition, Wang extracted the
candidate fire area in an image using an HSI color model and calculated the
dispersion of the flame color to determine the fire area. However, color-based fire
detection methods are generally vulnerable to a variety of environmental factors such
as lighting and shadow. Borges and Izquierdo adopted the Bayes classifier to detect
fires based on additional features such as the area, surface, and boundary of the fire
area to color. Mueller proposed the neural network-based fire detection method using
optical flow for the fire area. In the method, two optical flow models are combined to
distinguish between fire and dynamically moving objects. In addition,
Foggia proposed a multi-expert system which combines the analysis results of a fire’s
color, shape, and motion characteristics. Although insufficient, the supplementary
features to color, including texture, shape, and optical flow, can reduce the false
detections. Nevertheless, these approaches require domain knowledge of fires in
captured images essential to explore hand-crafted features and cannot reflect the
information spatially and temporally involved in fire environments well. In addition,
almost all methods using the conventional approach only use a
still image or consecutive pairs of frames to detect fire. Therefore, they only consider
the short-term dynamic behavior of fire, whereas a fire has a longer-term dynamic
behavior.

Deep Learning-Based Approach


Recently, deep learning has been successfully applied to diverse areas such as object
detection/classification in images, speech recognition, and natural language
processing. Researchers have conducted various studies on fire detection based on
deep learning to improve performance. The deep learning approach has several
difffferences from the conventional computer vision-based fire detection. The first is
that the features are not explored by an expert, but rather are automatically
captured in the network after training with a large amount of diverse training data.
Therefore, the effort to find the proper handcrafted features is shifted to designing a
proper network and preparing the training data. Another difference is that the
detector/classifier can be obtained by training simultaneously with the features in the
same neural network. Therefore, the appropriate network structure becomes more
important with an efficient training algorithm. Sebastien proposed a fire detection
network based on CNN where the features are simultaneously learned with a
Multilayer Perceptron (MLP)-type neural net classifier by training. Zhang et al. also
proposed a CNN-based fire detection method which is operated in a cascaded fashion.
In their method, the full image is first tested by the global image-level classifier, and
if a fire is detected, then a fine-grained patch classifier is used for precisely localizing
the fire patches. Muhammad et al. proposed a fire surveillance system based on a fine-
tuned CNN fire detector. This architecture is an efficient CNN architecture for fire
detection, localization, and semantic understanding of the scene of the fire inspired by
the Squeeze Net In the deep layer of CNN, a unit has a wide receptive field so that its
activation can be treated as a feature that contains a large area of context information.
This is another advantage of the learned features with CNN for fire detection.Even
though CNN showed overwhelmingly superior classification performance against
traditional computer vision methods, locating objects has been another problem. In
the proposed method, we adopt the object detection model to localize the SRoFs and
non-fire objects, which includes the flame, smoke for the SRoFs, and other objects
irrelevant to the fire for the non-fire objects. The objects irrelevant to the fire increase
false alarms due to variations in shadows and brightness, and will often detect objects
such as red clothes, red vehicles, or sunset. We detect the fire objects by using the
Faster R-CNN model, even though it does not have to be confined to the object
detection model. The deep object detector, either single- or multi-stage, is usually
composed of CNN-type feature extractors, followed by a localizer with a classifier.
Therefore, our object detection model includes the feature extractor with a relatively
wider area of receptive field than the detected SRoF area and can gather more context
information.
Although the CNN-based approaches provide excellent performance, it is hard to
capture the dynamic behavior of fire, which can be obtained by recursive-type neural
networks (RNN). LSTM proposed by Hochreiter and Schmidhuber is an RNN model
that solves the vanishing gradient problem of RNN. LSTM can accumulate the
temporal features for decision making through the memory cells which preserve the
internal states and the recurrent behavior. However, the number of recursions is

You might also like