This paper proposes a weapon detection system that utilizes the YOLOv4 algorithm to detect weapons in real-time through three features: web cam detection, IP address detection, and video file weapon detection. The proposed system is designed to assist law enforcement agencies and security personnel in detecting and preventing potential violent incidents in public places such as airports, schools, and other high-risk areas. The web cam detection feature of the system allows for real-time monitoring of public places through webcams. The system processes video streams from the webcams and automatically detects any weapon that appears in the frame. The IP address detection feature enables the system to detect weapons in live video streams from remote cameras with assigned IP addresses. This feature expands the system\'s reach beyond physical locations, providing an additional layer of security. The video file weapon detection feature allows the system to analyze pre-recorded video files to detect weapons that were missed during live monitoring. This feature is particularly useful for forensic analysis after an incident has occurred. Overall, this proposed weapon detection system using YOLOv4 algorithm and three features is an effective solution for real-time weapon detection in public places, increasing the security and safety of the general public.
Introduction
I. INTRODUCTION
Closed-circuit television (CCTV) has become a ubiquitous technology in modern society, used for a wide range of purposes such as monitoring traffic, improving workplace safety, and enhancing security in public places. One area where CCTV has shown great potential is in detecting and preventing the use of weapons in public places. With the increasing threat of violent incidents, there is a growing need for effective surveillance systems that can detect weapons and alert security personnel in real- time. The use of weapons in public places poses a significant threat to the safety and security of individuals, communities, and society as a whole. In recent years, there have been several high-profile incidents involving the use of firearms, knives, and other weapons in public places, highlighting the need for effective measures to prevent such incidents from occurring. CCTV technology has come a long way in recent years, with advancements in hardware, software, and analytics capabilities. These advancements have made it possible to develop sophisticated weapon detection systems that can analyze live video feeds and detect the presence of weapons in real-time. Such systems have the potential to significantly improve public safety by alerting security personnel to potential threats and enabling them to take immediate action. This paper explores the use of CCTV technology for weapon detection in public places. It discusses the challenges involved in developing effective weapon detection systems, the technologies and techniques used for detecting weapons, and the potential benefits and limitations of such systems. By highlighting the potential of CCTV technology for detecting weapons in public places, this paper aims to contribute to ongoing efforts to improve public safety and security.
II. LITERATURE REVIEW
There has been a significant amount of research in the area of weapon detection systems, particularly in recent years. Some notable related work includes:
A. Weapon Detection Using YOLO V3 for Smart Surveillance System
In this study, our aim was to create a comprehensive framework for reconnaissance security that gradually differentiates weapons and provides alerts to security personnel when positive identification is made. We utilized the YOLO V3 object detection model to identify dangerous weapons and notify the human administrator. The model was implemented and trained using a dataset specifically collected for weapon detection.
B. Automatic Handgun and Knife Detection
The classification of algorithms for detecting handguns and knives can be broadly divided into two categories: non- deep learning algorithms and deep learning algorithms. Non-deep algorithms rely heavily on the image quality for their performance.
C.Weapon Detection in Real-Time CCTV VideosUsing Deep Learning
Accuracy and F1-score for Yolov3 and yolov4 are 94%, 99% and 86% and 91% respectively.[1]
III. METHODOLOGY
Faster R-CNN, a widely adopted object detection algorithm, incorporates a Region Proposal Network (RPN) for generating object proposals and a Region-based Convolutional Neural Network (CNN) for classification and refinement. This algorithm, known for its effectiveness in detecting small objects, is extensively utilized in numerous applications, including the detection of weapons.
SSD (Single Shot Detector): SSD is another object detection algorithm that detects objects in a single pass of the neural network. It uses a series of convolutional layers to predict the class and location of objects in an image. It is known for its speed and has been used in various real- time applications, including surveillance and security systems. Mask R-CNN, an extension of the Faster R- CNN algorithm, introduces a segmentation branch to generate masks for each detected object. This additional capability allows Mask R-CNN to not only detect objects but also accurately outline their boundaries. It is particularly beneficial in applications that demand fine-grained object segmentation.
YOLOv4 (You Only Look Once version 4) is an object detection algorithm that can detect multiple objects in an image or video frame, including weapons. It is known for its speed and accuracy, which makes it a good choice for real-time applications like weapon detection.
All of these algorithms have their own strengths and weaknesses, and the choice of algorithm depends on the specific requirements of the application. For example, if speed is a critical factor, SSD and YOLOv4 might be good choices, while if high accuracy is required, Faster R- CNN and Mask R-CNN might be more suitable.
A. ??????????????Modules
In this project, we have designed following modules
Upload video
Webcam detection
IP monitoring
Proposed System Algorithm Input: video file or live video
Output: detect the weapons such as hand gun and knife and displays that frame
Begin
Step 1: if new user: Register Else: Login with credentials
Step 2 : users profile display
Step 3: user has 3 option i.e web cam, IP address, upload video
Step 4: if web cam selected:
Opens web cam of laptop and detection starts
Else if : IP address selected:
User need to enter cctv cameras IP address
Else:
Weapon is detected in uploaded video Step 5: email is sent to respected user provided mail
End
IV. IMPLEMENTATION
The proposed system for weapon detection using the YOLOv4 algorithm and three features can be implemented through the following steps:
???????A. Login and Registration
When a new user accesses the system, they are prompted to register with their details. If the user is already registered, they can simply login with their credentials.
???????B. Display user Profile
Once the user is logged in, their profile is displayed, showing their personal details such as their email and phone number.Email should be valid to send the weapon detected image
???????C.Selection of the Option
The user is presented with three options for weapon detection: web cam detection, IP address detection, or uploading a video for weapon detection
???????D. Webcam Detection
If the user selects web cam detection, the system will automatically open the web cam of the user's device and start detecting weapons.
???????E. IP address monitoring
If the user selects IP address detection, they will be prompted to enter the IP address of the CCTV camera.
???????F. Video File Detection
Finally, if the user chooses to upload a video for analysis, the system will start detecting for weapons in the uploaded video.
???????G. Alert and Email
If a weapon is detected, an email notification is immediately sent to the user's provided email address, alerting them of the potential threat.
The system will then end, allowing the user to access their weapon detection reports and take any necessary action. By following these steps, the proposed system for weapon detection can provide users with an easy-to- use and effective solution for detecting and preventing potential weapon-related incidents in public places.
???????
Conclusion
YOLO, an advanced recognition system, offers faster frames per second (FPS) and superior accuracy compared to existing detectors. It can be efficiently scaled up and utilized on a conventional GPU, making it highly accessible for widespread adoption. YOLOv4 introduces new features that enhance the accuracy of both the classifier and detector, making it applicable not only to its primary purpose but also to various other research projects.
Hence this application we developed to help to reduce the weapon violence there by sending a alert message immediately to government officials so as to prevent the voilence.
References
[1] https://www.amnesty.org/en/what-we- do/arms-control/gun-violence/
[2] https://www.researchgate.net/publication/288872331_Automated_Detection_of_Firea rms_and_Knives_in_a_CCTV_Image
[3] https://www.researchgate.net/publication/320689072_A_Review_on_Human_Motion_Detection_Techniques_for_ATM- CCTV_Surveillance_System
[4] https://www.ijraset.com/best- journal/weapon-detection-using-yolov4-cnn [5]
[5] https://ieeexplore.ieee.org/document/935348 3
[6] https://www.hindawi.com/journals/mpe/202 1/9975700/
[7] N. Cohen, J. Gattuso, and K. MacLennan-Brown. CCTV Operational Requirements Manual 2009. St Albans, U.K.: Hom Office Scientific Development Branch, 2009.
[8] G. Flitton, T. P. Breckon, and N. Megherbi, ‘‘A comparison of 3D interest point descriptors with application to airport baggage object detection in complex CT imagery,’’ Pattern Recognit., vol. 46, no. 9, pp. 2420–2436, Sep. 2013.
[9] R. Gesick, C. Saritac, and C.-C. Hung, ‘‘Automatic image analysis process for the detection of concealed weapons,’’ in Proc. 5th Annu. Workshop Cyber Secur. Inf. Intell. Res. Cyber Secur. Inf. Intell. ChallengesStrategies (CSIIRW), 2009, p. 20.
[10] [10] R. K. Tiwari and G. K. Verma, ‘‘A computer vision based framework for visual gun detection using Harris interest point detector,’’ Procedia Comput. Sci., vol. 54, pp. 703–712, Aug. 2015.
[11] R. K. Tiwari and G. K. Verma, ‘‘A computer vision based framework for visual gun detection using SURF,’’ in Proc. Int. Conf. Electr., Electron., Signals, Commun. Optim. (EESCO), Jan. 2015, pp. 1–5.
[12] Z. Xiao, X. Lu, J. Yan, L. Wu, and L. Ren, ‘‘Automatic detection of concealed pistols using passive millimeter wave imaging,’’ in Proc. IEEE Int. Conf. Imag. Syst. Techn. (IST), Sep. 2015, pp. 1–4.
[13] D. M. Sheen, D. L. Mcmakin, and T. E. Hall, ‘‘Three-dimensional millimeter-wave imaging for concealed weapon detection,’’ IEEE Trans. Microw. Theory Techn., vol. 49, no. 9, pp. 1581–1592, Sep. 2001.