Content uploaded by Sabih Rehman
Author content
All content in this area was uploaded by Sabih Rehman on Mar 09, 2020
Content may be subject to copyright.
Investigating the use of Machine Learning for
Smart Parking Applications
Jonathan Barker
School of Computing and Mathematics
Charles Sturt University, Australia
Email: jonno.p.barker@gmail.com
Sabih ur Rehman
School of Computing and Mathematics
Charles Sturt University, Australia
Email: sarehman@csu.edu.au
Abstract—Traffic congestion caused by greater competition
for limited parking spaces in the world’s major cities is a
growing problem. To overcome this challenge, a study has been
carried out to use a smart parking application that utilises
machine learning algorithms to help predict future car parking
occupancy rates at Port Macquarie campus of Charles Sturt
University (CSU), Australia. Parking data was collected over a
five-week period and the WEKA Machine Learning Workbench
was used to identify high-performing algorithms for predicting
future parking occupancy rates. In the initial phase, some well
known algorithms were used to investigate occupancy rates. In
the next phase of the study, student class timetable data was
used to enhance prediction accuracy and investigate parking
occupancy trends. While most algorithms proved to be accurate
in stable conditions, the KStar algorithm appeared to produce
better results during highly variable conditions.
I. INTRODUCTION
The Internet of Things (IoT) revolution promises to trans-
form our cities into more liveable places. Open access to big
data is helping innovators to deliver the smart city vision by
leveraging technology to improve existing services and create
new ones. The biggest gains from this transformation are
expected to come from the application of machine learning and
artificial intelligence in solving real-world problems such as
traffic congestion and environmental pollution. Smart parking
is an excellent example of how IoT technology, data and
machine learning can be combined to improve people’s lives.
Smart parking systems do not just streamline the parking
experience for drivers but also help in saving their time and
money, reduce stress, and can have a real impact on reducing
traffic congestion and pollution. It is estimated that between 30
to 45 percent of traffic in urban areas is comprised of vehicles
circling for vacant spaces [1]. Clearly, addressing this problem
is also in the wider interest of the community.
There are many interpretations of smart parking systems
globally and with each different technology there are trade-
offs. Dedicated parking sensors are popular and highly reliable
but relatively expensive, generally requiring one sensor per
parking space [2]. Cameras can give broader coverage per
unit and enhance public safety, but they face problems with
physical obstructions and low light levels [2] [3]. Smart-
phones are cheap, versatile and widely distributed but rely
on user participation and/or ongoing permission from users to
access their data, thus raising issues around individual privacy
[2] [4]. Smart parking systems generally produce real-time
data, so that drivers can make better-informed choices about
their immediate parking options. However, not all systems use
machine learning, which extends real-time data by allowing
predictions about future parking availability to also be made
that facilitate better forward planning. This study focuses on
the system-independent data and machine learning aspects of
smart parking systems. All smart parking systems generate
data, so each has the potential to use machine learning
algorithms on this data to enhance the utility of the system.
This paper provides an overview of various smart parking
applications and describes the pilot design of a smart parking
application that has been developed for Port Macquarie cam-
pus at the Charles Sturt University (CSU) utlising some well-
known machine learning algorithms. The remaining sections
of this paper are structured as follows: Section II describes
the state of art in the domain of smart parking. Section III
elaborates the methodology adopted for this study. The results
and findings of this investigation study are summarised in
section IV and V. A conclusion is presented in section VI
of the article.
II. RE LATE D WO RK
This section presents a brief synopsis of state of art in the
area of smart parking applications design. In [2], the authors
have provided an in-depth overview of the characteristics,
pros and cons of smart parking systems deployed in the
period 2001 to 2017. The authors use three categories to
distinguish system types: infrastructure (sensors); vision,
and; crowdsensing. Fixed sensors (especially magnetometers)
are identified as a popular option that has been successfully
deployed in Malaga (Spain), London, Moscow and Los
Angeles. However, upfront and maintenance costs can impact
sustainability and scalability, as seen in San Francisco.
Vision-based systems are given extensive coverage for their
future potential but most of these systems are currently
confined to academic research. Cost and versatility are touted
as key advantages over other approaches, but reliability of
image processing in real-world environments is an ongoing
challenge. Figure 1 summarises the key features of popular
apps developed in this area.
978-1-7281-3003-3/19/$31.00 c
2019 IEEE
Fig. 1: Smart parking apps [2]
A distinction between crowdsensing apps where data is
obtained automatically and crowdsourcing apps where data
is entered manually by users is highlighted. While highly
scalable, given the ubiquity of smart-phones, achieving critical
mass and getting reliable data from users are key challenges in
these systems. For crowdsensing, users need to be convinced
to let the app run continuously. For crowdsourcing, stimulating
participation and encouraging quality input are obstacles.
Wazypark in Spain has tried to increase user engagement by
adding other features to the app, like comparing local petrol
prices. A key observation is made about the main objectives of
on and off-street parking apps. Off-street apps generally aim
to identify cheap parking close to the destination, while on-
street apps seek to reduce competition for limited spaces. The
importance of machine learning in apps that utilise big data
is noted, as is their potential to generate highly accurate pre-
dictions about availability. The authors conclude that sensor-
based approaches will ultimately be constrained by cost while
vision-based systems have more potential, most of which is yet
to be commercially realised. Crowdsensing may be a useful
complement to the other systems.
In [5], the authors have presented a design of a smart
parking system that relies on smart-phone sensors to estimate
car parking availability. Each commuter’s journey is plotted
using Global Positioning System (GPS) then compared with
those arriving at the same destination. The system then esti-
mates when a vehicle has parked by determining a commuter’s
transition from driving to walking using a set of Google APIs.
Parking information is then displayed to commuters via a
heat map that displays parking activity in a given area. To
eliminate duplicate information, commuters are encouraged to
identify other passengers in their vehicle. Failing that, the
system automatically removes duplicate journeys based on
their similarity. The system proposed by the authors is novel,
but relying on user input to record duplicates is not sustainable
without a strong participation incentive. The author’s use of
heat maps may also be problematic. While it shows commuter
activity and congestion in a given location, it does not directly
depict parking space availability. The true utility of journey
comparisons may be in supporting a car pooling application,
as suggested by the authors, or supporting traffic management,
rather than for detecting car parking space availability.
In another article [6], the authors have examined the range
of smart parking systems described in the literature over the
period of 2000 to 2016. It demonstrates the multi-disciplinary
nature of smart parking systems and introduces a three-
tier classification for describing these systems: information
collection, system deployment, and service dissemination. The
importance of smart parking in regions with a high proportion
of on-street parking is emphasised, as is the need to adapt
the system to suit the circumstances. There is no one-size-
fits-all approach that has been highlighted in the article.
Demonstrated failures in Nice, France and Beijing, China
offer useful lessons. The articles’ coverage of crowdsensing
and ’gaparking’(an Uber-like approach for accessing privately-
owned parking) is interesting given the pre-eminence of soft-
ware and mobile phones in these systems, rather than costly
sensor hardware. The authors caution that while such systems
can be cost-effective, issues of user privacy and unreliable
user-generated data must be addressed. They also examine the
utility of data analytic in parking vacancy prediction, given
that real-time data is only helpful when drivers are close to
the available spaces.
III. METHODOLOGY
Car park occupancy data was collected from a sub-sample of
34 car parking spaces (out of 325) at the CSUs Port Macquarie
campus over a five-week period during semester 2 in 2018.
Since parking sensors were not installed at the time, the
actual number of cars occupying the sub-sample was counted
manually at 15 minute intervals between 8 am and 6 pm from
Monday to Friday of each week. The data for class load i.e. the
number of classes being held at any given time was extracted
from CSU’s class timetabling database, corresponding to the
same five-week period.
Following five machine learning algorithms were tested
using the WEKA Machine Learning Workbench [7]:
•K-Nearest Neighbour (instance-based model)
•KStar (instance-based model)
•Linear Regression (linear model)
•Multi-Layer Perceptron (linear model), and
•Random Forest (tree-based model).
Random Forest was selected because it has been used suc-
cessfully in other smart parking scenarios [4][8]. The other al-
gorithms were chosen arbitrarily to test a range of algorithms.
Instance-based models represent the simplest form of machine
learning. They are a type of lazy learning requiring no rules or
trees. Instead, new instances are classified according to their
resemblance to instances in the training set. Linear models
create an equation that describes each class in the training set.
The value of each equation is calculated for each new instance,
with the equation yielding the largest value being the chosen
class. Tree-based models use the divide and conquer approach
to the classification of instances. Instances are divided from
one another to achieve the greatest information gain in the
pursuit of order (low entropy) [9].
Three scenarios were devised to test the ability of algo-
rithms to make accurate predictions about future car parking
occupancy rates when:
•class load remains the same from one day to the next
(Scenario I)
•class load changes moderately from one day to the next
(Scenario II), and
•class load changes dramatically from one day to the next
(Scenario III).
In Scenario I, each algorithm was trained using occupancy
and class load data from each Monday in the first four weeks to
generate occupancy predictions for the Monday of week five.
In Scenario II, each algorithm was trained using occupancy
and class load data from each Monday to generate occupancy
predictions for Friday, using the Friday class load. Scenario III
was devised to test the algorithms using a completely different
class load i.e. the inverse of Mondays class load, resulting in
a high class load morning and evening and a low class load
throughout the working day. Although it is highly unlikely
such a class load would ever exist, the point was to test the
limits of the algorithms in an altogether different scenario.
The average rate of occupancy for each 15-minute interval for
Monday of the first four weeks was calculated (labeled Simple
Mean), as a benchmark for measuring the performance of
machine learning algorithms in each scenario. In each scenario
the class load was normalised by representing it as a proportion
of the highest number of classes being held on that given day.
IV. RES ULTS AND APPLICATI ON DESIGN
This section describes the results of algorithm performance
for the three scenarios outlined in section III.
A. Scenario I
The results for each algorithm under Scenario I were similar,
closely tracking the mean and actual car park occupancy rates.
The relationship between class load and occupancy can also
be clearly seen in Figure 2 - (KStar and Random Forest are
shown). The simple mean was the best predictor of future
availability in this scenario, exhibiting the lowest mean error
rate as highlighted in Figure 4.
B. Scenario II
The Random Forest and KStar algorithms performed best
in Scenario II, albeit marginally, and neither algorithm pre-
dicted the observed drop in occupancy from 4pm as clearly
visible in Figure 3. Both algorithms exhibited a mean error
of approximately 9 percent, compared to approximately 10.5
to 14.5 percent among the other algorithms as highlighted in
Figure 4. Interestingly, the simple mean, based on data from
Fig. 2: The class load, predicted and actual occupancy (Sce-
nario I)
Fig. 3: The class load, predicted and actual occupancy (Sce-
nario II)
Mondays, was still a reasonable, although poorer predictor
of Friday occupancy rates, demonstrating that patterns of use
were very similar on these two days.
C. Scenario III
In Scenario III only KStar appeared to respond proportion-
ately to the substantially altered class load as highlighted in
Figure 5, however, there is a question about whether overfitting
to the class load occurred. Random Forest continued to track
the (now redundant) simple mean in this scenario, somewhat
discrediting its predictions.
D. Pilot App Design
This section describes the design of the pilot application that
has been devised to incorporate the features highlighted earlier
in the article. The design of the pilot smart parking application
that was formulated after research into the currently available
applications as highlighted in section II by including the
following features in the design:
•Simple and intuitive design with minimal user input
•Map-based
•Having simple visual cues i.e. red for low availability and
green for higher availability
Fig. 4: Performance comparison for five machine learning al-
gorithms using the simple mean as the benchmark performance
measure
Fig. 5: The class load and predicted occupancy (Scenario 3)
•Providing real time parking availability (At this stage the
data has been collected manually since the sensors are not
yet installed, however there is scope for real-time data in
a future version)
•Provides predictions of future availability using machine
learning.
Since the on-campus parking at CSU Port Macquarie cam-
pus is free and not time limited, this app will not include
features such as payment facilities, expiry alerts and bookings
that are needed in commercial settings. However it should be
noted that these and some other features can be easily added
in future versions of this application. The screen shots shown
in Figures 6 and 7 show the User Interface (UI) of the Android
version of the smart parking app.
V. DISCUSSION
Perhaps not surprisingly, when conditions are stable, like in
Scenario I, using machine learning to predict future parking
space availability is not necessary. Here, the simple mean
is a better predictor of future car park availability. Since
machine learning is computationally expensive, if it is not
required, it should not be deployed. From Scenario II, which
Fig. 6: Smart-Parking App User Interface - Main Screen
Fig. 7: Smart-Parking App User Interface - Prediction
is most like the real world, it is clear that machine learning
algorithms can add real value to a smart parking system.
Data from parking sensors can be combined with data about
the known drivers of parking demand to accurately predict
future availability. This represents a significant value-add to
real time information, which is solely focused on the here
and now. Some of the world’s best smart parking apps,
such as ParkRight[10] in London, could be further improved
by using machine learning to generate predictions. Despite
the seemingly unreliable predictions using Random Forest in
Scenario III, it is important that this algorithm is not dismissed
out of hand as the scenario was extreme. Equally, it cannot be
assumed that the more sensible looking results using KStar are
reliable. Instead, these results point to the possible limitations
of the Random Forest algorithm and the potential utility of
the KStar algorithm in circumstances that are a substantial
departure from prevailing conditions. A key limitation in this
study was the relatively small volumes of data used. There
is no limit to the additional layers of data that could be
added in future studies, such as student and staff numbers per
class, special events, weather, local traffic conditions, public
transport services, etc. Adding such data to the occupancy
and class load data could substantially improve the accuracy
of machine learning predictions under all scenarios.
VI. CONCLUSION
Most of the world’s smart parking systems collect and share
real-time information with their customers via smart-phone
applications. The next logical step for these systems is to
utilize machine learning algorithms on that data to predict fu-
ture availability. Where real-time smart parking systems have
the potential to reduce traffic congestion, machine-learning
smart parking systems have the potential to eliminate traffic
congestion altogether. Future work of this project involves
deployment of parking sensors at Port Macquarie campus
which will mean that real-time parking data can be collected
on an ongoing basis. As the dataset expands, machine learning
will reveal further insights about on-campus parking usage.
Augmenting the parking data with data from other phenomena
that influence demand will also be explored in future work.
Leveraging smart-phone data, and adding other features to the
app to broaden its appeal are particularly areas of interest for
future versions of the app. This is expected to give rise to a
smarter parking application that is even better at predicting
future parking availability and eliminating the congestion and
pollution that searching for parking causes.
ACK NOW LE DG EM EN T
The authors would like to thank Division of Facilities
Management (DFM) at CSU’s Port Macquarie campus for
their support with data collection for this study.
REFERENCES
[1] G. C. A. Peng, M. B. Nunes, and L. Zheng, “Impacts of low citizen
awareness and usage in smart city services: the case of london’s smart
parking system,” Information Systems and e-Business Management,
vol. 15, no. 4, pp. 845–876, Nov 2017.
[2] F. Enr´
ıquez, L. M. Soria, J. A. ´
Alvarez-Garc´
ıa, F. Velasco, and O. D´
eniz,
“Existing approaches to smart parking: An overview,” in Smart Cities.
Springer International Publishing, 2017, pp. 63–74.
[3] M. Fraifer and M. Fernstrom, “Investigation of smart parking systems
and their technologies,” in the 37th International Conference on Infor-
mation Systems, Dublin, Ireland, Dec 2016.
[4] J. Krieg, G. Jakllari, H. Toma, and A. Beylot, “Unlocking the smart-
phone’s senses for smart city parking,” in IEEE International Conference
on Communications (ICC), May 2016, pp. 1–7.
[5] S. Biondi, S. Monteleone, G. L. Torre, and V. Catania, “A context-aware
smart parking system,” in 12th International Conference on Signal-
Image Technology Internet-Based Systems (SITIS), 2016, pp. 450–454.
[6] T. Lin, H. Rivano, and F. L. Moul, “A survey of smart parking solutions,”
IEEE Transactions on Intelligent Transportation Systems, vol. 18, no. 12,
pp. 3229–3253, 2017.
[7] “Weka 3: data mining software in Java, University of Waikato,”
https://www.cs.waikato.ac.nz/ml/weka/, 2018.
[8] F. Bock, S. Di Martino, and M. Sester, “Data-driven approaches for smart
parking,” in Machine Learning and Knowledge Discovery in Databases.
Springer International Publishing, 2017, pp. 358–362.
[9] I. H. Witten, E. Frank, and M. A. Hall, “Data Mining - practical machine
learning tools and techniques ,” in Published by Cambridge: Morgan
Kaufmann, 2017.
[10] “City of Westminster, ParkRight app: find parking and pay to park in
Westminster,” https://www.westminster.gov.uk/parkright, 2018.