Weapon Detection and Alerting System Using Deep Learning
Weapon Detection and Alerting System Using Deep Learning
Class = Weapons
Weapon types:
Knife
Pistols
Rifles
3.2 Processing
The configuration and weight files were loaded using OpenCV’s DNN module (yolov3weapon.cfg and
yolov3weapon.weights). The webcam was the primary source for taking video input, each frame of the video
was converted into blob, resized to 416x416 pixels and passed to yolov3 model for object detection. If the
detected object had a confidence score above 0.5, it classifies the object as weapon and draws a red bounding
box labelled as ‘weapon’ around the object in the video feed. After detection, the screenshot of the frame is
captured and stored in a designated folder. For real time response, the system is also integrated with automated
alerting mechanism. When a weapon is detected, an email is sent using SMTP protocol to the predefined
recipient.
Total weapons
Test Condition Correct Detections Incorrect Detections Accuracy
present in video
Good-lighting
50 39 11 78%
condition
Low-lighting
50 36 14 72%
condition
Cluttered
50 37 13 74%
background