Dashcam drives into coaching clips

Flagged driving events become coaching clips, with a safety manager’s review and readable plates and faces blurred.

Input
One city drive and one highway drive
Output
One reviewed coaching clip

Inspect the results

Watch the city clip to see how the output follows the event and obscures identifying details. The pipeline took a different path for each drive.

City drive
One event went through safety review and became the coaching clip below.
Highway drive
No events were found, so the run ended at the filter.
Event 1: a motorcyclist filtering past on the left0:12

The highway drive had no safety events, so its run ended at the filter without a clip. The city drive had one.

  1. Read metadata
  2. Sample framesNeeds Read metadata.
  3. Flag eventsNeeds Read metadata, Sample frames.
  4. Filter drivesNeeds Flag events.
  5. Review eventsNeeds Filter drives.
  6. Find road usersNeeds Sample frames, Review events.
  7. Track objectsNeeds Find road users.
  8. Plan overlaysNeeds Flag events, Sample frames, Track objects.
  9. Render clipsNeeds Plan overlays.
  10. Publish clipsNeeds Render clips.
What each step does
Read metadata
Reads the recording's duration, frame size and tracks.
Sample frames
Takes four frames a second.
Flag events
Gemini reviews the drive for safety events, with times, severity, a neutral account and coaching points.
Filter drives
Ends the run when the drive has no events.
Review events
Holds the events for a safety manager, and rejects them if nobody decides before the review expires.
Find road users
Finds road users and other objects in each frame with an open D-FINE detector.
Track objects
Links the detections into one track for each object.
Plan overlays
Gemini picks the tracks that follow each event's subject and boxes readable plates and identifiable faces to blur.
Render clips
Renders a 1920×1080 coaching clip for each event.
Publish clips
Returns playback URLs for the clips.

Source footage

Two dashcam recordings: a city drive of 8 seconds and a highway drive of 34 seconds.

Adapt this pipeline

A hosted run of this example requires an organization with Pipelines and LLM steps enabled.