Here is a concise version of your Project Story in Markdown and LaTeX, ready to copy and paste:
Inspiration
India's roads suffer from unpainted speed breakers and deep potholes, causing severe vehicle damage and fatal accidents. Current systems lack integrated, real-time alerting mechanisms. We built Road Alert to be an intelligent, low-cost driving companion that dynamically warns drivers before impact to save lives.
What it does
Road Alert tracks road conditions in real time using a standard camera and cloud AI:
Edge Detection: OpenCV scans the road to identify structural deformations.
Proximity Estimation: Calculates the exact distance to the hazard using optical formulas.
Cloud Verification: Captures and sends a localized crop of the hazard to the Google Gemini API for multimodal verification.
Dynamic UI & Analytics: Displays the hazard type, risk severity, and a custom safe speed profile while outputting telemetry logs for smart city databases.
How we built it
- Frontend Dashboard: Built with Tkinter, featuring adaptive telemetry counters and a functional traffic light signal display.
Computer Vision: Programmed with OpenCV and NumPy to apply grayscale filters, Gaussian blurring, and Canny contour detection.
Optical Physics: Implemented distance tracking using the triangle similarity ratio:
$$\text{Distance} = \frac{\text{REAL_WIDTH} \times \text{FOCAL_LENGTH}}{\text{Width in Pixels } (w)}$$
- Cloud AI: Connected the Google GenAI SDK to
gemini-2.5-flash, enforcing type-safe JSON payloads via Pydantic schemas (HazardCloudLog).
Challenges we ran into
- UI Freezing: Network latency and blocking functions (like audio beeps) originally stalled the live video feed. We resolved this by isolating audio and API requests into asynchronous background threads.
- API Spamming: Driving past a single pothole triggers multiple frames, risking API quota exhaustion. We implemented a state-management lock and a 5-second temporal rate-limiter.
- Visual Noise: Tree shadows mimic road defects. Cropping localized regions allows Gemini's semantic understanding to filter out these false positives.
Accomplishments that we're proud of
- Blended traditional edge computer vision with advanced Generative Cloud AI into a single application.
- Achieved seamless, zero-latency performance maintaining 30+ FPS locally while network tasks run concurrently in the background.
- Successfully generated structured, type-safe JSON directly from raw visual environments.
What we learned
- Gained experience in multi-threaded environment distribution and managing thread-safe states in Python.
- Learned to use strict Pydantic model constraints to translate unstructured AI responses into reliable database logs.
What's next for smart speedbreaker potholes detector
- Voice Stream Integration: Transitioning to natural, human-like voice warnings via the Gemini Live WebSocket API to eliminate driver visual distraction.
- Crowdsourced Navigation: Syncing logs to a live navigation map to warn nearby vehicles before their cameras even see the defect.
- Hardware Hardening: Porting the software onto a standalone Raspberry Pi or NVIDIA Jetson chip paired with an external micro-LiDAR sensor for 3D depth-mapping.
Log in or sign up for Devpost to join the conversation.