DITS Logo
Connect With Us
AI Video Platform for Automated Sobriety Testing

AI Video Platform for Automated Sobriety Testing

AI-powered marijuana detection device with VR-based eye tracking, automated sobriety test workflows, and secure video processing for compliance.

AI Video Platform for Automated Sobriety Testing

Project Overview

We partnered with a US-based startup to engineer the backend video infrastructure for an innovative marijuana detection device. The goal was to automate roadside sobriety test workflows by replicating and enhancing traditional Drug Recognition Expert (DRE) methods using VR technology and real-time AI drug testing. Our solution supported secure video processing, audio/subtitle overlays, and seamless cloud integration to improve accuracy, traceability, and scalability. This advanced eye tracking sobriety test system is now actively used in law enforcement and workplace safety protocols to assess cannabis-induced impairment.

Overcoming Roadblocks in Impairment Detection

Subjective and inconsistent manual tests created a pressing need for objective, reliable, and scalable detection systems to ensure safety across law enforcement and workplaces.

  • Inconsistent and Non-Digital DRE Testing

    Inconsistent and Non-Digital DRE Testing

    Manual DRE eye tests lacked objectivity, standardization, and reliable video documentation, creating inconsistencies in impairment assessments during roadside sobriety test procedures.

  • Lack of Scalable Video Infrastructure

    Lack of Scalable Video Infrastructure

    No solution existed to reliably capture, process, and store high-volume eye movement recordings, a requirement for scalable automated sobriety test deployment.

  • Missing Audio/Subtitles in Recordings

    Missing Audio/Subtitles in Recordings

    Raw recordings lacked guided voice prompts and synchronized subtitle overlays, critical for regulatory reviews, training consistency, and future rehabilitation app development.

  • Security and Privacy Gaps

    Security and Privacy Gaps

    High-sensitivity video data needed encryption, structured metadata tagging, and privacy controls, which were absent in existing video workflows.

  • Fragmented Metadata and Traceability

    Fragmented Metadata and Traceability

    No reliable way existed to connect recordings to session metadata like user ID, test type, and timestamps, hindering compliance and usability.

Our Tailored Backend Video Processing Solution

We developed a complete backend workflow to automate video ingestion, processing, audio/subtitle integration, and re-uploading with end-to-end session traceability.

Firebase-Powered Video Automation

Firebase-Powered Video Automation

Integrated Firebase SDKs to automate video retrieval and uploads based on structured session metadata while ensuring encrypted access and bucket-level control.

Smart Audio & Subtitle Sync

Smart Audio & Subtitle Sync

Locally processed videos were enhanced with audio prompts and subtitle overlays by aligning SRT files to specific eye movement cues used in impairment detection.

Structured Upload & Routing Logic

Structured Upload & Routing Logic

Videos were renamed and routed into pre-defined Firebase folders, ensuring logical storage paths based on test type, user, and timestamp.

Volume Handling & Retry Logic

Volume Handling & Retry Logic

Processing pipelines supported bulk video handling, download retries, file integrity validation, and optional compression or watermarking for public-facing use.

Session-Centric Metadata Tagging

Session-Centric Metadata Tagging

Each recording was linked to key metadata like officer ID, result, and test type, supporting downstream analytics and regulatory documentation.

Core Features We Delivered

VR-Based Eye Tracking Sobriety Test

VR-Based Eye Tracking Sobriety Test

The system captures real-time eye movement via VR headsets and supports AI-based evaluation of THC-related visual markers during roadside testing.

Automated Video Retrieval from Firebase

Automated Video Retrieval from Firebase

Session-specific videos are pulled automatically, streamlining the processing workflow and reducing the need for manual intervention.

Audio and Subtitle Overlay Engine

Audio and Subtitle Overlay Engine

FFMPEG-powered logic injects synchronized audio and subtitle cues, offering a consistent test structure and improved replayability for legal or training use.

Dynamic Re-Upload Workflows

Dynamic Re-Upload Workflows

Processed videos are automatically re-uploaded with traceable paths, flag-based visibility (private/public), and expiration logic.

Compliance and Traceability Support

Compliance and Traceability Support

Every session is audit-ready, with encrypted processing, structured logs, and metadata for full visibility into who was tested, when, and how.

Tech Implementation

  • FFMPEG
  • Python
  • 3rd-Party SDK
  • encrypted data storage
  • SRT

Scaling Cannabis Impairment Detection from Pilot to Production

Our automated pipeline accelerated video readiness, improved compliance, and enabled data-driven expansion into enterprise and law enforcement applications.

Digitized Traditional Drug Recognition Processes

Digitized Traditional Drug Recognition Processes

We modernized subjective roadside testing with objective, VR-based eye tracking sobriety test workflows supported by structured video evidence.

Accelerated Processing and Turnaround Time

Audio and subtitle overlay automation reduced session processing time by 70%, enabling quicker decision-making at the point of contact.

AI Drug Testing at Scale

With a scalable video infrastructure, our client deployed an AI drug testing solution capable of handling large volumes of sessions across jurisdictions.

Foundation for Advanced Use Cases

The system now supports additional developments such as rehabilitation app development and pupil dilation analytics using previously recorded sessions.

Improved Compliance and Safety Standards

With secure handling, metadata tagging, and visibility flags, the platform meets the privacy and audit needs of both public and private sector stakeholders.

Upgrade Sobriety Testing with Intelligent Video Workflows

Empower your team with next-gen tools that streamline, secure, and scale cannabis impairment detection for real-world impact.