Computer Vision-Based Early Fire Detection Using Open CV and Machine Learning
Computer Vision-Based Early Fire Detection Using Open CV and Machine Learning
1. INTRODUCTION 9
1.1 Overview 9
1.2 Scope and Objective 10
1.3 Domain Overview 10
1.3.1 Machine Learning Model 11
1.3.2 Data Pre-processing 12
1.3.3 Supervised Learning 14
1.3.4 Regression 16
1.3.5 Unsupervised Learning 17
1.3.6 Training and testing the 26
model of data
1.3.7 Validation Set 19
2. LITERATURE SURVEY 22
2.1 Analysis of literature 22
2.2 Literary review 23
3. SYSTEM ANALYSIS 26
3.1 Existing System 26
3.2 Problem Statement 26
3.3 Proposed System 26
3.4 System Design 28
3.5 Haar Like Features 29
3.6 Working Principle 32
3.7 System Requirements 33
4. RESULTS 34
6. REFERENCE PAPERS 36
7. APPENDIX 38
A. Sample Code 38
B. Plagarism Report 43
LIST OF FIGURES
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 SCOPE AND OBJECTIVE
● Step 4: Training
● Step 5: Evaluation
● Step 7: Prediction
Introduction:
In this blog, we will discuss the workflow of a Machine learning project this
includes all the steps required to build the proper machine learning project from
scratch.We will also go over data pre-processing, data cleaning, feature
exploration and feature engineering and show the impact that it has on Machine
Learning Model Performance. We will also cover a couple of the pre-modelling
steps that can help to improve the model performance.
1. Gathering data
2. Data pre-processing
3. Researching the model that will be best for the type of data
5. Evaluation
The machine learning model is nothing but a piece of code; an engineer or data
scientist makes it smart through training with data. So, if you give garbage to the
model, you will get garbage in return, i.e. the trained model will provide false or
wrong prediction
Gathering Data:
The process of gathering data depends on the type of project we desire to make, if
we want to make an ML project that uses real-time data, then we can build an IoT
system that using different sensors data. The data set can be collected from
various sources such as a file, database, sensor and many other such sources but
the collected data cannot be used directly for performing the analysis process as
there might be a lot of missing data, extremely large values, unorganized text data
or noisy data. Therefore, to solve this problem Data Preparation is done.We can
also use some free data sets which are present on the internet. Kaggle and UCI
Machine learning Repository are the repositories that are used the most for
making Machine learning models. Kaggle is one of the most visited websites that
is used for practicing machine learning algorithms, they also host competitions in
which people can participate and get to test their knowledge of machine learning.
1.3.2 Data pre-processing:
As we know that data pre-processing is a process of cleaning the raw data into
clean data, so that can be used to train the model. So, we definitely need data
pre-processing to achieve good results from the applied model in machine
learning and deep learning projects.Most of the real-world data is messy, some of
these types of data are:
● Missing data: Missing data can be found when it is not continuously created
or due to technical issues in the application (IOT system).
● Noisy data: This type of data is also called outliners, this can occur due to
human errors (human manually gathering the data) or some technical
problem of the device at the time of collection of data.
● Inconsistent data: This type of data might be collected due to human errors
(mistakes with the name or values) or duplication of data.
How can data pre-processing be performed?
These are some of the basic pre — processing techniques that can be used to
convert raw data.
As shown in the above representation, we have 2 classes which are plotted on the
graph i.e. red and blue which can be represented as ‘setosa flower’ and ‘versicolor
flower’, we can image the X-axis as there ‘Sepal Width’ and the Y-axis as the
‘Sepal Length’, so we try to create the best fit line that separates both classes of
flowers.
● K-Nearest Neighbor
● Naive Bayes
● Logistic Regression