DEV Community

MAHIR
MAHIR

Posted on

🚗 I Built DriveSafe So My Friends Never Have to Scrub Through Hours of Dashcam Footage Again

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

DriveSafe is a privacy-first AI platform that turns hours of dashcam footage into an intelligent, searchable driving history.

A few of my friends drive regularly and use dashcams. Quite often, someone might cross the road unexpectedly, a close call might happen, or another driver might do something unusual, and they need to find that exact moment in the dashcam footage.

The problem is that finding one specific moment in hours of video can take several minutes of manually scrubbing through the recording.

I built DriveSafe to make this simple. Instead of searching through the entire video, AI identifies important moments automatically and helps you quickly find the exact part of the drive you are looking for.

DriveSafe automatically identifies potentially important moments such as pedestrians, cyclists, close vehicle encounters, and sudden scene changes, creates clips and an interactive timeline, and lets you search historical drives using natural language.

Demo

🚗 Live Demo: https://drivesafe-gs66.onrender.com/

🎥 Video Demo: https://drive.google.com/file/d/1eD3sBaNlxmHwgaiHW-d83Q-_5YtZhKxQ/view?usp=sharing

Code

💻 GitHub: https://github.com/Mahir-Neema/drivesafe

How I Built It

DriveSafe is built around Google Gemma 4, with Temporal handling the durable video-processing workflow.

The pipeline is:

Dashcam Video → Temporal Workflow → Frame Extraction → Gemma Vision Analysis → Event Detection → Clip Generation → Embeddings → MongoDB → Searchable Timeline

I use Gemma 4 26B for cloud-based analysis and Gemma through Ollama for local, offline inference. Events are embedded using nomic-embed-text and stored in MongoDB for vector search across historical drives.

The project can also be started locally with Docker, including MongoDB and Ollama.

Why Does Open Innovation Matter?

Dashcam footage can contain highly personal information, so privacy was a major consideration.

Using open-weight Gemma models with Ollama, DriveSafe can process footage completely locally. In Local Edge Mode, video frames and telemetry remain on the user's machine instead of being sent to external cloud servers.

Open technologies also made it possible to combine Gemma, Ollama, Temporal, FFmpeg, MongoDB, and Docker into one end-to-end system.

Prize Categories

🏆 Best Use of MongoDB Atlas

Implements Atlas Vector Search over 768-dimensional embeddings to create long-term historical dashcam memory and enable natural-language retrieval across previous drives.

⏱️ Best Use of Temporal

Orchestrates a resilient, durable VideoAnalysisWorkflow with real-time progress queries, automated retries, heartbeats, and decoupled activity workers.

🧠 Best Use of Google Gemma

Uses Gemma 4 vision models in a dual-inference setup:

  • Cloud: Gemma 4 26B for deeper video scene understanding
  • Local Edge: Gemma through Ollama for private, offline processing

🏆 Best Overall Project

DriveSafe combines AI-powered video understanding with a complete end-to-end product experience, including 1-click Docker deployment, interactive timeline visualization, FFmpeg clip generation, vector search, historical drive memory, and automated verification tests.

Top comments (0)