bed-posture-depth-nano
A 46,899-parameter CNN that reads lying posture (supine or one of two lateral positions) from a 64x64 overhead depth frame, unaffected by bedding. ONNX, 190 KB. Model card and weights: resoajoe/bed-posture-depth-nano.
Everything runs on your device: this page fetches only its own files and ONNX Runtime Web from jsdelivr. No frame leaves the browser.
Measured
| condition | n test | balanced accuracy | best transferred scalar | lift |
|---|---|---|---|---|
| depth, uncovered | 1125 | 0.962 | 0.643 | +0.319 |
| depth, thin sheet (cover1) | 1125 | 0.981 | 0.588 | +0.393 |
| depth, thick blanket (cover2) | 1125 | 0.974 | 0.603 | +0.372 |
| pressure mat | 1125 | 0.983 | 0.512 | +0.471 |
| chance | 0.333 |
Three-way task, split by subject so no volunteer appears on both sides. Scalar baseline: best single cheap statistic (frame mean, entropy or Laplacian variance), thresholds fitted on training subjects and applied unchanged to held-out subjects.
Domain. Measured on SLP: 102 healthy adult volunteers in a laboratory bed, overhead depth camera, three bedding conditions. Deployment domain not tested: no hospital bed, no clinical population, no real ward camera. SLP subjects assumed poses on command; patients do not.
Named failures.
- The two lateral classes are lateral_A and lateral_B, not left and right. The joint annotations that would fix the sign live in SLP's password-protected archive. The three-way distinction is measured; the anatomical naming is not. Assign the sides yourself from one known frame in your own installation.
- Trained only on an overhead view at SLP's camera height. Oblique or wall-mounted depth views are untested.
- Healthy adults holding deliberate poses. Contracture, traction, bed rails, multiple people, and a patient half out of bed are all unmodelled.
Refusal. The model always returns one of three classes. It has no "empty bed" and no "not a person" class (SLP has no empty-bed frames). Gate it on occupancy before calling it, or it will confidently report a posture for an empty mattress. This page applies a stand-in occupancy gate (1st-to-99th percentile depth relief must exceed 60 mm) and a softmax-margin floor of 0.20; both are page policy, not part of the model, and each refusal says which one fired.
Operations, not diagnosis. It reports body orientation for repositioning audits; it is not a medical device and infers nothing about skin, tissue or ulcer risk.
Try it: 12 held-out frames
Four SLP volunteers from the held-out test quarter (the model never trained on them), each under all three bedding conditions. Tap a frame to classify it.
Or upload a depth frame
The model's input is per-frame percentile-normalised, so an 8-bit frame classifies identically to its 16-bit original; the mm range is needed only for the occupancy gate and the mm readout.
Result
Pick a frame above.
Scalar baseline, live
The thing the model had to beat. The three cheap statistics from nanolab.cheap_stats, computed here on the same 64x64 input, and a nearest-class-median rule on the best one. This rule is demo-fit on the 12 gallery frames (four per class); the paper's rule was fitted on 77 training subjects and scored 0.588-0.643 on held-out subjects.
Data
Frames from the open Harvard Dataverse release of SLP depth: Liu, Huang, Ostadabbas et al., SLP dataset, arXiv 2008.08735; cleaned depth via doi:10.7910/DVN/ZS7TQS. Posture labels come from SLP's capture protocol (poses 0-14 supine, 15-29 lateral_A, 30-44 lateral_B), not from any sensor. Non-commercial research use only; the licence text shipped with the Dataverse record is reproduced below and in LICENSE_BPSD.txt. Frames were converted from float32 mm to 16-bit PNG (rounded to 1 mm); no other modification.
Dataset licence (full text)
loading LICENSE_BPSD.txt ...