Inspiration

Parking is a common issue students and faculty face on Texas A&M Campus. With most students not willing to pay the hundreds of dollars for permits, they end up cruising around, looking for vacant parking spots which lead to heavily congested areas around campus.

What it does

Using surveillance structures already implemented such as security and traffic cameras, detection of vacant spots can be done using machine learning to recognize the absence/presence of vehicles in a form of an application for ease of access to drivers.

How I built it

We began by defining the parking spaces. Ids were assigned to each parking space, and the coordinates of the vertices of the polygon that encloses each parking spaces were recorded.To imitate the surveillance camera, we shot a video from our handheld camera, which we then stabilized in Photoshop. As the video is being transferred into the computer, we have a python script that captured one frame of the video every second. These frames are then sent to our python server. The server passes these frames through YOLO, a popular real-time object detection convolutional neural network. The network is able to find all the cars in the image and draw a box around each car. We then compare the overlap between the box and each parking spot to determine whether a parking spot is taken. Finally, we used socket.io to send the results of these computations in real time to our React Native app, which displays these results on a user-friendly interface.

Challenges I ran into

As we imitated the surveillance camera, slight movements greatly affected the coordinates of the polygons, so we had to utilize image stabilization to mitigate some of these effects. As much as we hate to admit it, we struggled so much with Git. We just don't know how to deal with big files or submodules. We also struggled to get the image recognition to work. We tried using GCP but it couldn't recognize all the cars.

Accomplishments that I'm proud of

Just making this app work is the thing that we are the most proud of. It seemed like such a daunting task, but we finally accomplished it through teamwork and the lack of sleep.

What I learned

I learned how to run YOLO locally on my machine for image recognition! We also learned Socket.io.

What's next for Real-time parking vacancy detection using machine learning

Using the magic of machine learning and pre-existing infrastructure, our app can help to alleviate the parking problem at A&M campus. As long as the parking lot managers are willing to plot out the parking spots, they can drastically modernize their parking space. In the future, we hope to train our own convolutional neural networks to identify parking lines and plot out the parking spots automatically, making this process even easier.

Built With

Share this project:

Updates