Fire Detection Using Deep Learning R.gh5
Fire Detection Using Deep Learning R.gh5
Abstract: From sprawling urbans to dense jungles, fire accidents pose a major threat to the world. These could be prevented by
deploying fire detection systems, but the prohibitive cost, false alarms, need for dedicated infrastructure, and the overall lack of
robustness of the present hardware and software-based detection systems have served as roadblocks in this direction. In this work,
we endeavor to make a stride towards detection of fire in videos using Deep learning. Deep learning is an emerging concept based
on artificial neural networks and has achieved exceptional results in various fields including computer vision. We plan to overcome
the shortcomings of the present systems and provide an accurate and precise system to detect fires as early as possible and capable
of working in various environments thereby saving innumerable lives and resources.
Key Words: - Fire accidents, Fire detection, Surveillance video, Machine learning, Deep Learning, Transfer Learning.
classifier. The transfer learning algorithms used were Source/input data which is in the form of videos is
Xception, Inception V3, ResNet-50, trained in ImageNet. In split into frames and preprocessed to convert it into a format
the first approach, accuracy up to 96% was achieved. The that is suitable to be fed as input to pre-built models for feature
second approach, stacking Xgboost and lightbgm achieved an extraction. The deep learning model returns a feature vector
AUC of 0.996. Transfer learning models greatly reduces the which is also known in transfer learning terminology as
training time required for our model. It requires bottleneck features.
comparatively smaller data set. Both approaches don't require
any sort of domain knowledge. In works [7] and [8], Deep
CNN approach was taken to detection and localization of
fires. The accuracy obtained was between 90 to 97% in both
of these papers. This approach is time consuming and training
was performed using Nvidia GTX Titan X with 12 GB of
onboard memory.
IV. METHODOLOGY 97.46% and 97.66% respectively. Hence this would be used
in our application.
The model is divided into two parts
Table.1: Performance evaluation results of different model
1. Data Collection and Pre-processing. combinations
2. Building fire detection model by Transfer Network Algorithm Accuracy Precision Recall
Learning. Decision
94.78% 93.98% 94.44%
Tree
The first step is to gather video frames for the
Naïve
problem statement. The dataset has 2 classes - fire and non- Bayes
93.17% 91.92% 92.98%
Resnet 50
fire. Positive samples consist of images with real fire. False
Positives consists of images which have objects that look Logistic
97.73% 97.30% 97.66%
Regression
like fire but are not. False positives are easier to collect.
Thus, we need to collect diverse video frames which will SVM 97.80% 97.46% 97.66%
help better fire detection. The collected dataset is divided into Decision
90.51% 89.59% 89.25%
train and test video frames. The dataset currently has 1678 Tree
fire images/video frames and 1368 that of non-fire sourced Naïve
from google since there is no standard data set available. Inception- 94.32% 91.75% 95.97%
Bayes
Net V2
Logistic
The second step is to use various available pre- Regression
96.81% 96.23% 96.71%
trained models in Keras to extract the video frame features.
SVM 96.25% 94.71% 97.07%
The pre-trained models are trained on very large-scale video
frames classification problems. The convolutional layer’s Decision
92.58% 92.07% 91.37%
act as feature extractor and the fully connected layers’ act as Tree
Classifiers. Since these models are very large and have seen Naïve
Inception 94.71% 92.63% 96.19%
a huge number of images, they tend to learn very good, Bayes
V3
discriminative features. In order to do extract, the video Logistic
frames feature we remove the last layer i.e. fully connected 97.17% 96.53% 97.22%
Regression
layer. This provides us with a feature vector. The feature
SVM 96.51% 95.36% 97.00%
vector sizes differ from model to model. The central concept
of Transfer Learning is to use a more complex but successful
pre-trained DNN model to transfer its learning to our more
simplified problem. Instead of creating and training deep V. RESULTS AND DISCUSSION
neural nets from scratch (which takes significant time and The aim of our work was to develop to an application
computing resources), we use the pre-trained weights of capable of detecting fire in videos and images, which is robust
these deep neural net architectures (trained on ImageNet) and works in any environment. In this regard, we have
and use it for our own dataset. We have used ResNet-50, experimented with various deep learning models and
InceptionV3 and InceptionResNetV2. models to extract the classification models and have selected ResNet-50-SVM
features and various ML algorithms [SVM, Logistic combination for implementation as it offered the best
Regression, Naive Bayes and Decision Tree] on the performance metric values (Accuracy, Precision and Recall
extracted features to detect fire in video frames. values for this combination was 97.8%, 97.46% and 97.66%
respectively). An email alert feature has also been
All the possible feature-extractor and classifier combinations incorporated to our application to provide real time alerts to
were evaluated using stratified K-fold validation. Table 1 the concerned stakeholders along with a logging system,
shows the obtained performance metric values for different which is implemented using Firebase. The GUI offers a user-
combinations of deep learning networks and classifier friendly experience and allows user with non-technical
algorithms. The best performance was observed with ResNet- background to make use of the application. The application
50 as the deep learning feature extraction model and Support performed exceptionally well during testing. It was able to
Vector Machine as the ML classifier and the Accuracy, identify fires in all of the twelve test fire videos but
Precision and Recall values for this combination was 97.8%, misclassified some instances of non-fire videos.
3
International Journal of Progressive Research in Science and Engineering
Volume-1, Issue-5, August-2020
[Link]
machines having better processing power compared to sequences,” The 26th Chinese Control and Decision
existing one of which it has been developed. Conference (2014 CCDC), Changsha, 2014, pp. 3005-
3009.
REFERENCES [15]. Toulouse, Tom & Rossi, Lucile & Celik, Turgay &
Akhloufi, Moulay. (2015). “Automatic fire pixel detection
[1]. National Risk Survey Report - Pinkerton, FICCI (2018). using image processing: A comparative analysis of Rule-
[2]. Janku P., Kominkova Oplatkova Z., Dulik T., Snopek P. based and Machine Learning-based methods. Signal,
and Liba J. 2018. “Fire Detection in Video Stream by Image and Video Processing”.
Using Simple Artificial Neural”. Network. MENDEL. 24, [16]. K. He, X. Zhang, S. Ren and J. Sun, “Deep Residual
2 (Dec. 2018), 55–60. Learning for Image Recognition,” 2016 IEEE Conference
[3]. Shen, D., Chen, X., Nguyen, M., & Yan, W. Q. (2018). on Computer Vision and Pattern Recognition (CVPR), Las
“Flame detection using deep learning”. 2018 4th Vegas, NV, 2016, pp. 770-778.
International Conference on Control, Automation and [17]. S. Wilson, S. P. Varghese, G. A. Nikhil, I. Manolekshmi
Robotics (ICCAR). and P. G. Raji, “A Comprehensive Study on Fire
[4]. Li, C., & Bai, Y. (2018). “Fire Flame Image Detection Detection,” 2018 Conference on Emerging Devices and
Based on Transfer Learning”. 2018 5th IEEE International Smart Systems (ICEDSS), Tiruchengode, 2018, pp. 242-
Conference on Cloud Computing and Intelligence Systems 246.
(CCIS). [18]. X. Wu, X. Lu and H. Leung, “An adaptive threshold deep
[5]. K. Muhammad, J. Ahmad, I. Mehmood, S. Rho and S. W. learning method for fire and smoke detection,” 2017 IEEE
Baik, “Convolutional Neural Networks Based Fire International Conference on Systems, Man, and
Detection in Surveillance Videos," in IEEE Access, vol. 6, Cybernetics (SMC), Banff, AB, 2017, pp. 1954-1959.
pp. 18174-18183, 2018. [19]. Chenebert, Audrey & Breckon, Toby & Gaszczak, Anna.
[6]. S. J. Pan and Q. Yang, "A Survey on Transfer Learning," (2011). “A nontemporal texture driven approach to real-
in IEEE Transactions on Knowledge and Data time fire detection”.
Engineering, vol. 22, no. 10, pp. 1345-1359, Oct. 2010. [20]. Seebamrungsat, Jareerat et al. “Fire detection in the
[7]. [Zhang, Qingjie & Xu, Jiaolong & Xu, Liang & Guo, buildings using image processing.” 2014 Third ICT
Haifeng. (2016). “Deep Convolutional Neural Networks International Student Project Conference (ICTISPC)
for Forest Fire Detection”. (2014): 95-98.
[8]. K. Muhammad, J. Ahmad, Z. Lv, P. Bellavista, P. Yang
and S. W. Baik, “Efficient Deep CNN-Based Fire
Detection and Localization in Video Surveillance
Applications,” in IEEE Transactions on Systems, Man,
and Cybernetics: Systems, vol. 49, no. 7, pp. 1419-1434,
July 2019.
[9]. Z. Jiao et al., “A Deep Learning Based Forest Fire
Detection Approach Using UAV and YOLOv3,” 2019
1st International Conference on Industrial Artificial
Intelligence (IAI), Shenyang, China, 2019.
[10]. Faming Gong ,1 Chuantao Li,1 Wenjuan Gong ,1 Xin Li,1
Xiangbing Yuan,2 Yuhui Ma and Tao Song. “A Real-
Time Fire Detection Method from Video with Multi-
feature Fusion”. Hindawi, Computational Intelligence and
Neuroscience, Volume 2019.
[11]. L. Shao, F. Zhu and X. Li, “Transfer Learning for Visual
Categorization: A Survey,” in IEEE Transactions on
Neural Networks and Learning Systems, vol. 26, no. 5, pp.
1019-1034, May 2015.
[12]. S. Mohd Razmi, N. Saad and V. S. Asirvadam, “Vision-
based flame detection: Motion detection & fire analysis,”
2010 IEEE Student Conference on Research and
Development (SCOReD), Putrajaya, 2010, pp. 187-191.
[13]. T. Qiu, Y. Yan and G. Lu, “A new edge detection
algorithm for flame image processing,” 2011 IEEE
International Instrumentation and Measurement
Technology Conference, Binjiang, 2011, pp. 1-4.
[14]. M. Ligang, C. Yanjun and W. Aizhong, “Flame region
detection using color and motion features in video
5