There's no argument that one of the most universally frustrating and disliked shared experiences involves parking. University campuses, especially UCI, consistently struggle to account for the sheer number of commuters and drivers year after year. As someone who worked for the Transportation Department, I've seen first hand how much UCI struggles with collecting parking data and consequently fails to adjust permit availability and prices to fit the ever-increasing demand for parking. The current method of tracking parking data is to send a student worker in a golf cart with a clipboard and a clicker - with the hopes that they manage to hit 30+ parking lots/structures and accurately count how many cars are parking in which type of stall.

There's easily an opportunity for a technology-enabled solution here.

What it does

CARAGE collects, compiles, calculates, and displays the most precise parking data possible, in real-time. Using live footage from a camera feed, CARAGE is able to intermittently collect aerial snapshots of any parking lot and returns a 100% accurate count of which cars are parked in which spot at which time. The data is processed, given meaning, and displayed in an easily digestible manner on a fully-built web application with the hopes of answering the following questions: "how many spots AND of which type are filled at this time," "what times of the day/week does density at this parking lot peak," "which parking lots are vacant enough to allocate for overflow parking?"

How I built it

CARAGE begins with an aerial view of any parking lot with identified codes written on the stalls. An image is sent from the camera after a fixed delay (currently 10 minutes) and is saved to a directory that is constantly being watched for the creation of new files by the Python Watchdog library.

Once a new image is detected, the program runs it through some pre-processing to remove noise and other miscellaneous information that is not necessary for the data. The brains of CARAGE are centered around the Google Cloud Vision AI; a powerful visual computing tool capable of detecting and returning text in images. An API request to the Vision API is made and a JSON object containing all of the text and associated info is returned to our program. This JSON object is also post-processed to remove noise and other unnecessary information. CARAGE will then process all of the data, calculate parking densities, stall statistics, and send a POST request to the Firebase Realtime Database to store the final count.

The web interface sends a GET request to retrieve most of the calculated data and uses a JavaScript library called Vega-lite to create graphical interpretations and display them to the user. Every time a new entry is added, the graphs also update in real-time. The user can select which parking lot/structure they're interested in watching data for and the page will automatically update them to show their information of interest.

Challenges I ran into

Exploration of solutions: Parking sensors are by no means a new concept - we've seen them in malls, we've seen them at Disneyland - so why fix what's not broken? I definitely considered whether there was a need to build this at all, and I ran into a lot of alternative solutions that had already been fully built. However, after extensive research all of these solutions had one thing in common: they need to be integrated into the floor as the lot or structure is built from the ground up, and they're INSANELY expensive to implement. There's no aftermarket or affordable solution that can adapt to changing surroundings or repaints until now. There was a need for CARAGE.

Tech stack: There was a lot of exploration in regards to choosing the technology I wanted to use to help me achieve my vision for this product.

  1. Vision AI - Because I really only need to identify text, I was considering tradeoffs between using the Google Cloud Vision API and the very popular Tesseract OCR library. I spent a significant amount of doing initial test and comparison runs and concluded that Google Cloud Vision was just more accurate as well as more scalable for my system in the long run, especially if I was going to integrate it with Firebase.
  2. Data Representation - I initially wanted to build a live connection to Tableau from my Firebase Realtime Database so that business-oriented users could have more power over how the data is visualized, but the lack of a proprietary connector made it near impossible to easily transfer data in real-time which was important to me. I decided to build a web application that employs Vega-Lite to display data that I manually give meaning to myself.

Accomplishments that I'm proud of

IT WORKS! I can literally test live cars in real-time and see near-instant updates to my program, database, and user-facing web application. I'm proud because I've had this idea since my first year and this is a project I truly believe will be the first step to finding a solution to solve parking overcrowding. It's also a huge indicator of how much I've grown as a developer since my first year of coding because using multiple APIs, frameworks, databases, and languages feels like second nature when, before, they used to be so daunting.

Although I have a small sample size of different lot styles and lighting conditions, I've actually managed to have my program be 100% accurate in counting the # of vacant spots. I've tested it with different sized cars, motorcycles, and edge cases and it's actually returned very promising results and being proactive in both avoiding and handling any errors.

What I learned

The biggest takeaway I got from this Hackathon is that the first idea might not always be the best idea. It's almost always worth it to explore alternative solutions and run tangible tests to compare the tradeoffs between each approach. While I stuck with my original intuition for some, I am beyond grateful to have found new technology and libraries to implement that turned out to either reduce the complexity of my project or make it more efficient.

Taking shortcuts in regards to seeing what best fits your projects' needs will be detrimental to the longevity of your code and the quality of your product.

What's next for CARAGE

CARAGE as it stands is a service to the corporate side of transportation. It has data and analytics so that companies and large organizations can make better-informed decisions that will help reduce parking inflation in the future. However, the ultimate goal is to build a product for society, the people, the average consumer, the students in the form of an app that reflects which parking spots are open in real-time. This will be the first step in reducing a ton of passive emissions, mental frustration, and educational/career roadblocks.

Built With

Share this project: