Scientific Reports (Jul 2024)

Transitioning sleeping position detection in late pregnancy using computer vision from controlled to real-world settings: an observational study

  • Allan J. Kember,
  • Hafsa Zia,
  • Praniya Elangainesan,
  • Min-En Hsieh,
  • Ramak Adijeh,
  • Ivan Li,
  • Leah Ritchie,
  • Sina Akbarian,
  • Babak Taati,
  • Sebastian R. Hobson,
  • Elham Dolatabadi

DOI
https://doi.org/10.1038/s41598-024-68472-x
Journal volume & issue
Vol. 14, no. 1
pp. 1 – 13

Abstract

Read online

Abstract Sleeping on the back after 28 weeks of pregnancy has recently been associated with giving birth to a small-for-gestational-age infant and late stillbirth, but whether a causal relationship exists is currently unknown and difficult to study prospectively. This study was conducted to build a computer vision model that can automatically detect sleeping position in pregnancy under real-world conditions. Real-world overnight video recordings were collected from an ongoing, Canada-wide, prospective, four-night, home sleep apnea study and controlled-setting video recordings were used from a previous study. Images were extracted from the videos and body positions were annotated. Five-fold cross validation was used to train, validate, and test a model using state-of-the-art deep convolutional neural networks. The dataset contained 39 pregnant participants, 13 bed partners, 12,930 images, and 47,001 annotations. The model was trained to detect pillows, twelve sleeping positions, and a sitting position in both the pregnant person and their bed partner simultaneously. The model significantly outperformed a previous similar model for the three most commonly occurring natural sleeping positions in pregnant and non-pregnant adults, with an 82-to-89% average probability of correctly detecting them and a 15-to-19% chance of failing to detect them when any one of them is present.