Full Report Complete
Full Report Complete
A PROJECT REPORT
Submitted by
SRUTHI R [211420104271]
SWETHA M [211420104281]
VIMALA PRIYA R [211420104306]
of
BACHELOR OF ENGINEERING
IN
APRIL 2024
PANIMALAR ENGINEERING COLLEGE
(An Autonomous Institution, Affiliated to Anna University, Chennai)
BONAFIDE CERTIFICATE
Certified that this project report “GAS LEAKAGE AND AUTOMATIC GAS
EMPTY ALERT SYSTEM USING IOT BASED DEEP LEARNING” is
the bonafide work of “SRUTHI R (211420104271), SWETHA M
(211420104281), VIMALA PRIYA R (211420104306)” who carried out the
project work under my supervision.
Signature of the HOD with date Signature of the Supervisor with date
DR L. JABASHEELA M.E., Ph.D., MRS. P. DEEPA, M.E.,
Certified That the above Candidates was examined in the End Semester Project
Viva-Voce Examination held on_____________
PRIYA R (211420104306) hereby declare that this project report titled GAS
IOT BASED DEEP LEARNING, under the guidance of Mrs. P. Deepa M.E.,
SRUTHI R
SWETHA M
VIMALA PRIYA R
ACKNOWLEDGEMENT
Our gratitude is also extended to our Principal, Dr. K. MANI, M.E., Ph.D.,
whose facilitation proved pivotal in the successful completion of this project.
SRUTHI R
SWETHA M
VIMALA PRIYA R
ABSTRACT
necessitating timely detection to prevent potential hazards and ensure occupant safety. This
abstract presents a gas leakage detection system designed to enhance safety measures. The
system utilizes a network of strategically placed gas sensors capable of detecting various
gases commonly found in residential and industrial settings, such as methane, propane, and
carbon monoxide. These sensors continuously monitor the environment and provide real-time
data to an AI algorithm, which analyses readings to determine the presence and severity of
gas leaks. Additionally, the system integrates smart gas meters or gas level sensors to address
the issue of gas emptying or depletion in cylinders or tanks. By combining gas leakage
detection with gas level monitoring, the system can identify instances where leaks occur due
gas leak or an emptying cylinder, the system employs automatic alert mechanisms through
multiple communication channels, including mobile notifications, email alerts, and audible
alarms. These alerts provide essential information about the location and severity of the issue,
enabling prompt and appropriate actions such as evacuation or gas supply shut-off. The AI
component of the system continuously learns and adapts to various environmental conditions,
enhancing detection accuracy and minimizing false alarms. Leveraging historical data, the
system can identify patterns and potential causes of gas leaks, offering recommendations for
gas level monitoring, and automatic alert mechanisms, this system offers a comprehensive
solution to address gas-related safety concerns, empowering users to respond promptly and
iii
LIST OF TABLES
iv
LIST OF FIGURES
v
A.14 MEASURES GAS WEIGHT 41
vi
LIST OF ABBREVIATIONS
AI - Artificial Intelligence
vii
TABLE OF CONTENTS
ABSTRACT iii
LIST OF TABLES iv
LIST OF FIGURES v
LIST OF ABBREVIATIONS vi
1. INTRODUCTION 1
1.1 Overview 2
2. LITERATURE SURVEY 4
3. SYSTEM ANALYSIS 9
4. SYSTEM DESIGN 17
5. SYSTEM ARCHITECTURE 20
viii
CHAPTER NO. TITLE PAGE NO.
6. SYSTEM IMPLEMENTATION 22
7. SYSTEM TESTING 28
ENHANCEMENT
8.1 Conclusion 34
9. APPENDICES 35
10. REFERENCES 44
ix
CHAPTER 1
INTRODUCTION
INTRODUCTION
The main objectives of this project are to automatically prevent or reduce the risks associated
with leaks of LPG also known as propane Autogas. Additionally, this project attempts to offer
an automatic petrol booking service by state-of-the-art communication technology. Gas leaks
pose a serious threat to public safety in both commercial and residential environments. Initial
identification of gas leaks is essential to avert possible dangers and guarantee the safety of
building occupants. A pre-configured mobile number will be alerted to a petrol leak via a
GSM alarm message and a buzzer sound.
The proposed work notifies people in case of a leak and automatically arranges for petrol
refills from petrol booking facilities before cylinders run out. The proposed concept
automates gas refills from gas booking centres before cylinders run out and alerts individuals
if there's a leak. This AI-based gas outflow detecting system offers safety, efficiency, and
convenience, with a wide scope and benefits in terms of safety, efficiency, and convenience.
The system notifies individuals before any leakage and automatically books for gas refills
before the cylinder gets empty. This system can provide more safety to an AI-based gas
outflow detecting system has a wide scope and offers several benefits in terms of safety,
efficiency, and convenience.
AI algorithms can provide early detection of gas leaks, often before they become a significant
threat. This allows for timely intervention and preventive measures. These systems often
include remote monitoring capabilities. The status of the gas supply can be checked by the
users and receive alerts even when they are not at home or on-site. Users can receive real-
time alerts through various means, such as mobile apps, SMS, or email, making it convenient
to stay informed about gas safety. AI-based systems can help users comply with regulations
and demonstrate a commitment to safety for contributing energy efficiency by ensuring that
gas appliances are not left running unnecessarily or leaking gas. Reducing gas leaks and
optimizing gas usage can have positive environmental impacts by reducing greenhouse gas
emissions.
1
1.1 OVERVIEW
An AI-based gas leakage detection system has a wide scope and offers several benefits in
terms of safety, efficiency, and convenience. Here are some key aspects of the scope, The
primary purpose of AI-based gas leakage detection systems is to enhance safety by detecting
gas leaks promptly. This is especially crucial for preventing accidents, such as fires or
explosions, in homes, industries, and commercial spaces. AI algorithms can provide early
detection of gas leaks, often before they become a significant threat. This allows for timely
intervention and preventive measures. These systems often include remote monitoring
capabilities.
In addition to safety, these systems can contribute to energy efficiency by ensuring that gas
appliances are not left running unnecessarily or leaking gas. In some regions, there are
regulations and standards related to gas safety. AI-based gas leakage detection systems can
help users comply with these regulations and demonstrate a commitment to safety. Reducing
gas leaks and optimizing gas usage can have positive environmental impacts by reducing
greenhouse gas emissions.
The development of AI-based gas leakage detection systems also opens opportunities for
research and innovation in the fields of AI, IoT, and sensor technology. It is important to
mention that as technology progresses, the range of these systems will also develop. As AI
and IoT technologies progress, these systems will likely become more sophisticated and
capable of addressing a broader range of gas-related safety and efficiency challenges.
Additionally, the adoption of these systems may increase as safety awareness grows, making
them an asset in various contexts.
2
1.2 PROBLEM DEFINITION
Propane Autogas is a fuel that is highly preferred in urban areas due to its eco-friendliness
and cleanliness; yet gas leaks are a major problem in both the industrial and residential
sectors. Gas leaks are a major problem in homes, especially in residential areas and in gas-
powered cars. It is advised to have a gas leak detecting kit to avoid mishaps. This project
offers a thorough analysis and novel design for a gas leak system for detecting and managing
that incorporates an enhanced warning system in addition to automatically detecting and
notifying users. The system, equipped with a sensitive sensor, effectively detects gas leaks,
thereby enhancing safety in residential buildings and cars.
3
CHAPTER 2
LITERATURE SURVEY
Year: 2023
Authors: Tao Tao, Zerong Deng, Zhuo Chen, Le Chen, Lifeng Chen, Shan Huang
Description
It is dangerous to evaluate the systemic risk of gas leakage in utility networks in order to
reduce the damage caused by leaks. Only a relatively small fraction of the gas pipeline
network can often be evaluated at a time since leakage detection systems mostly rely on time-
consuming and costly human labour, such as physically examining and analysing the risk. It
is crucial to establish systems that can automatically and methodically assess the entire gas
pipeline network and identify high-risk locations for prompt inspection.
Year: 2023
Authors: Lakshmi Lavanya, Devi Vara Prasad, Sravya, Durga Prasad, Seshadri
Description
Sensor is used to detect the Gas Leakage. This type of sensors are commonly utilized to
detect hazardous gases. An audible alert is given by the buzzer when gas is present. If a gas
leakage is not promptly detected, it leads to severe consequences. However, these days, we
may use gas sensors to detect gas leaks. IOT and Arduino-based gas leak detection systems,
for example, can be put in hotels, houses, and LPG storage facilities. This gas detector device
detects leaks of gas. When the gas in the air is normal, the circuit's LED will shine green,
4
signalling that everything is safe. The sensor detects gas leakage and illuminates the red LED
green, triggering a message and initiating a phone call to the owner.
3.Title: IOT Based Smart Home Automation LPG Leakage Detection With AI
Year: 2022
Description
4.Title: Detection of Gas Leakages Using a Laser-Based Methane Sensor and UAV
Year: 2021
Description
This study delves into the intriguing realm of airborne techniques to assess the integrity of
natural gas pipelines. This research aims to assess the efficacy of an autonomous flying
machine, fitted with an advanced device capable of detecting methane remotely, in the
identification of natural gas leakage within the extensive network of pipelines. There have
5
been numerous research papers discussing the use of UAVs fitted with laser detectors. These
studies involve tests primarily on simulated gas leaks that produce artificial methane.
Machine learning analysis identified spatially correlated regions with increased methane
concentrations, while investigating flight altitude's impact on measurement precision.
5.Title: Smart Gas Leakage Detection with Monitoring and Automatic Safety System
Year: 2021
Description
LPG leak detection equipped with an automated safety system and monitoring This system
will be beneficial to regularly monitor LPG consumption and take precautions against any
problems that may arise from LPG leakage, Considering the notable rise in command and
utilization of LPG. To enable the user to take the necessary action, we have developed a
system that uses an IoT mobile app to alert them to the quantity of LPG. Since LPG is highly
hazardous and combustible gas, so developed a safety system, that uses an IOT mobile app to
detect any LPG leaks and trigger the appropriate safety measures to prevent an explosion.
6.Title: Gas Leakage with Auto Ventilation and Smart Management System Using IoT
Year: 2021
Authors: Afsana Mim Anika, Ms. Nasrin Akter, Md. Niamul Hasan
Description
The concern of gas leaks and fires continues to be a major obstacle in the development of
comprehensive, secure and environmentally friendly kitchen models for smart homes.
However, in the modern era, security has also become a major concern. Most kitchens in
urban areas are quite tiny and lack enough ventilation. Gas spills in these situations raise the
possibility of a blast, fire, or suffocation. The development of smart management systems,
to overcome this challenge, it is crucial to have systems such as fire and gas leak detection.
Upon detection of a gas leak, the user will be alerted by SMS and Blynk application
instantaneously.
6
7.Title: Sensor-Based Gas Leakage Detector System
Year: 2020
Description
LPG is widely used in urban areas as a primary fuel source, mainly because it is more
eco-friendly compared to charcoal and firewood. One of the biggest issues in the industrial,
residential, and other sectors is gas leaks. Due to an increase in gas leaks, home security is
becoming a serious concern. Gas leaks are a major concern for ateliers, residential areas, and
gas-powered vehicles such as buses, autos, and compressed natural gas (CNG). Installing a
gas leak detection kit in susceptible locations is one way to prevent mishaps
caused by gas leaks. The design of an automatic gas leak detection system that can locate,
alert, and control leaks will be the main topic of discussion.
Year: 2020
Description
Year: 2019
Authors: Liqun Wu, Ting Zhang, Hongcheng Wnag, Chengxin Tang, Linan Zhang
Description
To prevent explosive mishaps in industrial and in residential settings, Catalyst sensors are
widely utilized for determining the concentration of flammable gases. Typically, a platinum
coil encloses carrier and catalyst elements that make up the structure of the sensor's sensitive
element. On the other hand, the platinum coil is usually cylindrical and has a micron-grade
size. The inside cavity of the coil and the quantity of carrier and catalyst materials are very
difficult to fill, which increases the unpredictability and irreproducibility of the sensor's
performance. This study offers an innovative approach by combining carrier and catalytic
substances within a platinum coil and producing the micropellistor using a drop-on-demand
droplet generator.
10.Title: Gas Leakage Source Detection and Boundary Tracking with Wireless Sensor
Networks
Year: 2016
Authors: Lei Shu, Mithun Mukherjee, Xiaoling Xu, Kun Wang, And Xiaoling Wu
Description
Due to the losses and damage brought about by poisonous gas leaks in large-scale
petrochemical plants, in both academic and industrial settings, researchers have concentrated
a considerable lot of effort on border monitoring of continuous objects and gas leakage
source detection. The last few decades have seen a rapid advancement and widespread use of
wireless sensor networks (WSNs), making source localization and boundary estimation top
priorities for research projects. Furthermore, the gas leakage moves quickly, changes shape,
8
and is invisible in comparison to other one-time detection, a precise boundary prediction is an
important difficulty.
CHAPTER 3
SYSTEM ANALYSIS
Gas sensors continuously scan the surrounding air, providing the microcontroller with data to
process. After processing, the data is sent to the cloud, where a deep learning model examines
it to look for trends related to gas leaks. The technology notifies users or authorities promptly
in case of a possible gas leak by triggering alarms via multiple communication channels. A
user interface allows for real-time monitoring of the system, and reliable maintenance
procedures are followed. In a variety of settings, this integrated technique allows for the
automated and effective identification of gas leaks.
DRAWBACKS
This system has Arduino Uno microcontroller for detecting abnormalities and ensuring safety
measures. The LCD display is utilized to provide real-time updates on the ongoing execution
process. The gas sensor is used for the detect the gas leakages and immediately send
information to controller. The load cell is used for measuring the weight of cylinder, if gas
leakage continues it send data to the controller. If children accidently ignite gas in the
kitchen, it will lead to gas explosion. To fix this problem, Python Image Processing is used to
9
detect whether the person closer to the gas is child or an adult. If the individual in proximity
to the gas is identified as an adult, the system grants access to turn on the gas. However, if the
person is recognized as a child, as a precautionary safety measure, the gas will be
automatically turned off by the system. If the gas is continually leaking from gas cylinder,
then the gas sensor detects it. Then, it sends the information to controller, while the solenoid
valves close immediately.
The data will be transmitted to IOT cloud and also the information will send to user mobile
number through GSM module. It will also indicate the user about the gas leakage using the
buzzer alert.
ADVANTAGES
The age verification system provides more security and prevents from child accessing
the kitchen.
The system has automatic triggers that improves the efficiency of emergency response
teams, enabling them to address incidents promptly.
Requirements are the basic constrains that are required to develop a system. Requirements are
collected while designing the system. The following are the requirements that are to be
discussed.
Power Supply
The power supply should deliver constant output regulated power supply for successful
working of the project. A 0-12V/1 mA transformer is used for this purpose. The primary of
this transformer is connected into main supply through on/off switch& fuse for protecting
from overload and short circuit protection.
Arduino UNO
10
frequency of 16 MHz, a connection for USB, a jack for power supply, a header for
ICSP (In-Circuit Serial Programming), and a button for resetting. It contains
everything needed to support the microcontroller.
Load Cell
A load cell is a type of force sensor that utilizes strain gauges as a basis for measuring force,
utilizing piezo-resistive force detectors in force transducers. Instead of linking the force to the
strain gauge's deformation, these force sensors directly detect the force. The electrical signal
changes in accordance with the force applied to the load cell.
The MQ-2 gas sensor consists of a sensitive material called SnO2, which has lower
conductivity when exposed to pure or clean air. As the concentration of the combustible gas
increases, the conductivity of the sensor also increases. The MQ-2 gas sensor is highly
sensitive to LPG, Propane, and Hydrogen, and can also be utilized to detect Methane and
other types of flammable gas. Sensor is sensitive to flammable gas and smoke.
IoT
Internet of Things pertains to the combined infrastructure of interconnected devices and the
technology that enables communication among devices and the cloud, as well as between the
devices themselves.
LCD
The LCD screen serves as a versatile electronic display module, with numerous practical uses
in various fields. The utilization of a 16x2 LCD display is quite fundamental and is
widespread in numerous devices and circuits. Seven segment displays and other multi
segment LEDs are not as favoured as these modules.
Relay
Relays are the primary protection as well as switching devices in most of the control
processes or equipment. The relay itself has the capability to open or close contacts or circuits in
11
according to one or more electrical quantities, such as voltage or current. When it comes to isolating
or altering the status of an electric circuit, a relay functions as a switching device.
Solenoid Valve
The presence of a solenoid valve is essential in every fluid control system. It is a valve that is
often used to regulate the movement of liquid or gas and operates with a combination of
electrical and mechanical components. Solenoid valves are used whenever the flow of media
must be controlled automatically.
GSM
The globally recognized standard for digital cellular communication is known as the Global
System for Mobile Communication (GSM). GSM was a significant improvement over the
first generation of cellular networks and represented a transition from Analog to Digital
telecommunications.
RS232
GSM/GPRS Modem-RS232 incorporates the SIM900 Dual Band GSM/GPRS engine, which
operates on the 900/1800 MHz frequencies. Additionally, the modem has an RS232 interface,
it can be used to connect a PC and a microcontroller that has an RS232 chip (MAX232).
Anaconda
Anaconda is an open-source package manager for Python and R. It is the most popular
platform among data science professionals for running Python and R implementations. There
are over 300 libraries in data science, so having a robust distribution system for them is a
must for any professional in this field. Package management and deployment are made easier
with Anaconda. Additionally, it offers a plethora of tools that assist you in gathering data via
machine learning and artificial intelligence algorithms. With Anaconda, we can easily set up,
12
manage, and share Conda environments. Moreover, we can deploy any required project with
a few clicks when we’re using Anaconda.
There are many advantages to using Anaconda and the following are the most prominent ones
among them:
Anaconda is free and open source. This means we can use it without spending any
money.
In the data science sector, Anaconda is an industry staple. It is open source too, which
has made it widely popular.
If we want to become a data science professional, you must know how to use
Anaconda for Python because every recruiter expects us to have this skill. It is a must-
have for data science.
It has more than 1500 Python and R data science packages, so we don’t face any
compatibility issues while collaborating with others. For example, suppose our colleague
sends we a project which requires packages called A and B but we only have package A.
Without having package B, we wouldn’t be able to run the project. Anaconda mitigates the
chances of such errors. We can easily collaborate on projects without worrying about any
compatibility issues. It gives we a seamless environment that simplifies deploying projects.
We can deploy any project with just a few clicks and commands while managing the rest.
Anaconda has a thriving community of data scientists and machine learning professionals
who use it regularly. If you encounter an issue, chances are, the community has already
answered the same. On the other hand, we can also ask people in the community about the
issues we face there, it’s a very helpful community ready to help new learners. Because
Anaconda integrates nicely with well-known tools like TensorFlow, Scikit-Learn, and
Theano, it makes it simple to develop and train machine learning and deep learning models.
With Anaconda, we can use Bokeh, Holoview, Matplotlib, and Datashader to generate
visualisations.
13
3.3.2.1 How to Use Anaconda for Python
After going over every detail in our Python Anaconda lesson, let's talk about some
essential commands that we can use to get started with this package management.
To begin using Anaconda, we’d need to see how many Conda environments are present in our
machine.
We can create a new Conda environment by going to the required directory and use this
command:
We can replace <your_environment_name> with the name of our environment. After entering
this command, conda will ask we if we want to proceed to which we should reply with y:
proceed ([y])/n)?
On the other hand, if we want to create an environment with a particular version of Python,
we should use the following command:
Similarly, if we want to create an environment with a particular package, we can use the
following command:
Here, we can replace pack_name with the name of the package we want to use.
14
If we have a .yml file, you can use the following command to create a new Conda
environment based on that file:
We have also discussed how you can export an existing Conda environment to a .yml file
later in this article.
We should activate the environment before we start working on the same. Also, replace the
term <environment_name> with the environment name we want to activate. On the other
hand, if we want to deactivate an environment use the following command:
conda deactivate
Now that you have an activated environment, you can install packages into it by using
the following command:
Replace the term <pack_name> with the name of the package we want to install in our Conda
environment while using this command.
conda update
The above command will update all the packages present in the environment. However, if we
want to update a package to a certain version, we will need to use the following command:
15
3.3.2.5 Exporting an Environment Configuration
Suppose we want to share your project with someone else (colleague, friend, etc.).
While we can share the directory on Github, it would have many Python packages, making
the transfer process very challenging. Instead of that, you can create an environment
configuration .yml file and share it with that person. Now, they can create an environment
like our one by using the .yml file.
For exporting the environment to the .yml file, we’ll first have to activate the same and run
the following command:
The person we want to share the environment with only must use the exported file by using
the ‘Creating a New Environment’ command we shared before.
If we want to uninstall a package from a specific Conda environment, use the following
command:
Sometimes, we don’t need to add a new environment but remove one. In such cases, we must
know how to delete a Conda environment, which we can do so by using the following
command:
The above command would delete the Conda environment right away.
16
CHAPTER 4
SYSTEM DESIGN
A data flow diagram (DFD) is a visual depiction of how data flows within an information
system, illustrating its procedural elements. It can be used for the visualisation of data
processing (structured design). It is also known as bubble charts. DFD is a designing tool
used in the top-down approach to systems design. DFD levels are 0 and 1.
17
FIG 4.1.1 DFD LEVEL 0
Level DFDs represent the complete system as a single process. It rotates every process and
subprocess that comes together in a sequence to form the complete system. This along with
and 1-level data flow diagrams comprise the “fundamental system model”. In 1-level DFD,
the context diagram is decomposed into multiple bubbles/processes. In this level, we
highlight the main functions of the system and breakdown the high-level process of 0-level
DFD into subprocesses.
18
4.2 BLOCK DIAGRAM
A system diagram known as a block diagram depicts the main components or functions
through interconnected blocks, with lines illustrating the connections among these blocks.
The indicated gas safety system makes use of an LCD display for real-time updates and an
Arduino Uno microcontroller for anomaly detection. Python image processing is used to
differentiate between adults and children, so that children cannot access gas. AI is used to
identify a person's presence before permitting gas use. To ensure gas safety, a sensor that
looks for any leaks triggers a solenoid valve, which quickly closes the gas valve. To
accurately monitor a gas's level, a load cell monitors its weight. GSM technology provides
alerts in the event of anomalies, while IoT connection guarantees error-free data transfer.
19
Users have the ability to monitor the performance of the system and receive alerts regarding
potential gas-related dangers. To put it briefly, the system combines the Arduino Uno, GSM,
load cells, gas sensors, Python image processing, and Internet of Things technologies to offer
a complete solution.
CHAPTER 5
SYSTEM ARCHITECTURE
A system architecture is the conceptual structure that provides an overview of how a system
is organized, operates, and is viewed from different angles. An architecture description refers
to a formal representation and explanation of a system, designed to facilitate understanding of
its structures and behaviours for analytical purposes. We have classified system architectures
into three categories: integrated, distributed, and mixed. The architecture's nature relies on the
interfaces it employs, and it is clear that integrated systems have more interfaces, which are
also characterized by unclear definitions.
20
FIG 5.1 SYSTEM ARCHITECTURE
MODULES
This system has Arduino Uno microcontroller for detecting abnormalities and
ensuring safety measures.
The LCD display is utilized to provide real-time updates on the ongoing execution
process.
The gas sensor is used for the detect the gas leakages and immediately send
information to controller.
The load cell is used for measuring the weight of cylinder, if gas leakage continues it
send data to the controller.
5.2.2 Age Verification
Children accidently ignites gas in the kitchen, which leads to cause gas explosion.
To fix this problem, Python Image Processing is used to detect whether the person
closer to the gas is child or an adult.
If the individual in proximity to the gas is identified as an adult, the system grants
access to turn on the gas.
However, as a safety precaution, the system will immediately cut off the gas supply if
it determines that the person is a minor.
5.2.3 Send Alert and Reduce risk
If the gas is continually leaking from gas cylinder, then the gas sensor detects it.
Then, it sends the information to controller, while the solenoid valves close
immediately.
The data will be transmitted to IOT cloud, and the information will send to user
mobile number through GSM module.
It will also indicate the user about the gas leakage using the buzzer alert.
21
CHAPTER 6
SYSTEM IMPLEMENTATION
apps.py
class AppConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'app'
forms.py
class UserImageForm(forms.ModelForm):
class Meta():
model = UserImageModel
fields = ['image']
models.py
class UserImageModel(models.Model):
def __str__(self):
return str(self.image)
22
urls.py
urlpatterns = [
views.py
import numpy as np
import serial
def home(request):
print("HI")
if request.method == "POST":
form = forms.UserImageForm(files=request.FILES)
if form.is_valid():
print('HIFORM')
form.save()
obj = form.instance
23
#('obj',obj)
result1 = UserImageModel.objects.latest('id')
models=
keras.models.load_model('C:/Users/VIMALAPRIYA/Music/CODE/CODE/Deploy/app/
adultorchild.h5')
image = Image.open("C:/Users/VIMALAPRIYA/Music/CODE/CODE/Deploy/media/"
+ str(result1)).convert("RGB")
image_array = np.asarray(image)
data[0] = normalized_image_array
classes = ['Adult','Child']
prediction = models.predict(data)
idd = np.argmax(prediction)
a = (classes[idd])
if a == 'Adult':
b = b'A'
ser.write(b)
ser.close()
print('This is Adult')
elif a == 'Child':
b =b'C'
24
ser.write(b)
ser.close()
print('This is Child')
else:
print('else')
else:
form = forms.UserImageForm()
# result = UserImageModel.objects.latest('id')
# result = result.image
#models =
keras.models.load_model('D:/BRAG/WORK/WORKING/DEEPLEARNING/HUMAN
ACTIVITY - DL20/CODE/Deploy/app/LENET.h5')
# test_image = image.load_img('D:/BRAG/WORK/WORKING/DEEPLEARNING/HUMAN
ACTIVITY - DL20/CODE/Deploy/media/' + str(result),target_size=(225, 225))
# test_image = image.img_to_array(test_image)
# result = models.predict(test_image)
# prediction = result[0]
# prediction = list(prediction)
#classes=
['calling','clapping','cycling','dancing','drinking','eating','fighting','hugging','laughing','running',
'sitting']
25
# output = dict(output)
# if output['calling'] == 1.0:
# a='calling'
# a='clapping'
# a="cycling"
# a="dancing"
# a='drinking'
# a="eating"
# a="fighting"
# a='hugging'
# a="laughing"
# a="running"
# a="sitting"
26
manage.py
#!/usr/bin/env python
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')
try:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
27
CHAPTER 7
SYSTEM TESTING
There are many different types of testing methods or techniques used as part of the software
testing methodology. Testing is performed to identify errors. It is used for quality assurance.
Testing is an integral part of the entire development and maintenance process. The goal of the
testing during this phase is to verify that the specification has been accurately and completely
incorporated into the design, as well as to ensure the correctness of the design itself. For
example, the design must not have any logic faults in the design before coding commences,
otherwise, the cost of fixing the faults will be considerably higher as reflected. Detection of
design faults can be achieved by means of inspection as well as a walkthrough.
Testing is one of the important steps in the software development phase. Testing checks
for the errors, of the project testing involves the following test cases:
● Static analysis is used to investigate the structural properties of the Source code.
● Dynamic testing is used to investigate the behaviour of the source code by executing the
Functional test cases involved exercising the code with nominal input values
for which the expected results are known, as well as boundary values and special values, such
as logically related inputs, files of identical elements, and empty files.
Performance Test
It determines the amount of execution time spent in various parts of the unit, program
throughput, and response time and device utilization by the program unit.
28
7.1.3 Unit Testing
Unit testing is conducted to verify the functional performance of each modular component of
the software. Unit testing focuses on the smallest unit of the software design (i.e.), the
module. The white box testing techniques were heavily employed for unit testing.
This testing is also called Glass box testing. In this testing, by knowing the
specific functions that a product has been designed to perform tests can be conducted that
demonstrate each function is fully operational and at the same time search for errors in each
function. It is a test case design method that uses the control structure of the procedural
design to derive test cases. Basis path testing is white box testing.
● Cyclomatic complexity
29
● Equivalence partitioning.
● Comparison testing
This approach evolved from the unstructured testing of small programs. Another strategy is to
construct the product in increments of tested units. A small set of modules are integrated
together and tested, to which another module is added and tested in combination. And so on.
The advantages of this approach are that interface dispenses can be easily found and
corrected.
The major error that was faced during the project is a linking error. When all the
modules are combined the link is not set properly with all support files. Then we checked out
for interconnection and the links. Errors are localized to the new module and its
intercommunications. The product development can be staged, and modules integrated as
they complete unit testing. Testing is completed when the last module is integrated and tested.
A software testing strategy provides a road map for the software developer. Testing is a set
activity that can be planned and conducted systematically. For this reason, a template for
30
software testing a set of steps into which we can place specific test case design methods
should be strategy should have the following characteristics:
● Testing begins at the module level and works “outward” toward the integration of the
● The developer of the software and an independent test group conducts testing.
● Testing and Debugging are different activities, but debugging must be accommodated in
The logical and syntax errors have been pointed out by program testing. A syntax error
is an error in a program statement that violates one or more rules of the language in which it
is written. An improperly defined field dimension or omitted keywords are common syntax
errors. These errors are shown through error messages generated by the computer. A logic
error on the other hand deals with the incorrect data fields, out-of-range items, and invalid
combinations. Since the compiler will not deduct logical errors, the programmer must
examine the output. Condition testing exercises the logical conditions contained in a module.
The possible types of elements in a condition include a Boolean operator, Boolean variable, a
pair of Boolean parentheses A relational operator or an arithmetic expression.
The condition testing method focuses on testing each condition in the program. The purpose
of the condition test is to deduct not only errors in the condition of a program but also other
errors in the program.
Security testing attempts to verify the protection mechanisms built into a system well,
in fact, protect it from improper penetration. The system security must be tested for
invulnerability from frontal attacks must also be tested for invulnerability from rear attacks.
During security, the tester places the role of the individual who desires to penetrate the
system.
31
7.2.3 Integration Testing
User acceptance of the system is a key factor for the success of any system. The system
under consideration is tested for user acceptance by constantly keeping in touch with
prospective systems and users at the time of developing and making changes whenever
required. This is done regarding the following points.
32
7.3 TEST CASES AND REPORTS
33
adult adult
5 Verifies whether the Identifies as As expected, it pass
uploaded image is child identifies as child
child
6 If child image is Solenoid valve As expected, it is Pass
detected, solenoid closed, intimate closed, user
valve closes to the user received message
7 The gas sensor will Notifies the user As expected, it Pass
notify the user if it through buzzer notifies the user
detects a gas leak alert and SMS through SMS
CHAPTER 8
8.1 CONCLUSION
The key advantages of this basic gas leak detector are its ease of use and its capacity to alert
relevant parties to an LPG gas leak. Future features of this detector will include a tripper
circuit and gsm module, which will boost system effectiveness and promote user safety. The
other advantage of this system includes its audio-visual warning systems. This detector is
implemented successfully and is easy to use and also a low-cost product.
Another advantage of this device is that even though if no one is there in the house and then
gas leaks occur, GSM module is there to send immediate messages to the stakeholders
regarding the gas leak and thus it lowers the intensity of accidents. GSM module in this
device ensures better safety regarding the gas leaks.
34
Overall, software and hardware parts of the systems have been developed and tested by
introducing a small amount of LPG near gas sensor module. One of the notable future
functions of this system is to add a sub system where wastage of gas and the uses of gas can
be monitored using this system. The system is flexible as a greater number of sensors and
relays can be added to it according to the whole LPG supply setup in those premises.
In future this system will have a feature where it can notify the emergency services if any
accidents happen. A mobile app and web-based app for real time monitoring also will be
added. In the user app for this system many smart features will be added. The overall features
will make the system safer for the users.
The system will be optimized for use in many places like the car, the home, industries and
many other places. After designing the final prototype with smart multifunctional features,
the system will be implemented in real life scenarios as a pilot project.
APPENDICES
35
Open the deploy folder in visual studio code
36
FIG A.4 LINK FOR WEBPAGE
37
FIG A.6 SELECT ADULT IMAGE
38
FIG A.8 LCD DISPLAY FOR ADULT
39
FIG A.10 TESTED IMAGE IS CHILD
40
FIG A.12 NOTIFIES THE USER AS CHILD DETECTED
41
FIG A.14 MEASURES GAS WEIGHT
42
FIG A.15 NOTIFIES AS GAS WEIGHT IS LOW
43
FIG A.18 DISPLAYS PREVIOUS DATA
REFERENCES
3. Chen.H and Copes.R,(2013) Review of Air Ǫuality Index and Air Ǫuality Health Index:
Environmental and Occupation Health. Toronto, Ontario: Public Health Ontario.
44
4. Cheng.W, Shen.Y, Zhu.Y, and Huang.L,(2018) “A neural attention model for urban air
quality inference: Learning the weights of monitoring stations” in Proc. 32nt AAAI Conf.
Artif. Intell., pp. 2151–2158.
6. Ding.A, Huang.X, and Fu.C,(2017) “Air pollution and weather interaction in east asia,” in
Oxford Research Encyclopedia of Environmental Science, London, U.K.: Oxford Univ.
Press.
8. Gannavaram V, Tulasi Krishna & Singh,Akhilesh & Gannavaram, Venkat Praveen &
Gannavaram, Venkat Chinmai Sai & Ohene-Akoto, Justice & Keshipeddi, Sai & Chandel,
Garima & Sangem, Raviteja & Koul, Sumit & A., Sabarivani & Deo, Rajesh & A.,
Ambikapathy. (2021). IoT and Machine Learning-based Headlight Intensity Changing
device for Electrical Vehicles.
10. Hu.W, Liu.B, Gomes.J, Zitnik.M, Liang.P, Pande.V, and Leskovec.J,(2020) “Strategies
for pre-training graph neural networks,” in Proc. Int. Conf. Learn. Representation.
11. Ignaccolo.R, Ghigo.S, and Bande.S,(2013) “Functional zoning for air quality,” Environ.
Ecological Statist., vol. 20, no. 1, pp. 109–127.
45
Conference on Computing Communication and Automation (ICCCA), Greater Noida,
India, pp. 1-5, doi: 10.1109/CCAA.2018.8777463.
14. Kurzekar.R, Arora.H and Shrestha.R,(2017) ”Embedded Hardware Prototype for Gas
Detection and Monitoring System in Android Mobile Platform” IEEE International
Symposium on Nanoelectronic and Information Systems (iNIS), Bhopal, 2017, pp. 6-10,
doi:10.1109/iNIS.2017.11.
15. Li.Y, Yu.R, Shahabi.C, and Liu.Y,(2017) “Diffusion convolutional recurrent neural
network: Data-driven traffic forecasting”, arXiv:1707.01926.
16. Luo.Z, Huang.J, Hu.K, Li.X, and Zhang.P,(2019) “AccuAir: Winning solution to air
quality prediction for KDD cup 2018, ” in Proc. 25th ACM SIGKDD Int. Conf. Knowl.
Discov. Data Mining, pp. 1842–1850.
17. Macker.A, Shukla.A.K, Dey.S and Agarwal.J,(2018) ”ARDUINO Based LPG Gas
Monitoring Automatic Cylinder Booking with Alert System,” 2018 2nd International
Conference on Trends in Electronics and Informatics (ICOEI), Tirunelveli, pp. 1209-
1212, doi: 10.1109/ICOEI.2018.8553840.
19. Muddassir.M,(2017) Alat Monitoring Gas/Asap Pada Ruangan Berbasis Relay Raspberry,
Universitas Negeri Makasar.
20. Priya.D.H and Babu.L,(2014) “Gas leakage system,” International Journal of Scientific
and Research Publications, p. 653.
21. Suma.V, Shekar.R.R and Akshay.K.A,(2019) ”Gas Leakage Detection Based on IOT,” 3rd
International conference on Electronics, Communication and Aerospace Technology
(ICECA), Coimbatore, India, 2019, pp. 1312-1315, doi: 10.1109 /ICECA .
2019 .8822055.
22. Santi Putri.M and Tio.M,(2018) "IoT-based Gas Leak Detection Device," 2018
International Conference on Applied Engineering (ICAE), Batam, Indonesia, pp. 1-4,
Doi: 10.1109/INCAE.2018.8579396.
46
23. Supeno.B.A, Rancang Bangun(2016) Data Logging Berbasis Web Server Pada Robot
Balon Udara Untuk Deteksi Kebocoran Pipa Gas, Institut Teknologi Sepuluh.
26. Tobler.W.R,(1970) “A computer movie simulating urban growth in the detroit region,”
Econ. Geogr., vol. 46, no.sup1, pp. 234–240.
27. Tummanapally, Shraddha Shree and Sunkari, Saideep,(2021, July 12) Smart Vehicle
Tracking System using GPS and GSM Technologies. Available at SSRN:
https://ssrn.com/abstract=3884903 or http://dx.doi.org/10.2139/ssrn.3884903
28. Tummanapally, Shraddha Shree and Sunkari, Saideep,(2021, July 12) Traffic Data
Collection and Analysis based on Wireless Sensor Network. Available at SSRN:
https://ssrn.com/abstract=3885102 or http://dx.doi.org/10.2139/ssrn.3885102
29. Unnikrishnan.S, Razil.M, Benny.J, Varghese.S and Hari.C.V,(2017) "LPG monitoring and
leakage detection system," 2017 International Conference on Wireless Communications,
Signal Processing and Networking (Wisp NET), Chennai, India, pp. 1990-1993, Doi:
10.1109/WiSPNET.2017.8300109.
32. Wang.S, Li.Y, Zhang.J, Meng.Q, Meng.L, and Gao.F,(2020) “PM2. 5- GNN: A domain
knowledge enhanced graph neural network for PM2. 5 forecasting,”, arXiv:2002.12898.
47
33. Yi.X, Z.Duan, Li.R, Zhang.J, Li.T, and Zheng.Y,(2020) “Predicting finegrained air quality
based on deep neural networks,” IEEE Trans. Big Data, early access, Dec. 24, doi:
10.1109/ TBDATA.2020.3047078.
34. Wu.N, Zhao.X.W, Wang.J, and Pan.D,(2020) “Learning effective road network
representation with hierarchical graph neural networks,” in Proc. 26th ACM SIGKDD Int.
Conf. Knowl. Discov. Data Mining, 2020, pp. 6–14.
35. Yi.X, Zhang.J, Wang.Z, Li.T, and Zheng.Y,(2018) “Deep distributed fusion network for
air quality prediction,” in Proc. 24th ACM SIGKDD Int. Conf. Knowl. Discov. Data
Mining, pp. 965–973.
36. Yuan.J, Zheng.Y, and Xie.X,(2012) “Discovering regions of different functions in a city
using human mobility and pois,” in Proc. 18th ACM SIGKDD Int. Conf. Knowl. Discov.
Data Mining, pp. 186–194.
37. Zhang.C, Zheng.Y, Ma.X, and Han.J,(2015) “Assembler: Efficient discovery of spatial
co-evolving patterns in massive geo-sensory data,” in Proc. 21th ACM SIGKDD Int.
Conf. Knowl. Discov. Data Mining, pp. 1415–1424.
39. Zheng.Y, Liu.F, and Hsieh.H.P,(2013) “U-Air: When urban air quality inference meets big
data,” in Proc. 19th ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining, 2013, pp.
1436–1444
40. Zheng.Y et al.,(2015) “Forecasting fine-grained air quality based on big data,” in Proc.
21th ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining, pp. 2267–2276.
48