Inspiration Industrial workspaces are inherently dynamic and hazardous. While traditional safety measures rely on manual supervision or reactive post-incident investigations, I realized that thousands of workplace accidents could be avoided if site supervisors had access to active, predictive telemetry. I was inspired to build AEGIS-X to bridge this gap—transforming standard passive CCTV feeds into an intelligent, real-time safety ecosystem that moves industrial security from reactive logging to proactive incident prevention. What it does AEGIS-X is an edge-based safety monitoring platform that acts as a real-time risk mitigation engine. The platform ingests standard video streams and dynamically tracks all personnel, monitoring for critical safety asset compliance (such as hardhats and high-visibility safety vests). Beyond simple detection, it maps the spatial environment to compute real-time distance vectors between workers and moving machinery (like forklifts) or hazard zones, dynamically escalating threat levels to provide an early predictive alert system. Additionally, it features an interactive, privacy-first local AI Copilot that allows safety supervisors to query workplace metrics using natural language. How I built it I engineered AEGIS-X alone as a modular, privacy-first pipeline designed to optimise computational throughput on standard consumer hardware: Object Detection & Compliance Tracking: I utilised the YOLOv8 architecture to handle multi-class identification for workers and safety gear assets. Temporal Identification: I integrated the ByteTrack framework to ensure robust identity persistence across frames, preventing ID fragmentation during fast movement or camera noise. Spatial Risk Architecture: Instead of relying purely on visual inference, I engineered a geometric tracking layer. The engine isolates the bottom-center coordinates of the tracking bounding boxes for a worker $ W $ and a hazard/machinery $ M $, translating them onto a normalised 2D plane. Real-time relative proximity is computed using the standard Euclidean distance formula:$$d(W, M) = \sqrt{(x_M - x_W)^2 + (y_M - y_W)^2}$$By assessing the first derivative of this spatial vector over successive frames $ \Delta d / \Delta t $, the platform derives closing velocities to output a predictive Time-to-Impact (TTI) alert status. Local Conversational AI: For the chat workspace, I set up a local Ollama server running Llama 3.2. This handles context-aware site analytics completely locally, protecting operational data privacy. Dashboard Interface: I wrapped the final application into a high-performance Streamlit viewport displaying live telemetry streams and historical violation charts. Challenges I ran into Edge Processing Bottlenecks: Running YOLOv8 tracking, geometric distance processing, and a local LLM simultaneously caused significant frame rate drops. Being a solo developer, I solved this by implementing an optimized frame-skipping algorithm—running heavy geometric coordinate calculations every $ n $-th frame while keeping tracking loops lightweight. I also handled the Ollama inference threads asynchronously to prevent dashboard lag. Occlusion Anomalies: In complex warehouse or construction zones, workers frequently pass behind large objects or vehicles, breaking tracking paths. Tuning the spatial memory parameters within ByteTrack allowed the system to hold target identities through temporary occlusions, preventing duplicate alerts. Hardware Resource Management: Running a high-accuracy vision framework alongside a local generative language model requires strict memory tracking. I spent substantial time optimizing batch sizes and local system memory configurations to prevent out-of-memory errors on a single GPU setup. Accomplishments that I'm proud of I am incredibly proud to have built a complete, working "Zero-to-One" industrial safety platform entirely from scratch as a solo developer within the hackathon time limits. I successfully took raw, passive video feeds and converted them into highly actionable spatial data vectors. Achieving a fully operational, zero-cloud pipeline where high-speed object tracking and complex local language models run perfectly side-by-side locally is a major technical milestone for me. What I learned Building AEGIS-X solo reinforced that object detection alone isn't enough for true safety engineering; true value lies in contextual awareness—combining vision models with direct spatial physics to anticipate risks. I deeply expanded my technical knowledge in real-time streaming architectures, multi-object coordinate tracking, asynchronous Python execution, and local-first AI optimization methodologies. What's next for Aegis-X Predictive Spatial Intelligence Platform: Moving forward, I intend to transition the geometric engine into full 3D camera calibration matrix mapping, utilizing homograph transformations to calculate absolute physical distances in meters rather than relative pixel space. I also plan to expand the local database layout to generate automated, compliant end-of-week safety shift logs, and experiment with tiny vision-language models (VLMs) to dynamically explain complex workplace anomalies in real time.