◈ VIGIL: ◈

Verify Impairment. Guard Innocent Lives.


🔗 Live System

VIGIL | AI-Powered Wellness Intelligence


💡 Inspiration

Most road safety systems focus on the vehicle and external environment, but ignore the human operator — the primary source of failure.

Fatigue, stress, and cognitive overload silently degrade decision-making, yet drivers rely on subjective self-assessment.

People don’t crash because machines fail — they crash because they do.

VIGIL was built to convert human condition into objective, measurable safety intelligence.


⚠️ The Problem — Human Failure

94% of road accidents are caused by human impairment, not machine failure.

Traditional systems monitor:

  • Speed
  • Obstacles
  • Environment

VIGIL monitors the real variable:

The human mind.


🚀 What it does

VIGIL is an AI-powered driver readiness system that evaluates whether a person is fit to operate a vehicle in real time.

It:

  • Processes audio signals using FFT
  • Detects fatigue, stress, and instability
  • Computes a readiness score (0–100)
  • Generates a clinical-style AI safety briefing

The result is a system that replaces intuition with data-driven decision-making.


🧠 Core Model — Internal State Vector

Driver readiness is a continuous system, not binary:

( V = [Sleep, Stress, Emotion, Chemical]^T )

The Readiness Score (RS):

$$ RS = 100 \cdot \left(1 - \frac{|V \cdot W|}{|W|} \right) $$

Where:

  • W = safety weighting vector
  • Lower projection ⇒ higher safety

😴 Drowsiness Collapse Model

$$ \tau(t) = \tau_0 \cdot \exp\left(\kappa \cdot \frac{t_{awake}}{t_{limit}}\right) $$

After ~18 hours awake, cognitive performance drops non-linearly, similar to intoxication.


⚡ Synergetic Impairment Model

$$ R = \sqrt{\alpha\delta^2 + \beta\gamma^2 + \zeta\lambda^2 + \chi(\delta \cdot \gamma \cdot \lambda)} $$

Impairments interact multiplicatively, creating hidden risk.


🏗️ How I built it

VIGIL is built as a real-time multimodal pipeline:

  • Frontend: Vanilla JS/CSS/HTML
  • Video Input: WebRTC
  • Audio Processing: Web Audio API (FFT analysis)
  • AI Engine: Gemini 2.5 Flash for inference
  • Backend: Node.js + Express proxy
  • UI Layer: Custom HUD-style interface

Architecture

Input (Video + Audio)
        ↓
AI Inference (Gemini 2.5 Flash)
        ↓
State Vector Engine
        ↓
Safety Guardian
        ↓
HUD Dashboard

🧪 Capabilities

  • Real-time gaze tracking & focus analysis
  • Audio signal processing via FFT
  • Detection of fatigue, stress, instability
  • Multimodal fusion into a single readiness score
  • AI-generated clinical safety briefings

⚔️ Challenges I ran into

  • Maintaining 60 FPS while processing video + audio simultaneously
  • Handling noisy real-world input from webcams and microphones
  • Preventing AI from behaving like a chatbot instead of a safety system
  • Keeping inference latency under ~850ms
  • Designing a high-performance UI without heavy frameworks

🏆 Accomplishments that I'm proud of

  • Built a fully functional real-time system
  • Achieved sub-850ms AI latency
  • Designed a multimodal inference architecture from scratch
  • Delivered a production-deployed application
  • Aligned with UN SDG 3.6 (road safety)

📚 What I learned

  • AI must be controlled in safety-critical systems
  • Real impact requires system-level thinking
  • Performance is as important as intelligence
  • Simpler stacks can outperform complex frameworks
  • Human-centered problems demand interdisciplinary design

⚙️ Tech Stack

Layer Technology
Frontend Vanilla JS / CSS / HTML
AI Engine Gemini 2.5 Flash
Video WebRTC
Audio Web Audio API (FFT)
Backend Node.js + Express
Deployment Render

🚀 What's next for VIGIL

  • Biometric integration: EEG + ECG signals
  • Wearable connectivity: Web Bluetooth
  • Vehicle integration: Embedded in-car systems
  • V2X network: Shared driver readiness between vehicles
  • Predictive alerts: Detect impairment before failure

🌍 Impact

VIGIL transforms safety from:

❌ Reactive ❌ External-only ❌ Assumption-driven

To:

✅ Predictive ✅ Human-centric ✅ Data-driven


⚠️ Disclaimer

VIGIL is a supplementary intelligence system. The operator remains the primary decision authority.


✨ Final Statement

“Measure the mind. Eliminate uncertainty. Prevent the crash.”

Built With

  • css3-(glassmorphism)
  • gemini-2.5-flash
  • google-gemini-api
  • html5
  • javascript-(es6+)
  • node.js
Share this project:

Updates