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

Weapon Detection Using Deep Learning Model For Smart Surveillance System

Uploaded by

kguptaacsb213232
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)
34 views11 pages

Weapon Detection Using Deep Learning Model For Smart Surveillance System

Uploaded by

kguptaacsb213232
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/ 11

ISSN: 2366-1313

Weapon Detection Using Deep learning model for Smart


Surveillance System
1
V.B.N. AJAY, 2K. NAGABALA SULOCHANA RANI

1Assistant professor, Dept. of CSE, NVR College of Engineering & Technology, Tenali-Guntur (Dt)

[email protected]

Assistant professor, Dept. of CSE, NVR College of Engineering & Technology, Tenali-Guntur (Dt)
2

[email protected]

Abstract: Safety and protection are a massive difficulty for today’s modern-day world. For a
country to be economically robust, it must make sure safe and secure surroundings for
traders and tourists. Having stated that, Closed Circuit tv (CCTV) cameras are getting used
for surveillance and to display activities i.e., robberies but those cameras nonetheless require
human supervision and intervention. We want a system which could automatically stumble on
these unlawful activities. Regardless of State-of-the-art deep trendy algorithms, speedy
processing hardware, and superior CCTV cameras, weapon detection in actual-time remains
an extreme challenge. This paper implements weapon detection using a Faster RCNN
algorithm. We have implemented Faster RCNN object detection model by training it on our
customized dataset. Our proposed system can also be implemented in high-end surveillance
and security robots to detect a weapon or unsafe assets to avoid any kind of assault or risk to
human life.

Keywords: Object detection, CCTV, weapon detection, Artificial intelligence, deep learning,
Faster RCNN.

I. INTRODUCTION It is necessary to detect or track all


movements in that 3D space. We can
Object detection techniques are useful to
depend on object detection algorithms to
make processing faster and simpler. There
not only detect objects in an image but to
are several areas where we can make use
do that with the speed and accuracy. We
of object detection including surveillance,
need object detection to improve
medical image analysis, human-computer
workplaces, increase security, and
interaction, and robotics. We can also
automated vehicle systems. Object
make use of object detection at 3D space.

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1167


ISSN: 2366-1313
detection can useful in case of traffic message to all Security guards alerting
management. Government can use object them without panicking the public or
detection techniques to keep track of alerting the attacker which will have
abnormal activities in various regions to catastrophic results. Since it is impossible
maintain security [1]. for all the security guards on duty to have
access to 24/7 CCTV access and monitor it
The work of this program is to basically do
all the time, it will be easier to just have
what a human can do but with the speed
the screenshot sent to them when there is
and accuracy of a machine. This is very
an actual attack. This screenshot can also
important especially in this use case as it is
provide all the necessary information
a life-or-death situation where even a split
needed like the attacker’s face, location,
difference makes a difference of saving
weapon carried etc. as a picture can
lives. A human who is responsible for
convey a thousand words, also it is more
monitoring the CCTV footage once finds a
reliable than eye evidence. Speaking of
gun (slower than an AI) will first go into a
evidence this project can also help in court
state of shock no matter how skilled they
cases. Since court cases drag on for years,
are, then will have to contact the
the evidence won't be waiting for that long.
authorities about the attacker. This process
For example, if the case requires photo
will also be time consuming as the person
evidence of an attack that happened years
has to verbally describe the attacker’s
ago, the CCTV storage in question might
clothing, face the weapon he or she carries
not have backed up footage fort years on
and the time and location of the incident.
as it is thousands of GB of footage. But
While all this is happening, the attacker
instead using this program the screenshot
would have already fled the scene of crime.
after being identified as an attack can be
Plus, it does not help since it's all just eye
stored as it is smaller in size [2].
evidence that the authorities have to take
when the attack takes place as only the Weapon or Anamoly detection is the
person responsible for monitoring has the identification of irregular, unexpected,
access to the CCTV and can convey the unpredictable, unusual events or items,
message. This program aims to remove which is not considered as a normally
these disadvantages, it is done by simply occurring event or a regular item in a
taking the screenshot when a weapon is pattern or items present in a dataset and
detected on the CCTV and send this thus different from existing patterns. An

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1168


ISSN: 2366-1313
anomaly is a pattern that occurs differently Weapon or Anamoly detection is the
from a set of standard patterns. Therefore, identification of irregular, unexpected,
anomalies depend on the phenomenon of unpredictable, unusual events or items,
interest. Object detection uses feature which is not considered as a normally
extraction and learning algorithms or occurring event or a regular item in a
models to recognize instances of various pattern or items present in a dataset and
category of objects. Proposed thus different from existing patterns. An
implementation focuses on accurate gun anomaly is a pattern that occurs differently
detection and classification. Also from a set of standard patterns. Therefore,
concerned with accuracy, since a false anomalies depend on the phenomenon of
alarm could result in adverse responses. interest [4]. Object detection uses feature
Choosing the right approach required to extraction and learning algorithms or
make a proper trade-off between accuracy models to recognize instances of various
and speed. Figure 1 shows the category of object.
methodology of weapons detection using
Artificial intelligence (AI) and computer
deep learning. Frames are extracted from
vision have enabled us to utilize video
the input video. Frame differencing
feeds in a way that we can detect and
algorithm is applied and bounding box
classify the objects of our interest in it.
created before the detection of object [3].
Therefore, it has been widely adopted and
used in many applications such as
autonomous vehicles, security feeds, etc.
Many algorithms and architectural works
have been done for the aforementioned
tasks. In 2020, Murthy, Chinthakindi
Balaram et al. [5] provided a detailed and
comprehensive discussion and analysis of
state-of-the-art techniques and algorithms
used in the field of computer vision using
deep learning technology, especially for
Fig.1 Object detection process
the GPU-based embedded system. They
II. LITERATURE SURVEY covered many state-of-the-art algorithms
that were trained and tested on COCO,

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1169


ISSN: 2366-1313
PASCAL VOC datasets. The algorithms surveillance and control systems require
included RCNN, SPPNet, SSD, RetinaNet, human resource supervision. Almost all
Squeeze Det, and CornerNet; these the criminal activities take place using
algorithms were compared and analyzed weapons mostly a handheld gun, revolver,
based on accuracy, speed, and pistol, swords etc. Therefore, automatic
performance for important applications weapons detection is a vital requirement
including pedestrian detection, crowd now a day. The current research is
detection, medical imaging, and face concerned about the real-time detection of
detection. Moreover, we also previously weapons for the surveillance cameras with
implemented a real-time weapon detector an implementation of weapon detection
model based on YOLOv4 trained with a using Efficient–Net. Real time datasets,
custom dataset. from local surveillance department’s test
sessions are used for model training and
In [6] Conventionally used cement –a
testing. Datasets consist of local
primary binder also a necessitate element
environment images and videos from
in producing concrete rates first in the
different type and resolution cameras that
construction industry. Production of
minimize the idealism. This research also
conventional cement requires a greater
contributes in the making of Efficient-Net
skill and is energy intensive. The usage of
that is experimented and results in a
waste materials in the production of
positive dimension. The results are also
concrete and reduction in cement content
been represented in graphs and in
was only the possible alternative in the
calculations for the representation of
past decade. Associated risks with the
results during training and results after
production of Ordinary Portland Cement
training are also shown to represent our
are well known. A greener aided with a
research contribution. Efficient-Net
natural friendly claim can be made only
algorithm gives better results than existing
with the usage of the waste materials and
algorithms.
reduction in evolving respiration gas to the
atmosphere. Almost all works are carried Akhil Addapa et al. [8] Efficient and
out using source material fly ash, with fine accurate object detection has been a
aggregate and coarse aggregate. important topic in advancement of
computer vision systems. With the advent
Erssa Ari et al. [7] The conventional Close
of deep learning techniques, the cure for
circuit television (CCTV) cameras-based

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1170


ISSN: 2366-1313
object detection has increased drastically. identifies the image. It creates a unique ID
The project aims to incorporate state-of- for each of initial detections. And then
the-art technique for object detection with tracking each of the objects as they move
the goal of achieving high accuracy with a around the frames in a video, maintaining
real-time performance. A major challenge the assignment of Unique ID's. This
in many of the object detection systems is project will be robust to occlusion. It can
the dependency on other computer vision also be used to detect missing object that
techniques for helping the deep learning- has been lost in between frames also
based approach, which leads to slow and
Devaki et al. [10] The object detection is
non-optimal performance. In this project,
used in almost every real-world
we use a completely deep learning
application such as autonomous traversal,
approach to solve the problem of object
visual system, face detection and even
detection in an end-to-end fashion. The
more. This paper aims at applying object
network is trained on the most challenging
detection technique to assist visually
publicly available dataset (PASCAL VOC),
impaired people. It helps visually impaired
on which a object detection challenge is
people to know about the objects around
conducted annually.
them to enable them to walk free. A
Deepika B et al. [9] An object needs to be prototype has been implemented on a
detected. This is done by the use of first Raspberry PI 3 using OpenCV libraries,
and foremost Computer vision Technology and satisfactory performance is achieved.
YOLO i.e., you Look Only Once. It finds In this paper, detailed review has been
several applications due to its tremendous carried out on object detection using
speed in detecting objects. These object region conventional neural network
needs to be tracked down, also using (RCNN) based learning systems for a real-
YOLO algorithm. YOLO object detection world application. This paper explores the
in images means not only to identify what various process of detecting objects using
kind of object is included, but also localize various object detections methods and
it inside the co-ordinates of the "bounding walks through detection including a deep
box" containing the Object. YOLO uses neural network for SSD implemented
deep learning and Convolution Neural using Caffe mod.
Networks (CNN) for object detection. It
III. PROPOSED METHODOLOGY
needs to "see" the image only once and

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1171


ISSN: 2366-1313
A wide variety of data sets that contain of. consequently, the offset values help in
both negative sets and positive sets were adjusting the bounding field of the area
acquired.to improve the accuracy of the idea. R-CNN set of rules starts off evolved
system it is imperative to have greater with making many small windows or
negative sets than positive. keeping this in filters and makes use of the grasping
mind two times the wide variety of bad algorithm to broaden the vicinity. Then it
statistics units (500 datasets) had been locates the equal shades in the regions and
used in comparison to the superb statistics merges them collectively. The version
unit's present (250 datasets). this feature maintains to merge all the areas together to
doubtlessly leads to greater accuracy to enhance the dimensions of the regions.
detecting the desired weapons which is the The picture is an illustration of a selective
ultimate end purpose of the system. For seek algorithm manipulate the spined
the analysis of the video footage from the phrases as you need.
CCTV, OpenCV module became installed
Faster R-CNN
place, in which a convolution neural
network is used to photo processing, In faster R-CNN instead of performing

category, segmentation and also different maximum pooling, we carry out ROI

associated sports. The CNN acts as a pooling for utilizing a single characteristic

feature extractor and the output dense layer map for all the areas. This warps ROIs into

includes the features extracted from the one single layer; the ROI pooling layer

image and the extracted capabilities are fed makes use of max pooling to convert the

into an SVM to categories the presence of features. in view that max pooling is

the object inside that candidate region likewise operating here, that’s why we are

proposal.in addition to predicting the able to recall fast R-CNN as an upgrade of

presence of an object inside the region the SPPNet. rather than generating layers

proposals, the algorithm also predicts 4 in a pyramid form, it generates only one

values that are offset values to increase the layer.The bounding field is further refined

precision of the bounding area. for with linear regression. faster R-CNN is

instance, given a location notion, the set of faster than SPPNet faster R-CNN makes

regulations ought to have expected the use of a region proposal method to create

presence of someone however the face of the sets of regions. faster R-CNN

that man or woman inside that place possesses an extra CNN for gaining the

concept ought to have been reduce in half local proposal, which we call the regional

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1172


ISSN: 2366-1313
proposal network. in the training region,
the proposal network takes the feature map
as input and outputs region proposals. And
these proposals go to the ROI pooling
layer for similarly manner. Image
processing entails manipulating virtual
snapshots with a view to extracting extra
statistics. we have seen a lot of evolutions
in pc hardware in the beyond decade Fig.2 Faster RCNN architecture for object

resulting in faster processors and GPUs. detection

That enabled us to resolve new and An input image and multiple regions of
emerging problems using image interest (RoIs) are input into a fully
processing. Essentially, image processing convolutional network. Each RoI is pooled
entails the following fundamental steps: into a fixed-size feature map and then
importing image using image acquisition mapped to a feature vector by fully
tools, image Pre-processing / Analyzing connected layers (FCs). The network has
and manipulating images, Output in which two output vectors per RoI: softmax
either you can modify an image or make probabilities and per-class bounding-box
some analysis out of it. We used the regression offsets. The architecture is
OpenCV library for all the image pre- trained end-to-end with a multi-task loss.
processing obligations. OpenCV reads
SYSTEM ARCHITECTURE
records from a contiguous memory place.
we can use OpenCV library for resizing
the pics and developing feature vectors out
of it, that may be accomplished through
converting the image data to NumPy
arrays. We used one of the extensions of
Deep Neural Nets named CNN
(Convolutional Neural community) for
training the version.

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1173


ISSN: 2366-1313

Fig.4 Image along with its label

Fig.3 System architecture

IV. RESULTS AND DISCUSSIONS

Dataset Creation and Training

Image classification includes, for example,


the class of one object in a picture.
However, object localization is to
recognize the area of at least one article in
a picture and drawing a proliferating box
around their degree as shown in Figure 4.
Moreover, Figure 5 illustrates the detection
of rifle from an animated video. Fig.5 Real-time weapon detected from a
video surrounded by bounding box.
Weapon category rifle

Sample dataset

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1174


ISSN: 2366-1313
V. PERFORMANCE ANALYSIS

TABLE I. Performance Analysis: Faster


R-CNN Algorithm

S. No Models Dataset used Accuracy(


%)
1 Traditiona IMDB 95
l CNN
2 SSD Streaming 96.6
video

Fig.6 Sample images from collected 3 (Yolo) V3 Gun video 98.89

dataset database
4 Faster Image dataset 99.1
RCNN collected for
current
research

Fig.7 Cumulative result of detecting


weapon with precision value Fig.8 Performance Analysis of deep
learning models with proposed algorithm

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1175


ISSN: 2366-1313
VI. CONCLUSION [3] Ruben J Franklin et .al., “Anomaly
Detect ion in Videos for Video
Faster RCNN algorithms is simulated for
Surveillance Applicat ions Using Neural
pre labelled and self-created image dataset
Networks,” International Conference on
for weapon (gun) detection. In this study,
Inventive Systems and Control,2020.
the state-of-the-art Faster RCNN object
detection model was implemented and [4] H R Rohit et .al., “ A Review of Art
trained over our collected dataset for ificial Int elligence Met hods for Data
weapon detection. We propose a model Science and Data Analytics: Applicat ions
that provides a visionary sense to a and Research Challenges,”2018 2nd
machine or robot to identify the unsafe International Conference on I-SMAC (IoT
weapon and can also alert the human in Social, Mobile, Analytics and Cloud),
administrator when a gun or a firearm is 2018.
obvious in the edge. The experimental
[5] Abhiraj Biswas et. al., “ Classificat ion
results show that the trained Faster RCNN
of Object s in Video Records using Neural
has better performance compared to the
Network Framework,” International
Traditional CNN model, yolo v3, and SSD
conference on Smart Systems and
is less expensive computationally. Smart
Inventive Technology,2018.
surveillance systems would fully replace
current infrastructure with the growing [6] R. M. Alaqil, J and H. Benhidour, 2020,

availability of low-cost storage, video “Automatic Gun Detection from Images

infrastructure, and better video processing Using Faster R-CNN,”,pp.149–154.

technologies. [7] Erssa Arif, Syed Khuram Shahzad,

REFERENCES 2022, “Automatic Detection of Weapons


in Surveillance Cameras Using Efficient-
[1] Wei Liu et al., “ SSD: Single Shot Mult
Net”, pp.4615-4630.
iBox Det ector”, European Conference on
Conputer Vision, Volume 169, pp 20-31 [8] Akhil Addapa, Praneeth Reddy

Sep. 2017. Ramaswamy, 2020, “Object


Detection/Recognition Using Machine
[2] D. Erhan et al., “Scalable Object Detect
Learning Techniques in AWS”, pp. 2361-
ion Using Deep Neural Networks,” IEEE
2369.
Conference on Computer Vision and
Pattern Recognition(CVPR),2014.

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1176


ISSN: 2366-1313
[9] Deepika B, Dorthy Shaji, 2020,
“Object Detection and Tracking Using
Deep Learning Algorithms”, pp.495-498.

[10] P.Devaki, S.Shivavarsha, 2019,


“Real-Time Object Detection using Deep
Learning and Open CV”, pp.411-414.

Volume VIII Issue I APRIL 2023 www.zkginternational.com 1177

You might also like