Case Studies

Detecting Parking Lot Occupancy Using AI and Machine Learning

AI-powered parking lot occupancy detection solution by Akvelon

Whether you are going to the office, the mall, or the grocery store, finding a parking spot can be one of the most time consuming and frustrating parts of the day. Thanks to advances in technology, the days of circling the parking lot to find an open spot before someone else snags it may be behind us soon.

Figure 1 Parking lot in front of Akvelon’s office

 

Smart Parking Lots

One of Akvelon’s offices noticed that finding a spot in their parking lot was becoming harder for their employees as their office grew, so they set out to develop a model that would make it far easier and more efficient to find open parking spots.

This wasn’t Akvelon’s first time working with smart parking spot detection technology. Most notably, Akvelon developed a modular integration solution that provided real-time analytics about parking space occupancy from IoT edge devices to the centralized analytics system for their client, who is a leading provider of digital transformation solutions for network operators, service providers, and content providers. In this case, several pieces of hardware, equipment, and sensors were used to detect open parking spots. For our new project, Akvelon’s team decided to take a different approach that required far less hardware so that it would be much easier to install and more cost-effective as we relied on visual-only learning.

Building the Model

To start, our team set up a small camera at the top of the office building’s front entrance that viewed our parking lot from above. We then set out to use Machine Learning to convert the live images into suitable data, allowing us to build web-based apps and mobile apps and to integrate them with a voice assistant as well.

By leveraging different Machine Learning models, we were able to detect objects as long as the camera quality was decent (Figure 2). Although we could have purchased and set up higher quality camera, our team wanted to use a camera that had similar quality to those that are often used at parking lots. That way, we could develop a model that could easily be integrated with our clients’ current parking lot surveillance equipment down the road.

Figure 2 Akvelon’s model detecting cars on the parking lot’s live feed

Overcoming Hurdles

We were faced with several hurdles while we trained our model. For instance, while many existing Machine Learning models can already recognize cars, they typically use street-view images of cars. Due to the fact that our camera feed came from an aerial view of our parking lot, these existing models were unable to detect cars, so we had to entirely develop our own. Additionally, changes in shadows as a result from the sun’s movement made it difficult for most models to detect cars. Also, our office’s parking lot does not have any painted parking lines, making it far more difficult for open spaces to be detected, so our team also had to address this issue as well.

 

Figure 3 Points to transform into bird view

 

Our first step to address these hurdles was to change the “perspective” of our model. We were unable to place the camera straight above the parking lot which would have been ideal for easier model training, so we instead added a visual transformation over the camera (Figure 3). This transformation allowed us to now have a “Bird view” (Figure 4).

 

Figure 4 Bird view as a result of the camera visual transformation

With the camera feed now successfully transformed to “Bird view”, our Machine Learning model improved significantly and was able to detect cars and open spaces more accurately (Figure 5).

Figure 5 Detection over bird view

With the Machine Learning model working more effectively, we then addressed the absence of painted parking lines in the lot. We selected regions in the camera feed as approximate parking spaces. We then defined the width of cars on each line according to its’ perspective (Figure 6). According to this detection of cars and possible free spaces, we were able to calculate and detect open parking spots (Figure 7).

 

Figure 6 Drawing parking lines

Figure 7 Draw Empty Parking Lot Spaces

Figure 8 Web view of parking lot and available spots

As we continue to train our model so that its accuracy improves even more, we are also developing the mobile and web apps that will allow users to view the parking lot detection results live while they are on the move in the lot. We are excited to see our model being used regularly within our own office parking lots, and perhaps in our clients’ lots down the road. Keep an eye out for more updates on our smart parking lot occupancy detection model in the future!