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.

Owner
Janhavi
Janhavi
Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. This Neural Network (NN) model recognizes the text contained in the images of segmented words.

Handwritten-Text-Recognition Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. T

27 Jan 08, 2023
Virtualdragdrop - Virtual Drag and Drop Using OpenCV and Arduino

Virtualdragdrop - Virtual Drag and Drop Using OpenCV and Arduino

Rizky Dermawan 4 Mar 10, 2022
Tensorflow-based CNN+LSTM trained with CTC-loss for OCR

Overview This collection demonstrates how to construct and train a deep, bidirectional stacked LSTM using CNN features as input with CTC loss to perfo

Jerod Weinman 489 Dec 21, 2022
Detect the mathematical formula from the given picture and the same formula is extracted and converted into the latex code

Mathematical formulae extractor The goal of this project is to create a learning based system that takes an image of a math formula and returns corres

6 May 22, 2022
Official PyTorch implementation for "Mixed supervision for surface-defect detection: from weakly to fully supervised learning"

Mixed supervision for surface-defect detection: from weakly to fully supervised learning [Computers in Industry 2021] Official PyTorch implementation

ViCoS Lab 169 Dec 30, 2022
Distort a video using Seam Carving (video) and Vibrato effect (sound)

Distort videos Applies a Seam Carving algorithm (aka liquid rescale) on every frame of a video, and a vibrato effect on the audio to distort the video

AlexZeGamer 6 Dec 06, 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
Code for the head detector (HeadHunter) proposed in our CVPR 2021 paper Tracking Pedestrian Heads in Dense Crowd.

Head Detector Code for the head detector (HeadHunter) proposed in our CVPR 2021 paper Tracking Pedestrian Heads in Dense Crowd. The head_detection mod

Ramana Subramanyam 76 Dec 06, 2022
Using python libraries to track hands

Python-HandTracking Using python libraries to track hands on a camera Uses cv2 and mediapipe libraries custom hand tracking module PyCharm IDE Final E

Martin Matsudaira 1 Dec 17, 2021
This is a GUI for scrapping PDFs with the help of optical character recognition making easier than ever to scrape PDFs.

pdf-scraper-with-ocr With this tool I am aiming to facilitate the work of those who need to scrape PDFs either by hand or using tools that doesn't imp

Jacobo José Guijarro Villalba 75 Oct 21, 2022
A python programusing Tkinter graphics library to randomize questions and answers contained in text files

RaffleOfQuestions Um programa simples em python, utilizando a biblioteca gráfica Tkinter para randomizar perguntas e respostas contidas em arquivos de

Gabriel Ferreira Rodrigues 1 Dec 16, 2021
MeshToGeotiff - A fast Python algorithm to convert a 3D mesh into a GeoTIFF

MeshToGeotiff - A fast Python algorithm to convert a 3D mesh into a GeoTIFF Python class for converting (very fast) 3D Meshes/Surfaces to Raster DEMs

8 Sep 10, 2022
This project proposes a camera vision based cursor control system, using hand moment captured from a webcam through a landmarks of hand by using Mideapipe module

This project proposes a camera vision based cursor control system, using hand moment captured from a webcam through a landmarks of hand by using Mideapipe module

Chandru 2 Feb 20, 2022
1st place solution for SIIM-FISABIO-RSNA COVID-19 Detection Challenge

SIIM-COVID19-Detection Source code of the 1st place solution for SIIM-FISABIO-RSNA COVID-19 Detection Challenge. 1.INSTALLATION Ubuntu 18.04.5 LTS CUD

Nguyen Ba Dung 170 Dec 21, 2022
governance proposal to make fei redeemable for eth

Feil Proposal 🌲 Abstract Migrate all ETH from Fei protocol-controlled value into Yearn ETH Vault. Allow redemptions of outstanding FEI for yvETH. At

13 Mar 31, 2022
A simple document layout analysis using Python-OpenCV

Run the application: python main.py *Note: For first time running the application, create a folder named "output". The application is a simple documen

Roinand Aguila 109 Dec 12, 2022
Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.

EasyOCR Ready-to-use OCR with 80+ languages supported including Chinese, Japanese, Korean and Thai. What's new 1 February 2021 - Version 1.2.3 Add set

Jaided AI 16.7k Jan 03, 2023
A selectional auto-encoder approach for document image binarization

The code of this repository was used for the following publication. If you find this code useful please cite our paper: @article{Gallego2019, title =

Javier Gallego 89 Nov 18, 2022
Automatically fishes for you while you are afk :)

Dank-memer-afk-script A simple and quick way to make easy money in Dank Memer! How to use Open a discord channel which has the Dank Memer bot enabled.

Pranav Doshi 9 Nov 11, 2022
A set of workflows for corpus building through OCR, post-correction and normalisation

PICCL: Philosophical Integrator of Computational and Corpus Libraries PICCL offers a workflow for corpus building and builds on a variety of tools. Th

Language Machines 41 Dec 27, 2022