The Problem:

Every year, poor road conditions cost drivers and logistics companies over $160 billion in vehicle repairs and wasted fuel. A big part of the reason is that modern maps don't keep track of real-time road quality. At the same time, buckled pavement and icy sidewalks lead to hundreds of thousands of injuries, costing the U.S. health system over $50 billion in annual medical bills. This loss is entirely avoidable if we simply had the real time data to navigate the perfect balance between speed and safety. That's where SafeStep comes in.

The Solution:

We bridge the gap between "fastest" and "safest" by turning every trip into a data-gathering mission. Here is how it works:

Crowdsourced Vision: Users capture and upload photos of road and sidewalk conditions in real-time as they navigate, similar to how existing driving maps like Waze and Apple Maps work.

AI Analysis: Our system uses the Gemini API to run instant inference on every image, automatically identifying hazards like deep potholes, buckled pavement, or black ice as well as providing "severity scores" for each hazard based on their danger level.

Custom Inference Pipeline: Engineered a custom perception pipeline by integrating a fine-tuned YOLOv8 segmentation model with Depth-Anything-V2. Developed logic to cross-reference instance masks with depth maps, enabling real-time calculation of hazard dimensions and severity levels.

Dynamic Routing: This location-tagged hazard data is fed into our database to update the map live, allowing our algorithm to calculate the optimal path that balances travel time with surface integrity. For walking, the user is presented with three options, a regular, accessibility-friendly, and safe option, each prioritizing different hazards to avoid or safe areas to stay within.

How we built it:

Our system processes infrastructure data through a cascaded pipeline that merges computer vision with geographic intelligence and rich database storages for GIS data:

FastAPI Inference Engine: A high-performance Python wrapper around PyTorch and YOLO models for real-time pothole detection and depth estimation.

A* Routing Algorithm: Custom pathfinding logic that calculates optimal repair or transit routes based on real-world road and sidewalk hazards.

Leaflet Integration: Renders dynamic, interactive maps on the frontend to visualize detected issues with sub-meter precision.

The Data Layer: PostGIS Standard relational databases aren't enough for spatial data. We use PostgreSQL with the PostGIS extension to store road networks as geometric objects. This allows us to run complex proximity queries and routing graphs directly in the database.

Challenges we ran into:

Overriding the edge weights with our hazards was difficult, as the underlying edge graph for our map is extremely dense. We solved this through a combination of pre-processing hazard weights, dynamic edge adjustment with hazard additions, and optimizing runtime route calculations through localization.

Maintaining a consistent schema and abstraction layers across the project proved to be difficult with four coders constantly iterating on the codebase. Edges, API routes, Hazards, Routes Types, and other variations on similar ideas raised challenges across implementations. We often required refactors across classes to ensure a consistent, optimized pipeline.

Project database architecture proved to be an interesting design challenge. Our project required several, interlinked databases to function properly, which were a mix of mutable/immutable databases that often contained references to other objects or tables entirely.

Accomplishments that we're proud of:

Context-aware hazard intelligence - Built a Gemini-powered classification engine that doesn't just see a pothole, but understands the risk. By utilizing the vision capabilities of LLMs, we transformed slow, manual reporting into instant, high-fidelity hazard assessments.

Integrated technical precision - Successfully bridged the gap between high-level reasoning and physical metrics by fusing Gemini’s contextual analysis with specialized segmentation and depth-estimation APIs.

What we learned:

Fine tuned models beat general models for precision - Fine models offer superior precision over general-purpose alternatives. Our fine tuned YOLOv8 architecture significantly outperformed standard weights in detecting road hazards.

What's next for SafeStep:

Global Road Intelligence — We are expanding our footprint beyond Providence. Our roadmap includes onboarding all major metropolitan hubs, featuring localized calibration of our hazard weights to account for the unique infrastructure and traffic patterns of each specific city.

Specialized Neural Architecture — While base Gemini provides the foundation, we are moving toward a custom-tuned vision model. By fine-tuning a model specifically for infrastructure forensics, we will achieve even higher precision in identifying road degradation and safety anomalies.

Built With

Share this project:

Updates