SlideShare a Scribd company logo
1 of 4
Download to read offline
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1869
Weapon Detection and Classification in CCTV Footage
Tejashwini PS1, Saatvik Girish Nargund2, Sumuk K2, Rohith G R2, Trinetra BM2
1Assistant Professor, Department of CS&E, BIT, Bangalore, Karnataka, India
2Student, Department of CS&E, BIT, Bangalore, Karnataka, India
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Closed Circuit Television (CCTV) cameras are
being used for surveillance and to monitor activities i.e.
robberies, but these cameras still require human supervision
and intervention. We need a system that can automatically
detect these illegal activities. This work focusesonprovidinga
secure place using CCTV footage as a source to detect harmful
weapons by applying the state of the art open-source deep
learning algorithms. We have implemented a classification
model with different classes of weapons and relevant
confusion objects inclusion concept is introduced to reduce
false positives and false negatives
Key Words: Machine Learning, Convolutional Neural
Network, Weapon Detection, Pistol Detection, Knife
Detection
1. INTRODUCTION
Security and safety is a big concern for today’s modern
world. For a country to be economically strong, it must
ensure a safe and secure environment for investors and
tourists. Having said that, Closed Circuit Television (CCTV)
cameras are being used for surveillance and to monitor
activities i.e. robberies. It is considered as one of the most
important evidence in law enforcement agenciesandcourts.
Therefore, the amount of CCTV cameras installed have
increased in number all over the world. This has made the
public feel much safer, anddecreasedcrimein manyareasall
over the world. As a result of the increase in numberofCCTV
cameras, the number of screens that have to be monitored
by a single CCTV operator has increased a lot. One operator
cannot be expected to monitor many screensata singletime.
Also, he cannot constantly monitor the footage throughout
the day Moreover, it is difficult and expensive to monitor
hundreds, or even thousands of CCTV video footage in an
area. Therefore, there is an increasing demand to automate
CCTV surveillance.
1.1 Objectives of the system
The main aim of automated CCTV surveillance is to alert
the CCTV operator wheneverthereisadangeroussituation.A
dangerous situation refers to a person or a group of people
attacking, creating fear or disturbances with weapons like
knives and guns. These kindsof situationscan be detectedby
automated systems. The systems work by using object
detection algorithms to classify objects detected in the video
footage. Our proposed system will detect and classify any
weapons which may be present in the CCTV footage.
Weapons can include knife and pistols. Whenever a weapon
is detected, it will alert the user (CCTV operator). It will also
be possible to add exceptions to the rules if the user wishes.
2. RESEARCH ELABORATION
We have researched various papers to get to understand
the different methods used by various authors in their own
weapon detection systems. Aarchi Jain et. al. explored the
usage of gun detection using the Haar Cascade Classifier [1].
The low accuracy on pistols was a drawback in this system.
Harsh Jain et. al. implemented a system using a CNN based
SSD algorithm, which offered improved precision [2]. Pawel
Donath et. al. presented a neuralnetworkbasedsystemusing
a custom neural net inspired by AlexNet and VGGNet
architectures [3]. Michal Grega et. al. have used descriptors
like edge histogram and homogenous texture, along with
SVM, in their system to detect pistols and knvies [4]. JLS
Gonzalez, in their proposed system, have used faster RCNN,
along with creation of synthetic datasets using Unity game
engine to compensate for the lack of good quality date.
Muhammad Tahir Bhatti et. al. implemented and tested
various models for Pistol Detection in CCTV footage [6]. All
the models tested were based on convolutional neural
networks (CNN). KushagraYadavet.al.usedNstagelearning,
along with ADADELTA technique to trainaneuralnetworkto
detect different types of weapons and knives [7]. Jacob Rose
et. al. propsed aFaster RCNNbased model using theResNet–
50 base network for weapon detection [8]. This model was
trained on COCO dataset. Mitchell Singleton utilized the
MobileNetV1 Neural Network to identify handguns in in
various orientations, shapes, and sizes [9]. Jesus Ruiz-
Santaquiteria et. al. combined, in a single architecture, both
weapon appearance and human pose information to better
detect weapons in an image [10].
3. METHODOLOGY
The techniques used in this paper mainly center around
object recognition. It is a complex task which actually
involves3subtasks:ImageClassification,ObjectLocalization,
and Object Detection. Image Classification predicts the class
of an object in an image. Object Localization locates the
presence of objects in an image and indicate their location
with a bounding box. Object Detectionlocatesthepresenceof
objects with a bounding box and detect the classes of the
located objects in these boxes.
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1870
One of the first objectdetectionalgorithmswasAlexNet.It
won the ImageNet competition. This was the beginning of
object detection in deep learning. Initially, Sliding window
models were used. Since it is an exhaustive search over the
whole picture for objects, it has high memory and CPU costs,
and is inefficient. The next stage of algorithms to be used
were region proposalalgorithms. They used selective search
algorithms. However, their performance was not suitablefor
real time systems.
One of the fastest series of algorithims today is YOLO
family. YOLO (“You Only Look Once”) is an effectivereal-time
object recognition algorithm. It gives a much better
performance on all the parameterswediscussedalongwitha
high fps for real-time usage. YOLO algorithm is an algorithm
based on regression. Instead of selecting the interesting part
of an Image, it predicts classes and bounding boxes for the
whole image in one run of the Algorithm. YOLO doesn’t
search for interested regions in the input image that could
contain an object, instead it splits the image into cells,
typically a 19x19 grid. Each cell is then responsible for
predicting K bounding boxes.An Object is consideredtoliein
a specific cell only if the center co-ordinatesoftheanchorbox
lie in that cell. Due to this property the center co-ordinates
are always calculated relative to the cell whereas the height
and width are calculated relative to the whole Image size.
During the one pass of forwards propagation, YOLO
determines the probability that the cell contains a certain
class. The class with the maximum probability is chosen and
assigned to that particular grid cell. Similar process happens
for all the gridcells present inthe image. Thelatestversionof
YOLO, YOLOv5 has been used in our system.
3.1 Training Mechanism
The training mechanism used in a machine learning
project, such as ours, is given in Fig 1. It starts with defining a
problem, finding the required dataset, applying pre-
processing methods, and then finally training and evaluating
the dataset. If the evaluation is. correct then we save those
weightsasa classifier. If those weights are incorrect,thenthe
parameters are tuned, and the whole process is repeated.
Some of the parameters we have experimented with on this
project are: Weight Decay, Box Loss Gain, etc. The trained
weights are evaluated on real life CCTV footage gathered
from various sources like Youtube, etc.
Fig -1: Training Mechanism
3.2 Dataset Construction
We have collected data frommultiple datasets sothatour
model can be trained on the maximum amountofdataforthe
best performance and accuracy. The dataset has been
collected from different places around the internet, such as:
extracted from YouTube CCTV videos, through GitHub
repositories, data by the University of Granada research
group, and internet movie firearm database imfdb.org. In all
these, only the dataset which contained pistols and knives
were chosen. We have also included confusion objects in the
dataset, like phones, wallets, etc. This is to include the
category of objects which may be confused with knife and
pistol, so that the model does not confuse them for it. The
split is given in Table 1.
Table -1: Dataset used for training
Category Total
Images
Training
Images
Test Images Split Ratio
Pistol 2971 2526 445 15%
Knife 2178 1851 327 15%
To increase the size of the dataset, data preprocessing was
done. The pre-processing process involves data cleaning,
standardization,processing,extractionandchoiceoffeatures,
etc. The final training dataset is the result of pre-processing
processes applied to the collected dataset. It is necessary for
better training of a model, so multiple steps must be taken to
augment the size of the dataset. Some of the data
augmentation techniques that we have used are: image
rotation, image cropping, image scaling. After creating the
augmented dataset, we fed it into the YOLOv5 model with
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1871
default hyperparameters. After a few iterations of training
and testing, wefinally obtainedgoodresultsforthepistoland
knife detection model.
4. METHODOLOGY
After obtaining the model, it was tested on a variety of
real life CCTV footage containing knives and guns. These
footages are of usually low resolution and low quality, so it
allowed us to see the speed and accuracy of the model. The
confusion matrix is given in Fig 2.
Fig -2: Confusion Matrix
The confusion matrix for the dataset is given in Figure 2.
For the pistol class, 87% of pistols which were there in the
picture were predicted correctly. For the knife class, 96% of
knives which there in the picture were predicted correctly.
BFN and BFP represent background false negatives and
background false negatives, respectively. Though the
algorithm was able to predict almost all the instances in
which there were pistols or knives, in some instances it
predicted knives and pistols where there were not any. It
indicates that further improvement isrequiredto reducethe
number of false positives. Moreover, the confidence score
might need to be increased if the system is actually used in
practice to reduce the number of false positives.
The other results are given in a graph form in Figure 3.
The first graph is the precision vs. epochs. The second graph
is the recall vs. epochs of the model. The mean average
precision at 0.5 and at 0.95 are also given. mAP stands for
mean average precision. Average precision (AP) computes
the average precision value for all recall values from 0 – 1. It
is basically the area under the precision recall curve. The
mean average precision is the mean of the APs for all
possible classes. In this case, it is theaverageofAPsforpistol
and knife classes. The best results for the model are given in
Table 2
Fig -3: Precision and Recall vs. Epoch Graphs
Table -2: Best results in each category
Precision Recall mAP@0.5 mAP@0.95
0.95353 0.88723 0.94576 0.61443
5. CONCLUSION
Weapon detection plays a vital role in safety,security,and
surveillance management. In this advanced time of
observation and security the quantity of Closed-Circuit
Television (CCTV) conveyed out in the open and private
places, have expanded exponentially and this has led to a
challenge to humans to spot weapon in so many cameras.
This paper presents a real-time framework and methodthat
is designed for security purpose. This method was built to
identify and classify knives and pistols in a video, as theyare
the most commonly used weapon types in attacks.Itreaches
an accuracy of 87% on pistols, and 96% on identifying
knives. The salient features in this model are that the
weapon can come at any angle but the model can still detect
it. Though it has a problem with false positives, with more
training and experimentation, it can surely be improved.
ACKNOWLEDGEMENT
We would like to convey our sincere gratitude to our
college the Bangalore Institute of Technology, and Dr.
Aswath M U, Principal, Bangalore Institute ofTechnologyfor
being kind enough to provideanopportunityandplatformto
complete this project. We would alsoliketothank Dr.GirijaJ,
Professor and Head of the Department forComputerScience
and Engineering, Bangalore Institute of Technology for her
constant encouragement andmakingusbelievein ourselves.
We are most humbled to mention the enthusiastic influence
provided during the development and ideation phasebyour
guide Prof. Tejashwini P S, Assistant Professor, Department
of Computer Science and Engineering for her ideas, time to
time suggestionsandco-operationshownduringtheventure
and helping make this project a success.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1872
REFERENCES
[1] Jain A., Aishwarya and G. Garg, "Gun Detection with
Model and Type Recognition using Haar Cascade
Classifier," in 2020 Third International Conference on
Smart Systems and Inventive Technology (ICSSIT), pp.
419-423, 2020.
[2] H. Jain, A. Vikram, Mohana, A. Kashyap and A. Jain,
"Weapon DetectionusingArtificial IntelligenceandDeep
Learning for Security Applications," in 2020
International Conferenceon ElectronicsandSustainable
Communication Systems (ICESC), pp. 193-198, 2020.
[3] Donath P., Grega M., Guzik P., Król J., Matiolański A.,
Rusek K., “Dangerous Tool Detection forCCTVSystems,”
in Multimedia Communications, Services and Security.
MCSS 2020. Communications in Computer and
Information Science, vol 1284. Springer, Cham, 2020.
[4] Grega, M.; Matiolański, A.; Guzik, P.; Leszczuk, M.
“Automated Detection of Firearms and Knives ina CCTV
Image,” in Sensors. 16. 47. 2016
[5] Jose L. Salazar, González,CarlosZaccaro, JuanA.Álvarez-
García, Luis M. Soria Morillo, Fernando Sancho
Caparrini, “Real-time gun detection in CCTV: An open
problem,” in Neural Networks, Volume 132, pp. 297-
308, 2020
[6] M. T. Bhatti, M. G. Khan, M. Aslam and M. J. Fiaz,
"Weapon Detection in Real-Time CCTV Videos Using
Deep Learning," in IEEE Access, vol. 9,pp.34366-34382,
2021.
[7] K. Yadav, R. Punia and N. Raghava, "Towards the Law
Enforcement of Firearms," in 2020 IEEE 17th India
Council International Conference (INDICON), pp. 1-6,
2020
[8] J. Rose, T. Bourlai and J. A. Loudermilk, "Assessment of
Data Augmentation TechniquesforFirearmDetectionin
Surveillance Videos," in 2020 IEEE International
Conference on Big Data, 2020, pp. 1838-1846
[9] Singleton M., Taylor B., Taylor J., Liu Q, “Gun
Identification Using Tensorflow,” in Machine Learning
and Intelligent Communications. MLICOM 2018
[10] J. Ruiz-Santaquiteria, A. Velasco-Mata, N. Vallez, G.
Bueno, J. A. Álvarez-García and O. Deniz, "Handgun
Detection Using Combined Human Pose and Weapon
Appearance," in IEEE Access, vol.9,pp.123815-123826,
2021

More Related Content

Similar to Weapon Detection and Classification in CCTV Footage

Similar to Weapon Detection and Classification in CCTV Footage (20)

Detection of a user-defined object in an image using feature extraction- Trai...
Detection of a user-defined object in an image using feature extraction- Trai...Detection of a user-defined object in an image using feature extraction- Trai...
Detection of a user-defined object in an image using feature extraction- Trai...
 
IRJET- Displaying and Capturing Profile using Object Detection YOLO and Deepl...
IRJET- Displaying and Capturing Profile using Object Detection YOLO and Deepl...IRJET- Displaying and Capturing Profile using Object Detection YOLO and Deepl...
IRJET- Displaying and Capturing Profile using Object Detection YOLO and Deepl...
 
DSNet Joint Semantic Learning for Object Detection in Inclement Weather Condi...
DSNet Joint Semantic Learning for Object Detection in Inclement Weather Condi...DSNet Joint Semantic Learning for Object Detection in Inclement Weather Condi...
DSNet Joint Semantic Learning for Object Detection in Inclement Weather Condi...
 
IRJET- Anomaly Detection System in CCTV Derived Videos
IRJET- Anomaly Detection System in CCTV Derived VideosIRJET- Anomaly Detection System in CCTV Derived Videos
IRJET- Anomaly Detection System in CCTV Derived Videos
 
OBJECT IDENTIFICATION
OBJECT IDENTIFICATIONOBJECT IDENTIFICATION
OBJECT IDENTIFICATION
 
IRJET- A Review Analysis to Detect an Object in Video Surveillance System
IRJET- A Review Analysis to Detect an Object in Video Surveillance SystemIRJET- A Review Analysis to Detect an Object in Video Surveillance System
IRJET- A Review Analysis to Detect an Object in Video Surveillance System
 
ROAD POTHOLE DETECTION USING YOLOV4 DARKNET
ROAD POTHOLE DETECTION USING YOLOV4 DARKNETROAD POTHOLE DETECTION USING YOLOV4 DARKNET
ROAD POTHOLE DETECTION USING YOLOV4 DARKNET
 
Review on Object Counting System
Review on Object Counting SystemReview on Object Counting System
Review on Object Counting System
 
A Smart Target Detection System using Fuzzy Logic and Background Subtraction
A Smart Target Detection System using Fuzzy Logic and Background SubtractionA Smart Target Detection System using Fuzzy Logic and Background Subtraction
A Smart Target Detection System using Fuzzy Logic and Background Subtraction
 
IRJET- Comparative Analysis of Video Processing Object Detection
IRJET- Comparative Analysis of Video Processing Object DetectionIRJET- Comparative Analysis of Video Processing Object Detection
IRJET- Comparative Analysis of Video Processing Object Detection
 
IRJET- Object Detection and Recognition using Single Shot Multi-Box Detector
IRJET- Object Detection and Recognition using Single Shot Multi-Box DetectorIRJET- Object Detection and Recognition using Single Shot Multi-Box Detector
IRJET- Object Detection and Recognition using Single Shot Multi-Box Detector
 
Human pose detection using machine learning by Grandel
Human pose detection using machine learning by GrandelHuman pose detection using machine learning by Grandel
Human pose detection using machine learning by Grandel
 
IRJET - Human Pose Detection using Deep Learning
IRJET - Human Pose Detection using Deep LearningIRJET - Human Pose Detection using Deep Learning
IRJET - Human Pose Detection using Deep Learning
 
IRJET - An Robust and Dynamic Fire Detection Method using Convolutional N...
IRJET -  	  An Robust and Dynamic Fire Detection Method using Convolutional N...IRJET -  	  An Robust and Dynamic Fire Detection Method using Convolutional N...
IRJET - An Robust and Dynamic Fire Detection Method using Convolutional N...
 
Real time ship detection using YOLOv5
Real time ship detection using YOLOv5Real time ship detection using YOLOv5
Real time ship detection using YOLOv5
 
IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
 IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2 IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
 
IRJET- Rice QA using Deep Learning
IRJET- Rice QA using Deep LearningIRJET- Rice QA using Deep Learning
IRJET- Rice QA using Deep Learning
 
MILITANT INTRUSION DETECTION USING MACHINE LEARNING
MILITANT INTRUSION DETECTION USING MACHINE LEARNINGMILITANT INTRUSION DETECTION USING MACHINE LEARNING
MILITANT INTRUSION DETECTION USING MACHINE LEARNING
 
IRJET- Border Security using Computer Vision
IRJET- Border Security using Computer VisionIRJET- Border Security using Computer Vision
IRJET- Border Security using Computer Vision
 
IRJET- Object Detection using Machine Learning Technique
IRJET- Object Detection using Machine Learning TechniqueIRJET- Object Detection using Machine Learning Technique
IRJET- Object Detection using Machine Learning Technique
 

More from IRJET Journal

More from IRJET Journal (20)

TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
 
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURESTUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
 
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
 
Effect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil CharacteristicsEffect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil Characteristics
 
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
 
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
 
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
 
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
 
A REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADASA REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADAS
 
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
 
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD ProP.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
 
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
 
Survey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare SystemSurvey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare System
 
Review on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridgesReview on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridges
 
React based fullstack edtech web application
React based fullstack edtech web applicationReact based fullstack edtech web application
React based fullstack edtech web application
 
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
 
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
 
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
 
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic DesignMultistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
 
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
 

Recently uploaded

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

Recently uploaded (20)

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 

Weapon Detection and Classification in CCTV Footage

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1869 Weapon Detection and Classification in CCTV Footage Tejashwini PS1, Saatvik Girish Nargund2, Sumuk K2, Rohith G R2, Trinetra BM2 1Assistant Professor, Department of CS&E, BIT, Bangalore, Karnataka, India 2Student, Department of CS&E, BIT, Bangalore, Karnataka, India ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - Closed Circuit Television (CCTV) cameras are being used for surveillance and to monitor activities i.e. robberies, but these cameras still require human supervision and intervention. We need a system that can automatically detect these illegal activities. This work focusesonprovidinga secure place using CCTV footage as a source to detect harmful weapons by applying the state of the art open-source deep learning algorithms. We have implemented a classification model with different classes of weapons and relevant confusion objects inclusion concept is introduced to reduce false positives and false negatives Key Words: Machine Learning, Convolutional Neural Network, Weapon Detection, Pistol Detection, Knife Detection 1. INTRODUCTION Security and safety is a big concern for today’s modern world. For a country to be economically strong, it must ensure a safe and secure environment for investors and tourists. Having said that, Closed Circuit Television (CCTV) cameras are being used for surveillance and to monitor activities i.e. robberies. It is considered as one of the most important evidence in law enforcement agenciesandcourts. Therefore, the amount of CCTV cameras installed have increased in number all over the world. This has made the public feel much safer, anddecreasedcrimein manyareasall over the world. As a result of the increase in numberofCCTV cameras, the number of screens that have to be monitored by a single CCTV operator has increased a lot. One operator cannot be expected to monitor many screensata singletime. Also, he cannot constantly monitor the footage throughout the day Moreover, it is difficult and expensive to monitor hundreds, or even thousands of CCTV video footage in an area. Therefore, there is an increasing demand to automate CCTV surveillance. 1.1 Objectives of the system The main aim of automated CCTV surveillance is to alert the CCTV operator wheneverthereisadangeroussituation.A dangerous situation refers to a person or a group of people attacking, creating fear or disturbances with weapons like knives and guns. These kindsof situationscan be detectedby automated systems. The systems work by using object detection algorithms to classify objects detected in the video footage. Our proposed system will detect and classify any weapons which may be present in the CCTV footage. Weapons can include knife and pistols. Whenever a weapon is detected, it will alert the user (CCTV operator). It will also be possible to add exceptions to the rules if the user wishes. 2. RESEARCH ELABORATION We have researched various papers to get to understand the different methods used by various authors in their own weapon detection systems. Aarchi Jain et. al. explored the usage of gun detection using the Haar Cascade Classifier [1]. The low accuracy on pistols was a drawback in this system. Harsh Jain et. al. implemented a system using a CNN based SSD algorithm, which offered improved precision [2]. Pawel Donath et. al. presented a neuralnetworkbasedsystemusing a custom neural net inspired by AlexNet and VGGNet architectures [3]. Michal Grega et. al. have used descriptors like edge histogram and homogenous texture, along with SVM, in their system to detect pistols and knvies [4]. JLS Gonzalez, in their proposed system, have used faster RCNN, along with creation of synthetic datasets using Unity game engine to compensate for the lack of good quality date. Muhammad Tahir Bhatti et. al. implemented and tested various models for Pistol Detection in CCTV footage [6]. All the models tested were based on convolutional neural networks (CNN). KushagraYadavet.al.usedNstagelearning, along with ADADELTA technique to trainaneuralnetworkto detect different types of weapons and knives [7]. Jacob Rose et. al. propsed aFaster RCNNbased model using theResNet– 50 base network for weapon detection [8]. This model was trained on COCO dataset. Mitchell Singleton utilized the MobileNetV1 Neural Network to identify handguns in in various orientations, shapes, and sizes [9]. Jesus Ruiz- Santaquiteria et. al. combined, in a single architecture, both weapon appearance and human pose information to better detect weapons in an image [10]. 3. METHODOLOGY The techniques used in this paper mainly center around object recognition. It is a complex task which actually involves3subtasks:ImageClassification,ObjectLocalization, and Object Detection. Image Classification predicts the class of an object in an image. Object Localization locates the presence of objects in an image and indicate their location with a bounding box. Object Detectionlocatesthepresenceof objects with a bounding box and detect the classes of the located objects in these boxes. Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1870 One of the first objectdetectionalgorithmswasAlexNet.It won the ImageNet competition. This was the beginning of object detection in deep learning. Initially, Sliding window models were used. Since it is an exhaustive search over the whole picture for objects, it has high memory and CPU costs, and is inefficient. The next stage of algorithms to be used were region proposalalgorithms. They used selective search algorithms. However, their performance was not suitablefor real time systems. One of the fastest series of algorithims today is YOLO family. YOLO (“You Only Look Once”) is an effectivereal-time object recognition algorithm. It gives a much better performance on all the parameterswediscussedalongwitha high fps for real-time usage. YOLO algorithm is an algorithm based on regression. Instead of selecting the interesting part of an Image, it predicts classes and bounding boxes for the whole image in one run of the Algorithm. YOLO doesn’t search for interested regions in the input image that could contain an object, instead it splits the image into cells, typically a 19x19 grid. Each cell is then responsible for predicting K bounding boxes.An Object is consideredtoliein a specific cell only if the center co-ordinatesoftheanchorbox lie in that cell. Due to this property the center co-ordinates are always calculated relative to the cell whereas the height and width are calculated relative to the whole Image size. During the one pass of forwards propagation, YOLO determines the probability that the cell contains a certain class. The class with the maximum probability is chosen and assigned to that particular grid cell. Similar process happens for all the gridcells present inthe image. Thelatestversionof YOLO, YOLOv5 has been used in our system. 3.1 Training Mechanism The training mechanism used in a machine learning project, such as ours, is given in Fig 1. It starts with defining a problem, finding the required dataset, applying pre- processing methods, and then finally training and evaluating the dataset. If the evaluation is. correct then we save those weightsasa classifier. If those weights are incorrect,thenthe parameters are tuned, and the whole process is repeated. Some of the parameters we have experimented with on this project are: Weight Decay, Box Loss Gain, etc. The trained weights are evaluated on real life CCTV footage gathered from various sources like Youtube, etc. Fig -1: Training Mechanism 3.2 Dataset Construction We have collected data frommultiple datasets sothatour model can be trained on the maximum amountofdataforthe best performance and accuracy. The dataset has been collected from different places around the internet, such as: extracted from YouTube CCTV videos, through GitHub repositories, data by the University of Granada research group, and internet movie firearm database imfdb.org. In all these, only the dataset which contained pistols and knives were chosen. We have also included confusion objects in the dataset, like phones, wallets, etc. This is to include the category of objects which may be confused with knife and pistol, so that the model does not confuse them for it. The split is given in Table 1. Table -1: Dataset used for training Category Total Images Training Images Test Images Split Ratio Pistol 2971 2526 445 15% Knife 2178 1851 327 15% To increase the size of the dataset, data preprocessing was done. The pre-processing process involves data cleaning, standardization,processing,extractionandchoiceoffeatures, etc. The final training dataset is the result of pre-processing processes applied to the collected dataset. It is necessary for better training of a model, so multiple steps must be taken to augment the size of the dataset. Some of the data augmentation techniques that we have used are: image rotation, image cropping, image scaling. After creating the augmented dataset, we fed it into the YOLOv5 model with
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1871 default hyperparameters. After a few iterations of training and testing, wefinally obtainedgoodresultsforthepistoland knife detection model. 4. METHODOLOGY After obtaining the model, it was tested on a variety of real life CCTV footage containing knives and guns. These footages are of usually low resolution and low quality, so it allowed us to see the speed and accuracy of the model. The confusion matrix is given in Fig 2. Fig -2: Confusion Matrix The confusion matrix for the dataset is given in Figure 2. For the pistol class, 87% of pistols which were there in the picture were predicted correctly. For the knife class, 96% of knives which there in the picture were predicted correctly. BFN and BFP represent background false negatives and background false negatives, respectively. Though the algorithm was able to predict almost all the instances in which there were pistols or knives, in some instances it predicted knives and pistols where there were not any. It indicates that further improvement isrequiredto reducethe number of false positives. Moreover, the confidence score might need to be increased if the system is actually used in practice to reduce the number of false positives. The other results are given in a graph form in Figure 3. The first graph is the precision vs. epochs. The second graph is the recall vs. epochs of the model. The mean average precision at 0.5 and at 0.95 are also given. mAP stands for mean average precision. Average precision (AP) computes the average precision value for all recall values from 0 – 1. It is basically the area under the precision recall curve. The mean average precision is the mean of the APs for all possible classes. In this case, it is theaverageofAPsforpistol and knife classes. The best results for the model are given in Table 2 Fig -3: Precision and Recall vs. Epoch Graphs Table -2: Best results in each category Precision Recall mAP@0.5 mAP@0.95 0.95353 0.88723 0.94576 0.61443 5. CONCLUSION Weapon detection plays a vital role in safety,security,and surveillance management. In this advanced time of observation and security the quantity of Closed-Circuit Television (CCTV) conveyed out in the open and private places, have expanded exponentially and this has led to a challenge to humans to spot weapon in so many cameras. This paper presents a real-time framework and methodthat is designed for security purpose. This method was built to identify and classify knives and pistols in a video, as theyare the most commonly used weapon types in attacks.Itreaches an accuracy of 87% on pistols, and 96% on identifying knives. The salient features in this model are that the weapon can come at any angle but the model can still detect it. Though it has a problem with false positives, with more training and experimentation, it can surely be improved. ACKNOWLEDGEMENT We would like to convey our sincere gratitude to our college the Bangalore Institute of Technology, and Dr. Aswath M U, Principal, Bangalore Institute ofTechnologyfor being kind enough to provideanopportunityandplatformto complete this project. We would alsoliketothank Dr.GirijaJ, Professor and Head of the Department forComputerScience and Engineering, Bangalore Institute of Technology for her constant encouragement andmakingusbelievein ourselves. We are most humbled to mention the enthusiastic influence provided during the development and ideation phasebyour guide Prof. Tejashwini P S, Assistant Professor, Department of Computer Science and Engineering for her ideas, time to time suggestionsandco-operationshownduringtheventure and helping make this project a success.
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1872 REFERENCES [1] Jain A., Aishwarya and G. Garg, "Gun Detection with Model and Type Recognition using Haar Cascade Classifier," in 2020 Third International Conference on Smart Systems and Inventive Technology (ICSSIT), pp. 419-423, 2020. [2] H. Jain, A. Vikram, Mohana, A. Kashyap and A. Jain, "Weapon DetectionusingArtificial IntelligenceandDeep Learning for Security Applications," in 2020 International Conferenceon ElectronicsandSustainable Communication Systems (ICESC), pp. 193-198, 2020. [3] Donath P., Grega M., Guzik P., Król J., Matiolański A., Rusek K., “Dangerous Tool Detection forCCTVSystems,” in Multimedia Communications, Services and Security. MCSS 2020. Communications in Computer and Information Science, vol 1284. Springer, Cham, 2020. [4] Grega, M.; Matiolański, A.; Guzik, P.; Leszczuk, M. “Automated Detection of Firearms and Knives ina CCTV Image,” in Sensors. 16. 47. 2016 [5] Jose L. Salazar, González,CarlosZaccaro, JuanA.Álvarez- García, Luis M. Soria Morillo, Fernando Sancho Caparrini, “Real-time gun detection in CCTV: An open problem,” in Neural Networks, Volume 132, pp. 297- 308, 2020 [6] M. T. Bhatti, M. G. Khan, M. Aslam and M. J. Fiaz, "Weapon Detection in Real-Time CCTV Videos Using Deep Learning," in IEEE Access, vol. 9,pp.34366-34382, 2021. [7] K. Yadav, R. Punia and N. Raghava, "Towards the Law Enforcement of Firearms," in 2020 IEEE 17th India Council International Conference (INDICON), pp. 1-6, 2020 [8] J. Rose, T. Bourlai and J. A. Loudermilk, "Assessment of Data Augmentation TechniquesforFirearmDetectionin Surveillance Videos," in 2020 IEEE International Conference on Big Data, 2020, pp. 1838-1846 [9] Singleton M., Taylor B., Taylor J., Liu Q, “Gun Identification Using Tensorflow,” in Machine Learning and Intelligent Communications. MLICOM 2018 [10] J. Ruiz-Santaquiteria, A. Velasco-Mata, N. Vallez, G. Bueno, J. A. Álvarez-García and O. Deniz, "Handgun Detection Using Combined Human Pose and Weapon Appearance," in IEEE Access, vol.9,pp.123815-123826, 2021