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.

A thick blanket costs this model nothing (-0.012). Depth measures shape, and a blanket preserves it: a 13 mm rise on a 123 mm body.

Measured

conditionn testbalanced accuracybest transferred scalarlift
depth, uncovered11250.9620.643+0.319
depth, thin sheet (cover1)11250.9810.588+0.393
depth, thick blanket (cover2)11250.9740.603+0.372
pressure mat11250.9830.512+0.471
chance0.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.

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.

full frame
64x64, as the model sees it (same ramp; the model gets 0 = nearest, 1 = farthest)

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 ...