Docsity

Computer Vision Based Fire Detection: A Multi-Feature Approach, Papers of Computer Science

Toggle sidebar
bg1
Computer Vision Based Fire Detection
Nicholas True
University of California, San Diego
9500 Gilman Drive, La Jolla, CA 92093
Abstract
In this paper we use a combination of techniques to de-
tect fire in video data. First, the algorithm locates regions of
the video where there is movement. From these regions fire-
colored pixels are extracted using a perceptron. Lastly, we
use dynamic texture analysis to confirm that these moving,
fire-colored regions have the temporal and motion charac-
teristics of fire.
1. Introduction
Automatic fire detection devices have been around since
the first smoke alarm was invented by Francis Upton in
1890 [2]. After further technological advances in the mid
1960s reduced the price of smoke detectors, these devices
started showing up in buildings all over the world, becom-
ing the ubiquitous and essential devices that they are to-
day [2]. However, automated fire detection devices such
as smoke detectors have some significant limitations which
make them useless in many important situations. For in-
stance, smoke detectors, the most common type of fire de-
tection device, only work well in small enclosed spaces like
those find in homes and offices. However, in large open
spaces such as warehouses, atriums, theaters, and the out-
doors, smoke detectors are ineffective because they require
smoke to build up to sufficient levels to set them off. In open
spaces, the fire is usually out of control by the time smoke
has built up sufficiently to set off the alarm. Heat sensors
suffer from the same shortcomings as smoke detectors.
Video-based fire detection does not suffer from the space
constraints that smoke and heat detection do. Cameras can
detect and pinpoint fire from long distances as soon as the
fire starts, allowing the fire to be dealt with before it gets out
of control. Furthermore, cameras can cover very large ar-
eas, potentially mitigating their high cost compared to other
fire detection technologies. Video-based fire detection even
has the potential to be placed on mobile platforms such as
planes and robots.
2. Approach
Since fire is a complex but unusual visual phenomenon,
we decided upon a multi-feature-based approach for our al-
gorithm. The hope and the goal of such an algorithm is
to find a combination of features whose mutual occurrence
leaves fire as their only combined possible cause.
Fire has distinctive features such as color, motion, shape,
growth, and smoke behavior. For this project we focused on
features such as color and motion and we hope to include
additional feature analysis in future work.
Figure 1. The fire detection algorithm outline.
1234
To reduce the total computational load, the first step
of our algorithm is to perform frame differencing to get a
rough idea where motion occurred. The regions of the video
which are moving are fed to a fire color classification algo-
rithm.
There are a number of different ways of detecting fire-
colored pixels. In [15], the authors used a mixture of Gaus-
sian in the RGB color space to classify pixels as being fire-
colored or not. In [7], pixels whose color landed in a spe-
1faculty.ksu.edu.sa
2www.sumo1.com
3hubblesite.org
4cksinfo.com
pf3
pf4
pf5

Partial preview of the text

Download Computer Vision Based Fire Detection: A Multi-Feature Approach and more Papers Computer Science in PDF only on Docsity!

Computer Vision Based Fire Detection

Nicholas True

University of California, San Diego

9500 Gilman Drive, La Jolla, CA 92093

[email protected]

Abstract

In this paper we use a combination of techniques to de- tect fire in video data. First, the algorithm locates regions of the video where there is movement. From these regions fire- colored pixels are extracted using a perceptron. Lastly, we use dynamic texture analysis to confirm that these moving, fire-colored regions have the temporal and motion charac- teristics of fire.

1. Introduction

Automatic fire detection devices have been around since the first smoke alarm was invented by Francis Upton in 1890 [2]. After further technological advances in the mid 1960s reduced the price of smoke detectors, these devices started showing up in buildings all over the world, becom- ing the ubiquitous and essential devices that they are to- day [2]. However, automated fire detection devices such as smoke detectors have some significant limitations which make them useless in many important situations. For in- stance, smoke detectors, the most common type of fire de- tection device, only work well in small enclosed spaces like those find in homes and offices. However, in large open spaces such as warehouses, atriums, theaters, and the out- doors, smoke detectors are ineffective because they require smoke to build up to sufficient levels to set them off. In open spaces, the fire is usually out of control by the time smoke has built up sufficiently to set off the alarm. Heat sensors suffer from the same shortcomings as smoke detectors. Video-based fire detection does not suffer from the space constraints that smoke and heat detection do. Cameras can detect and pinpoint fire from long distances as soon as the fire starts, allowing the fire to be dealt with before it gets out of control. Furthermore, cameras can cover very large ar- eas, potentially mitigating their high cost compared to other fire detection technologies. Video-based fire detection even has the potential to be placed on mobile platforms such as planes and robots.

2. Approach

Since fire is a complex but unusual visual phenomenon, we decided upon a multi-feature-based approach for our al- gorithm. The hope and the goal of such an algorithm is to find a combination of features whose mutual occurrence leaves fire as their only combined possible cause. Fire has distinctive features such as color, motion, shape, growth, and smoke behavior. For this project we focused on features such as color and motion and we hope to include additional feature analysis in future work.

Figure 1. The fire detection algorithm outline. 1234

To reduce the total computational load, the first step of our algorithm is to perform frame differencing to get a rough idea where motion occurred. The regions of the video which are moving are fed to a fire color classification algo- rithm. There are a number of different ways of detecting fire- colored pixels. In [15], the authors used a mixture of Gaus- sian in the RGB color space to classify pixels as being fire- colored or not. In [7], pixels whose color landed in a spe- (^1) faculty.ksu.edu.sa (^2) www.sumo1.com (^3) hubblesite.org (^4) cksinfo.com

cific segment of the HSV color space were classified as be- ing fire colored. We decided to use a multilayer perceptron, like [9], to classify pixels as being fire colored or not. Spa- tial clustering and analysis is performed on the pixels that get classified as being fire colored. The next stage involves grabbing a short 50 to 100 frame sequence of the video focused and centered at each of these moving fire-colored regions. These short video sequences are then fed to a module which performs dynamic texture analysis it. The result is that the target region is either clas- sified as being fire or not.

2.1. Motion Detection

The first step for our algorithm is to find regions in the video stream where there is motion. This is done through frame differencing based on image intensity values. Given that flames often flicker and jump, the algorithm has a built in timer which keeps track how long it’s been since there’s been movement at a particular pixel. This helps ‘smooth’ out the results for the query, ‘where is there motion in the video’.

Figure 2. Original frame sequence.

Figure 3. motion detected by frame differencing.

2.2. Detecting Fire-Colored Pixels

To classify pixels as being fire colored or not, we decided to use a multilayer perceptron. The perceptron has two lay- ers, three input nodes for each of the color channels, and one node in the hidden layer. (Given that perceptrons are well described in the literature and known in many fields, I will forgo their description here.) At first glance one might say that fire color classification fails miserably because it tends to label lots of non fire pix- els as being fire. However, the goal of this first classifier is

Figure 4. Original image.

Figure 5. Red denotes pixels that were classified as being the color of fire.

to get a very high true positive rate and a low false negative rate, irregardless of the false positive rate. This is because the color classifier is the first in a sequence of classifiers whose job is to weed out the color classifier’s false posi- tives. Thus, these additional classification algorithms will help to reduce the overall false positive rate. One of the advantages of choosing a perceptron to per- form color classification is that it is easy to retrain. Given that the input images might be coming from different types of cameras with different levels of saturation and different color ranges, ease of retraining is an important feature. This way, it is easy to apply this technology to existing camera systems with a minimum amount of time and difficulty.

2.3. Motion + Color

The follow images are the result of passing the image through the motion detection module and then passing those results through the fire-color classifier. As you can see, these combined results are much more

where

D 1 =

[

Iτ − 1 0

]

, D 2 =

[

Iτ − 1 0 0 0

]

[5]. Thus, using the previous equations, one can compute the parameters of the dynamic texture model M = { A,ˆ Cˆ}.

2.4.3 Recognizing Different Dynamic Texture Models

The next step is to recognize different dynamic texture mod- els via a nearest neighbor (NN) classifier which is utilizing Martin Distance [11] as the means to compare dynamic tex- ture models. The intuition behind Martin Distance is to compare the subspace angles between extended observability matrices of two dynamic textures [4]. Put more formally, let Ma = {Aa, Ca} be the first dynamic texture model and let Mb = {Ab, Cb} be the second dynamic texture model. The square of the Martin Distance between the two models is defined to be

db(Ma, Mb) = − log

∏^ n

i=a

cosb^ θi

where θi are the angles between the extended observability matrices of Ma and Mb [4]. The 64 thousand dollar question is therefore, how does one compute θi? First let’s define the extended observability matrices of Ma and Mb to be

Oi =

Ci ATi Ci .. . (ATi )nCi .. .

where i = {a, b} and Oi ∈ R∞×n^ [4]. It turns out that cos θi for i= 1 , ..., n are just the n largest eigenvalues found by solving the generalized eigenvalue problem [ 0 Oab OabT 0

] [

x y

]

= λ

[

Oaa 0 0 OTbb

] [

x y

]

subject to xT^ Oaax = 1 and yT^ Obby = 1 where

Opq = OTp Oq =

∑^ ∞

j=

(CpAjp)T^ Cq Ajq

for some dynamic texture models p and q [4]. At this stage it is handy to note that infinite sums of the form

X =

∑^ ∞

j=

Aj^ Q(Aj^ )T

can also be written as

Xj = AXj− 1 A + QT

where in steady state the equation becomes

X = AXA + QT

But this is just the Lyapunov equation [1] and can be solved in Matlab using the function dlyap.m. Thus, all one has to do to compute the Martin Distance between Ma and Mb is to compute the extended observabil- ity matrices, solve the generalized eigenvalue problem, take the largest n eigenvalues, and compute the Martin Distance. With this distance metric, a nearest neighbor algorithm can be used to classify dynamic texture models as being that of fire or not.

3. Data

The training and testing videos for this project were cre- ated using a Canon PowerShot A540 digital camera. All of the videos are 320×240 and 15fps. We chose such a low power, low resolution camera in an attempt to simulate the poor quality of many CCTV camera networks that this al- gorithm might be applied to. The data sets consist of indoor, outdoor, day, and night video sequences with a variety of lighting conditions and distances to the fire in the video. There are 41 training videos and 26 test videos. We manually created 141 segmented fire videos and 48 segmented non-fire videos for dynamic texture training. We also created 67 segmented fire videos and 24 segmented non-fire videos to test the dynamic texture algorithm.

Figure 8. Segmented fire videos.

Figure 9. Segmented non-fire videos.

It is important to note that the training and testing seg- ments were created from the raw training and testing video sets. Furthermore, there are no overlapping frame se- quences in either the segmented training or testing data. However, all of the videos were created in similar settings and lighting situations. Thus, the following results say noth- ing about this particular algorithms ability to generalize to as yet unseen and unknown situations. However, given that the algorithm is based on a nearest neighbor classifier, the larger and more varied the training the better.

4. Results

The following are the results for the dynamic texture classification part of the algorithm. The results are inde- pendent of the color classification or motion detection algo- rithms.

Non-Fire Fire Combined Correctly Classified 33% 97% 80%

5. Analysis

As we can see, the results for the dynamic texture classi- fication algorithm are good and reasonably consistent with past results in the literature. It is encouraging to know that through the use of a kernelized dynamic texture classifica- tion method such as the one proposed in [3], it is possible to achieve up to a 97.5% correct classiciation rate. One thing that stood out were the poor results in clas- sifying non-fire video segments correctly. Given that the algorithm in question is a nearest neighbor classifier and

given that these results are based off of a very small training set with an even smaller training subset of only 48 non-fire video sequences, it is reasonable to expect that the results could improve significantly from a more training examples. There is an old adage that goes, where there’s smoke there’s fire. Due to time limitations, we were unable to take advantage of this bit of wisedom. However, we can safely say that our accuracy could be significantly improved by the inclusion of a smoke feature detection algorithm which would bolster the current flame detection algorithms.

6. Conclusion In conclusion, this paper demonstrates a multi-feature classification approach to detecting fire in video data. Fur- thermore, we introduce the concept of dynamic texture anal- ysis to the existing body of video-based fire detection re- search and show that it works well in concert with other tried and true fire feature detection algorithms. In our future work we will endeavor to incorporate smoke detection algorithms and fire reflection detection al- gorithms into our current algorithm. Furthermore, we will explore different ways of combining the different feature detection algorithms such as by using a Bayesian belief net- work or a boosting algorithm to improve the overall results. 7. Acknowledgments

I would like to thank Antoni Chan and Serge Belongie for all their help and advice on this project! And remember, only you can prevent forest fires. But for the times that you can’t, bring marshmallows!

References [1] Lyapunov equation. wikipedia.org. 4 [2] Smoke detector. wikipedia.org. 1 [3] A. Chan and N. Vasconcelos. Classifying video with kernel dynamic textures. Computer Vision and Pattern Recogni- tion, 2007. CVPR ’07. IEEE Conference on , pages 1–6, June

  1. 3, 5 [4] K. D. Cock, K. D. Cock, B. D. Moor, and B. D. Moor. Sub- space angles between linear stochastic models. In In Proc. the 39th IEEE Conference on Decision and Control , pages 1561–6, 2000. 4 [5] G. Doretto, A. Chiuso, Y. N. Wu, and S. Soatto. Dynamic textures. 51(2):91–109, 2003. 3, 4 [6] G. Doretto, D. Cremers, P. Favaro, and S. Soatto. Dynamic texture segmentation. volume 2, pages 1236–1242, Nice, France, Oct. 2003. 3 [7] J. Elbert and J. Shipley. Computer vision based method for fire detection in color videos. 1 [8] R. Hecht-Nielsen. Perceptrons. Imprints, 2008. [9] W.-B. Horng and J.-W. Peng. Image-based fire detection us- ing neural networks. In Joint Conference on Information Sci- ences. Atlantis Press, 2006. 2