1. Body target and label specification
1.1 Posture is the orientation of a body segment
Sleep posture detection converts overnight inertial, bed-pressure or imaging observations into supine, prone, left, right, sitting, out-of-bed or unknown states. It can also output continuous tilt, turn time and duration in each position. First identify whether the target is head and neck, trunk, pelvis or whole-body shape. A head can turn while the trunk remains supine; the direction of a chest sensor is not the head posture. A dual-sensor obstructive sleep apnea study found that head and trunk positions carried distinct information for positional analysis; one label should not silently stand for both.[7]
This guide concerns posture and turning, not generic movement intensity, sleep staging or respiratory-event detection. A posture class is not a diagnosis, and adult positional studies do not establish infant safety monitoring. Report body segment, observed time, confidence and periods in which no judgment can be made.
1.2 Class boundaries and continuous angles
The label protocol should define left and right from the participant's perspective, anatomical axes, supine and prone reference directions, semilateral transition zones, elevation, out-of-bed and indeterminate states. Different systems can draw different angular boundaries around an oblique posture; do not call one study's cutoffs natural universal thresholds. An original overnight video and multi-segment inertial study used explicit angular sectors and body-segment codes, illustrating why human labels also need rater agreement.[3]
Continuous rotation preserves tilt that a coarse class loses, but one sensor still reflects its attachment segment and identifiable axes. Claims for curled limbs or a starfish-like shape need suitable body-shape observation and separately reproducible labels. A depth-camera experiment found that blankets and fine-grained classes changed classification performance.[4]
| Output field | Must specify | Common confusion |
|---|---|---|
| Discrete posture | Segment, class, left/right direction and angle boundary | Oblique side lying forced into supine or lateral. |
| Continuous angle | Coordinate system, calibration pose and valid axis | Head turning mistaken for trunk turning. |
| Turn event | Onset, end, prior and later class, merging rule | Brief torso lift or sensor impact. |
| Unknown and out of bed | Trigger and duration | Missing signal counted as valid posture. |
2. Sensors and installation conditions
2.1 Modalities observe different physical quantities
An inertial sensor on the chest, head or pelvis measures local orientation and depends on secure attachment and an initial reference pose. A pressure mat or under-mattress hydraulic transducer measures contact or load distribution and can depend on bedding, mattress, bed partners and placement. Original under-bed and pressure-textile studies demonstrate such classifiers, but their class sets and validation conditions are not interchangeable.[5][8] A depth image shows visible contour but may be obscured by blankets, viewpoint or multiple people. One controlled blanket study compared coarse and fine classes, yet posed conditions are not natural whole-night validation.[4] A watch mainly follows an arm, and a phone placed on a bed can follow bed movement; a trunk-orientation claim from either needs direct evidence.
2.2 Coordinate calibration, displacement and synchronization
Retain attachment site, sensor axes, initial reference pose, device clock, sampling rate and recalibration events. A loosened patch or overnight rotation changes the device-to-body transform; detect discontinuities and enter a sensor-displacement or unknown state. A smartphone accelerometry comparison against video-checked PSG found that initial-orientation correction and video review affected agreement, supporting retention of raw orientation and correction rules.[2] A pressure system also needs mattress type, bed frame and mat location. An open pressure-map dataset contains collections under different mattress and participant conditions; brief posed frames are not proof of overnight performance.[6]
For combination with video or polysomnography (PSG), retain a common clock, time zone, midnight crossing and synchronization error. Report valid wear time or valid bed-sensing time. Do not quietly count disconnection, occlusion, overlap between people or bed exit as a known position.
| Modality | Direct observation | Deployment check |
|---|---|---|
| Body inertial sensor | Orientation and motion at attachment segment | Attachment, axes, reference pose and shift. |
| Pressure or under-bed sensor | Contact or spatial load distribution | Mattress, partner, objects and placement. |
| Depth or video | Visible contour and local structure | Blanket, view, lighting and privacy. |
| External reference | Synchronized video, human labels and PSG time | Time alignment and reference error. |
3. Label construction and temporal algorithm
3.1 Reference labels must be reviewable
Build an annotation manual defining positions for each participant and body segment, semilateral handling, transition intervals, occlusion, bed partners and bed exit. Synchronized infrared video or a manually reviewed PSG position channel can serve as reference. The automatic PSG channel itself can disagree with video, as shown in an original smartphone comparison.[2] Have multiple raters review a subset and report disagreement; the overnight video versus inertial study illustrates why segment and human interpretation must both be specified.[3] Unknown is a valid label. Do not discard it from training and then force every second into four classes in operation.
3.2 From frames to stable posture and turns
An inertial pipeline can correct bias and coordinate axes, estimate identifiable tilt, and assign a class using documented thresholds, a state machine or a trained model. Bed and image pipelines can extract contact maps, contours or depth features. Use hysteresis or a minimum stable interval near decision boundaries to reduce switching caused by breathing motion. Tune the rule on real turn sequences: excessive smoothing can miss slow rolling. Define turn onset, end, prior and later class, transitional state and merging of short movements.
Posture and sleep state are distinct axes. Awake supine time cannot automatically enter supine sleep duration; sitting up does not mean EEG-confirmed wake. Retain recording time, valid time in bed and independently established sleep time separately. The public pressure-map dataset provides brief posed classes for development; turn counts and overnight duration still need continuous independent natural nights.[6]
| Processing step | Intermediate value to retain | Failure output |
|---|---|---|
| Calibration and location | Raw axes, baseline and attachment segment | Displaced or missing; stop fine classification. |
| Frame estimate | Angle, pressure map or contour and quality score | Occluded or low confidence is unknown. |
| Temporal smoothing | Hysteresis, stability interval and version | Do not conceal a slow real turn. |
| Event and summary | Turn boundary, duration by class and valid denominator | Report bed exit and invalid spans separately. |
4. Validation and transfer
4.1 Overall accuracy is insufficient
Separate training, tuning and testing by participant and whole night. Randomly splitting neighboring frames within one long posture leaks nearly identical examples. An original hydraulic bed-transducer study reported both ordinary folds and leave-one-subject-out validation, with performance depending on evaluation design; its scores are not universal device accuracy.[8] Report participant count, night count and real exposure by class. Frame-level results should include a confusion matrix, class-wise recall, precision, F1 and unknown rate. Whole-night results should compare supine share, duration in each posture, turn count and boundary timing. A common, long-held posture must not conceal failure on rare classes.
4.2 Test new beds, people and downstream uses separately
Conduct independent tests across mattresses, blankets, body shapes, bed partners, attachment methods and natural sleep. Public pressure maps and posed laboratory examples can train a classifier but cannot replace full-night tests on unseen people at home.[5][6] Prespecify blanket occlusion, device displacement and partner interference as failure cases, reporting abstention and person-level errors. Validation in adult OSA samples does not automatically cover children, infants, pregnant users or people with limited mobility.[1]
| Validation layer | Reference and measure | Exposed risk |
|---|---|---|
| Unseen participant | Human-reviewed video and confusion matrix | Body shape and habit differences. |
| Unseen night and bed | Whole-night duration, turns and unknown rate | Mattress, blanket and partner. |
| Segment agreement | Head and trunk labeled separately by angle and class | One sensor overclaims whole-body posture. |
| Downstream task | Aligned event, sleep and posture outcome | Denominator, false feedback and benefit. |
5. Use boundaries and handoff
5.1 Positional breathing and feedback require another evidence chain
Positional respiratory analysis needs respiratory events, valid sleep exposure and the correct body-segment posture on one timeline. An event assigned to the wrong posture changes a numerator; wake or invalid time counted as sleep changes a denominator. The original dual head-and-trunk study shows that one trunk label may omit head information.[7] State when a position has too little exposure for a stable rate. Successful posture classification does not establish diagnostic validity.
Vibration or other closed-loop feedback needs separate testing of latency, false triggers, sleep disruption, user response and adherence. A randomized trial of one positional trainer is intervention evidence, but does not establish efficacy for every new algorithm or device.[9] Deliver a model card with body segment, classes, angles, sensors, training domain, reference labeling, person-level results, version, unknown rule and privacy handling. Images and pressure maps can reveal bedroom activity and body shape; specify access, retention and deletion of raw data.
| Handoff item | Minimum record | Update trigger |
|---|---|---|
| Label and coordinate dictionary | Segment, left/right, angle and unknown rule | Class or boundary change. |
| Collection and model card | Attachment, calibration, device, parameters and version | Hardware or firmware update. |
| Validation report | Person- and night-level performance, duration and turn error | New bed, group or feedback use. |
| Operating monitor | Displacement, occlusion, invalid spans and human review | Persistent drift or false triggers. |
6. Acceptance and evidence limits
6.1 Final check
The reviewer should be able to tell which body segment is recognized, how each posture is defined, how reference labels are created and reviewed, how turns and unknown periods are handled, whether testing was independent by person and night, and whether positional respiratory analysis or feedback has separate evidence. Hold conclusions when the reference cannot be traced or only overall frame accuracy is reported. The original studies and primary dataset below define methods and limits. They do not show that an algorithm in this guide has been developed, validated or made suitable for diagnosis or intervention.
[1] Wearable position sensor versus video-checked PSG
[2] Smartphone accelerometry versus video-checked posture
[3] Multi-segment inertial sensors versus overnight video
[4] Depth-camera posture classification under blankets
[5] Pressure-textile mattress posture classifier
[6] PhysioNet pressure-map posture dataset
[7] Head and trunk position in positional breathing analysis
[8] Hydraulic under-bed posture classifier
[9] Randomized trial of a positional trainer