deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications

Overview

Automatic Weapon Detection

Deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications.

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors License   Badge


Loved the project? Please visit our Website


Literature Survey

Security is always a main concern in every domain, due to a rise in crime rate in a crowded event or suspicious lonely areas. Weapon detection and monitoring have major applications of computer vision to tackle various problems. Due to growing demand in the protection of safety, security and personal properties, needs and deployment of video surveillance systems can recognize and interpret the scene and anomaly events play a vital role in intelligence monitoring. We implemented weapon detection using a convolution neural network (CNN). Results are tabulated, both algorithms achieve good accuracy, but their application in real situations can be based on the trade-off between speed and accuracy. We surveyed various research evidences and proposed a detection framework which involves three phases detection of objects, recognition of detected objects and alarm system. Single learning based detection framework is used because of which high processing speed is achieved. Because dense features need only to be evaluated once rather than individually for each detector. For object detection a framework using a linear support vector machine classifier with histogram of oriented gradients features. Using a combination of ACF(Aggregated Channel Features) features and sp- LBP(Local binary pattern)features can provide a better trade-off between detection performance and system runtime. some techniques are used to post-process raw detection results. Uses shrinkage version of AdaBoost as the strong classifier and use decision trees as weak learners.To train the classifier, the procedure known as bootstrapping is applied . Shifu Zhou(researcher) et al suggested a method for detecting and locating anomalous activities in video sequences of crowded scenes. The key for method is the coupling of anomdescribon with a spatial-temporal Convolutional Neural Networks. This architecture allows us to capture features from both spatial and temporal dimensions by performing spatial-temporal convolutions, thereby, both the appearance and motion information encoded in continuous frames are extracted Two criterions are used for evaluating anomaly detection accuracy namely a frame level criterion and a pixel level criterion. Motion pattern and FRP (False positive rates) are calculated for evaluating performance. And DR(Detection Rate) corresponds to the successful detection rate of the anomalies happening at EER(Equal Error Rate). We also surveyed from various research evidences that One of the main challenges is to detect anomalies both in time and space domains. This implies to find out which frames that anomalies occur and to localize regions that generate the anomalies within these frames. This model extracts features from both the spatial and the temporal dimensions by performing. 3D convolutions, is achieved by convolving a 3D kernel to the cube formed by stacking multiple contiguous frames together. The issues are that , accurate recognition of actions is a highly challenging task due to cluttered backgrounds, occlusions, and viewpoint variations perform 3D convolution in the convolutional layers of CNNs so that discriminative features along both the spatial and the temporal dimensions are captured.3D convolution is achieved by stacking multiple contiguous frames together. The developed 3D CNN model was trained using a supervised algorithm , and it requires a large number of labelled samples. we propose a novel end-to-end model which integrates the one-class Support Vector Machine (SVM) into Convolutional Neural Network (CNN). Specifically, the robust loss function derived from the one-class SVM is proposed to optimize the parameters of this model. We proposed a learning model for weapon detection from video sequences by combining CNN and SVM. CNN is utilized to learn the underlying high-dimensional normal representations to effectively capture normal features. SVM layer not only distinguishes normal/abnormal cases as a discriminator, but also optimizes parameters of the whole model as an optimization objective. From our exhaustive study of work done and research about Weapon detection model , we proposed a Model which detects the Weapon from video or Picture and activates the alarm.

Features to Detect Weapons / Intruders

Weapons:

We propose algorithms that are able to alert the human operator when a firearm or knife is visible in the image. We have focused on limiting the number of false alarms in order to allow for a real-life application of the system. The specificity and sensitivity of the knife detection are significantly better than others published recently. We have also managed to propose a version of a firearm detection algorithm that offers a near-zero rate of false alarms. We have shown that it is possible to create a system that is capable of an early warning in a dangerous situation, which may lead to faster and more effective response times and a reduction in the number of potential victims.

Size:

Estimation of the size of software is an essential part of Software Project Management. It helps the project manager to further predict the effort and time which will be needed to build the project. Various measures are used in project size estimation. Some of these are: • Lines of Code • Number of entities in ER diagram • Total number of processes in detailed data flow diagram • Function points

Find the number of functions belonging to the following types: • External Inputs: Functions related to data entering the system. • External outputs: Functions related to data exiting the system. • External Inquiries: They leads to data retrieval from system but don’t change the system. • Internal Files: Logical files maintained within the system. Log files are not included here. • External interface Files: These are logical files for other applications which are used by our system.

Trigger:

Detecting small objects is a difficult task as these objects are rather smaller than the human. In this section, we will implement a gun detector that trained by using the discriminatively trained part-based models. As our object of interest is gun, we will collect different positive samples from different type of gun related videos. To minimize the amount of supervision, we provide the bounding box of the gun in the first frame where the gun appears and apply the tracking method to let it track for the gun. We will then use the result from the tracker to annotate the gun location in each image. For the negative samples, we will use all the annotation from the Pascal Visual Object Classes Challenge (VOC) as all the annotations are without any gun object. Lastly, all the annotation results of the positive sample and negative samples are used as the input for the DPM to train a gun model. Tracking is required in different stages of our system because the object detector tends to produce sparse detection as the object of interest is too small.

Handle

Cohen’s kappa coefficient is used to check the agreement between experts which is calculated using following formula:

aaaaa

where pa ¼ proportion of observations for agreement of two experts; pc ¼ proportion of observations for agreement which is expected to happen by chance between two experts. Agreement matrix of proportions is for weapon purchase. Cohen’ Kappa coefficient value was found to be 0.9425 at a ¼ 0.05 (a is probability of confidence interval for kappa statistics) which signifies an almost perfect agreement between the experts. R Programming Package “psych” is used to compute Cohen’s kappa coefficient. Considering significance and magnitude of kappa coefficient so computed, the annotations labelling represents the justification of process of manually labelling approach which can therefore be used in our analysis to train and test our proposed automated illegal weapon procurement model.

Project Summary:

In this project CNN algorithm is simulated for pre-labelled image dataset for weapon (gun, knife) detection. The algorithm is efficient and gives good results but its application in real time is based on a trade-off between speed and accuracy. With respect to accuracy, CNN gives accuracy of approx. 85%. In our CNN model we have taken 16 layers. Apart from this the optimiser used by us is SGD, with categorical cross entropy loss and accuracy is used as the metrics. For every layer we have used the ‘relu’ activation function, for the last layer we have used softmax. We have used Tensorflow, Keras, PIL, OpenCV, Playsound modules to implement the project. Our software takes a 240 x 240 image as input, in a batch size of 32.

Further, it can be implemented for larger datasets by training using GPUs and high-end DSP and FPGA kits.

You might also like...
This project modify tensorflow object detection api code to predict oriented bounding boxes. It can be used for scene text detection.
This project modify tensorflow object detection api code to predict oriented bounding boxes. It can be used for scene text detection.

This is an oriented object detector based on tensorflow object detection API. Most of the code is not changed except for those related to the need of

A novel region proposal network for more general object detection ( including scene text detection ).
A novel region proposal network for more general object detection ( including scene text detection ).

DeRPN: Taking a further step toward more general object detection DeRPN is a novel region proposal network which concentrates on improving the adaptiv

YOLOv5 in DOTA with CSL_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)
YOLOv5 in DOTA with CSL_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)

YOLOv5_DOTA_OBB YOLOv5 in DOTA_OBB dataset with CSL_label.(Oriented Object Detection) Datasets and pretrained checkpoint Datasets : DOTA Pretrained Ch

Shape Detection - It's a shape detection project with OpenCV and Python.
Shape Detection - It's a shape detection project with OpenCV and Python.

Shape Detection It's a shape detection project with OpenCV and Python. Setup pip install opencv-python for doing AI things. pip install simpleaudio fo

Morphological edge detection or object's boundary detection using erosion and dialation in OpenCV python
Morphological edge detection or object's boundary detection using erosion and dialation in OpenCV python

Morphologycal-edge-detection-using-erosion-and-dialation the task is to detect object boundary using erosion or dialation . Here, use the kernel or st

🔎 Like Chardet. 🚀 Package for encoding & language detection. Charset detection.
🔎 Like Chardet. 🚀 Package for encoding & language detection. Charset detection.

Charset Detection, for Everyone 👋 The Real First Universal Charset Detector A library that helps you read text from an unknown charset encoding. Moti

Hand Detection and Finger Detection on Live Feed
Hand Detection and Finger Detection on Live Feed

Hand-Detection-On-Live-Feed Hand Detection and Finger Detection on Live Feed Getting Started Install the dependencies $ git clone https://github.com/c

Text page dewarping using a "cubic sheet" model

page_dewarp Page dewarping and thresholding using a "cubic sheet" model - see full writeup at https://mzucker.github.io/2016/08/15/page-dewarping.html

ocroseg - This is a deep learning model for page layout analysis / segmentation.
ocroseg - This is a deep learning model for page layout analysis / segmentation.

ocroseg This is a deep learning model for page layout analysis / segmentation. There are many different ways in which you can train and run it, but by

Owner
Janhavi
Janhavi
Awesome anomaly detection in medical images

A curated list of awesome anomaly detection works in medical imaging, inspired by the other awesome-* initiatives.

Kang Zhou 57 Dec 19, 2022
Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)

English | 简体中文 Introduction PaddleOCR aims to create multilingual, awesome, leading, and practical OCR tools that help users train better models and a

null 27.5k Jan 8, 2023
Scale-aware Automatic Augmentation for Object Detection (CVPR 2021)

SA-AutoAug Scale-aware Automatic Augmentation for Object Detection Yukang Chen, Yanwei Li, Tao Kong, Lu Qi, Ruihang Chu, Lei Li, Jiaya Jia [Paper] [Bi

Jia Research Lab 182 Dec 29, 2022
Omdena-abuja-anpd - Automatic Number Plate Detection for the security of lives and properties using Computer Vision.

Omdena-abuja-anpd - Automatic Number Plate Detection for the security of lives and properties using Computer Vision.

Abdulazeez Jimoh 1 Jan 1, 2022
A semi-automatic open-source tool for Layout Analysis and Region EXtraction on early printed books.

LAREX LAREX is a semi-automatic open-source tool for layout analysis on early printed books. It uses a rule based connected components approach which

null 162 Jan 5, 2023
Provides OCR (Optical Character Recognition) services through web applications

OCR4all As suggested by the name one of the main goals of OCR4all is to allow basically any given user to independently perform OCR on a wide variety

null 174 Dec 31, 2022
Computer vision applications project (Flask and OpenCV)

Computer Vision Applications Project This project is at it's initial phase. This is all about the implementation of different computer vision techniqu

Suryam Thapa 1 Jan 26, 2022
Unofficial implementation of "TableNet: Deep Learning model for end-to-end Table detection and Tabular data extraction from Scanned Document Images"

TableNet Unofficial implementation of ICDAR 2019 paper : TableNet: Deep Learning model for end-to-end Table detection and Tabular data extraction from

Jainam Shah 243 Dec 30, 2022
text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network

text-detection-ctpn Scene text detection based on ctpn (connectionist text proposal network). It is implemented in tensorflow. The origin paper can be

Shaohui Ruan 3.3k Dec 30, 2022
Textboxes : Image Text Detection Model : python package (tensorflow)

shinTB Abstract A python package for use Textboxes : Image Text Detection Model implemented by tensorflow, cv2 Textboxes Paper Review in Korean (My Bl

Jayne Shin (신재인) 91 Dec 15, 2022