Implementation of Optical Flow, Sliding Window and SVM for Vehicle Detection and Tracking

Similar documents
Classification of objects from Video Data (Group 30)

Human Motion Detection and Tracking for Video Surveillance

Tri-modal Human Body Segmentation

Traffic Signs Recognition using HP and HOG Descriptors Combined to MLP and SVM Classifiers

SIMULINK based Moving Object Detection and Blob Counting Algorithm for Traffic Surveillance

Car Detecting Method using high Resolution images

A MODULARIZED APPROACH FOR REAL TIME VEHICULAR SURVEILLANCE WITH A CUSTOM HOG BASED LPR SYSTEM. Vivek Joy 1, Kakkanad, Kochi, Kerala.

Human detection using histogram of oriented gradients. Srikumar Ramalingam School of Computing University of Utah

Bus Detection and recognition for visually impaired people

A Street Scene Surveillance System for Moving Object Detection, Tracking and Classification

C. Premsai 1, Prof. A. Kavya 2 School of Computer Science, School of Computer Science Engineering, Engineering VIT Chennai, VIT Chennai

Human detections using Beagle board-xm

Moving Object Counting in Video Signals

An Implementation on Histogram of Oriented Gradients for Human Detection

Detection and Classification of Vehicles

Automatic License Plate Detection

Pedestrian Detection and Tracking in Images and Videos

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

Object Tracking using HOG and SVM

Combining shape-based and gradient-based classifiers for vehicle classification

HOG-based Pedestriant Detector Training

Moving Object Detection for Video Surveillance

LOCALIZATION OF LICENSE PLATE NUMBER USING DYNAMIC IMAGE PROCESSING TECHNIQUES

International Journal of Advance Engineering and Research Development

Large-Scale Traffic Sign Recognition based on Local Features and Color Segmentation

Classification and Tracking of Traffic Scene Objects with Hybrid Camera Systems

International Journal Of Global Innovations -Vol.4, Issue.I Paper Id: SP-V4-I1-P17 ISSN Online:

Detecting Printed and Handwritten Partial Copies of Line Drawings Embedded in Complex Backgrounds

MULTI ORIENTATION PERFORMANCE OF FEATURE EXTRACTION FOR HUMAN HEAD RECOGNITION

Human Detection. A state-of-the-art survey. Mohammad Dorgham. University of Hamburg

FAST HUMAN DETECTION USING TEMPLATE MATCHING FOR GRADIENT IMAGES AND ASC DESCRIPTORS BASED ON SUBTRACTION STEREO

CS 231A Computer Vision (Winter 2018) Problem Set 3

Detection and Classification of Vehicles from Omnidirectional Videos using Temporal Average of Silhouettes

DYNAMIC BACKGROUND SUBTRACTION BASED ON SPATIAL EXTENDED CENTER-SYMMETRIC LOCAL BINARY PATTERN. Gengjian Xue, Jun Sun, Li Song

An Edge-Based Approach to Motion Detection*

TRAFFIC SIGN RECOGNITION USING A MULTI-TASK CONVOLUTIONAL NEURAL NETWORK

Non-rigid body Object Tracking using Fuzzy Neural System based on Multiple ROIs and Adaptive Motion Frame Method

Computer Science Faculty, Bandar Lampung University, Bandar Lampung, Indonesia

Real-time Object Detection CS 229 Course Project

Human-Robot Interaction

Robotics Programming Laboratory

Improving License Plate Recognition Rate using Hybrid Algorithms

Fast Vehicle Detection and Counting Using Background Subtraction Technique and Prewitt Edge Detection

Self Lane Assignment Using Smart Mobile Camera For Intelligent GPS Navigation and Traffic Interpretation

Moving Object Tracking in Video Using MATLAB

Vehicle Detection Using Gabor Filter

Face Recognition Using Vector Quantization Histogram and Support Vector Machine Classifier Rong-sheng LI, Fei-fei LEE *, Yan YAN and Qiu CHEN

Multiclass SVM and HoG based object recognition of AGMM detected and KF tracked moving objects from single camera input video

Templates and Background Subtraction. Prof. D. Stricker Doz. G. Bleser

Multiview Pedestrian Detection Based on Online Support Vector Machine Using Convex Hull

Vehicle Detection under Day and Night Illumination

Adaptive Background Mixture Models for Real-Time Tracking

MOVING OBJECT DETECTION USING BACKGROUND SUBTRACTION ALGORITHM USING SIMULINK

Preceding vehicle detection and distance estimation. lane change, warning system.

Defining a Better Vehicle Trajectory With GMM

Research on Recognition and Classification of Moving Objects in Mixed Traffic Based on Video Detection

Mobile Human Detection Systems based on Sliding Windows Approach-A Review

Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

TEXTURE CLASSIFICATION METHODS: A REVIEW

Scene Text Detection Using Machine Learning Classifiers

EE795: Computer Vision and Intelligent Systems

Vehicle Detection under Day and Night Illumination

An Approach for Real Time Moving Object Extraction based on Edge Region Determination

Classification and Detection in Images. D.A. Forsyth

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Human detection based on Sliding Window Approach

Object Detection in Video Streams

International Journal of Modern Engineering and Research Technology

Gesture based PTZ camera control

Vehicle Detection and Tracking using Gaussian Mixture Model and Kalman Filter

Moving Object Segmentation Method Based on Motion Information Classification by X-means and Spatial Region Segmentation

SVM CLASSIFIER FOR VEHICLE SURVEILLANCE UNDER NIGHTTIME VIDEO SCENES

Video and Image Processing for Finding Paint Defects using BeagleBone Black

Histograms of Oriented Gradients

REAL TIME TRACKING OF MOVING PEDESTRIAN IN SURVEILLANCE VIDEO

PEOPLE IN SEATS COUNTING VIA SEAT DETECTION FOR MEETING SURVEILLANCE

Support Vector Machine-Based Human Behavior Classification in Crowd through Projection and Star Skeletonization

ФУНДАМЕНТАЛЬНЫЕ НАУКИ. Информатика 9 ИНФОРМАТИКА MOTION DETECTION IN VIDEO STREAM BASED ON BACKGROUND SUBTRACTION AND TARGET TRACKING

IMPROVING SPATIO-TEMPORAL FEATURE EXTRACTION TECHNIQUES AND THEIR APPLICATIONS IN ACTION CLASSIFICATION. Maral Mesmakhosroshahi, Joohee Kim

IMAGE RETRIEVAL USING VLAD WITH MULTIPLE FEATURES

Implementation of a Pedestrian Detection Device based on CENTRIST for an Embedded Environment

Object Recognition II

Robust PDF Table Locator

Adaptive Cell-Size HoG Based. Object Tracking with Particle Filter

DEVELOPMENT OF VISION-BASED HANDICAPPED LOGO REGONITION SYSTEM FOR DISABLED PARKING

Person Detection in Images using HoG + Gentleboost. Rahul Rajan June 1st July 15th CMU Q Robotics Lab

Designing Applications that See Lecture 7: Object Recognition

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

Category-level localization

Local Features: Detection, Description & Matching

Modern Object Detection. Most slides from Ali Farhadi

EE795: Computer Vision and Intelligent Systems

International Journal of Innovative Research in Computer and Communication Engineering

2D Image Processing Feature Descriptors

Digital Image Processing COSC 6380/4393

International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering

Detection And Matching Of License Plate Using Veda And Correlation

Object Classification for Video Surveillance

Efficient Acquisition of Human Existence Priors from Motion Trajectories

ISSN (Online)

Transcription:

Implementation of Optical Flow, Sliding Window and SVM for Vehicle Detection and Tracking Mohammad Baji, Dr. I. SantiPrabha 2 M. Tech scholar, Department of E.C.E,U.C.E.K,Jawaharlal Nehru Technological University Kakinada, A.P, India Professor, Department of E.C.E,U.C.E.K,Jawaharlal Nehru Technological University Kakinada, A.P, India 2 ABSTRACT: Vehicle detection and tracking are two most challenging tasks of traffic surveillance in transport system. Traditional vehicle detection and tacking methods are computationally expensive and become inefficient in case where light intensity is low and occlusion of vehicles is high. This paper includes detection of moving vehicles, counting of vehicles and tracking of detected vehicles. Here detection is carried out by Optical Flow Method in which a moving vehicle is extracted from the relative motion by segmenting the region representing the same optical flows.the optical flow image uses Horn-Schunk technique in finding the optimum parameters for providing the smoothness. The detected vehicles are tracked using Linear Support Vector Machine Classifier (Linear SVM) with a set of features like Histograms of Oriented Gradients (HOG), Histograms of color features and Geometric features of vehicles, withthis details the classifier is trained.this trained classifier is used to search for vehicles in a video, based on the sliding window technique then its heat map is generated to know the position of a vehicle. Combine this heat maps gives the exact location of the vehicle in images. Experimental results demonstrate that the proposed method is effective in detection&counting and tracking of vehicles. KEYWORDS: Detection and Tracking, Horn-Schunk method, Optical Flow, Morphological operation, HOG, SVM, Sliding-Window technique. I.INTRODUCTION Road Safety with the amount of vehicles is becoming more serious problem. The collision is a main reason for traffic accidents, especially on the highway. Therefore, developing an automotive safety driver assistance system is very important to reduce the accidents. Vehicle detection and tracking techniques are in demand due to numerous applications in Self driving car, traffic surveillance, toll collection, parking lots, and transportation system. For example, counting vehicles over a period of time on a busy intersection helps the concerned authority to efficiently control the duration of traffic signal on a road to reduce the level of traffic congestion during busy hours. Automated counting and tracking of vehicles in self driving car. At present, moving vehicles detection method for video are mainly temporal difference between two consecutive frames [], image subtraction with background [2], Gaussian Mixture model (GMM) [7] and optical flow estimation [3]. Copyright to IJIRSET DOI:0.5680/IJIRSET.207.060939 8452

Fig.. Block Diagram of vehicle detection and tracking system Due to the higher detection accuracy of optical flow, it is more suitable for multi-objective moving analysis in complex scenes. Through optical flow estimation, motion parameters of moving objects can be obtained and at the same time, phenomena of occlusion and overlapping of objects may be avoided by applying the morphological operation, which is erosion followed by dilution. Mean filter is used to predict the centroid of each track in the current frame and update to next frame by deleting the previous frame details. Histogram of Oriented Gradients (HOG) [4] is a feature descriptor used in computer vision and image processing for the purpose of object detection. HOG features are calculated by taking orientation histogram of edge intensity in a local region. The extracted HOG features from all locations of a dense grid on a image region and combined features are classified by using linear SVM [5]. The simplest classifier available is the k-nearest neighbor (k-nn) [6] which doesn t have any separate training stage. SVM is asupervised learning method. SVM algorithm uses a set of training examples which creates a model that is used for classify objects in accordance with the data set created. II.LITERATURE SURVEY The concept for using the SVM classifieris taken from papersaran K. B. and Sreelekha G in which they proposed the SVM classifier for human detection. The idea of HOG feature descriptor is taken from the paper N. Dalal and B. Triggsby which HOG features from all locations of dense grid on an image region and the combined features are classified by using linear SVM. For the detection of vehicle in an video sequence is taken from paper [3] which uses the optical flow method. Here optical flow uses the Horn Schunck method for the smoothness of the images velocity flow magnitude. III.RELATED WORK Proposed method is based on detection of vehicles using optical flow, vehicle counting and vehicle tracking which are explained below.. Optical Flow Method: One of the important blocks presented in the above scheme is called optical flow analysis block. The main purpose of this block is to determine the existence of possible contacts in the incoming video signal and process them in such manner that the median filter is able to detect them with minimal error. The Horn-Schunk algorithms qualify the smoothness of velocity field using the magnitude of gradient of optical flow velocity defined as: f x u + f y v + f t = 0 Where u and v are velocity vectors corresponding to Optical flow and f(x,y,t) is brightness of (x,y) at time t. Optimal value E w = f x u + f y v + f t 2 + α u 2 + v 2 dx dy Copyright to IJIRSET DOI:0.5680/IJIRSET.207.060939 8453

Where f x,y is partial derivative of f with respect to x,y and u = u x 2 + u y 2. 2. Vehicle Counting: Vehicle is represented using white pixels and the background is represented using black pixels. So the maximum intensity will be at the vehicle position. Thus the centroids can be used to mark the position of vehicles, which is represented as arithmetic mean of x and y directions. Suppose A denotes the entire region, then the centroids (x andy) are given by: x = x ; y = y It can be represented as x = x y 0 = M 0 M 00 ; y = x 0 y = M 0 M 00 Where M 00 denotes the zero order moment, which gives the area () of the region A. So each vehicle s binary mask will have one centroid. The number of vehicles in a frame will be equal to the number of centroids within that frame. For that the position or perspective of the camera is required. For example, in the camera view, if the motion of vehicles is in the vertical direction, then consider two columns of pixels in the frame as real axes (i.e. parallel to x-axis). Fig. 2. Representation of real axes for vehicle counting Wherey denotes the centroid of vehicle regions and y and y 2 represents two rows of pixels in the frame representing the real axes. 3. Vehicle Tracking: Vehicles tracking is an important task in the traffic video surveillance, since it can be used to get the type of vehicles or any other information regarding a particular vehicle that is passed through the region of interest. The tracking is done using Linear Support Vector Machine (SVM) with histograms of oriented gradients (HOG) [4] and geometric features has been used. 3. Vehicle tracking using SVM SVM is supervised learning model with associated learning algorithms that analyze data used for classification and regression analysis. Linear SVM is a binary classifier where positive and negative samples are used for training. This SVM is fed with feature extracted from HOG. Copyright to IJIRSET DOI:0.5680/IJIRSET.207.060939 8454

Features Extraction: A. Histograms of Oriented Gradients The concept of HOG is presented by Dalal et al., [4], which is an image descriptor mainly used for the Object detection. HOG is calculated by dividing the image into small blocks with 50% overlap. These blocks are again divided into small cells. G x and G y are the respective horizontal and vertical gradients ofthe image, then the gradient magnitude (M) and orientation (ɵ) can be calculated as: M = G x 2 + G y 2 θ = arctan G y G x A voting is conducted for each gradient orientation. The vote is the gradient magnitude. According to the number of votes obtained, the gradient orientation is quantized into nine bins ranging from 0 to 80. Thus it will form a histogram. The histograms of all the blocks are concatenated to form the feature vector. Since HOG deals with the gradient of the image, it tells how the edges of an object are oriented. Intuitively it gives the information regarding the shape of the vehicle. The HOG of all the vehicle images in the dataset are found and stored for training the neural network. When a new vehicle is detected in a frame, the vehicle is cropped and pre-proceed to find the HOG. The size of each image is converted into 32 x 32 and is divided into 8 x 8 blocks containing 2 x 2 cells. The gradient of these cells are used to find the HOG. The HOG of the detected vehicle is fed to the trained SVM and the output determines the class of that vehicle. (a) (b) Fig. 3. (a) Test image for features extraction (b) HOG image of Fig. (a) B. Geometric features: The dataset contains images of vehicles. When the sizes of vehicles are compared they differ by a lot. Length and breadth of any vehicle will not be same. With these geometric features such as height, length, breadth and area, we can classify the image. The ratio of length to height is given by RLH = l h The ratio of perimeter to area is given by RPA = 2 l + h 2 l h Copyright to IJIRSET DOI:0.5680/IJIRSET.207.060939 8455

C. Sliding Window Search: We have to process the image of the vehicle that is in motion in a video. Now we need to extract the feature of the full resolution images into some sub regions and look for the car is present or not. To find the sub-regions of the images a sliding window approach is used. To improve the performance minimal search of sub-region should be maintained and to avoid for looking of car in region of non-interest. We need to compute the feature vector of the each sub region and feed to the linear SVM, which predict if the car is present or not in the images. By recording all the positions of positive detections in each frame of the video we generate a heat map by fixing a threshold to identify vehicle positions and create the blobs. Using this individual blobs of heat map, combine them into single unit to construct the region of the vehicle. (a) (b) Fig. 4. (a) Pipeline: search vehicle (b) Heat map of Fig. (a) IV.EXPERIMENTAL RESULTS The proposed optical flow model provides the detecting, counting and shadow removal by using the motion vector estimation vector. Below Fig. 5(a) show the vehicle in video and (b) represent the binary mask of (a) from which the centroid is calculated. One centroid represent one vehicle in the proposed method. Copyright to IJIRSET DOI:0.5680/IJIRSET.207.060939 8456

(a) (b) Fig. 5. Vehicle detection result from video (a) Actual frame (b) binary mask after morphological operation Table I Comparison of detection accuracy of KNN and FBS with SVM and HOG Tracking KNN and FBS SVM and HOG Total no. of vehicles Correct Detection Detection Accuracy (%) 58 45 77.58 58 50 86.20 The images used for creating data set are obtained from the GTI vehicle image database, the KITTI vision benchmarks suite and other websites. The performance of a classifier is determined by the correctness in the classification. Which is quantified by the recognition accuracy. Table: I shows the classification accuracy of SVMwith HOG of feature vector compared with KNN classifier and FBS. (a) (b) (c) Fig. 6.(a) Tracking of vehicles by using sliding window (b) Heat map of Fig. (a), (c) region of vehicle from combined heat maps Copyright to IJIRSET DOI:0.5680/IJIRSET.207.060939 8457

The data set of a vehicle and non-vehicle examples are used to train your classifier. These example images come from a combination of the GTI vehicle image database, the KITTI vision benchmark suite. The data set contains of 8792 car images and 8968 not cars images. HOG features are obtained by using 9 orientations, 8 pixels per cell and 2 cell per block. The Features vector is mapped into single array element and fed to trainer. SVM classifier took near 6minutes during training the data to the above set. After the sliding search in fig (a) it is heat map as shown in fig (b). Combine to form the position of vehicles. Computational Time: Vehicle detection and tracking is implemented using Python 2.7.3 with OpenCv 3.0.0 and is supported with 3 GB RAM Intel i3 processor. The code took 6 minutes to train the SVM classifier with above data set. Computational time dependence on the data set, processor speed and ram memory. Once the SVM is trained, the network can be ready to use for any number videos until the processor is shut down. Table II Comparison of computation time of KNN with SVM for a video sequence Classification Method Computation Time (sec) KNN 6.3 SVM 7.25 V.CONCLUSION In this paper, vehicle detection and tracking has been implemented which focuses on a real time application of self -driving cars and highway traffic. The experimental results validate that the Optical flow gives better performance for detecting the vehicles in a real time videos. The value of optimal parameters for each displacement of Horn-Schunk optical flow have been identified and are necessary in determining image flow sequence providing image with optimal smoothness. For tracking of vehicle, Linear SVM with histogram of oriented gradients (HOG) features, color histogram, and geometry as features are used. The proposed method gives better accuracy compared to k-nn classifier with the Frame Background Subtraction (FBS). The classifier is restricted to moving objects and non-moving objects. This can be extended by developing multi-class SVM which classify the vehicles in different categories (i.e., motorbike, cars, buses, trucks etc.). Some of the challenges in practical cases can also be considered such as night time traffic, different weather conditions and different time instants for future studies. REFERENCES [] K. Park, D. Lee and Y. Park, Video-based detection of street-parking violation, in Proc. Int. Conf. Image Process., Computer Vision., Pattern Recognition, Las Vegas, NV, vol., pp. 52 56, 2007. [2] P. G. Michalopoulos, Vehicle detection video through image processing: The autoscope system, IEEE Trans. Veh. Tech., vol.40, no., pp. 2 29, Feb. 99. [3] H. Yalcin, M. Herbert, R. Collins, and M. J. Black, A flow-based approach to vehicle detection and background mosaicking in airborne video, in Proc. CVPR, San Diego, CA, 2005, vol. 2, pp. 202. [4] N. Dalal and B. Triggs, Histograms of oriented gradients for human detection, IEEE Computer Society Conf. on Computer Vision and Pattern Recognition, vol., pp. 886 893, June 2005. [5] B. Morris and M. Trivedi, Improved vehicle classification in long traffic video by cooperating tracker and classifier modules, EEE Int. Conf. on Video and Signal Based Surveillance, vol. 9, p. 9, November 2006. [6] NiluthpolChowdhuryMithun, Nafi Ur Rashid, and S. M. MahbuburRhman, Detection and classification of vehicles from video using multiple time spatial images, IEEE Transactions on Intelligence Transactions Systems, vol. 3, no. 3, September 202. [7] Saran K. B. and Sreelekha G, Traffic Video Surveillance: Vehicle Detection and Classification, International Conference on control, communication and computing India, pp. 56-52, Nov. 205. [8] Shiva Kamkar and Reza Safabakhsh, Vehicle detection, counting and classification in various conditions, IET Intel. Transp. Syst., vol. 0, Iss. 6, pp. 406-43, 206. Copyright to IJIRSET DOI:0.5680/IJIRSET.207.060939 8458