Anomaly Detection in Surveillance Camera: Capstone Project Report End-Semester Evaluation
Anomaly Detection in Surveillance Camera: Capstone Project Report End-Semester Evaluation
Anomaly Detection in Surveillance Camera: Capstone Project Report End-Semester Evaluation
CAMERA
Submitted by:
In this project, we develop a system for detecting anomalies in surveillance footage. An anomaly
refers to a deviation from the normal routine, for example: a person abandoning a bag at a crowded
or public location, or a computer being stolen from a lab. For efficient large-scale monitoring, it is
critical to design a system based on intelligent video analysis. The system is based on a simple
mathematical model, and works efficiently at resolutions at which most CCTV cameras function.
The framework is based on a Background Subtraction technique, with pre-processing involving a
dual-time background subtraction algorithm, which maintains two backgrounds, one updated with
a relatively high frequency, and the other at a low frequency. Results show that the system is fast,
and robust in both moderately and sparsely populated areas. As the system does not use expensive
filters and statistical calculations, it is less intensive computationally, and at the same time delivers
good detection results.
DECLARATION
We hereby declare that the design principles and working prototype model of the project entitled
Anomaly detection in surveillance camera is an authentic record of our own work carried out in
the Computer Science and Engineering Department, TIET, Patiala, under the guidance of Dr
Shatrughan Modi during 6th semester (2019).
Date:
Faculty Mentor:
Dr. Shatrughan Modi
Lecturer
CSED,
TIET, Patiala
ACKNOWLEDGEMENT
We would like to express our thanks to our mentor Dr Shatrughan Modi. She has been of great
help in our venture, and an indispensable resource of technical knowledge. He is truly an amazing
mentor to have.
We are also thankful to Dr Maninder Singh, Head, Computer Science and Engineering
Department, entire faculty and staff of Computer Science and Engineering Department, and also
our friends who devoted their valuable time and helped us in all possible ways towards successful
completion of this project. We thank all those who have contributed either directly or indirectly
towards this project.
Lastly, we would also like to thank our families for their unyielding love and encouragement. They
always wanted the best for us and we admire their determination and sacrifice.
Date:
DECLARATION 3
ACKNOWLEDGEMENT 4
LIST OF TABLES 7
LIST OF FIGURES 8
LIST OF ABBREVIATIONS 9
CHAPTER 1- INTRODUCTION 10
1.1 Project Overview 10
1.1.1 Technical terminology 10
1.1.2 Problem Statement 10
1.1.3 Goal 11
1.1.4 Solution 11
1.2 Need Analysis 11
1.3 Research Gaps 12
1.4 Problem Definition and Scope 14
1.5 Assumptions and Constraints 14
1.6 Approved Objectives 14
1.7 Methodology Used 15
1.8 Project Outcomes and Deliverables 15
1.9 Novelty 15
If these specifications are not met, then it might be too late to take proper action, as
a bomb may explode, or a shoplifter can escape. The algorithm used by us runs in
real time on modern inexpensive computer systems. It should have no problem
running on old hardware, if the video resolution is QVGA (320*240 pixel
resolution), as is the case with most security CCTV cameras
● Accuracy of dataset
1.1.3 Goal
The goal is to build an application that can detect the anomaly with high accuracy
and to achieve the fastest possible response time of the Anomaly detection algorithm.
1.1.4 Solution
We are planning to use CCTV cameras connected with computer. Footage from
CCTV with be sent to application. After that, the data will be sent as input parameters
of anomaly detection algorithm. Algorithm will compute the degree of anomaly and
will then classify the anomaly. If the result is beyond threshold limit, an alert will be
generated on application to check if it is false alert or not.
There have been an increasing number of terrorist attacks in crowded public places such
as train stations, subways, airports, malls, etc. Security staff and police forces rely on
video surveillance systems; however, it is labour intensive, and there are limits of human
effectiveness in monitoring and analysing crowded scenes, particularly when multiple
cameras are involved. It is rather unfortunate if there is no one to monitor the feed, or if
negligence leads to an attack. Automated surveillance systems have been used for mostly
offline video analysis after an event has occurred, much research is underway on online
analysis and prediction of events. We can detect anomalies and suspicious behaviours in
the video feed online, abandoned objects particularly. Many algorithms proposed to deal
with the challenge of abandoned object detection depend on complex probabilistic
mathematics, resulting in the need for large amount of resources, and their failure to work
fast in real time. Other difficulties in detecting abandoned objects are occlusion by people
in a crowd, and the background subtraction lacking dynamically updating features or
being computationally intensive. Successive frames, the system keeps a lookout for the
bag positions, whose presence in anomaly in footage is not limited to detection of static
objects. It can be extended to detecting a fight, a person jumping a fence or an accident.
When an abandoned bag is detected, the system analyses its database to determine the
most likely bag position(s), where the position is defined as the location where the bag
into the scene is left unattended. Thro or disappearance from the scene defines the status
of the bag, and decides the appropriate course of action. Automatic threat detection
systems can assist security personnel by providing better situational awareness, enabling
them to respond to critical situations more efficiently.
Loss of consciousness is one of the leading problems faced by the user who monitor
surveillance camera’s feed. To prevent this from happening, a constant supervision of the
application is needed. Hence an alternate surveillance method is required. Anomaly require
immediate attention and the only way one can establish that is by designing a sensing and
alerting method.
According to a survey done by Michael D. Breitenstein, Helmut Grabner and Luc Van
Gool [1], They focus on situations where tracking and object detection is difficult due to
the objects of interest being small, the frame-rate quite low (time-lapse like footage) and
image quality also low. Therefore the data is treated as a stream of separate images focusing
on the spatial information in each image. The basic idea is that everything not observed in
the past is unusual. They discriminate between unusual scenes (never seen before) and rare
scenes (similar scene seen before, but not very often). A model is learned using the previous
observed data. When a new image is captured a similarity measure is calculated that
compares it with the learned model. Different similarity measures can be used, they use
normalized cross correlation. Since the representation of the image has a high
dimensionality most points are equally distant to a query point. Therefore concept of
meaningful nearest neighbours is employed. To do this they store distribution of the
similarities. If it is unlikely that the similarity score of a new image is drawn from this
distribution, then the image is rated as unusual. No temporal information is represented
with this method. There might be a problem with the testing being too much of anecdotal
nature. The results are not thoroughly documented with ROC or confusion matrix.
R. Schuster, R. M¨orzinger, W. Haas, H. Grabner and Luc Van Gool [2] proposed As with
Hunting Nessie they focus on low frame-rate data where optical flow or other methods
cannot be used. They utilise the HOG descriptor to describe each region and a database
classification system where each entry is a HOG descriptor. When a descriptor is
introduced into the classifier the distance from the input descriptor to the nearest entry in
the database is measured. If the nearest distance is greater than the inner model distance of
the database classifier the two nearest entries are merged and a new is created with the
newest input. There is an upper limit to how many entries there can be in the database, to
keep the computational requirements to low. This is regulated by a constant which can be
set differently. The method achieve 20 fps. The method works quite well for detecting out
of place objects and runs in real-time. There is an unsupervised learning algorithm which
is optimal and it is data-driven so no manually thresholds have to be set.
Chen Change Loy, Tao Xiang and Shaogang Gong [3] in its research, Optical flow is
computed for each pixel in each region using the Lucas-Kanade methods. The motion in
each region is quantised into four directions and the motion in the next frames are summed
up to make a four-bin histogram containing the motion of 50 frames. This will then be
converted to a codebook of 16 possible combinations ranging from no significant motion
in either of the 4 directions to significant motion in all of the four directions. The classifier
is a naive Bayes classifier and a threshold is used for determining if a frame is abnormal or
not.
Vijay Mahadevan, Weixin Li, Viral Bhalodia and Nuno Vasconcelos. [4] Developed
method combines both spatial and temporal anomaly detection. There is attaining and a
testing phase, so they do not use on-line updating of the normal model. For the temporal
anomalies an MDT is computed on each frame in the training set and in the running phase
the computed MDTs are compared by using log likelihood for the cluster that is closest to
the MDT. This will produce the temporal anomaly map. For the spatial anomalies saliency
method is used. This is a measure of how much the region stands out of its surroundings.
An MDT is computed using an approximation, since it would otherwise be too
computationally heavy. The spatial anomaly map is computed by using KL divergence
between the MDT of the training-set and the input frame. The two anomaly maps are joined
by adding them together and the anomaly detection is done using a simple threshold. In the
testing phase it takes 25s for each frame to be processed, which makes this method far from
real-time.
All the above research papers provided us an insight of the techniques and the algorithms
being currently being used in this research area. We, hence, deduced the need of a portable,
low cost and environment independent system which can alert the user as soon as the
anomaly is detected to prevent.
1.4 Problem Definition and Scope
The main problem in detection of anomaly is the generation of false alarm. It can have
various reasons like the application is not working properly, the application crashes off
from the user accidentally and some more.
A CCTV camera will be attached to computer through wires or Wi-Fi. Footages from the
camera will be sent to application for the detection of anomaly. This will be done with the
help of a Anomaly detection algorithm which will classify the results obtained after
computing the recorded data into normal or anomalous. An alert will be generated on the
application with a 10 seconds window to respond, failing which the security will be alerted
through alarm system.
4 The sensor used may or may not have a higher surviving capacity, thus,
malfunctioning of it can occur, so we need to keep a check on the sensor condition
timely.
5 The hardware must contain GPU that efficiently process the algorithms and image
processing.
6 For the alarm to get to the active state, a proper trained algorithm must be used
to measure the level of anomaly. If the level is greater than the threshold value,
then only the alarm will go the active state.
1.6 Approved Objectives
1. To successfully detect the anomaly
2. To successfully alert the user
3. To ensure that device is recording valid values and in every possible light condition
c on modern inexpensive systems.
4. To optimize the time complexity of our anomaly detection algorithm
5. To classify the normal and anomalous videos
1.9 Novelty
CHAPTER 3- METHODOLOGY ADOPTED
1 Descriptive An investigation in which scientific questions Projects based on designing completely new
are investigated and observations of system models, concepts, algorithms
phenomenon are recorded and catalogued. etc.
2 Comparative Investigations where observations are made Comparison Based Projects (Algorithm
that compare two objects or phenomenon. based, System based etc.)
3 Experimental An organized investigation that includes a Image Processing based Projects etc.
control group and is designed to test the
hypothesis, includes independent and
dependent variables
4 Analytical An investigation in which a proposed method Image Processing based Projects etc.
is analysed to calculate its effectiveness.
5 Case Study An investigation in which the problem Software Engineering projects, quality
statement is studied in real time Assurance projects, etc.
7 Questionnaire Survey An investigation in which a survey is circulated Comparison Based Projects (Algorithm
to compare results based on feedback either based, System based etc.)
from a targeted audience or from a variable
audience.
Name
Login
Description This use-case depicts that if you need to use our software you need
proper user-id and password to use it for security reasons.
1. Software is uploaded on hardware.
Assumptions 2. Software should be configured properly.
3. User and Caregivers are comfortable with using software.
Trigger Users is provided user id and password for login.
Secondary Actor -
1. User starts the software and enters the correct user-id and
Normal Scenario password to monitor screen displays.
Alternate Scenario -
Special Requirements -
Frequency of Occurrence Login use-case is used only one time while using the software to
open homepage.
Issues -
TABLE 4.2: Use Case Template
Secondary Actor -
Stakeholders and Interests People owning shops, gyms, malls etc. who want security in their
system.
Minimal Guarantee:
1. Data is recorded correctly and is then classified to
Detect the anomaly.
Performance:
1. The anomaly should be detected in real time.
Special Requirements 2. Power consumption should be less
User Interface:
1. It should be very simple for the user.
2. It should take correct decision.
Frequency of Occurrence When anomaly is detected at that time it will give alert message.
[1] Michael D. Breitenstein, Helmut Grabner and Luc Van Gool. “Hunting Nessie – Real-Time
Abnormality Detection from Webcams." IEEE 12th International Conference on Computer Vision
Workshops (ICCV Workshops) 118.18 (2009): 2537-2543.
[2] R. Schuster, R. M¨orzinger, W. Haas, H. Grabner and Luc Van Gool, etc. al " Real-time
detection of unusual regions in image streams." Proceedings of the international conference on
Multimedia 39.10 (2010): 105002.
[3] Chen Change Loy, Tao Xiang and Shaogang Gong, et al. “Stream-based active unusual event
detection” Procedia Computer Science 141 (2008): 358-365.
[4] Vijay Mahadevan, Weixin Li, Viral Bhalodia and Nuno Vasconcelos. “Anomaly Detection in
Crowded Scenes." Instrumentation Science & Technology 44.4 (2010): 333-342.