blueprint · advanced
Elderly Guardian
Real-time, on-device fall detection — YOLOv8 Pose on an RK3588 + Metis, triggering a Kasa plug for local alerts.
hardware
software
See it running
The problem
Wearable fall detectors work — until someone forgets to wear them, or takes them off in the shower, or the battery dies. I wanted a passive fall detector for the room my grandmother spends the most time in: no button, no wristband, no cloud. If it sees a fall, a plug flips on, an Alexa routine fires, and help gets called. That’s it.
This blueprint is the wiring, the code, and the tuning knobs from getting that working reliably enough that I trust it.
What it is
- A single RK3588 SBC does the orchestration.
- An Axelera Metis M.2 accelerator, driven by the Voyager SDK, runs YOLOv8 Pose. This is what makes the whole thing feasible without a beefy GPU.
- A Logitech C920 at 1280×720 @ 30 FPS is the camera. Voyager’s pipeline pulls frames via GStreamer and letterboxes them to 640×640 for the model.
- The model returns a tidy meta package: boxes, 17 keypoints, and confidence scores per person.
- My Python app filters low-quality detections, then runs a small stack of heuristics (posture + motion + guards) to decide fall vs ok.
- On a confirmed fall,
python-kasapulses a TP-Link Kasa smart plug on the LAN. The plug is bound to an Alexa routine on a nearby Echo Dot — which is the escalation path. Nothing leaves the house.
Bill of materials
| Part | Role |
|---|---|
| RK3588 SBC | Compute + orchestration |
| Axelera Metis M.2 | ML acceleration (via Voyager SDK) |
| Logitech C920 | USB camera, 1280×720 @ 30 FPS |
| Edimax EW-7822UAC | USB Wi-Fi — reliable link for the LAN control path |
| TP-Link Kasa smart plug | Local trigger (via python-kasa) |
| Amazon Echo Dot | Runs the Alexa routine that fires on the plug’s state change |
The heuristics (the actual interesting bit)
Three independent signals feed the decision, then a set of guards suppresses false positives.
Posture — is the person horizontal, on the floor? Wide bbox + spread skeleton, with the box bottom and the ankle/hip keypoints sitting in the bottom ~20–22% of the frame. That’s “on the ground,” not “sitting on a couch.”
Motion — did they actually go down? True downward movement within a short window: the core-Y and the box-bottom-Y both need to move down on screen. Requiring both makes the signal robust to noisy keypoints.
Slow-fall fallback. Not every fall is a big drop. If someone stays persistently floor-prone for N frames, that’s enough to flag — even without a sharp descent event.
Guards.
- Proximity. Person too close to the camera → bbox area explodes, geometry lies. Downgrade.
- Retreat. Walking away → shrinking box moving toward frame edge. Not a fall.
- Couch / bed logic. Sitting or lying on furniture reads as horizontal but not on the floor. The floor-band check catches this.
Recovery latch. Once the app flags a fall, it latches until it sees a full recovery: upright + off-floor + ascended. This is what stops the state from blink-flipping frame-to-frame while someone is mid-fall or mid-getting-up.
What’s in the repo
- README with setup steps: exports, dependencies, GStreamer bits, example run commands.
fall_detection.py— the main app. OpenCV overlay of skeleton + status, per-person tracking, optional MP4 writer for after-the-fact debugging.- Tunable knobs (mostly CLI flags): floor band, descent pixels, min keypoints, bbox area,
--kasa-ip, plug cooldown, pulse length. - Systemd unit so it comes back after reboots.
Repo: github.com/moorebrett0/elderly-guardian.
What you’ll see in the demo
The YouTube demo walks through the four cases I care most about:
- Normal walk-through — no alert. Skeleton overlay stays green.
- Quick sit on couch — suppressed. The floor-band + off-ground rules catch this exact false positive.
- Fall to floor —
FALLoverlay flips red. The Kasa plug pulses on. Alexa routine fires. - Standing back up — the recovery latch clears once it sees upright + off-floor + ascended.
What I got wrong the first time
- Trusted a single signal. Motion alone fires on someone sitting quickly. Posture alone fires on someone lying on the couch. You need at least two of the three.
- Waited too long on the accelerator. I ran the model on CPU while the Metis was in shipping and the frame drops were bad enough that fast falls fell between analyzed frames. The accelerator isn’t optional for this workload.
- Didn’t latch early enough. Without the latch-until-recovery behavior, the fall state would blink-flip once per frame as posture/motion signals updated — Kasa would pulse multiple times.
Where I’d go next
- Voice acknowledgement. After a trigger, the Echo asks “Are you okay?” and listens for a response before escalating.
- Silent-mode timer. Off during known-empty-house hours.
- Multi-camera fusion. Two cameras, agreement mode: only fire if both see it.
- MQTT output in addition to Kasa, for anyone running Home Assistant instead of Alexa.
If you build one, tell me what you changed. That’s the whole point of a blueprint.