Automatic Detection of Firearm in Surveillance Camera
Group 13
108502502 邱孟儒
108502522 黃煒勛
108502560 沈凱翔
110582609 Vaitheeshwari Rajendran
Project Goal
The datasets is collected from Roboflow Universe: the Computer Vision Community under the public dataset domain.�
Dataset Description
Positive Dataset
(Image with Gun)
Negative Dataset
(Image without Gun)
Results
Analysis
Architecture
Outline
01
02
03
Architecture
01
Xception Deep Learning Model
Input Images
(Gun
No Gun)
Xception
Pre-Trained
Model
Global Average Pooling Layer
Dense Layer
Output Layer
(Dense with Sigmoid)
Predicted
Class
(Gun/ No Gun)
Gun detected frame in video
If
P(k) >0.8
End
Execute Siren sound implementation
No
Yes
Normal Convolution
The number of multiplication
required is 178x3x3x3x75x75=27,033,750 multiplications
149
149
149
149
Conv-Output = (W – F +2P) / (S) +1
Where, W- width of image (299x299)
F- Filter size(3x3)
p- padding (0)
S- Stride (2)
Why Depth Wise Convolution?
Depth wise Convolution and Pointwise convolution
For depth-wise it requires 3x3x3x1x75x75=151,875
For pointwise convolution it requires 178x1x1x3x75x75=3,003,750
Total is 3,155,625 multiplications
149
149
149
149
149
149
149
149
149
149
Mathematics behind Computation
Where, W is the weight matrix, Y(i,j) is the image pixel coefficient, k,l,m is width, height and channel of the image respectively.
Analysis
02
Analysis of Xception Model
Method | Accuracy | Sensitivity | Loss | Computation time |
Layer Trainable False | 86 | 0.51 | 0.3 | 215s/epoch |
Layer Trainable True | 97.9 | 0.61 | 0.002 | 510s/epoch |
Hyperparameters Considered
Parameter | Optimal Chosen Value | Scope |
Epoch | 50 | To iterate through all features |
Learning Rate | 5e-3 and 5e-4 | To determine the step size at each iteration while moving towards a min loss function |
Optimizer | Adam | To update and tune the weights |
Batch Size | 32 and 16 | To consider number of sample at each epoch |
Weight Initializer | Golorot | To initialize the weight value |
Results
03
Classification Results
Classification Results
Label: No Gun, 100%
Classification Results
Accuracy and Loss Plot
Accuracy v.s. Epoch
Loss v.s. Epoch
Demo
Demo in Real Time
Thanks!�Q & A