Inspiration

Traditional CCTV surveillance systems present a major trade-off: streaming raw video to cloud servers compromises user privacy and creates compliance risks, while purely local recording systems lack real-time threat detection capabilities.

What it does

GuardianAI was built to eliminate this compromise. The goal was to create a privacy-first, edge-native security system that detects loitering and security threats locally, anonymizes video frames immediately at the edge, and transmits only encrypted telemetry data to the cloud.

How we built it

The system operates on a modular pipeline designed for real-time edge processing and low latency:Edge Anonymization & Privacy Engine: Live video frames pass through an automated privacy masking engine (PrivacyEngine) that detects and blurs facial features and regions of interest (ROIs) before any downstream processing occurs.Centroid & Trajectory Tracker: Motion contours are detected via background subtraction ($\text{MOG2}$). The tracker computes bounding box centroids $(x, y)$ and tracks target dwell times ($T_{\text{dwell}}$) across frame sequences:$$T_{\text{dwell}} = t_{\text{current}} - t_{\text{first_seen}}$$Agentic Threat Orchestrator: Evaluates real-time tracking data against safety policies. If $T_{\text{dwell}} > T_{\text{threshold}}$, the orchestrator locks the ROI, triggers browser audio alerts via the Web Speech API, and updates the active security status.AWS KMS Encrypted Telemetry: Metadata payloads are packed and encrypted using AES-256 envelope encryption via AWS KMS (AWSKMSConnector), ensuring tamper-proof cloud synchronization without exposing raw video feeds.Dashboard & Audit Logging: Built using Flask, an interactive HTML5/JS dashboard renders live video streams side-by-side with real-time target analytics, updating telemetry via no-cache API endpoints every $250\text{ ms}$ and generating CSV audit logs.

Challenges we ran into

Threading & Frame Synchronization: Streaming video over Flask while serving real-time telemetry JSON endpoints initially caused blocking issues. This was resolved by implementing a thread-safe background processing loop (threading.Lock()) and client-side cache-busting headers.Low-Latency Edge Performance: Running background subtraction, anonymization, and centroid tracking simultaneously while maintaining a $\approx 30\text{ FPS}$ feed required optimizing bounding box contour filtering and downscaling video frames to $640 \times 480$.

What we learned

Privacy by Design: Masking raw visual data at the earliest stage of the pipeline guarantees privacy compliance without sacrificing system accuracy.

Edge Architecture Design: Decoupling real-time video processing workers from frontend polling endpoints ensures stable performance on constrained local edge hardware.

Built With

Share this project:

Updates

Submission history