Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 29

Fire and Smoke Detection using Image Recognition System

A Capstone Project
Presented to the Faculty
of College of Teacher Education and Technology (CTET)

In Partial Fulfilment
of the Requirements for the Degree
Bachelor of Science in Information Technology

Prepared by:

LOREFE D. BUAL

DIANA QUEEN D. PAULINIO

DHALLY A. ILISAN, MSIS

Adviser

January 2020

CHAPTER I
INTRODUCTION

Project Context

Fire is one of mankind’s greatest discoveries but can also be a great source of

danger in accidents. The risk has fortunately been addressed by governments which

have continuously adjusted fire safety strategies. The objective of measures for fire

prevention is to reduce the probability of a fire starting in a building or premises

(Akhimien, 2018).

In the Department of Labor of the United States has an agency called

Occupational Safety and Health Administration (OSHA), the agency requires

employers to implement fire protection and prevention programs in the workplace.

List of fire safety work practices addressing many fire hazards found in the roofing

workplace, including field operations and shop activities. 

In the Philippines, The Bureau of Fire Protection (BFP) estimates that fire

incidents nationwide totalled more than 17,000 in 2015, resulting in over P3 billion in

damages. Data from the BFP also show that fire incidents have increased by 51%

from 2011 to 2015. Fortunately, economics may also provide the country with a clear

path to better fire standards as the same economic growth behind the booming real

estate sector has also made citizens more discerning in terms of quality of

structures. Harish Vellat, vice president, security and fire, at Honeywell, a global

manufacturer of security and automation solutions said that the solutions come in the

form of advanced fire and safety protection such as smoke detectors, motion

sensors, closed circuit security cameras or CCTVs, amd gas sensors, among others

(Schnabel, 2019).

In the study of Department of Computer Engineering at Gachon University

(2018), Detecting fire or smoke at an early stage is a crucial to facilitate intervention


in time to avoid large-scale damage. Several methods and tools have been using to

recognize fire or smoke in visual scenes. Most of the traditional fire and smoke

detection methods use sensor-based tools, which are supposed to detect the

presence of the smoke or flame. The main disadvantage of such sensors is that they

can generally only recognize fire or flame near the places where they are installed,

and this limits their effectiveness in large covered areas. Moreover, flame or smoke

detection sensors cannot provide enough information about the direction, initial

location, or size of the fire.     

The most basic alarm system does not include detection. It has manual pull

stations and sounds only a local alarm. This level of system is not what is typically

used; it relies on an occupant to discover the fire, which can cause a significant

delay. The more quickly you want to be notified of the fire, the more costly the

system you must install. Speed of detection is expensive. The slowest system to

detect a fire is a heat detector, which is also the least expensive. An air-aspirating

smoke detection system provides the most rapid indication of fire, but these systems

are five to 10 times as expensive (Schroll, 2007).

           In the stated problem above, the team proposes a system that is capable of

detecting fire and smoke through the use of CCTV. This system can help the owner

of the building live safer.

Purpose and Description of the Project

The purpose of this study is to develop a low-cost system that would detect
the fire and smoke when occurred. Fire and Smoke Detection using Image

Recognition System uses CCTV which provides a reliable result about the immediate

detection of fire and smoke.

This system serves as a tool to automatically alert a concerned owner. This

system is designed for a working place and even in the home for fire prevention and

for the safety of the people who live and work there. This system is for all because it

is a budget-friendly system, unlike others that have an expensive system that only

financially stable people can afford to buy such a system.

The system features have a notification and it’s a real-time system. In the

notification feature, it will send SMS immediately to alert the desired persons if there

is a fire detected. The desired persons or recipients of the notification are the

owners, closest neighbors, local authorities, fire departments, and rescuers. The

system is also a real-time system for faster and immediate response.

Objectives of the Study

This study aims to develop a system that can immediately alert or notify

relevant individuals when there is fire detected.

Specifically, the project aims to develop a module that:

1. detects fire and smoke in real-time through CCTV.

2. instantaneously alerts the responsible persons about the possible occurrence

of fire for relevant operation. Responsible persons includes:

 Owner

 Closest neighbours
 Local authorities

 Fire Departments

 Rescuers

Scope and Limitation

Fire Detection using Image Recognition System is intended to detect fire and

smoke through CCTV. It serves as a tool for fast determined the occurred fire and

smoke.

The system will immediately send an alert if it recognizes fire and smoke in

the area range. Since it is SMS, all of the desired recipients must be able to receive

simultaneously and instantaneously. The desired recipients are the owner, closest

neighbors, local authorities, fire departments, and rescuers. The information about

the notification provides the exact location of the fire. The system has a specific area

range where it focused.

The limitation of the system is that if the area is not covered by the camera

range and if there is an object that would block the camera. The brightness of the

room can also affect the immediate determination of fire.

CHAPTER II

REVIEW OF RELATED LITERATURE AND TECHNICAL EVIDENCES

This chapter presents relevant literature and related systems which have
bearing to the present system.

Related Literature

Security is very important thing in today’s life. In order to maintain peace and

provide security to people now a day’s CCTV surveillance system (close circuit

television) is used. Supermarkets, hotels, schools, factories are having their own

CCTV for 24/7 monitoring. It gives real time monitoring, provides surveillance

footage, and allows the authorities to have evidence against illegal activities. It can

reduce the crime rate in the society (Ashok et al., 2016).

Early fire detection has a crucial role in fire spreading and extinguishing.

Development of fire detection technology was introduced as a result of series of

great fire incidents, which have caused heavy material losses with even greater

casualties (Bistrović et al., 2017).

Existing solutions are based on ultraviolet and infrared sensors, and usually

explore the chemical properties of fire and smoke in particle samplings. However,

the main constraint of these solutions is that sensors must be set near to the fire

source, which brings complexity and cost of installation and maintenance, especially

in large open areas. Alternative to sensors, cameras can provide visual information

of wider spaces, and have been increasingly embedded in a variety of portable

devices such as smartphones (Traina et al., 2015).

Research on video analysis for fire detection has become a hot topic in

computer vision. However, the conventional algorithms use exclusively rule-based

models and features vector to classify whether a frame is fire or not. These features

are difficult to define and depend largely on the kind of fire observed. The outcome
leads to low detection rate and high false-alarm rate. A different approach for this

problem is to use a learning algorithm to extract the useful features instead of using

an expert to build them. Convolutional Neural Network (CNN) is used for identifying

fire in videos. Convolutional neural network are shown to perform very well in the

area of object classification. This network has the ability to perform feature extraction

and classification within the same architecture. Tested on real video sequences, the

approach achieves better classification performance as some of relevant

conventional video fire detection methods and indicates that using CNN to detect fire

in videos is very promising (Frizzi et al., 2017).

The above literatures can help in developing the system. The system is a

desktop application that detect fire and smoke through the use of CCTV and can be

used in home and even in the workplace for immediate response if there is fire

occurred.

Related Systems

The following are the systems that are related to the present study.

A. Computer Vision Based Fire Detection From Video


In the study of the department of Computer Science and Engineering at

the University of Dhaka (2012), the project work suggests a method to use

surveillance cameras in order to monitor occurrences of fire anywhere within

camera range. In this project, two methods are proposed for fire detection in

video images using color and motion properties of fire. The first approach uses

only color segmentation. The second approach finds the boundary of the moving

region in the color segmented image and calculate the amount of fire pixels in

this area. This fire detection system is developed based on these methods to

detect fire efficiently to save life and property from fire hazard.

Figure 2.1 Computer Vision Based Fire Detection From Video

Figure 2.1 shows that there is fire in the monitored area and system can detect it.

B. Fire Detection Use CCTV with Image Processing Based Raspberry Pi

Fire detector device using Raspberry Pi and Raspberry Pi Camera, apply

the concept of Image Processing and Internet of Things (IoT) in order to get the

real-time detection results. In this study Haar Cascade Classifier Algorithm is


used for the preprocessing of image, to detect the correct image of fire. As long

as the device in active condition, the camera will continue to monitor the

conditions in the room. If there is a fire detected by the camera, then the fire

image will be processed using Image Processing then the result is a data string

sent to the server and forwarded to the user's smartphone (using the concept of

IoT) as a warning (alert) there is fire in the room (Pranamurti et al., 2019).

Figure 2.2 Fire Detection Use CCTV with Image Processing Based Raspberry Pi

Figure 2.2 shows that the distance does not determine the level of

accuracy but the intensity of light is very influential towards the accuracy of

measurements.

C. Fire Detection System using CCTV

The study at the University of the Philippines Manila, developed a fire

detection system while taking advantage of the CCTV system already installed

inside the building. The web interface of the Fire Detection System allows the
Building Administrator to manage Building Occupants, edit Fire Department

information,set alert levels and receive sound and message alerts from the

landing page during the occurrence of fire (Arzadon, 2016).

Figure 2.3 Fire Detection System using CCTV

Figure 2.3 shows the landing page when the Building Administrator enters the

system. S/He can select a functionality by pressing the icons.

D. A Multi-Feature Approach to Smoke Detection

The study at the University of the Philippines presents a method for smoke

detection in video using multiple features. In this method, it is assumed that the

camera that captures the video is stationary. The presence of smoke in an image

creates significant changes to the regions comprising the image. Smoke

increases the luminance of an image region while dark smoke decreases the

luminance value. Contrast starts to decrease as smoke gets in the way. The

edges of objects within the image loose their sharpness and the color

components eventually decrease in saturation. Using these features, a classifier

detects the presence of smoke in each region (Templadoet and Mariano, 2008).
Figure 2.3 A Multi-Feature Approach to Smoke Detection

Figure 2.3 shows how the smoke was recognized and detected unlike other

ordinary moving objects such as the moving person in the video.

Synthesis of the Related System

Table 2.1 shows the comparison of features of the related systems. It shows

the similarities and differences to the system. All of the system is a desktop

application. The unique feature of the system is that it can detect both fire and
smoke.

Table 2.1 Synthesis of the Related System

Features Computer Fire Detection Use A Multi-Feature Fire and Smoke


Fire Detection
Vision Based CCTV with Image Approach to Detection using
System using
Fire Detection Processing Based Smoke Image
CCTV
From Video Raspberry Pi Detection recognition
System

Desktop
    
Applicatio
n   

Real-time

Fire
Detection 
  
Real-time
Smoke

Detection 

Uses 
CCTV

Sends
SMS

Technical background

The project’s desktop application utilizes CCTV to record the video only. In
developing the system, the developer uses OpenCV and Image Recognition for the

detection of fire and smoke because it mainly aimed to identify and detect an object

or a feature in a digital image or video. The algorithm used in this system is deep

learning approach based on Convolutional Neural Network (CNN). In enhancing the

design of the application the developer will be using a multimedia application which

is the Adobe Photoshop cs6. In sending the sms text message, developer will be

using python application that uses a web application interface(API).

Convolutional Neural Network

A Convolutional Neural Network (ConvNet/CNN) is a Deep Learning algorithm

which can take in an input image, assign importance (learnable weights and biases)

to various aspects/objects in the image and be able to differentiate one from the

other. The pre-processing required in a ConvNet is much lower as compared to other

classification algorithms. While in primitive methods filters are hand-engineered, with

enough training, ConvNet have the ability to learn these filters/characteristics.

The architecture of a ConvNet is analogous to that of the connectivity pattern of

Neurons in the Human Brain and was inspired by the organization of the Visual

Cortex. Individual neurons respond to stimuli only in a restricted region overlap to

cover the entire visual area (Sumit Saha, 2018).

Software Requirements

The software listed below are necessary requirements needed for the
development of the Fire and Smoke Detection using Image Recognition System.

Table 2.2 Software Tools in the Development

SOFTWARE DESCRIPTION

PyCharm An integrated Development (IDE) used

for programming in Python. It provides

code analysis, a graphical debugger, an

integrated unit tester, integration with

version control systems (VCSes), and

supports web development with Django.

PyCharm is developed by the Czech

company JetBrains.
Adobe Photoshop The designing tool applied for user

interface and other multimedia

requirements of the system.


Twilio API For SMS to send and receive text

messages over the carrier network to

any phone, anywhere in the world.

Table 2.2 shows the different software that will assist in developing the

system. This software’s are essential in creating different functions and features of

the desktop application.

Hardware Requirements

Listed below are the hardware requirements needed in creating the

application.
Table 2.3 Hardware Tools in the Development

HARDWARE DESCRIPTION

PC (Desktop/Laptop) Devices used by team in developing

the system where PyCharm takes

place.

Mobile Any mobile device that can receive

SMS.

CCTV At least captures 20cm distance to

capture fire.

Table 2.3 shows the hardware specification that used in developing of the

system. All of this hardware tools are important in the development.

User Classifications

The users of this desktop application are anyone who wants safety measures.

Table 2.3 System User Classification

USER DESCRIPTION
Administrator The one who can add, edit and delete
the notification system and receives SMS

alert.
Authorities These are the persons who will receive

SMS alert.

Table 2.3 explains the administrator’s role and authorities that will benefit from

the system application.

System Architecture
This system architecture will show the interaction between the users and the

system.

Figure 2.5 System Architecture

Figure 2.1 Shows that the CCTV will capture the video and the system will

analyse the video. The user or the administrator will add, edit or delete the

information of the authorities.

CHAPTER III
METHODOLOGY

This chapter discusses the methods involved in developing the system. The

developers will be using these methods to ensure correctness of data and processes

involved in the conduct of the study.

The overall approach used in development of the system is SCRUM, one of

the most popular Agile methodologies that is known to be fast, flexible and effective

in delivering potential product quickly. The said approach allows the developer to

inspect the working software repeatedly so the project’s real capacity will be visible

and decide if it is a potential product or continue to improve for another sprint.

Figure 3.1 Scrum Software Development Process

Figure 3.1 shows the steps of the SCRUM method. This method is applicable

when the developer need to review their work to ensure correctness of data and

processes involved in the conduct of the study.

Part of the Scrum development team is the product owner. The product owner

is responsible for the product vision. In this case, the administrator will serve as the

product owner. As for this capstone, two developers are designated to take every
important role such as Scrum master and the team, the one will play as the Scrum

master while the other will take the responsibility of the team.

Product Backlog

To ensure the success of the capstone project and to sustain the

effectiveness of the desktop application, the developers have set and made their

plans by estimating and prioritizing the backlogs to its highest possible value. . The

functional requirements made by the developers are listed below:

M – Mandatory requirements (something the system must do)

D – Desirable requirements (something the system preferably should do)

O – Optional requirements (something the system may do)

Table 3.1 Functional Requirements of Fire and Smoke Detection using Image

Recognition System

___________________________________________________________________

NO. REQUIREMENTS ID REQUIREMENT DESCRIPTION PRIORITY


___________________________________________________________________

T1 Record video

T1_1 The system will analyse the video D

T2 Input information

T2_1 User can input information about the

responsible authorities O

T3 Notification

T3_1 Notify the user if there is fire M


___________________________________________________________________

Table 3.1 shows the task that will be executed. It is rated by (M, D, O) basis if

the task is highly needed and must be taken care immediately.

Use Case Diagram

To describe a set of actions, happen in the system. The use cases diagram

need to identify performance or collaboration of one or more external users or actors

of the system.

Figure 3.2 Use Case Diagram of Fire and Smoke Detection using Image

Recognition System

Figure 3.2 shows that the system will analyse the video, after that if the

system detects fire or smoke the system will send a notification to the authorities.

Use Case Description for Fire and Smoke Detection using Image Recognition

system
The tables below describe each case that the application had. It consists of

descriptions that determine how each case works.

Table 3.2 Record and Analyse Video Use Case Diagram

Component Description

Scenario The CCTV will record a video.


Triggered Event The system will saved and analyse the recorded
video.
Brief Description This use case explained how the system will
record and analyse the video.
Actors Authorities
Basic Flow This use case will occur when the system will
detect a smoke or fire
1. The CCTV will capture a video.
2. The system will analyse the video captured by the CCTV.
Alternative Flows Record Video
Exceptional Flow None
Special Requirements None
Pre-Conditions None
Post-Conditions
3. If the use case is successful, the user can perform all necessary controls. If not,
the system state is unchanged.
Extension Points None

Table 3.3 Send Result Use Case Diagram

Component Description

Scenario The system will notify the authorities.


Triggered Event If the system will detect a smoke and fire motion, it
will automatically send information to the
authorities.
Brief Description This use case explained how the application will
notify the authorities.
Actors Authorities
Basic Flow This use case will occur after receiving data from
the CCTV and analyse the actual footage.
4. The system will send information to the authority using the analysed video
captured by the CCTV.
Alternative Flows Give result
Exceptional Flows
5. Result of the data is based on the video captured by the CCTV in order for the
system to analyse the information.
Special Requirements None
Pre-conditions None
Post-conditions
6. If the use case is successful, the application will notify the authorities.
Extension Points None

Table 3.4 Input Information Use Case Diagram

Component Description
Scenario The user will input the numbers of every
designated authority.
Triggered Event The data will be saved in the database and the
system will use the information to notify the
authorities.
Brief Description This use case explained how the system will use
the data of every authority that is being saved by
the user.
Actors User
Basic Flow This use case will occur before the system is being
activated.
7. The system will use the information given by the user to notify the authorities.
8. The system will save the video to the storage.
Alternative Flows Analyse video
Exceptional Flows
9. If the system did not recognize a fire and smoke motion.
Special Requirements None
Pre-conditions None
Post-conditions
10. If the use case is successful, the application will use the given numbers to notify
the authorities.
Extension Points None

Table 3.5 Receive Emergency Notification Use Case Diagram

Component Description
Scenario The system will send information and the user will
receive emergency notification.
Triggered Event The system will detect a fire and smoke motion.

Brief Description This use case explained how the application


response to the triggered event.
Actors Users
Basic Flow This use case will occur if there is a smoke and fire
motion.
11. During the actual capture, the system analyse the video.
12. The system will automatically send notification to the user.
13. The system will save the actual video of smoke and fire motion.

Alternative Flows View Video


Exceptional Flows None
Special Requirements None
Pre-conditions None
Post-conditions
14. If the use case is successful, the application will notify the authorities.
Extension Points None

Context Data Flow Diagram

The following diagram illustrates the flow and the process along with the

operation executed in the whole system.


Figure 3.3 Context Data Flow Diagram of the system

Figure 3.3 shows how the user interacts with the application. It shows the

whole operation of the system and its output.

System Flowchart
Figure 3.5 System Flow Chart of the System

Figure 3.5 this figure shows the flow of the application in how the system operates.

Level 1 Data Flow Diagram

Level 1 Data Flow Diagram shows the main process within the Application.
This reflects more detailed flow of data shown within the context data flow diagram

above.

1.0

Capture Video

2.0
1.0 Convolutional
Owner Contact Details Layers
Verify and save data

Verified Contacts 3.0

Pooling Layers

Contacts

4.0
Fully connected
Layers

5.0
Check if there is fire
or smoke or none

6.0

Show Result

Figure 3.7 Level 1 Data Flow Diagram of the System

Figure 3.7 shows that the process is divided into approach that is more

specific and which together, provides all the functionality of the application as a

whole.

Physical Data Flow Diagram

Physical Data Diagram is the representation of the application. A brief flow


structure about how the system gathers all the needed data to produce rating result

reports.

Figure 3.8 Physical Data Flow Diagram of the System

Figure 3.8 shows how the system operates and represents the manual

procedures and program modules for ensuring the successful completion of the

process.

Activity Diagram

The Activity Diagram focuses on the structure of application’s design. It gives


an overall procedure on what would be the concept of the development of the

application.

Figure 3.9 Activity Diagram of the System

Figure 3.9 shows how the Desktop Application runs. The system will analyse

the video and it will show process of detecting smoke or fire. The black circle

represents the starting point of the activity. The rounded rectangle symbolizes the

activity of the application. The arrows represent the transition of the activities. The

diamond represents the choices of the user if proceed ordering.

You might also like