Team Team Chud

MyGuard

AI drowning detection for areas without lifeguards or for lifeguard assistance

MyGuard

Video Demo

About this project

MyGuard is a web app for monitoring pool footage. You point it at a webcam or upload a video, start monitoring, and it detects people in each frame using MediaPipe’s EfficientDet Lite 0 object detector (person class only), running in the browser. Each detected person gets tracked across frames. A TypeScript risk engine assigns a 0–100 score based on things like how still they are, detection confidence, whether they were lost from view while alone, and posture-ish heuristics from the bounding box. You can optionally draw safe and monitor zones on the video; safe zones never alert, monitor zones use stricter rules. When someone’s score stays above a threshold (~65) for a short window (~400ms), the app triggers an alert (sound + a red panel on the left). It also snapshots the last ~10 seconds of detection data—boxes and risk scores, not the video file itself—for replay afterward. After an alert, a small Node server calls the Gemini API with structured context (risk breakdown, timeline events, replay stats) and returns a short text summary. That shows up in the incident replay section below the video, not in the alert panel. The timeline on the right logs system events, risk spikes, and AI text. Stack: React + TypeScript + Vite + Tailwind on the front end; MediaPipe for detection; a custom risk/tracking layer in TS; Gemini via a local API proxy so the key stays off the client. Pose detection (pose_landmarker_lite) exists in the codebase but isn’t hooked up to the main flow—the live path is bounding-box detection only.

Gallery