0% found this document useful (0 votes)
15 views

An IoT Based Fire Image Recognition for Home Industry Security Using Machine Learning

This paper discusses the development of an IoT-based fire image recognition system for enhancing home and industry security using machine learning techniques. The system utilizes Raspberry Pi for capturing fire images, which are then processed through Google Cloud Vision API to identify hazards, providing alerts to users. The research highlights the effectiveness of combining IoT with machine learning to improve fire detection accuracy and response times.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

An IoT Based Fire Image Recognition for Home Industry Security Using Machine Learning

This paper discusses the development of an IoT-based fire image recognition system for enhancing home and industry security using machine learning techniques. The system utilizes Raspberry Pi for capturing fire images, which are then processed through Google Cloud Vision API to identify hazards, providing alerts to users. The research highlights the effectiveness of combining IoT with machine learning to improve fire detection accuracy and response times.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

International Journal of Advances in Engineering and Management (IJAEM)

Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

An IoT-Based Fire Image Recognition for


Home/Industry Security Using Machine
Learning
1
1, 2
Chukwunazo J.Ezeofor and 2Nkolika O. Nwazor
Department of Electrical/Electronic Engineering, University of Port Harcourt, Rivers State, Nigeria

---------------------------------------------------------------------------------------------------------------------------------------
Submitted: 05-02-2022 Revised: 14-02-2022 Accepted: 17-02-2022
----------------------------------------------------------------------------------------------------------------
ABSTRACT - This paper presents the development tremendously improved on the intelligence of smart
of Internet of Things (IoT) based fire image security systems in recent times [4].Most of the
recognition for home/industry security using Machine security problems that require machines are now
learning. Fireoutbreaks have ravaged homes, solved easily by applying IoT and machine learning
industries, banks, hospitals, organizations etc., and together. Security has become the talk of the day in
kept a lot of people homeless. Government agencies, every field of life. People have been recruited to
security agencies, and even private organizations seek monitor and raise alarm but to no avail. Most
to make their assets safe and to restrictaccess to areas companies have also used fire detectors which
that could pose dangers. In the same vein, individuals basically detects the presence of carbon II oxide or
have also sought reliable ways to keep their homes increase in temperature and send an alert when set
safe and alert themselves of any impending danger. limits are exceeded.
Hence, this work is aimed to address the challenges
posed by fire outbreaks using IoT-based Machine II. REVIEW OF RELATED WORKS
learning techniques. The IoT system comprises both The authors in [5], presented a computer
hardware and software. Raspberry Pi and other vision-based fire detection algorithm. Fire
components were selected to handle the detecting and colourmodelling and motion detection were used for
capturing part of the fire images. For fire image thefire detection algorithm.TheFire colour model was
recognition,Raspberry Pi sends captures the fire tested with ten diverse video sequences including
imagesand sends them to the Google Cloud Vision different types of fire. The experimental results
APIwhich calls a pre-trained model to recognize any showed correct classification of fire pixels according
hazard in the image. The pre-trained model predicts to colour information only.In [6, 7],Convolutional
with high percentage confidence and sendsto the Neural Networks Based Fire Detection in
mobile phone of the homeowner/personnel on duty Surveillance Videos was implemented. They
for necessary action. deployed Google Net and fine-tuned it according to
Keywords— Home Security,IoT, Machine Learning, the targeted problem with fire data. Experimental
Raspberry PI, Google cloud, Image Recognition results revealed the effectiveness of the chosen
framework and its suitability for fire detection in
I. INTRODUCTION CCTV surveillance systems.
Fire outbreak is a common issue happening A wireless sensor network using multiple
everywhere and the damage caused by this type of sensors for early detection of house fires wasdesigned
incidence is tremendous [1]. Homes, Industries, and simulated by the authors in [8]. They used Global
Organizations, Hospitals, Banks etc. have been System for Mobile Communications (GSM) to alert
experiencing fire outbreak times without numbers. personnel on duty to avoid false alarms. Fire
Many researchers are involved in early warning Dynamics Simulator was used to simulate the fire in a
systems, which considerably minimize the smart home to test the results. The simulation results
consequences of fire damage [2]. It is important for showed that the system is able to detect early fire,
fire detectors to operate quickly in the event of a fire, even when a sensor is not working while keeping the
but existing conventional fire detectors sometimes do energy consumption of the sensors at an acceptable
not work properly or there are problems where non- level
fire or false reporting occurs frequently [3]. Machine The work in [9], is on a dependable Fire
Learning, a subset ofArtificial Intelligence (AI)has Detection System with Multifunctional Artificial

DOI: 10.35629/5252-0402834842 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 834
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

Intelligence Framework. The framework includes a RCNN, R–FCN, SSD, and YOLO v3) [14-16].
set of multiple machine learning algorithms and an YOLO v3 achieved 83.7% accuracy which
adaptive fuzzy algorithm. They introduced Direct- outperformed other models when compared. The
MQTT based on SDN to solve the traffic authors in [17-19] worked on the extraction and
concentration problems of the traditional MQTT. The classification of image features for fire recognition
system performance on fire detection accuracy and based on a convolutional neural network (CNN). A
delay time was over 95%. The transfer and decision Gaussian mixture model was used to extract features
delays between devices were reduced by an average from the fire smoke movement areas to improve the
of 72%.In [10], a machine learning techniques efficiency of image analysis. Experiments results
method for Multimedia Surveillance during fire proved that the system was feasible and effective.
emergencies was proposed. They used a hybrid model The works, [20-23], were on real-time video-based
made of Adaboost and many Multi-layer perceptron fire and smoke detection using CNN YOLO v2 in
(MLP) neural networks in their work. The hybrid anti-fire surveillance systems. The training stage was
Adaboost-MLP model was used to predict fire processed off-line with indoor and outdoor fire and
efficiently. This model used different sensors data smoke image sets in different indoor and outdoor.
like smoke, heat, and gas for training. After The trained model was deployed in a low-cost
predicting the fire, the CNN model was called to embedded device (Jetson Nano). The experimental
detect the fire immediately. The test results show that results showed that the model is suitable for creating
the trained model has near 91% fire detection a smart and real-time video-surveillance system for
accuracy while false-positive results were quite low. fire/smoke detection. Deep –Learning (YOLOv4)
The authors in [11] presented forest fire Based Approach was developed for Smart City
image recognition based on convolutional neural Environment in [24, 25]. The method successfully
networks. An adaptive pooling approach was detected and notified the incidence of disastrous fires
introduced in their work. Experiments show that the with a high speed and accuracy in different weather
convolutional neural network method based on the environments—sunny or cloudy, day or night.
adaptive pooling method has better performance and Experimental results revealed that the method can be
has higher recognition rate.In [12,13], an Integrated used successfully for the protection of smart cities
Fire Detection System using IoT and Image and in monitoring fires in urban areas.
Processing Technique for Smart Cities was designed.
Their system combined wireless sensor technologies, III. SYSTEM DESIGN METHODOLOGY
UAVs, and cloud computing to achieve its aim. Some The system is made up of hardware and software. The
image processing techniques and rules were design method adopted for hardware is prototyping
integrated into the fire detection system to identify while agile methodology for software designs.
the fire event with better results. The simulation A. IoT Hardware
results of the fire detection system were compared The IoT hardware comprises of Raspberry Pi 3, IP
with several existing methods and observed a higher camera, Wireless Router, Speaker, +5v power supply,
fire detection rate from 95 to 98 percent. Wi-Fi adapter, OTG cable, memory SD card and 5V
Image fire detection algorithms based on DC infrared lightas shown in figure 1.
Convolution neural network was developed using
four advanced object detection CNN models (Faster-

DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 835
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

Figure 1: IoT Hardware components of the system

IP camera is used for fire image capturing. speaker is used to alert the user before sendinga
The wireless Router provides the internet message to the user’s mobile phone. 5V DC power
connectivity and Wi-Fi adapter used to connect the adapter provides 5V Dc voltage to the system to
raspberry pi to the wireless router for internet access. function. The block diagram of the IoT system is
SD card is used to store the captured fire images. The shown in figure 2.

DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 836
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

Figure 2: Block diagram of the IoT system for fire detection and capturing

B. System Implementation Tools Used library used to address the GPIO (General
 The Raspbian JessiePixel is used to provide Purpose Input Output) pins of the raspberry pi.
desktop view and command-line interface. C. Algorithm and Flow Chart of Fire Image
 The SD Card Formatter is used to format the Recognition
microSD card on which the Raspbian image is The step-by-stepprocesses used to achieve the image
mounted on. recognition via the raspberry pi are written below
 Etcher software is used to write the Raspbian and flow chart diagram shown in figure 3.
image to the Raspberry Pi microSD card.  Raspbian OS image isdownloaded from internet
 Putty is a tool used to connect to the command-  SD Card formatter is used to format the microSD
line interface (CLI) of the raspberry pi through a Card in order to prepare it for the mounting of
protocol known as SSH (Secure Shell). the Raspbian OS image.
 VNC Viewer is a Windows-based application  Etcher Software is used to burn the image file to
used to provide system developer access for the microSD Card
viewing the X windows of the raspberry pi  After the image has been burnt into the microSD
 Google Cloud Vision API is a Computer vision Card, it is then mounted into the Raspberry Pi
cloud-based machine learning resource provided and the Pi is powered up.
by Google for machine learning activities. It was  All the peripherals are then attached to the USB
chosen because the model was trained using a hub
very robust data set provided by Google with  After the raspberry pi zero is connected to a
high accuracy. wireless network, the firmware is updated and
 BASHis a shell scripting language used to upgraded.
automate tasks in the host computer. BASH  The Google Cloud Vision API is downloaded
script is used to actuate the Python program as from gitHub.
soon as the Raspberry Pi boots up.  All the source files are built using the Cmake
 Python is the main programming language used tool
in this research work because of its rich libraries  Thereafter, the training phase is launched. Here a
for image processing and machine language. user captures as many images as possible into a
 GPIO libraryis an open-source Python based folder.

DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 837
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

 The folder is then used to train the controller and  The enrolment phase is complete
various parameters are assigned to a file that is  Finally, a python script is written to integrate the
generated. This file contains all the features of whole system and trigger the speaker when it
the images which have just been trained recognizes a security-threatening image.

Figure 3: Fire Image Recognition flow chart

D. IoT System operations  The camera captures real-time video stream but
The following steps are used by the system to detect does not saveit
the fire, capture the image and send it to the Google  The infra-red light automatically gets activated
cloud server for recognition: on sensing low light

DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 838
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

 The python script processes the video frame by registered email address on the system.
frame to determine if there is motion  The process repeats till the system is deactivated.
 If motion is detected, the camera captures a E. IoT System Test Conducted
frame and saves it as an image locally then sends The prototype of the image recognition
this image to Google cloud servers for system designed was first setup on a bread board. The
processing. microSDcard contains the Rasbian OS and all the
 The result is returned from the servers within necessary software for image recognition. A power
seconds and the program parses this result to bank was used to supply power to the raspberry pi
search for labels that have been pre-enrolled as and mobilehotspot configured to provides internet
threats. connectivity to the raspberry pi. The Raspberry Pi
 The program returns these labels with a degree of Camera was connected properly as an image input
certainty expressed in percentage. device. Before the system is powered up, all the
 If the returned percentage reaches the threshold connections were made and all the peripherals
percentage already set, the speaker is triggered to attached appropriately. The system powered up and
sound an alarm. An email is also sent to the tests carriedout as shown in the setup of figure 4.

After system setup was successfully done, the would recognize them. Other objects were also
following tests were conducted: brought to the camera to see if the system would give
 Hardware Tests false positives.
Vout pin was tested to ensure that it supplies
the power required; i.e., 5V for its functionality. The IV. RESULTS OBTAINED
ground pin was tested to ensure that it is at zero Various experiments were performed to test
potential.After the components were soldered to the the robustness of the developed system in order to
Vero board, a meter was used to check for continuity measure its accuracy. A paper was set on fire close to
to avoid a short circuit. The brightness and quality of the IP camerato simulate a fire outbreak. Also, a
the raspberry camera were tested in various rooms lighter was used to ignite the fire to cause an
light conditions to ensure that itsfunction optimally outbreak. Here are various conditions by which the
for hazard detection. The results varied in different hazard detection system was tested:
brightness levels and an infra-red was mounted on the  Recognition in a well-lit environment when the
system to improve on the brightness conditions of object is at a close distance (<100cm)
rooms that are poorly lighted.  Recognition in a well-lit environment when the
 Software Tests object is at mid-distance (100cm<x<500cm)
Image Detection Test: After the application  Recognition in a well-lit environment when the
was launched, the ―activate‖ command was entered. object is at a far distance (>500cm)
This results in the system detecting an object in front  Recognition in a dark environment when the
of it and immediately startingthe required analysis. object is at a close distance (<100cm)
Enrollment: The characteristics of the hazards  Recognition in a dark environment when
captured by the system using the camera were saved object is at a mid-distance (100cm<x<500cm)
in a folder. This was used to train the raspberry pi.  Recognition in a dark environment when the
Recognition Test: The previously enrolled threats object is at a far distance (>500cm)
were simulated and observed to see if the system
DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 839
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

 False positives in a well-lit environment D = Recognition in a dark environment when the


 False positives in a dark environment object is at a close distance
The results obtained are plotted as shown in figure 5. E = Recognition in a dark environment when the
A = Recognition in a well-lit environment when the object is at a mid-distance
object is at a close distance F = Recognition in a dark environment when the
B = Recognition in a well-lit environment when the object is at a far distance
object is at mid-distance G = False positives in a well-lit environment H =
C = Recognition in a well-lit environment when the False positives in a dark environment
object is at a far distance

Figure5 represents the results of how well the IoT system could perform on 150 test samples under different
conditions. Table 1 shows the statistics of the success rate of hazard detection.

Table 1: Success Rate of Hazard Detection System


Fire
S/N Test Condition
Accurac Failure %
y Success
Recognitioninawell-
1 litenvironment whenthe142 8 94.67
objectisataclosedistance
Mid-distance
2 140 10 93.33
Recognitioninawell-
3 litenvironment whenthe 138 12 92.00
objectisatafardistance
Recognitioninadarkenvironme
4 nt whenthe146 4 97.33
objectisataclosedistance
Recognitioninadarkenvironme
5 nt whenthe objectisatamid-140 10 93.33
distance
Recognitioninadarkenvironme
6 nt whenthe 132 18 88.00
objectisatafardistance

DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 840
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

7 False positives in a well-lit 150 0 100.00


environment
8 False positives in a dark 150 0 100.00
environment

V. CONCLUSION of Smart Home Environment for Fire


IoT-based fire image recognition for Prevention and Safety, Journal of Sensor and
home/industry security has been successfully Actuator Network (MDPI). 7(11) (2018) 1-16.
implemented on the Raspberry Pi Single Board [9] H. P. Jun, L. Seunggi, Y. Seongjin, K. Hanjin,
Computer. The IoT hardware has been implemented and K. Won-Tae, Dependable Fire Detection
and Google Cloud Vision API set up. This system can System with Multifunctional Artificial
be deployedin the home/industryas means of security Intelligence Framework, Journal of Sensor.
to detect and classify situations that could pose a 19(9) (2019) 2025
threat. From the tests carried out, it can be deduced [10] S. Faisal, P. Anand, R. Abdul, H. H. Won, and
that the image detection performedexcellently well S. Hyuncheol, Machine learning based
following the conditions attached. It is also deduced approach for multimedia surveillance during
that it has a higher accuracy of classifying slow fire emergencies, Multimedia Tools and
motions as compared to rapid ones. The system has Applications. © Springer Science+Business
an improved response time and accuracy in message Media, LLC, part of Springer Nature (2019)
delivery [11] W. Yuanbin, D. Langfei and R. Jieying, Forest
fire image recognition based on convolutional
REFERENCES neural network. Journal of Algorithms &
[1] N. P. Ram, R.G. Kannan, V. Gowdham, R .A. Computational Technology. 13(1) (2019) 1-11.
Vignesh, Fire Detection Using CNN [12] A. Sharma, P.K. Singh, and Y. Kumar,An
Approach. International Journal of Scientific & Integrated Fire Detection System using IoT
Technology Research. 9(4) (2020) 3849-3853 and Image Processing Technique for Smart
[2] W.H.Ting, P.Shreya, S.M. Mahendra, Cities, Elsevier Science Direct Sustainable
K.J.Deepak, L.L.Dong, S.Amit, P.Mukesh and Cities and Society. 61(1) (2020) 102332
T.L.Chin, An Early Flame Detection System [13] P. Kumarguru and L. Siau-Chuin, Fire
Based on Image Block Threshold Selection Detection Algorithm Using Image Processing
Using Knowledge of Local and Global Feature Techniques. Published in Researchgate. (2015)
Analysis. Sustainability Journal. 12(1) (2020) 160-168.
8899 [14] L. Pu and Z. Wangda, Image fire detection
[3] R. Jinkyu and K. Dongkurl, Flame Detection algorithms based on convolutional neural
Using Appearance-Based Pre-Processing and networks.Elsevier Case Studies in Thermal
Convolutional Neural Network. Applied Engineering Journal. 19 (1) (2020) 100625.
Science Journal. 11(5138) (2021) 1-14 [15] A. H. M. Hanan, H. A. Amal, and S.A. Norah,
[4] R. Nematullo, P. Anand, S. Faisal and S. Time-Efficient Fire Detection Convolutional
Hyuncheol, Real-time fire detection using Neural Network Coupled with Transfer
CNN and search space navigation. Journal of Learning. Intelligent Automation & Soft
Real-Time Image Processing 18(1) Computing. IASC. 31(3) (2022) 1393-1403
(2021) 1331–1340 [16] Z. Bin, S. Linkun, S. Yingjie, S. Weiping,
[5] C. Turgay, Fast and Efficient Method for Fire G.Yan, and Y.Fang, DeepFireNet: A real-time
Detection Using Image Processing. ETRI video fire detection method based on multi-
Journal. 32(6) (2010) 881-890. feature fusion. Mathematical Biosciences and
[6] M. Khan, A. Jamil, M.Irfan, R.Seungmin and Engineering Journal. 17(6) (2020) 7804-7818
W.B.Sung, Convolutional Neural Networks [17] B. Kim and J. Lee, A Video-Based Fire
Based Fire Detection in Surveillance Videos. Detection Using Deep Learning Models.
IEEE Access. 6(1) (2018) 18174-18183 Applied Science MDPI. 9(1) (2019) 2862
[7] M. Khan, A. Jamil, M.Irfan, and W.B.Sung, [18] Q. Ruiyang and L.Zhiqiang, Extraction and
Early fire detection using convolutional neural Classification of Image Features for Fire
networks during surveillance for effective Recognition Based on Convolutional Neural
disaster management. Elsevier Network. International Information and
Neurocomputing. 288(1) ( 2018) 30-42 Engineering Technology Association (IIETA).
[8] S. Faisal, P. Anand, R. Abdul, H. H. Won, and 38(3) (2021) 895-902
S. Hyuncheol, IoT-Based Intelligent Modeling [19] S.T. Yavuz, K. Murat, and A. Mustafa, Fire

DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 841
International Journal of Advances in Engineering and Management (IJAEM)
Volume 4, Issue 2 Feb 2022, pp: 834-842 www.ijaem.net ISSN: 2395-5252

Detection in Images Using Framework Based (2020) 27-33


on Image Processing, Motion Detection and [23] A.Umamakeswari , P. Venkatesh , P. Vivek,
Convolutional Neural Network. International and S.M. Narendran, Convolution Neural
Journal of Intelligent Systems and Network based Fire Detection in Surveillance
Applications in Engineering. 9(4) (2021) 171- Videos. International Journal on Emerging
177 Technologies. 10(2) (2019) 450-454
[20] S. Sergio, E. Abdussalam, and G. Alessio, [24] A. Kuldoshbay, M. Mukhriddin, M. Fazliddin,
Real-time video fire/smoke detection based on and I.C. Young, Fire Detection Method in
CNN in antifire surveillance systems. Journal Smart City Environments Using a Deep-
of Real-Time Image Processing. 18(1) (2021) Learning-Based Approach. Electronics
889-900 Journal. 11(73) (2022) 1-17
[21] K. M Raghad, A real-time forest fire and [25] G .Suhas , C. Kumar1 , B. S. Abhishek, G.K.
smoke detection system using deep learning. A. Digvijay, R. Prajwal, Fire Detection Using
Int. J. Nonlinear Anal. Appl. 13 (1) (2022) Deep Learning. International Journal of
2053-2063 Progressive Research in Science and
[22] K. Otabek, and H. Muhammed, Fire detection Engineering. 1(5) (2020) 1-5
in Surveillance Videos using a combination
with PCA and CNN. Academic Journal of
Computing & Information Science. 3(3)

DOI: 10.35629/5252-0402790802 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 842

You might also like