Inspiration

Finding a parking spot on college campuses, event venues, and congested downtown lots is universally frustrating. Circling crowded rows blindly wastes time, burns gas, and spikes stress—especially when you arrive at a lot with zero visibility into whether spaces are even open.

We built Pullin to solve the parking guessing game: an intelligent, end-to-end smart parking assistant that tells drivers in real-time not just if a lot has vacancy, but exactly where open spots are located.


What it does

Pullin transforms standard video feeds into live, actionable parking intelligence.

  1. Automated Monitoring: A camera continuously scans the parking lot from an elevated vantage point.
  2. Edge Spot Classification: On-device computer vision isolates individual parking stalls, detects vehicle presence, and calculates occupancy status with high confidence.
  3. Live Driver Dashboard: Drivers access a responsive web application featuring an interactive map displaying real-time green (available) and red (occupied) stalls, paired with an ultra-low-latency live video stream of the lot.

How we built it

Pullin combines embedded edge computing, computer vision, cloud streaming infrastructure, and a modern reactive web stack:

1. Edge Hardware & Dual-Stream Architecture

Using a Raspberry Pi equipped with a camera module, we capture high-definition video of the parking lot. To balance responsiveness and compute constraints, we split the camera feed into two parallel streams:

  • Cloud Live Stream: Piped via FFmpeg using RTMP to a MediaMTX streaming server hosted on an AWS EC2 instance, providing low-latency H.264 video playback directly in user browsers.
  • Edge Vision Loop: Kept locally on the Raspberry Pi for immediate, low-latency frame analysis with OpenCV.

2. Computer Vision & Occupancy Detection

Instead of relying on heavy, power-hungry cloud neural networks, we engineered an efficient edge-based vision pipeline:

  • Preprocessing & Masking: Frames are converted to HSV to mask out grass and landscaping, followed by Gaussian blurring, morphological Top-Hat transforms, and adaptive Gaussian thresholding to isolate vehicle contours and stall markings.
  • ROI Feature Density: Each parking stall is mapped as a Region of Interest (ROI) polygon. We calculate the active edge pixel density $D_{\text{spot}}$ relative to the total stall area:

$$D_{\text{spot}} = \frac{1}{|A_{\text{ROI}}|} \iint_{(x,y) \in A_{\text{ROI}}} I_{\text{edge}}(x, y) \, dx \, dy$$

  • Temporal Smoothing: To prevent false positives from shadows or transient pedestrians, a sliding window of historical classifications determines the final occupancy state using majority voting:

$$\text{State}{\text{occupied}} = \mathbb{I}\left( \frac{1}{W} \sum{t=1}^{W} \mathbf{1}[D_{\text{spot}}^{(t)} > \tau] \ge 0.5 \right)$$

where $\tau$ is the occupancy threshold and $W$ is the historical frame window.

3. Backend & Real-Time Sync

  • FastAPI Backend: Containerized with Docker and deployed on AWS EC2.
  • WebSockets: Whenever a stall changes state, the Raspberry Pi dispatches a lightweight JSON payload to the FastAPI backend, which instantly broadcasts the update to all connected frontend clients over WebSockets.

4. Interactive Frontend

  • Built with Svelte, TypeScript, and Vite, rendering an interactive vector map synchronized with the live video feed.

Challenges we ran into

  • Streaming Protocols (RTSP vs. RTMP): We initially attempted piping video via RTSP through FFmpeg to AWS EC2. We ran into frequent firewall blockages, transport stream packet drops, and player incompatibility in modern web browsers. Transitioning to RTMP via MediaMTX allowed us to reliably ingest the stream, convert it on the fly, and deliver a smooth feed over standard HTTP/WebRTC ports.
  • Network Bandwidth & Video Buffering: High-bitrate video transmission over Wi-Fi strained the Raspberry Pi's network interface. Network latency spikes caused OpenCV’s frame buffers to overflow, triggering BrokenPipeError crashes and stalled detection threads. We resolved this by decoupling the vision loop from the streaming thread into separate asynchronous worker processes and downscaling analysis frames independently of the stream resolution.
  • Irregular Lot Layouts & Lighting: Real-world parking lots aren’t uniform grids. Dealing with skewed camera angles, varying stall dimensions, and harsh outdoor shadows required building dynamic polygon boundary definitions and adaptive thresholding rather than static bounding boxes.

Accomplishments that we're proud of

  • Full Cloud & Edge Integration: Successfully deploying the backend, streaming server, and web application on AWS EC2 so anyone can access the live dashboard from any device in real-time.
  • Robust Edge Computer Vision: Implementing custom edge-detection algorithms and an irregular-boundary modeling tool that can manually or semi-automatically adapt to oddly shaped parking layouts without requiring high-end GPUs.
  • Sub-Second Latency: Achieving near-instantaneous synchronization from the moment a car pulls into a spot to the moment the UI turns red on the user's phone.

What we learned

  • Managing hardware constraints, thermal limits, and threading on the Raspberry Pi.
  • Architecting production cloud infrastructure on AWS EC2 using Docker and reverse proxies.
  • Low-latency live video streaming pipelines using FFmpeg, RTSP/RTMP, and MediaMTX.
  • Edge computer vision techniques with OpenCV (adaptive thresholding, morphological filtering, and spatial masking).
  • Building reactive, real-time user interfaces with Svelte, TypeScript, and WebSockets.

What's next for Pullin

  • Turn-by-Turn In-Lot Navigation: Integrating routing using embedded Google Maps to direct users to the spot they want most.
  • Oblique & CCTV Perspective Correction: Enhancing the camera pipeline with perspective homography transformations and lightweight object detection (YOLOv8-nano) to support low-angle, diagonal CCTV feeds where vehicles partially occlude one another.

Built With

Share this project:

Updates

Submission history