Unsupervised Video Surveillance for Anomaly Detection of Street Traffic

Intelligent transportation systems enables the analysis of large multidimensional street traffic data to detect pattern and anomaly, which otherwise is a difficult task. Advancement in computer vision makes great contribution in the progress of video based traffic surveillance system. But still there are some challenges which need to be solved like objects occlusion, behavior of objects. This paper developed a novel framework which explores multidimensional data of road traffic to analyze different patterns of traffic and anomaly detection. This framework is implemented on road traffic dataset collected from different areas of the city. Keywords—Kalman filter; Gaussian mixture model; DBSCAN clustering; similarity matrix; occlusion; computer vision; traffic surveillance; Intelligent Transport Systems (ITS)


I. INTRODUCTION
Major problem arises with the rapid development and expansion of urbanization includes traffic congestion, accidents, traffic violations, etc.These factors have great influence on human life.Over last three decades Intelligent Transport Systems (ITS) is playing a vital role in optimization of traffic flow, avoid traffic congestion and other issues of road traffic.ITS collect and analyze data to extract information which can used to detect and prevent accidents and in this way damages to properties can be minimized and human life can be saved.
Although great progress has been made on video-based traffic surveillance but still the detection and prediction of accidents is a very complicated task and researchers are still facing various difficulties and challenges for practical ITS applications like vehicle all day surveillance, occlusion, pose variation, different resolutions and vehicle behavior understanding [1].
The accurate detection of vehicles can fulfill the strive to have better traffic data and a reliable traffic surveillance.Image processing of traffic videos is an effective approach to track vehicles and as a consequence various factors like velocity, change of lane, vehicle trajectories can be efficiently analyzed.Measurement of accurate density is possible if trajectories of vehicles are observed over a road till certain distance.Monitoring of vehicle trajectories is one of the key points to predict any incident.Detecting anomaly behavior is an important aspect of video surveillance for several applications.In the last few years various researchers focused on this issue [1], [2].
Patterns of trajectories and abnormal behaviors recorded in videos can decipher anomalies.With the development in visual surveillance, accuracy in tracking of moving objects becomes high which provides reliable source of detection of incident.Two approaches, parametric and non-parametric are used to identify abnormal behaviors on road [3]- [6].The detection of abnormal events in parametric method is performed on the basis of feature extraction from the observed data [3].The tracking algorithms can be used to extract visual features for example appearance, position, speed etc. Statistics of the data provides the real picture of normal and abnormal patterns of the vehicle activities [4]- [6].
Based on the challenge faced by present traffic surveillance system, a novel framework has been developed here which explores multidimensional data of road traffic to analyze different pattern of traffic and anomaly detection.This framework is implemented on real road traffic data set collected from different areas of the city.This paper is arranged as follows.Section 2 presents background and related work being performed in this area.Section 3 deals with proposed framework for detection and tracking of objects, extraction of features, preprocessing, similarity based trajectory clustering and anomaly detection.Section 4 discusses the results and experimental analysis.Finally the conclusion of paper is mentioned in Section 5.

II. LITERATURE REVIEW
In unsupervised learning, the model of data is hidden and it's up to the system to learn it.The data is differentiated into different classes using their statistical property.The results of these approaches are dependent on the data it's being applied on.The advantage of unsupervised approaches is the nonessentiality of any sort of special training.Clustering of trajectories of moving objects is needed to detect abnormal activities.Identification of outlier by spatial measurements was done to study vehicle behaviors from trajectory data [7].
In [8], Fu et al. propose a hierarchical clustering framework to cluster trajectories using pairwise similarities.After trajectory preprocessing the similarity matrix is constructed based on the pairwise distance of sample trajectories.Spectral clustering is then applied on the similarity matrices.A second layer of clustering is done on the already clustered trajectories to achieve finer classification.Abnormal trajectories are determined using point-to-point distance between the trajectory in question and the template www.ijacsa.thesai.orgtrajectory.Spectral clustering only slightly improves the results obtained from the popular K-means approach but requires more work.
Framework based on temporal study was given to detect outliers on the basis of changes in trajectories [9].Pan et al. in [10] develop a traffic surveillance system for detecting vehicle flows.They use a background subtraction method for separating the vehicle from the background.Using an edge detection technique a region of interest is created around the vehicle.They also propose a lane-dividing algorithm for counting the number of passing vehicles.In [11] Piciarelli [12] suggested a trajectory based clustering method.Anomalies in trajectories were extracted through a tree formed from a series of clusters.Anomalous trajectories are those having less probability when compared with the tree.Vehicles moving in a wrong direction can easily be identified by this method but this approach fails to estimate speed of vehicle.Correspondingly, movement through unusual path can be determined by path frequency and time used [13].Although variations in direction and speed were estimated but small changes in motion cannot be detected.
The main goal is automatically determination of suitable number of trajectory clusters especially when there are large quantities of trajectories.Features of local trajectories were examined by vector quantization [14].Wang et al. [15] used spectral clustering to perform trajectory clustering for detection and prediction of anomalies.Expectationmaximization algorithm was proposed by Vasquez and Fraichard [16] for computation of trajectory similarities.The authors [17] compile a survey of activity definitions based on trajectory data.Their compilation covers diverse sets of real time applications such as behavioral analysis, anomaly detection, object interaction etc.Using the motion information of the objects, topological scene description is built.This scene topology is automatically learnt and distinguished by points of interest and motion characterized by activity paths.In most of the methods mentioned above, the anomalies are detected by first categorizing the normal events which are far more common compared to the anomalous events.This categorization is done by extracting certain features of the events.These features can be in terms of image frames containing the activity being modeled as GMMs or in terms or features containing spatiotemporal information.These extracted features are categorized using one of the many clustering algorithms or machine learning algorithms.In [1] the challenges in traffic video surveillance are discussed in detail.The framework developed here deals with problems like occlusion, behavior of objects.

III. METHODOLOGY
Vehicle pattern and anomaly detection system is shown in Fig. 1.The proposed frame work is based on unsupervised techniques i.e. there is no requirement for learning stage.Approach based on real time trajectory has been established for the recognition of pattern and anomalous behavior in video sequences.An automated method is suggested for detection of vehicle pattern and anomaly detection.Vehicle trajectories are used for detection of pattern in the field of a camera.Surveillance videos are recorded from defense Khayaban-e-Ittehad and university road near FUUAST, Karachi.

A. Detection and Tracking of Objects
Background subtraction technique is implemented in the proposed system.It is essential to efficiently detect foreground because the consequent process like tracking of objects, extraction of features, etc. are mainly dependent on the results of foreground detection technique.Gaussian Mixture Model (GMM) is employed for background subtraction and detection of foreground objects [23] is performed by using Expected Maximization (EM).
Effect of alterations in the illuminations is minimized by applying various distributions for modeling the pixel values.The probability of pixel having the value of Xt is found to be: Where,


symbolizes Co-variance of the ith object [18].Probability Density Function (PDF) [19] can be formulated as: Kalman filter is applied for the indication of each track.American scientist R.E.Kalman established Kalman filtering algorithm for discrete random systems based on Wiener filtering, also can be used for linear continuous time systems [20].General discrete systems can be expressed as in formula [21].
In ( 3) and (4), X (i) is the p-dimensional state vector, R (i) is the v-dimensional observation vector, s(i) is the y-dimensional state vector, c (i+1) is the z-dimensional noise vector measurement.Q (i+1,i) is the state transition matrix from the time i to time (i+1), J (i+1, i) is the incentive transfer matrix from time i to time (i+1), H (i+1) predictive output matrix for ( i+1) moments.
This filter is applied to locate track in every frame, it also decided the probability of each detection which is being allocated to each track.Maintenance of track is an essential point.In selected frames, some of the detections are assigned to tracks, whereas others remained unassigned.The updating of assigned tracks is performed by using corresponding detections.

B. Extraction of Features
The features used in proposed framework include objects position, trajectory, orientation, visible age in the scene and invisible count.Table I show these features in terms of x-axis, y-axis, width, height, age, visible and invisible count.Unassigned tracks are considered invisible and a new track is originates by unassigned detection.Each of the tracks retains sum of the number of successive frames, where it kept unassigned.If the count surpasses a definite threshold, it is assumed that the object move away from the view of camera and the track is deleted.
Following the detection of foreground, object of foreground is tracked from frame to frame with the help of blob tracking.Centroid of two dimensional areas is estimated by average of bounding box points.Although occlusion can occur between vehicles, but centroid can efficiently distinguish them and the tracking continues productively.After tracking, the set of points are recorded as trajectories of moving objects or vehicles given in Table I.

C. Preprocessing
There is a need of preprocessing to obtain fix length of trajectory data and the algorithm used for this purpose is as follows: Step1: Count the number of coordinates of each trajectory.
Step2: Calculate average (number of coordinates) for each trajectory to convert it into fixed length.
Fixed Coordinates=mode function (the top five modes have been selected and there average was calculated, therefore some of them move towards higher value and other get decreased) Step3: For

D. Similarity based Trajectory Clustering
Euclidean distance is not only used in data mining but it also helps to analyze trajectory.Due to its simplicity it is important in data mining of moving objects.Addition to that large trajectory data can be easily handled due to its linear time complexity.The sampling points must have same dimension.However, in real situation, the sampling time of each point in trajectory may not be same.Trajectory data is fixed to same length by preprocessing algorithm (Section III.C).In the developed framework, Euclidean distance is used to calculate clusters in trajectory data set.

Similarity base clustering algorithm:
 Threshold value is the criteria for which the similarities of trajectories are being defined. Calculation of difference of every new trajectory with all the clusters and then select that cluster which has minimum difference with trajectory (i.

E. Anomaly Detection
Detection of anomaly is the identification of those points in dataset that do not follow the normal pattern or other points in a dataset.Outliers indicate the abnormal behavior of vehicle.In this research DBSCAN clustering which is an unsupervised technique is being used to detect anomaly.The main goal of this technique is to separate regular and irregular patterns in the video surveillance.DBSCAN deals with the density of points to perform clustering, as a consequence regions of high and low density separate.This algorithm can handles clusters of various size and shape [22].
The algorithm can effectively handle noise and a large data set.The main emphasis of DBSCAN is to access density with two critical parameters, i.e.Eps and MinPts.Eps means neighbors of point p and MinPts is minimum number of points.
Point p is density accessible from q, as given in ( 5) and (6).
For finding a cluster, DBSCAN initiates with a random point p and accesses all density reachable points from p applying region queries for p as well as for p's direct and indirect neighbors if necessary.This technique results in a cluster if p is a core point.However, if p is not a core point, no points are supposedly density reachable from p and thus DBSCAN assigns p to noise and continues the same technique with next point.The algorithm ends when all pints are either assigned to a cluster or to noise.

IV. RESULTS AND DISCUSSION
In order to check the reliability and accuracy of a system, there is a need of good annotated dataset.A verified annotated dataset can assumed to be a ground truth to find the consistency of results of the system under consideration.As this data is not available publicly, therefore, observations of a survey person (video observer) have been set to be a ground truth.Traffic Surveillance videos are recorded from defense Khayaban-e-Ittehad and university road near FUUAST, Karachi.The results after applying Gaussian Mixture Model and Kalman filter on these video are shown in Fig. 2 I. From the table features of interest of the objects are computed for the anomaly classification.Accuracy of the system is not affected by duration of videos.Abnormal events are represented by DBSCAN clustering using features age and angle, results are shown in Fig. 3(a), (b).The graphs (Fig. 3 (a), (b)) demonstrate that objects having age less than 10 and objects turning with angle greater than 56º are anomalous in the objects data set since the focus is on sharp turn and less age anomalous events in this context.
Different patterns of trajectories are calculated for similarity matching algorithm using fix length trajectory data set.In total three patterns were observed, most of the vehicles go straight on the road, some moves towards left and few took U-turn.The result of the proposed system is found to be 90% accurate when compared with the observations of the survey person (Fig. 4).www.ijacsa.thesai.orgThe video-based traffic surveillance system is playing efficient role in intelligent transport system.Well organized association is required between human and machine in order to decipher valuable information from big, multidimensional and diverse data set.These systems capture traffic scenes, evaluate the information obtained and finally differentiate between normal and abnormal activities.In this paper a novel frame work, for detection of pattern and anomaly, has been developed.The main purpose of this framework is to extract the dynamic feature of vehicle, investigate vehicle pattern and behavior on the road and detect anomaly by using single camera node.The framework is in such a sequence that capturing and understanding of vehicle behavior over the entire road becomes effective.Additional achievements in this research area will give more efficient ITS facilities for extensive applications.
, Basharat et al. propose a scheme for identifying vehicular anomalies.Pixel level pdfs of motion and sizes of objects in static camera environments are modeled from the tracks.Each pdf is modeled as a multivariate Gaussian mixture model of motion and size of the object.The authors propose an unsupervised Expectation Maximization based algorithm for learning the GMMs.Their training phase generates a scene model consisting of all the GMM parameters of all the pixels with sufficient training data.This scene model is used to detect anomalous patterns which differ from the patterns observed in the training data.
The video series are recorded with various resolutions, different time frame, and under varying conditions of weather.The developed framework includes the following steps:  Detection and tracking of objects  Extraction of feature  Preprocessing  Similarity based trajectory clustering  Anomaly detection.
(a)-(d).The dataset contains 10 surveillance videos having 698 total trajectories.The examples of few objects in the dataset are given in Table

Fig. 4 .
Fig. 4. Comparison of results of survey person and algorithm.

TABLE II .
EXAMPLES OF FEW OBJECTS IN THE DATASET