Problem statement
Let me start with the part that matters. A fall is not really the emergency. The emergency is the hours that follow.
Falls are the leading cause of injury-related hospitalization for older adults, and the medicine here is uncomfortably simple: the sooner someone is found after a fall, the better they do. Every hour spent on the floor is an hour that turns a bruise into a fracture, a fracture into a hospital stay, and a hospital stay into a permanent loss of independence. Clinicians even have a name for it — the long lie. It is quiet, it is common, and it is preventable.
Now consider who is most at risk: someone living alone. There is no one in the next room. There is no one to notice that the house has gone silent. And the options we hand these families today all ask them to give something up.
Wearable panic buttons only work if the person is conscious and still wearing them — which is precisely what a hard fall takes away. Motion and bed sensors are coarse; they fire on ordinary activity and miss the thing that actually happened. And the option that genuinely works — a camera service — asks a family to stream live video of their parent's home to a stranger's servers, pay a subscription, and depend on an internet connection that may fail exactly when it is needed most. Many families, and many seniors, reasonably say no.
So here is the gap, we can watch a person continuously, understand what is happening to their body, and raise an alarm without sending a single frame off the device they live with.That is the problem worth solving, and it is the one Kinguard takes on.
Solution overview
Kinguard is a small fall monitor that lives in the room. It runs on a Raspberry Pi, a mini PC, an old laptop — anything sitting quietly in the house. It watches a camera, understands the occupant's body pose, notices when the torso has gone horizontal and stayed that way, and raises an alert on a local dashboard. And it does all of it offline. The footage never leaves the house.
First, it captures. OpenCV reads frames from a webcam, or from a video file when you want to test without hardware. If the camera drops, the monitor backs off and reconnects on its own — because a home camera that silently dies is worse than no camera at all.
Then it perceives. Each frame goes to the MediaPipe Pose Landmarker, which we only read the torso landmark, both shoulders and both hips.
Those four points collapse into two midpoints, a shoulder and a hip, and those two midpoints give a single vector. When the horizontal part of that vector dominates the vertical part, the torso is lying down.
But one horizontal frame is not a fall. Someone could be doing yoga, tying a shoe, or sleeping. So the system does not react to a moment, it reacts to duration, and it only confirms a fall once the horizontal posture persists.
That gives us honest phases instead of one blunt alarm: warning - possible fall, then alert - fall detected. The warning phase is a grace window, the system being honest that it is not yet certain.
Then it responds. On confirmation, a snapshot is written to a local storage as evidence and the incident is logged. The bundled dashboard shows the live stream with the pose overlay, the current phase, the frame rate, the running fall timer, and the full incident history. A caregiver opens a browser on the same machine and sees exactly what is happening.
AI usage explanation
AI does the perception. The one learned component in Kinguard is the MediaPipe Pose Landmarker, a pre-trained on-device model running in video mode.
Give it a camera frame and it returns a thirty-three-point skeleton of the human body. We keep only the torso landmarks. That is what a neural network is for, and it is beyond what hand-built rules could ever do reliably.
- It gives a richer signal. Instead of a coarse motion trigger, we get a full body pose every frame, which is what makes a meaningful warning phase possible instead of a single hard alarm.
- It protects privacy instead of eroding it. The model runs on-device and offline. There is no inference API, no upload, no cloud dependency.
- It fits real hardware. The lite landmarker is fast enough to run in real time on a cheap, low-power board, so the intelligence fits the budget and the power envelope of a device that actually lives in a room.
- It stays in its lane. The AI watches continuously and quietly. The deterministic rule decides. The human reads the dashboard. The system augments a caregiver's attention, it never claims to replace their judgment.
Built With
- css3
- file-system-storage-(no-database)
- hatchling
- html5
- importlib.resources
- in-memory-state-(no-database)
- javascript
- json-api
- linux
- local-first
- mediapipe
- mediapipe-pose-landmarker
- mediapipe-tasks-vision-api
- mjpeg-(multipart/x-mixed-replace)
- nix-/-devenv
- numpy
- opencv
- opencv-videocapture-api
- pyright
- python-3.13
- python-http.server
- rest-style-endpoints
- ruff
- uv
- web-browser
Log in or sign up for Devpost to join the conversation.