0% found this document useful (0 votes)
26 views11 pages

Computer Vision-Based Early Fire Detection Using Open CV and Machine Learning

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
0% found this document useful (0 votes)
26 views11 pages

Computer Vision-Based Early Fire Detection Using Open CV and Machine Learning

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
You are on page 1/ 11

ABSTRACT

The project aimed to detect fire by using the image processing


technology that will alert people by early detection of fire. As there are many
automatic fire alarm systems already existed like the sensor method, that has
some limitations and designed to sense fire with the smoke, limited areas. To
reduce limitations and to optimize with new technology, the project is proposed.
The project is implemented by using pycharm IDE and to connect the webcam as
hardware.Webcam is taken as an input source, which captures the video feed
from the surrounding and feeds into the system for analysis.The entire code is
written in pure python language using the open CV library for image processing.
The theoretical parts emphasize more in computer vision, machine learning,
image processing, color model, and the working algorithm of the project to detect
the fire. The project gives a better understanding of object detection with the
computer and the use of these technologies in different forms and uses.
Table of contents

Chapter No. Title Page No.


ABSTRACT V
LIST OF FIGURES VII

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

5. CONCLUSION AND FUTURE WORK 35


5.1 Conclusion 35
5.2 Limitation and Future Work 35

6. REFERENCE PAPERS 36

7. APPENDIX 38
A. Sample Code 38
B. Plagarism Report 43
LIST OF FIGURES

FIGURE No. FIGURE NAME PAGE No.

1.1 Supervised Architecture 14


1.2 Unsupervised Architecture 14
1.3 RGB Colours 15
1.4 Prediction Of IQ 16
1.5 Original Clustered Data 17
1.6 Clustered Data 17
1.7 Classifications Of Machine Learning 18
1.8 Training Set 18
1.9 Validation Set 19
1.10 Confusion Matrix 20
3.1 Block Diagram 27
3.2 Flow Chart 28
3.3 Haar Features 30
4.1 Result ScreenShot 34
CHAPTER 1
INTRODUCTION
1.1 OVERVIEW

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

The proposed software product is used in various areas like in parking


areas, road traffic congestions, agriculture, farming, there are many uses of object
detection.we are using the Haar Cascade classifier, which is very popular in object
detection through the image or any other video feeds.In future, this approach can
be extended by for other disasters as well.

1.3 DOMAIN OVERVIEW

Steps of Machine Learning

● Step 1: Gathering Data

● Step 2: Preparing that Data

● Step 3: Choosing a Model

● Step 4: Training

● Step 5: Evaluation

● Step 6: Hyper parameter Tuning

● 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.

Python Libraries that would be need to achieve the task:


1.Numpy
2.Pandas
3.Sci-kitLearn
4. Matplotlib

Understanding the machine learning workflow

We can define the machine learning workflow in 3 stages.

1. Gathering data

2. Data pre-processing

3. Researching the model that will be best for the type of data

4. Training and testing the model

5. Evaluation

1.3.1 MACHINE LEARNING MODEL

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:

Data pre-processing is one of the most important steps in machine learning. It is


the most important step that helps in building machine learning models more
accurately. In machine learning, there is an 80/20 rule. Every data scientist should
spend 80% time for data per-processing and 20% time to actually perform the
analysis.Data pre-processing is a process of cleaning the raw data i.e. the data is
collected in the real world and is converted to a clean data set. In other words,
whenever the data is gathered from different sources it is collected in a raw format
and this data isn’t feasible for the analysis.Therefore, certain steps are executed to
convert the data into a small clean data set, this part of the process is called as
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.

● Conversion of data: As we know that Machine Learning models can only


handle numeric features, hence categorical and ordinal data must be
somehow converted into numeric features.
● Ignoring the missing values: Whenever we encounter missing data in the
data set then we can remove the row or column of data depending on our
need. This method is known to be efficient but it shouldn’t be performed if
there are a lot of missing values in the dataset.
● Filling the missing values: Whenever we encounter missing data in the data
set then we can fill the missing data manually, most commonly the mean,
median or highest frequency value is used.
● Machine learning: If we have some missing data then we can predict what
data shall be present at the empty position by using the existing data.
● Outliers detection: There are some error data that might be present in our
data set that deviates drastically from other observations in a data set.
[Example: human weight = 800 Kg; due to mistyping of extra 0]
A classification problem is when the output variable is a category, such as “red” or
“blue” , “disease” or “no disease” or “spam” or “not spam”.

Fig 1.3 RGB Colours

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.

These some most used classification algorithms.

● K-Nearest Neighbor

● Naive Bayes

● Decision Trees/Random Forest

● Support Vector Machine

● Logistic Regression

You might also like