0% found this document useful (0 votes)
32 views5 pages

Vacant Parking Lot Detection System Using Random Forest Classification

The document discusses a system for detecting vacant parking spaces using images. The system extracts features from parking lot images using Canny edge detection and color variation detection. These features are then classified using a Random Forest classifier to label spaces as occupied or vacant. The proposed approach aims to accurately detect vacant spaces from side view images captured in open parking lots under different conditions.

Uploaded by

Arpan Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views5 pages

Vacant Parking Lot Detection System Using Random Forest Classification

The document discusses a system for detecting vacant parking spaces using images. The system extracts features from parking lot images using Canny edge detection and color variation detection. These features are then classified using a Random Forest classifier to label spaces as occupied or vacant. The proposed approach aims to accurately detect vacant spaces from side view images captured in open parking lots under different conditions.

Uploaded by

Arpan Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Proceedings of the Third International Conference on Computing Methodologies and Communication (ICCMC 2019)

IEEE Xplore Part Number: CFP19K25-ART; ISBN: 978-1-5386-7808-4

Vacant Parking Lot Detection System Using


Random Forest Classification
Suthapalli Uday Raj Mummidi Veera Manikanta Paduchuri Sesha Sai M. Judith Leo
Department of CSE Department of CSE Harsitha Assistant Professor
Hindustan Institute of Hindustan Institute of Department of CSE Department of CSE
Technology and Science Technology and Science Hindustan Institute of Hindustan Institute of
Chennai, India Chennai, India Technology and Science Technology and Science
[email protected] [email protected] Chennai, India Chennai, India
om [email protected] [email protected]
m n
side of the parking lot where maximum of the parking
slots can be
Abstract— Intelligent parking system is an essential
attribute nowadays as the time is being wasted in finding
the vacant slot for parking. The proposed method focuses
viewed. Aerial view images have been generally taken
on detecting any vacant space that is out of human vision.
A camera is used for capturing the images of parking from the drones and processed to detect the spots. Side
space. Then a combination of both canny edge detection view images may have been taken from normal
and LUV based colour variation detection methods are security cameras. In [2] Yusnita et al. proposed an
used to precisely extract the edges of each parking slot.image detection module that will draw the shape of the
The extracted features are then trained using Random car. In [3] Wei et al. used the canny edge and
Forest classifier to obtain the model which is used to Morphological methods to detect the car in the parking
classify the parking space as empty and occupied. For space. They also used the self-adaptive algorithm for
experimentation, parking lot images from the PKlot training the images with the different positions and
dataset captured under different weather conditions has angles of the vehicle parked. Few Authors have
been used. When trained with a subset of the dataset withproposed the detection using the sliding window
37,680 parking spaces, after extracting the features and methodology in [4]. In [5] Gou et al. used an Haar-like
applying the Random Forest classification algorithm the detector and AdaBoost in face recognition which is a
proposed method can able to achieve a better accuracy of supervised learning model and comparing with the
98.31% compared to the existing methods. image of empty parking lot image. In [6] Peng et al.
Keywords — Parking slot detection, Canny edge detection,
proposed a drone based vacant parking space detection
LUV Algorithm, Random Forest classifier. in which the HOG, Harris corner, Vehicle color
transform, local gray-binary map and SVM are applied
I. INTRODUCTION for classification, achieving an accuracy of 97%.
Vacant Parking Lot Detection system is an intelligent Aerial images have a lot of complications as it takes an
system for parking space detection based on image image from the top view which can be taken from
processing and machine learning techniques. drones or satellite which is not an economical option
for small parking lots. The drone has to be much stable
For closed parking lot management lot of methods are
while taking images and even small disturbances will
available for efficient use of the parking spaces, like
cause a lot of damage in the model. So, the normal
sensors at the top of every parking space that detected
side view cameras can be used for image acquisition as
whether the spaces are filled or not. But for open
it will be easy for the parking management in the view
parking lot management it is a little bit difficult
of economy.
because we cannot place sensors at top or bottom of
car space the only way to solve this problem is using For side viewed images there are lot of methods that
the camera sensor to detect the parking spaces using will detect the parking spaces. But none of them are of
the image processing techniques. much accurate for various reasons like climatic
conditions, improper view of the parking lot, quality of
In [1] Jones and Lewis Proposed an image processing
the image or video. To overcome the above limitations
technique for closed parking lots by drawing the slots
to some extent, this paper proposes the use of novel
and detecting any motion in the slot. But many of the
combination of canny edge detection and color
parking lots will be in open spaces. Detecting the cars
variation detection for feature extraction which is then
in open spaces is a challenging. Camera will be used
trained using random forest classifier for classifying
for detecting the parking spaces. The camera can be
the spaces as occupied or vacant.
placed in two ways, one at the place where the parking
lot can be viewed from aerial view and other at any

978-1-5386-7808-4/19/$31.00 ©2019 IEEE 454


Authorized licensed use limited to: Somaiya University. Downloaded on November 06,2023 at 17:15:44 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Computing Methodologies and Communication (ICCMC 2019)
IEEE Xplore Part Number: CFP19K25-ART; ISBN: 978-1-5386-7808-4

II. RELATED WORKS with a high accuracy of reaches up to 89.1 %. Praveen


A lot of research has been carried out to propose this et.al [16] used an Haar-Cascade classifier for feature
model which is based the side view parking spaces extraction parking space classification.
captured on open space parking lot and the details are
given below for reference. III. THE PROPOSED PARKING LOT DETECTION
SYSTEM
Wu et al. [7] used an 8- class Support Vector Machine The proposed parking lot detection system takes as
(SVM) classifier to distinguish each parking space input the parking lot images each with 40 parking
with the PKLot-N2D dataset where SVM using single spaces and detects the empty slots in that particular
space have 84.35% to 85.57% accuracy. Markov images. The system is trained and tested using images
random field-based correction can improve the with empty and occupied slots to trace the empty slots.
By training the features extracted from the slots which
precision to 93.52% and sharply reduce the average
are previously detected instead of entire image the
conflict rate from 7.32% to 2.57%.
processing time of the image is reduced and the
Tsai et al. [8] proposed classification of pixels in efficiency is increased.
background or vehicle, and then used edge detector The input images are pre-processed after image
and Harris corner detector for verifying vehicles on the acquisition, labelled and segmented. The images are
ground with an accuracy of 95.7% in side view, 95.1 given to feature extraction algorithm that will extract
% in front and rear side view and 94.9% in multi the edges and colour variation of that particular slot.
views. Thus, in the proposed method the extraction involves
the two features extraction methodologies – the canny
Nicholas [9] used the colour histograms for feature edge detection for edge detection of the images in the
extraction and compared the use of k-nearest particular slot and the LUV bases colour variation
neighbour and SVM for the classification, got an detection.
accuracy of 89% for linear kernel SVM and 94% for
RBF kernel svm and 85.2 % for nearest neighbour Canny edge detection helps to identify the structure of
algorithm. the vehicle even if some part of the vehicle is covered
by another vehicle for some natural reasons like
Ananth et al. [10] introduced a novel method by using shadow, trees, etc. It uses a 5*5 gaussian filter to avoid
background subtraction, colour histogram analysis and noise as the canny edge detection is mainly vulnerable
texture matching approach to detect the slot as empty to the noise of an image.
or occupied and accuracy rate is 63.21% ,59.06% and
69.99% respectively for all the above features. As far as the colour feature detection is concerned, we
can surely say that the intensity of colours in parking
Ichihashi et al. [11] proposed a novel method of using lot varies for vacant slot and occupied slot and can be
the semi-hard clustering and FCM classifier for feature extracted using LUV algorithm. All of these features
extraction and SVM classifier for classification which are given to Random Forest classifier to classify each
can be used in both closed parking lot and open lots. slot into vacant or occupy. To achieve better accuracy
The experiment gives an error rate of 0.760 for PKlot the vacant/ occupied decision is made by the electing
datasets. technique. In a slot, if five or six pixels is found to be
vacant, then it has been determined to be empty slot.
Chen et al. [12] proposed a three-model camera
synchronization of background subtraction, Edge
model and colour model and achieved an accuracy of
92.8% for Edge-Eclipse, 35.6% for Edge-Grid, 94.7%
for Colour-Eclipse, 85.4% for Colour-Grid.

Paulo et al. [13] proposed a Textural Descriptors and


LBP and LPQ for feature extraction and svm
classification of vacant or occupied.

Ahrnbom et al. [14] proposed a comparison method


for classification of parking space as vacant or
occupied using the Integral Channel Features, used the
logistic regression and SVM for classification.
Fig. 1. The Proposed model architecture of feature extraction and the
Amato et al. [15] used deep CNNs (Convolutional classification.
Neural Network) to train a detector to detect parking
slots and their statuses based on LBP-type features

978-1-5386-7808-4/19/$31.00 ©2019 IEEE 455


Authorized licensed use limited to: Somaiya University. Downloaded on November 06,2023 at 17:15:44 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Computing Methodologies and Communication (ICCMC 2019)
IEEE Xplore Part Number: CFP19K25-ART; ISBN: 978-1-5386-7808-4

All of these features will be extracted for all the slots ii. Rounded gradient = 0° and
in an image. For our dataset every image has 40 slots magnitude > east & west pixels
and we have extracted two features with four variables iii. Rounded Gradient = 135° and
namely median of the canny edges, white difference magnitude > north-west & south-east pixels.
from empty, number of white pixels and number of iv. Rounded Gradient = 45° and
black pixels in each and every slot along with mean magnitude > north-east & south-west pixels.
and covariance from colour detection. A set of 942 d) Applying High Threshold: Even if we did
images have been used for training and every image non-maximum suppression still there will be some
has 40 slots. Thus, a total of 37,680 parking space each edges that cause noise because of colour variation. So
with four variables is given to Random Forest again, the suppression algorithm is applied more
classifier for generating the trained model. For testing, efficiently by selecting two threshold values as peak
the probe image is taken, pre-processed and features threshold value and a base threshold value. Some
will be extracted from that image and the classification conditions are checked to detect the weak edges as
is done using previously trained model. well. The pixel value must fall under one of these
conditions:
A. Feature Extraction  If pixel value is large than peak threshold
1) Canny Edge Detection: Canny edge detection value then it will be taken as thick edge pixel.
is a technique to extract useful structural information  If pixel value is smaller than peak
from different vision objects and dramatically reduce threshold value and also large than base
the amount of data to be processed. Every slot is taken threshold value then it will be taken as thin
as image and applied a canny edge detection edge pixel.
algorithm.  If the pixel value is smaller than base
Canny edge detection includes five steps. threshold value then that pixel will be
a) Applying Gaussian filter: Gaussian filter supressed.
is applied for softening the noise reduction filtration. It
As applying all of these conditions to every pixel of
prevents the unwanted or fake detection of the edges
the image will decrease the time efficiency, it will be
as the edge detection results are heavily affected by the
only applied to the parking slot of an image.
noise.
e) Edge tracking by hysteresis:

For tracking the connections between the edges
b) Intensity Gradient of the image: The detected in the previous steps blob analysis is applied
canny edge detection algorithm aims to find the points which is connected by the 8-connected neighbourhood
in vertical, diagonal and horizontal edges for a blurred pixels. And the weak edges and its connected edges
image. The operators of edge detection such as sobel, are removed for achieving the accurate result.
Prewitt is helpful in determining the edge gradient and
direction.



Where G defines the magnitude of the directional


gradients ,Ɵ defines the angle of the directional
gradients and G can be computed by the hypotenuse
function.
Fig. 2. Output of canny edge detection of a slot in parking lot
c) Non-Maximum Suppression: without vehicle in the space.
Application of intensity gradient to the edges of image
will be still blurred but only one response should be
there for edge. For that non-maximum suppression will
be used to supress the gradient values. The edge
strength of the current executing pixel will be
compared with the pixel in positive and negative
gradients directions.
Any given point will be considered as edge if
i. Rounded gradient = 90° and Fig. 3. Output of canny edge detection of a slot in parking lot with
magnitude > north & south pixels. vehicle in the space.

978-1-5386-7808-4/19/$31.00 ©2019 IEEE 456


Authorized licensed use limited to: Somaiya University. Downloaded on November 06,2023 at 17:15:44 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Computing Methodologies and Communication (ICCMC 2019)
IEEE Xplore Part Number: CFP19K25-ART; ISBN: 978-1-5386-7808-4

2) Colour Variation Detection: There will be spaces and 7536 test parking space images) have been
difference between the parking ground colour and the taken based on the location for building the model and
vehicle colour. Whenever a car comes into the parking classification.
spot there will be a disturbance in the background
IV. RESULTS AND DISCUSSION
colour of parking images. Our aim is to detect those
disturbance and store it for classification. LUV After applying Random Forest classifier using the 10-
algorithm is used for colour variation detection in our fold cross validation, an accuracy of 98.31% is
proposed method. The algorithm used by Peng in [6] achieved and detection of parking lot is depicted in
has been used in our proposed method for colour Fig. 4. The confusion matrix for the generated output
detection where the mean and covariance of the image is given below.
have been calculated and given to the classifier. We 
have separated the background colour and vehicle
colour using the new colour space (U, V). The (U, V) 
colour space is defined as follow:



Using the Bayes’ rule, the pixel can be classified either


vehicle or background pixel.



The pixel value calculated has been given to the


random forest classifier for classification of space as
vacant or occupied.
Fig 4: - Parking Slot Detection using Random Forest Classifier
B. Classification of Spaces: Random Forest
tree is an ensembled classification model which Fig. 5 and Fig. 6 shows the decision boundary for
classifies the data based on the decision trees. Random training and test set respectively.
Forest algorithm is used for both classification and
regression and it is widely used for its simplicity of
implementation. It is a supervised learning algorithm.
The Features extracted from canny edge detection and
colour variation are represented in a vector. This
classifier will select the random data from training set
and construct the decision tree. The process will
continue until specified number of decision trees have
been constructed. Final decision will be made based on
result of maximum number of decision trees.

For classification and building decision trees in


random forest model we used the Gini index function
which gives us the purity of the leaf nodes. The Gini
index will be given as Fig. 5. Decision boundary on training set of 30,144. (Red triangle
represents the occupied and blue square represents the vacant
parking spaces.)
G = sum (p * (1 – p)) 
where p is the no of predicted values.

Our proposed model is binary classification, so the


above can be written as

G = 2 * p1 * p2 or G = 1 – (p1^2 + p2^2) 

where p1 represents vacant parking spaces and p2


represents occupied parking spaces.
Random decision forests are best to solve the
overfitting problem of the training data using the
decision tree classifier. In the proposed method, only a
part of the PKLot dataset (30,144 training parking

978-1-5386-7808-4/19/$31.00 ©2019 IEEE 457


Authorized licensed use limited to: Somaiya University. Downloaded on November 06,2023 at 17:15:44 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Computing Methodologies and Communication (ICCMC 2019)
IEEE Xplore Part Number: CFP19K25-ART; ISBN: 978-1-5386-7808-4

Fig. 6. Decision boundary on testing set of size 7,536. (Red triangle location traces of the slots in the images by efficient
represents the occupied and blue squares represents the vacant image processing techniques.
parking spaces.)
VI. REFERENCES
The accuracy of the model is calculated by the formula [1] Jones and Lewis, 2011, “Vacant Parking Spot Detection”,
Stanford.edu, California.
Accuracy = (TP + TN) / (TP + TN + FP + FN). [2] Yusnita et al, 2012. “Intelligent Parking Space Detection System
Based on Image Processing”, International Journal of Innovation,
Precision, F1-score, Recall and Support of the model Management and Technology, Vol. 3, No. 3, June 2012.
are given below where the parameters are the predicted [3] Huan et al. 2013, “Vehicle detection from parking lot using
values of the model. the aerial images” in IEEE International Geoscience and Remote
Sensing Symposium.
precision recall f1-score support [4] M. Teutsch and W. Kruger 2015, “Robust and fast detection of
moving vehicles in aerial videos using sliding windows,” in
Empty 0.98 0.97 0.97 2443 Proceedings of the IEEE Conference on Computer Vision and
Occupied 0.98 0.99 0.99 5093 Pattern Recognition, pp. 26-34, 2015.
[5] Gou et al., 2016, “Extraction of parking lot structure from aerial
The above can be calculated using the formulas image in urban areas”, International Journal of Innovative
Precision = (TP) / (TP + FP)  Computing, Information and Control, Volume 12, Number 2, April
Recall = (TP) / (TP + FN)  2016, pp. 371–383.
F1-Score = (2 * Precision * Recall) / (Precision + [6] Peng et al, 2018, “Drone-Based Vacant Parking Space
Detection” IEEE Advanced Information Networking and
Recall)  Applications Workshops, 2018.
F1-Score is a value used for model comparison of [7] Wu et al, 2007, “Robust Parking Space Detection Considering
same data with another model or process. Inter-Space Correlation” ICME, pp. 659-662, Jul. 2007.
[8] Tsai et al, 2007, “Vehicle detection using normalized colour and
Support = number of values of each class having. edge map”, IEEE Transactions on Image Processing, vol. 16, no. 3,
Where precision and recall are the data to be viewed pp. 850-864, 2007.
carefully. [9] Nicholas, 2007, “Vacant Parking Space Detection in Static
Images”, University of California, San Diego.
TABLE I. COMPARISON OF PREVIOUS MODELS WITH OUR [10] Ananth et al, 2008, “Vision Based Parking Space
MODEL Classification”, Clemson University,
[11] Ichihashi et al, 2009, “Vacant Parking Space Detector for
DATASET ERROR Outdoor Parking Lot by Using Surveillance Camera and FCM
REFERENCE FEATURES ACCURACY
SIZE RATE
Wu et al. [7] Colour 1100 85% 6.5 Classifier”, IEEE International Conference on Fuzzy Systems, Jeju
Island, 2009, pp. 127-134.
Gabor
Sastre et al. [17] 12,150 78% 2.2 [12] L.-C. Chen, et al., 2010, “Vision-based vehicle surveillance and
Filters
parking lot management using multiple cameras,” Sixth
Huang et al. [18] Colour 2600 75% 2.5
International Conference on Intelligent Information Hiding and
Bong et.al [19] Colour 80 75% 7.0 Multimedia Signal Processing (IIHMSP), pp. 631-634, 2010.
Ichihashi et al. [13] Paulo et al. 2013, “Parking space Detection using the
PCA 54,800 80% 2.0
[11] Textural Descriptors” in IEEE International Conference on
Huang and Wang Systems, Man, and Cybernetic, 978-1-4799-0652-9/13, 2013
Colour 6912 88% 1.2
[2] IEEE.
Paulo et al. [13] Texture 82,516 93% 0.7 [14] Ahrnbom et al, 2016, “Fast Classification of Empty and
Edge and Occupied Parking Spaces Using Integral Channel Features”,
Proposed Model 37,680 98.31% 0.17
Colour IEEE Conference on Computer Vision and Pattern Recognition
Workshops (CVPRW), Las Vegas, NV, 2016, pp. 1609-1615.
The proposed method has achieved a very good [15] Amato et al,2016, “Car Parking Occupancy Detection Using
Smart Camera Networks and Deep Learning” IEEE Symposium on
accuracy of 98.31% compared to the existing methods Computers and Communication (ISCC), pp. 1212-1217, 2016.
since a combination of both canny edge detection and [16] Praveen et al, 2018, “A Haar-Cascade classifier based Smart
LUV based colour detection is used. Also, the Random Parking System”, Int'l Conf. IP, Comp. Vision, and Pattern
Forest algorithm contributes more to the accuracy Recognition, IPCV'18.
[17] Sastre et al, 2007, “Computer algebra algorithms applied to
caused due to its ability to solve the overfitting computer vision in a parking management system”, IEEE
problem of training data using the decision tree international symposium on industrial electronics, 2007. ISIR 2007,
classifier. pp. 1678-1680.
[18] Huang et al, 2013, “Vacant parking space detection based on
V. FUTURE WORK plane-based Bayesian hierarchical framework”, IEEE Transactions
on Circuits and Systems for Video Technology”, 23, 1598-1610.
Using this model, we can build a very efficient and [19] Bong et al, 2008, “Integrated approach in the design of car park
intelligent parking system. Efficiency can also be occupancy information system”, IAENG International Journal of
increased in case of different weather conditions like Computer Science, 35, 1-8.
[20] Huang, C.-C., & Wang, S.-J., 2010, “A hierarchical Bayesian
sunny, rainy and cloudy days, in different light generation framework for vacant parking space detection” IEEE
conditions and also in different views of the parking Transactions on Circuits and Systems for Video Technology, 20,
space like space covering with the leaves or other 1770-1785.
conditions. The proposed method can also be extended
to includes the location tracking of the empty slot
using the Google’s API. An android application can be
created where the users can easily access the location
of the empty slot in the parking lot without giving the

978-1-5386-7808-4/19/$31.00 ©2019 IEEE 458


Authorized licensed use limited to: Somaiya University. Downloaded on November 06,2023 at 17:15:44 UTC from IEEE Xplore. Restrictions apply.

You might also like