Automated Non-Contact Detection of Head and Body Positions During Sleep

Sina Akbarian, Ghazaleh Delfi, Kaiyin Zhu, Azadeh Yadollahi, Babak TaatiIEEE Access 2019 · OpenReview

Abstract

Obstructive sleep apnea (OSA) severity is often linked to sleeping position, with the supine position typically exacerbating airway collapse. Monitoring both head and body orientation is clinically vital for optimizing treatment, such as positional therapy. This study evaluates three machine learning approaches—engineered features, classical supervised classifiers, and convolutional neural networks (CNNs)—to detect these positions using non-contact infrared imaging. Utilizing a dataset of 50 participants across different laboratory environments, the Darknet19 architecture emerged as the most effective, achieving 92% accuracy for head position and 87% for body position.

Introduction

Obstructive Sleep Apnea (OSA) is characterized by repeated interruptions in breathing during sleep, often caused by the physical collapse of the airway. For many patients, gravity plays a significant role; the supine (back) position allows the tongue and soft tissues to obstruct the airway more easily than lateral (side) positions. While positional therapy is a common recommendation, clinical monitoring usually requires intrusive wearable sensors or expensive polysomnography (PSG) setups that can disrupt natural sleep.

This research proposes a non-contact, automated system using infrared (IR) cameras. IR imaging preserves patient privacy while allowing for monitoring in total darkness. The goal is to provide a robust method for tracking sleep posture that can withstand the common occlusions found in a bedroom environment, such as blankets and pillows.

Methodology

Feature Engineering vs. Deep Learning

The researchers compared two distinct paradigms for posture detection:

  1. Classical Computer Vision: This involved "engineered features" such as Haar-cascade classifiers to detect facial landmarks (eyes, nose, ears) and the Dlib library for 3D facial mapping. These methods rely on clear visibility of facial features.
  2. Deep Learning (CNNs): Three architectures—ResNet50, MobileNet, and Darknet19—were trained to classify positions directly from raw IR frames. Unlike landmark-based methods, CNNs can learn abstract spatial hierarchies, making them potentially more robust to partial occlusions.

Data Augmentation and Transfer Learning

A significant innovation in the training process was the use of the NIST Special Database 18, a collection of over 3,000 high-quality mugshot images. By augmenting the noisy, low-resolution IR sleep data with these clear facial images, the models were forced to learn the fundamental geometry of the human head. This "transfer learning" approach helped the networks converge faster and improved their ability to identify head orientation even when the IR signal was degraded.

Key Insights: The Blanket Challenge

One of the primary hurdles in automated sleep monitoring is the presence of bedding. Traditional pose estimation models often fail when limbs or the torso are hidden.

Infrared sleep images showing various head and body positions, both uncovered and covered by blankets.

As shown in the figure above, the system must distinguish between supine and lateral positions across a variety of occlusion levels. The study found that while blankets do decrease performance, CNNs are significantly more resilient than landmark-based detectors. In fact, landmark detectors failed to identify a face in 65% of the sleep images, whereas the CNNs maintained high accuracy by processing the overall silhouette and visible head contours.

Experimental Results

Dataset and Validation

The study involved 50 participants with varying levels of OSA severity. To ensure the model's generalizability, the researchers employed a "Room Split" validation strategy:

  • Training Set: 25 participants recorded in one laboratory room.
  • Test Set: 25 participants recorded in a different room with unique lighting conditions and camera angles.

Performance Metrics

The Darknet19 model outperformed other architectures in both accuracy and computational efficiency.

  • Head Position: Achieved 92% accuracy and a 94% F1-score for lateral vs. supine detection.
  • Body Position: Achieved 87% accuracy and an 87% F1-score.
  • Efficiency: The model processed an entire night's data (approx. 5-6 hours) in under 100 seconds on a standard GPU, demonstrating its potential for real-time clinical application.

Discussion and Limitations

While the results are promising, several challenges remain. The current model is a binary classifier (supine vs. lateral) and does not yet robustly detect "prone" (stomach) sleeping due to a lack of training data for that specific position. Furthermore, while the system handles light blankets well, heavy or opaque bedding that completely obscures the body's silhouette remains a limitation for optical-based systems.

Conclusion

This work demonstrates that deep learning, specifically the Darknet19 architecture augmented with facial datasets, provides a highly accurate and non-intrusive way to monitor sleep posture. By overcoming the "blanket challenge" more effectively than traditional computer vision, this technology paves the way for automated, home-based OSA management and positional therapy monitoring.

Summary updated

Abstract

Obstructive sleep apnea (OSA) is a respiratory disorder characterized by interruption to breathing during sleep. Usually, the OSA is more severe in the supine sleeping position. Recent studies also demonstrated that the head position may play an important role in the pathophysiology of the OSA. Therefore, monitoring the sleeping body and the head position has high clinical importance to optimize the treatment of the OSA. In this paper, three machine learning approaches were used to detect the head position during sleep in infrared images. In the first two methods, supervised classifiers were trained to estimate the head position based on different feature sets extracted from infrared images. In the third method, three different convolutional neural network (CNN) structures (ResNet50, MobileNet, and Darknet19) were trained to detect the head position during sleep. To detect the body position, the same CNN architectures were trained on infrared images. Overnight sleeping data (sleep duration =5±1h) from 50 participants (age: 53 ± 15 years, BMI: 29 ± 6 kg/m2, and 30 men/20 women) with various levels of OSA severity as measured by the apnea-hypopnea index (AHI =25±29 events/h and OSA severity: 12 normal, 13 mild, 11 moderate, and 14 severe) were collected for this paper. The models were trained on the data collected in one laboratory room from half of the participants and tested on the data from the other half collected in a different laboratory room. The best performing model (Darknet19) correctly estimated the lateral versus supine head position with 92% accuracy and 94% F1-Score and the lateral versus supine body position with 87% accuracy and 87% F1-Score.
BibTeX
@inproceedings{akbarian2019automated,
  author = {Sina Akbarian and Ghazaleh Delfi and Kaiyin Zhu and Azadeh Yadollahi and Babak Taati},
  title = {{Automated Non-Contact Detection of Head and Body Positions During Sleep}},
  booktitle = {IEEE Access},
  year = {2019},
  url = {https://openreview.net/forum?id=dzoKNIbILFZ},
}

Loading related content...

Figure