Skip to main content
PLOS Digital Health logoLink to PLOS Digital Health
. 2023 Oct 3;2(10):e0000353. doi: 10.1371/journal.pdig.0000353

Vision-based detection and quantification of maternal sleeping position in the third trimester of pregnancy in the home setting–Building the dataset and model

Allan J Kember 1,2,3,*, Rahavi Selvarajan 4, Emma Park 3, Henry Huang 5, Hafsa Zia 6, Farhan Rahman 4, Sina Akbarian 7, Babak Taati 5,7,8, Sebastian R Hobson 1,9, Elham Dolatabadi 2,7
Editor: Chrystinne Oliveira Fernandes10
PMCID: PMC10547173  PMID: 37788239

Abstract

In 2021, the National Guideline Alliance for the Royal College of Obstetricians and Gynaecologists reviewed the body of evidence, including two meta-analyses, implicating supine sleeping position as a risk factor for growth restriction and stillbirth. While they concluded that pregnant people should be advised to avoid going to sleep on their back after 28 weeks’ gestation, their main critique of the evidence was that, to date, all studies were retrospective and sleeping position was not objectively measured. As such, the Alliance noted that it would not be possible to prospectively study the associations between sleeping position and adverse pregnancy outcomes. Our aim was to demonstrate the feasibility of building a vision-based model for automated and accurate detection and quantification of sleeping position throughout the third trimester–a model with the eventual goal to be developed further and used by researchers as a tool to enable them to either confirm or disprove the aforementioned associations. We completed a Canada-wide, cross-sectional study in 24 participants in the third trimester. Infrared videos of eleven simulated sleeping positions unique to pregnancy and a sitting position both with and without bed sheets covering the body were prospectively collected. We extracted 152,618 images from 48 videos, semi-randomly down-sampled and annotated 5,970 of them, and fed them into a deep learning algorithm, which trained and validated six models via six-fold cross-validation. The performance of the models was evaluated using an unseen testing set. The models detected the twelve positions, with and without bed sheets covering the body, achieving an average precision of 0.72 and 0.83, respectively, and an average recall (“sensitivity”) of 0.67 and 0.76, respectively. For the supine class with and without bed sheets covering the body, the models achieved an average precision of 0.61 and 0.75, respectively, and an average recall of 0.74 and 0.81, respectively.

Author summary

Over the last decade, mounting evidence has pointed to sleeping on the back in late pregnancy as a possible risk factor for fetal growth restriction and stillbirth. One such analysis indicated that avoiding sleeping on the back in late pregnancy may be as important as stopping smoking and more important than achieving a healthy pre-pregnancy weight. However, a major problem with previous research has been that a pregnant person’s sleeping position was not actually measured but was, rather, recollected by the person themselves, which is known to be inaccurate. Currently available sleep position measurement devices, including computer vision based algorithms, are not appropriate for use in pregnancy. As such, there is a need for tools to help researchers measure sleeping position in pregnancy. Using an ordinary home-surveillance camera, we collected night-vision video of pregnant participants simulating sleeping positions unique to pregnancy in the home setting and in the presence and absence of bed sheets. We built a model from this data to automatically and accurately detect sleeping position and measure the amount of time spent in each position. Our model may eventually contribute to a tool that could help bridge a major gap in previous research, which would strengthen the case for a definitive and universal change in clinical practice.

Introduction

Sleep during pregnancy plays a crucial role in maternal and fetal complications as evidenced by prior studies [111]. A supine going-to-sleep position after 28 weeks’ gestation was shown to be associated with more than double the odds of late stillbirth [1217], and more than triple odds of birthing a small-for-gestational age (SGA) infant [1215,18]. The going-to-sleep position is the dominant sleep position for the entire night in more than 50% of pregnancies with most pregnant people spending an average of 44% of the night in their sleep onset position [19]. Analyses demonstrate that avoiding the supine going-to-sleep position is important for all pregnancies after 28 weeks’ gestation regardless of risk factors for stillbirth in the pregnant person (e.g., age, body size, smoking, recreational drug use, pre-existing hypertension or diabetes) or in the fetus (e.g., movements, growth, gestation) [17].

In high-income countries, late stillbirth, defined as stillbirth occurring at or greater than 28 weeks’ gestation, remains an important yet understudied public health issue, affecting 1.3–8.8 per 1000 births [20]. Sleeping position in pregnancy, if a truly causative risk factor for stillbirth, must be contextualized among other modifiable risk factors. The leading three potentially modifiable risk factors for stillbirth are maternal obesity, advanced maternal age, and smoking–all of which have been shown to be deleterious to placental health and fetal growth [21]. Of these, only smoking is a realistically modifiable factor during the course of pregnancy, which amplifies the potential importance of sleeping position as a potentially modifiable risk factor [2224]. For comparison, consider that if all pregnant people avoided sleeping on the back in the third trimester of pregnancy, the overall late stillbirth rate could be reduced by 5.8% (population attributable risk), [17] whereas if all pregnant people quit smoking, the overall late stillbirth rate would be reduced by 5.5% [25]. Furthermore, for a given pregnant person who usually goes to sleep on their back, by going to sleep on their left side instead, they can reduce their risk of late stillbirth by 62% (aOR 0.38) [17], whereas one Canadian study demonstrated that a 10% reduction in pre-pregnancy body weight would reduce the risk of stillbirth by only 10% [26].

The potential contribution of supine sleeping position in late pregnancy to stillbirth and growth restriction is biologically plausible. When in the supine position after 28 weeks’ gestation, the inferior vena cava (IVC) is compressed by the gravid uterus and pregnancy, resulting in reduction in blood flow and oxygen delivery to the fetus [2733]. Furthermore, the prevalence of supine sleeping position in the third trimester is common with a wide range of variability–published research of objective sleeping positions demonstrate that pregnant people spend between 9.5–47% of the night sleeping supine [19,22,23,3439].

The National Institute for Health and Care Excellence (NICE) organization’s recently reviewed the evidence for safe sleeping positions in pregnancy and concluded that, on a balance, the evidence is strong enough to recommend that pregnant people should be advised to avoid going to sleep on their back after 28 weeks’ due to the likely link with stillbirth [40]. Indeed, the aforementioned studies demonstrating an association between supine sleep, stillbirth, and delivering an SGA infant were all retrospective and body position was subjectively measured through self-reporting. As such, these studies are limited by recall bias, established inaccuracies inherent in self-reported sleep behavior when compared to objective measurements [35,4145], and by the fact that sleeping position is usually not static in healthy sleep nor pregnancy [22,46,47]. Furthermore, members of our group have previously demonstrated that pregnant people underestimate the percentage of time they spend sleeping supine by an average of 7% in absolute terms (44% underestimate in relative terms) [22]. Among the NICE’s main critiques of the evidence was that it would not be possible to study the association between sleeping position in pregnancy and adverse outcomes because of these limitations [40]. As such, herein lays the rationale for the present study.

Over the past decade, advances in computer vision have revolutionized daily life, and deep neural networks in particular, have attained remarkable performance in object detection tasks [48,49]. There have been numerous studies utilizing computer vision technologies (CVT) to track and analyze body movement and posture [5055]; however, none of these were developed for pregnancy, which has unique sleep behaviors and physiology. Non-CVT devices for body position detection such as BodyCompass [56] and SleepPos [5760] were also not developed with pregnancy in mind. These devices focus on the position of the thorax. While the position of the thorax may be important for maternal obstructive sleep apnea (OSA) diagnosis and treatment in pregnancy and the postpartum [19,6164], the position of the pelvis, owing to its impact on maternal and uteroplacental hemodynamics [27,29,6568], is more important to fetal wellbeing.

The literature concerning investigations of the impact of OSA on fetal heart rate (FHR) patterns is of questionable quality in that it rarely accounts for maternal posture, a major confounder, using the gold standard (video determination). While OSA and accompanying maternal oxygen desaturations may play a role in spontaneous nocturnal FHR decelerations [6971], this likely only holds true for moderate or severe OSA with deep desaturations and concomitant placental disease (e.g., fetal growth restriction) [70,71]. The fetus has a remarkable adaptive capacity to withstand in utero hypoxia, and the fetal hemoglobin has a higher affinity for oxygen than the maternal adult hemoglobin. Evidence from the largest studies to date investigating the role of OSA indicates no relationship between mild maternal oxygen desaturations and FHR decelerations, even in pregnancies with known fetal growth restriction [71,72]. Conversely, objectively-verified supine maternal posture seems to play a role in overnight FHR patterns, and this is corroborated by several studies [19,23,29], and likely extends to adverse pregnancy outcomes [17,18]. Only one study showed no effect of supine maternal sleeping position on FHR patterns; however, this study did not confirm maternal position with video, and the median percentage of time spent in the supine position overnight was only 1.09%, which makes it challenging to draw definitive conclusions [73].

Further, determination of only the thorax position is of insufficient resolution for sleep-in-pregnancy research because discordance between the position of the pelvis and the position of the thorax naturally occurs when the body is in a hybrid (i.e., twisted) position–in one of our studies (ClinicalTrials.gov Identifier: NCT04437407), we have observed up to 144 minutes of discordance between the pelvis and thorax position and up to 26.5 minutes of discordance between the pelvis and head position in a single night, which exposes a major limitation of use of “thoracic-centric” and/or “head-centric” position detection devices in sleep-in-pregnancy research.

In the present study, we built a model for effortless, accurate, unobtrusive, and non-contact detection and measurement of sleeping position, at a high resolution, occurring throughout the third trimester of pregnancy in the home setting.

Materials & methods

Design

This study can be conceptualized as a cross-sectional design in which video data of simulated sleeping positions was prospectively collected over a period of five to ten minutes. No methodological changes were made after the study’s commencement.

Patient and public involvement

Development of the research question and outcome measures, design of the study, recruitment process, and conduct of the study were completed by the researchers without the involvement of the public or patients. Participants in this study indicated whether they wished to receive a summary of the overall study results during the informed consent process.

Participants

Participants were recruited Canada-wide by the researchers via various social media platforms (Instagram, Facebook, LinkedIn, and Twitter) and an app for research study participation (Honeybee). Snowball sampling was also used in which participants who completed their participation in the study invited their friends and family members who also may have been eligible to participate in contacting the researchers. All contact between the researchers and participants was virtual (i.e., no in-person or face-to-face contact given the ongoing COVID-19 pandemic). All data collection was completed within the participants’ own homes.

Participants were eligible to participate in the study if they were healthy (self-reported), had a low-risk singleton pregnancy, were in the third trimester of pregnancy (between 28 weeks’ and 0 days through 40 weeks and 6 days gestation, inclusive, by first-trimester ultrasound), were aged 18 to 50 years, had access to an Android or iPhone device, and had a secure 2.4 GHz network (WiFi or cellular data plan) in their home. Exclusion criteria included non-English speaking, reading, or writing and a musculoskeletal condition preventing simulation of sleeping positions.

Interventions

The consent process was completed via a virtual meeting (telephone or Zoom), and eligible participants gave voluntary, written, informed consent to participate in the study. Basic demographic data was collected from each participant including, name, mailing address, age, gestational age, height, and weight. No additional personal health information was accessed or shared because linkage to clinical outcomes was beyond the scope of this study. Each participant was then mailed a study kit containing sanitized study equipment.

A virtual meeting was held with each participant to describe the specific study protocol and instructions including assisting in equipment setup and data collection. Each participant installed an infrared home-surveillance camera (Wyze Cam V2 by Wyze Labs, Inc., Seattle, USA) by attaching it to the wall, centered at the head of their bed and 1.6 to 1.7 meters above the sleeping surface, to clearly capture all pertinent data. The participant then shared the video feed of the Wyze Cam with the researcher via the Wyze smartphone app, and the researcher provided instructions in real-time to the participant. The participant was assisted in taking two short video clips of themself in twelve different simulated body positions. We used a simulated position approach to data collection to create a highly heterogeneous dataset for CVT model building. See the supplementary file S1 Appendix for a justification of why recordings of natural sleep were not used.

Each participant simulated the body positions while lying in their bed in the dark and fully clothed. The participant was asked to use a bed sheet with no patterns and remove all pillows and objects from the bed except for head pillows. The participant simulated each of the twelve positions for ten seconds per position (recorded at 10 frames per second, fps), first without bed sheets covering her body, and subsequently with bed sheets covering her body. While simulating each position, the participant was asked to move her head, arms, and legs constantly while maintaining the position with her body. The individual who appears in the images in this manuscript has given written informed consent (as outlined in PLOS consent form) to publish their photos. The twelve simulated positions, eleven of which are sleeping positions and one of which is a transitional position, were (see Fig 1): left recovery (P1), left lateral (P2), left tilt (P3), supine (P4), supine thorax with left pelvic tilt (P5), supine thorax with right pelvic tilt (P6), supine pelvis with left thorax tilt (P7), supine pelvis with right thorax tilt (P8), right tilt (P9), right lateral (P10), right recovery (P11), and sitting up at the edge of the bed (P12). All “tilt” positions were tilted in the lateral direction (i.e., rotated about a string connecting the head to the feet) and were simulated at approximately 45° above the horizontal plane–to achieve this angle, participants were instructed to tilt their body “45°, that is, half-way between completely on your side and flat on your back”. When the simulation was complete, each participant uploaded her video clips to the research team’s secure cloud server for analysis and storage.

Fig 1. Twelve simulated positions. Example of each of the twelve simulated positions, P1 through P12, without a bed covering the participant’s body.

Fig 1

Outcomes

Not applicable.

Sample size

A formal sample size calculation was not performed. We determined a target sample size of N = 20, which was informed by the study budget and timeline.

Statistical methods

We assessed normality of continuous variables via the Shapiro-Wilk test at a 0.05 significance level. Normally distributed continuous variables are presented as “mean ± standard deviation”, and non-normally distributed continuous variables are presented as “median (interquartile range)”. Statistical analyses were conducted using the R Statistical Software package (R version 4.1.1 (2021-08-10) — "Kick Things") [74].

Computer vision model development

Dataset development and annotation

First, all video recordings were converted to a sequence of frames at a rate of 10 fps using an open-source video and audio processing software, FFmpeg [75], (refer to Fig 2). All extracted frames were then manually reviewed and sorted into the twelve unique postures, shown in Fig 1, with and without bed sheets (24 classes in total).

Fig 2. Schematic representation of dataset development and annotation and model development and evaluation.

Fig 2

Frames were extracted from video recordings via FFMPEG and manually reviewed to classify them into the twelve positions without bed sheets and with bed sheets covering the body. Low-quality frames and frames without a participant (negatives) were set aside. The manually sorted frames were then semi-randomly down-sampled and localization and annotations were then completed with LabelImg. The negative frames were augmented using the ImageDataGenerator class in the Keras library and were then combined with the annotated frames in the training and validation phase, which was by six-fold cross-validation on a virtual GPU (NVIDIA Tesla P100 on Google Colab) using YOLOv5s by Ultralytics and pre-trained weights from the COCO dataset. The weights of the model in each loop of the cross-validation that achieved the best mAP on the validation set were saved as the best weights. Performance evaluation for each loop was completed on the testing set using the best weights, and the performance was evaluated by computing the mAP, precision, and recall. Various classes with similar anatomic and hemodynamic implications on uteroplacental perfusion were subsequently combined, which resulted in a simpler, collapsed-resolution (CR) condition (see the supplementary file S2 Appendix).

Next, all low-quality frames were excluded from the dataset. Low-quality frames included frames in which there was static posing (no movement between subsequent frames), minimal movement between subsequent frames, unidentifiable postures, transitions between postures, low image resolution, and glitches in the video recording.

Moreover, frames in which there was no participant in the field of view (i.e., the object being detected was not in the frame), which we refer to as “negative frames”, were set aside to be used as negative frames (background) in the training dataset [76].

The remaining frames were semi-randomly down-sampled such that there were approximately 10 frames per class per participant for annotation. Annotation included localization of the participant’s body within the frame and labeling of the body posture occurring in the frame. An open-source annotation tool, LabelImg [77], was used to localize the participant’s body in each frame via a rectangular bounding box that touched the edges of their body. As such, the development dataset to be used for model training and evaluation included the annotated (labeled) dataset and the negative frames (non-labeled).

Model development and evaluation

We framed the detection of sleeping position in bed as a multi-class classification (24 classes) where state-of-the-art deep learning Convolutional Neural Networks were used. In this regard, we used YOLOv5s with 7.5M parameters [78,79] including pre-trained weights from the COCO dataset and fine-tuned it on our annotated dataset to make predictions of classes. We trained our deep learning models on an NVIDIA Tesla P100 GPU virtual machine running on Google Colab Pro Plus using the PyTorch framework with a batch size of 16 and early stopping criteria [80,81].

During training, we disabled “flip augmentation” in the YOLO configuration file because we wanted our model to distinguish left and right sleeping positions as separate classes. The clinical rationale for distinguishing between left and right as separate classes is that while the human body looks symmetrical on the outside, it is not anatomically symmetrical on the inside, which has physiologic implications. On the inside, the relatively thick-walled and high-pressure aorta runs down the left side of the spinal column whereas the relatively thin-walled and low-pressure IVC runs up the right side of the spinal column. As such, the left lateral and tilt positions are not likely hemodynamically equivalent to the right lateral and tilt positions, and tilting from the supine position to the right tilt position may actually worsen the compression of the IVC (rather than relieving it like tilting to the left does) and reduces cardiac output, and this effect is supported by several studies [8287].

Using k-fold cross-validation, the participants and pertaining frames were randomly split into six non-overlapping folds (k = 6) of equal size (equal number of participants). In each loop of the cross-validation, four folds were used for training (“training set”), one fold was used for validation (“validation set”), and one fold was held out for testing (“testing set”). For each training loop, the weights that achieved the highest mean average precision (mAP) estimate across all classes on the validation set were saved. Six loops of the cross-validation procedure were completed such that each fold was given a turn to be the validation set and testing set. Finally, performance evaluation was completed using the best weights on the testing set for each loop, and precision, recall, and average precision (AP) at different intersections over union (IoU, described below) were calculated and compared across each class.

The precision for a class is the precision average across all recall (sensitivities) values between 0 and 1 at various IoU thresholds. The IoU is the area of overlap between the predicted object location and the ground truth location divided by the area of union (the total area of both the prediction and ground truth combined). During object detection, the IoU is calculated to determine whether the object is correctly detected or not. By interpolating across all points, the AP can be interpreted as the area under the curve of the precision-recall curve. For each class, we also report the AP@0.50 and the AP@.50-.95. The 0.50 in “AP@0.50” is the IoU threshold value. If the predicted IoU is greater than or equal to the threshold, it is considered a true positive. As such, the AP@0.5 means that the AP is calculated for the objects predicted with an IoU value of 0.50 or greater. The AP@.50-.95, similar to the previous definition, means the AP is calculated by considering multiple threshold values between 0.50 and 0.95 and averaging them across all those thresholds. For a given class, a very high value for AP@.50-.95 indicates that the model is more confident about its predictions. The mean average precision (mAP) across all classes was calculated by taking the mean of the AP’s across all classes being predicted by the model.

See the supplementary file S1 Appendix for more details regarding the rationale for a simulated posture study design, bias-variance trade-off in k-fold cross-validation, selection of YOLOv5s, early stopping criteria, and definitions of precision and recall.

In addition, we presented the performance evaluation of the models from each loop under a collapsed resolution (CR) condition where we reduced the total number of classes by combining classes with similar anatomic and hemodynamic implications from the perspective of uteroplacental perfusion (see the supplementary files S2 Appendix and S1 Fig).

Ethics

This study was approved by the University of Toronto Health Sciences Research Ethics Board in June 2021 (Protocol No. 27465). Written informed consent was given by all study participants.

Results

From July 5th, 2021 through September 22nd, 2021, 39 participants were assessed for eligibility. Of these, 12 (31%) were not recruited (2 gave birth prior to giving written informed consent, 1 was excluded due to twin pregnancy, and the remaining 9 declined participation)–we did not collect any data from these. Of the 27 (69%) participants that met the eligibility criteria and gave written informed consent to participate in the study, 24 (89%) successfully completed the study. Two (7%) gave birth prior to completing data collection, and one (3%) was excluded by the researchers due to irremediable technical difficulties.

Demographic characteristics

Demographic characteristics of the 24 participants included in our model are shown in Table 1. Age and height were not normally distributed and had medians of 29 years and 1.64 meters, respectively.

Table 1. Demographic characteristics of participants (n = 24) included in the computer vision model.

Characteristic Value
Age (years) 29.0 (26.8–31.3)
At time of data collection (video)
 Gestational age (weeks’) 33.7 ± 3.4
 Height (meters) 1.64 (1.63–1.65)
 Weight (kilograms) 77.7 ± 14.7
 BMI (kg/m2) 27.9 ± 5.1

Dataset

We collected 257.12 minutes of infrared 1080P video at 10 frames-per-second from which we extracted a total of 152,618 frames. Of these, 82,251 frames (53.9%, 137.33 minutes) were recorded with no bed sheets covering the body, and 70,367 (46.1%, 119.78 minutes) were recorded with bed sheets covering the body. Of the total 152,618 frames, 88,793 (58.2%) were low-quality frames and 206 (0.1%) were negative frames, which left 63,619 (41.7%) frames for annotation with the 24 classes. Of these 63,619 frames, 33,190 (52.2%) frames were with no bed sheets and 30,429 (47.8%) were with bed sheets. See Table 2 for the number of frames extracted and manually sorted for each class without bed sheets and with bed sheets.

Table 2. Total number of frames extracted for each class.

Class description Without bed sheets With bed sheets
Number of frames Number of frames
Left recovery 2562 2799
Left lateral 3333 2491
Left tilt 3130 2602
Supine 2937 3302
Supine pelvis with left thorax tilt 3527 2569
Supine pelvis with right thorax tilt 2689 2980
Supine thorax with left pelvic tilt 2486 2318
Supine thorax with right pelvic tilt 1944 1794
Right tilt 2735 2020
Right lateral 2625 2948
Right recovery 2534 1986
Sitting up at the edge of the bed 2688 2620
Remaining frames (low quality, negatives) 49061 39938

Models

Our development set included 5970 annotated frames and 206 negative frames. We used six-fold cross validation for model training and evaluation. See Table 3 for a summary of the training and validation, which is given for reference purposes. The summary includes, for each loop of the cross-validation, the number of validation frames, the number of training epochs completed prior to activation of the early stopping criteria, the epoch with the best results (highest validation mAP@0.50), and the performance parameters (validation precision, validation recall, validation mAP@0.50, and validation mAP@.50-.95) corresponding to the best results and across the 24 classes (12 classes with bed sheets covering the body, 12 classes without bed sheets covering the body).

Table 3. Summary of validation and performance parameters (validation precision, validation recall, validation mAP@0.50, and validation mAP@.50-.95) during training and validation of six models via six-fold cross-validation, across 24 classes (12 classes with bed sheets covering the body, 12 class without bed sheets covering the body).

Loop of CV Number of validation frames Number of epochs completed Best results at epoch # Validation Precision Validation Recall Validation mAP@0.50 Validation mAP@.50-.95
1 985 84 63 0.708 0.800 0.811 0.665
2 882 150 129 0.759 0.803 0.839 0.648
3 967 119 98 0.780 0.767 0.814 0.652
4 967 81 60 0.727 0.778 0.779 0.594
5 985 118 97 0.749 0.782 0.813 0.685
6 952 108 87 0.803 0.780 0.812 0.649

CV = cross-validation; mAP@0.50 = mean average precision at an intersection of union threshold of 0.50; mAP@.50-.95 = mean average precision averaged across multiple intersections of union thresholds between 0.5 and 0.95.

Table 4 provides a summary of the testing of each of the six models produced from the six-fold cross-validation. These six models are defined by the weights achieving the highest validation mAP@0.50 during the training and validation phase. For each model, the number of testing frames in the testing set, number of testing instances, and performance parameters (testing precision, testing recall, testing mAP@0.50, and testing mAP@.50-.95) across 24 classes (12 classes with bed sheets covering the body, 12 class without bed sheets covering the body) are presented.

Table 4. Summary of testing and performance parameters (testing precision, testing recall, testing mAP@0.50, and testing mAP@.50-.95) during testing of the six models produced by six-fold cross-validation, across 24 classes (12 classes with bed sheets covering the body, 12 class without bed sheets covering the body).

Model Number of testing frames Number of instances Testing Precision Testing Recall Testing mAP@0.50 Testing mAP@.50-.95
1 938 882 0.806 ± 0.128 0.757 ± 0.159 0.798 ± 0.100 0.633 ± 0.105
2 1008 952 0.822 ± 0.119 0.779 ± 0.182 0.823 ± 0.105 0.693 ± 0.104
3 1041 985 0.778 ± 0.162 0.736 ± 0.161 0.766 ± 0.144 0.663 ± 0.147
4 978 922 0.759 ± 0.112 0.743 ± 0.181 0.776 ± 0.124 0.629 ± 0.135
5 982 926 0.735 ± 0.210 0.570 ± 0.193 0.669 ± 0.177 0.537 ± 0.162
6 1023 967 0.726 ± 0.159 0.700 ± 0.180 0.721 ± 0.162 0.578 ± 0.160

Performance parameters given as mean ± standard deviation. mAP@0.50 = mean average precision at an intersection of union threshold of 0.50; mAP@.50-.95 = mean average precision averaged across multiple intersections of union thresholds between 0.5 and 0.95.

Fig 3 shows an elaboration of the results in Table 4 by presenting a grouped bar chart, and Fig 4 shows these results via a heat map. In Fig 3, the grouped bar chart shows the four performance parameters–precision, recall, mAP@0.50, and mAP@.50-.95 –from the testing phase across the six models’ testing sets and across all classes under three different conditions: (1) Red bar: a combination of the “with bed sheets” and “without bed sheets” conditions (24 classes). (2) Blue bar: the “without bed sheets” condition (12 classes). (3) Yellow bar: the “with bed sheets” condition (12 classes). The error bars represent one standard deviation of the respective value across all measures, which reflects the variability both across models (n = 6) and classes (n = 24 for combined condition; n = 12 for the without and with bed sheets conditions). In Fig 4, the heatmap shows the four performance parameters (columns)–precision, recall, AP@0.50, and AP@.50-.95 –from the testing phase averaged across the six models’ test sets for each of the predicted classes (rows) under the “without bed sheets” and “with bed sheets” condition. The “all class average” is provided as the averaged value of the respective performance parameter across the six models’ test sets and the 12 classes under each bed sheets condition, and the “combined 24 class average” is given as the average of the former two values combined.

Fig 3. Grouped bar charts of performance parameters from the testing phase (precision, recall, mAP@0.50, and mAP@.50-.95) averaged across the six models’ testing sets and across all classes, where the parameters are presented under three conditions.

Fig 3

(1) Red bar: averaged across all classes as a combination of the “with bed sheets” and “without bed sheets” conditions (24 classes). (2) Blue bar: averaged across all classes under the “without bed sheets” condition (12 classes). (3) Yellow bar: averaged across all classes under the “with bed sheets” condition (12 classes). The error bars represent one standard deviation of the respective value across all measures, which reflects the variability both across models and classes.

Fig 4. Heatmap of precision, recall, AP@0.50, and AP@.50-.95 (columns) from the testing phase averaged across the six models’ test sets for each of the predicted classes (rows) under the “without bed sheets” (upper blue row header) and “with bed sheets” condition (lower yellow row header).

Fig 4

The value of the respective performance parameter is mapped to a color spectrum from red to yellow to green where values of 0.50 or less are represented by red at the lower end of the spectrum, values around 0.75 are shades around yellow (oranger if lower than 0.75; greener if higher than 0.75), and values of 0.90 or more are represented by green at the higher end of the spectrum. The “all class average” is provided as the averaged value of the respective performance parameter across the six models’ test sets and the 12 classes under each bed sheets condition, and the “combined 24 class average” is given (red column) as the average of the former two values combined. For the “all class average” rows, the value in the AP@0.50 column is the mAP@0.50, and the value in the AP@.50-.95 column is the mAP@.50-.95 since these values represent averages across multiple classes.

On a per-condition basis, higher and more consistent values of performance were generally achieved under the “without bed sheets” condition, whereas the values for “with bed sheets” conditions were lower and had higher variability. On a per-class basis under the “without bed sheets” condition, the recovery classes had higher values (≥0.90) of AP@0.50, and the lateral, supine, and supine hybrid classes had values between 0.80 to 0.90, whereas non-hybrid tilted (left tilt, right tilt), sitting, and supine thorax with left pelvic tilt generally had lower (<0.80) AP@0.50 as averaged across the six models. When the “with bed sheets” condition is considered, the recovery classes maintained higher values (≥0.80) of AP@0.50, whereas the left lateral, supine hybrid, and sitting classes had values between 0.70 to 0.80, and the right lateral, non-hybrid tilted (left tilt, right tilt), supine, and supine pelvis with right thorax tilt classes generally had lower (<0.70) AP@0.50 as averaged across the six models. An enduring pattern with regard to the AP@0.50 across models for the “without bed sheets” and “with bed sheets” conditions is that the recovery classes scored high and non-hybrid tilted (left tilt, right tilt) classes scored low.

Fig 5 displays a running example using one of our trained models to localize and classify the sleeping position of a study participant. As shown in the figure, the participant’s body on the bed is localized by the colored bounding box. Moreover, the prediction of the sleeping position along with its confidence score (between 0 and 1) are shown at the top of each bounding box.

Fig 5. Example output of one of our trained models to localize and classify the sleeping position of a study participant.

Fig 5

Ground truth localizations and labels are on the left. Model predictions of localizations and labels are on the right.

Harms

There were no known harms related to this study. The time spent supine and in positions with a supine pelvis, while simulated in both video clips for each participant, was minimal. No participants reported symptoms of supine hypotensive syndrome.

Discussion

There exists a significant need to study sleeping positions in the third trimester of pregnancy using objective methods. These methods enable quantifying the time (“dose”) spent in various sleeping positions across this trimester and linking these “doses” to pregnancy outcomes (“responses”). Data on this dose-response is valuable and may lend support to or detract support from previous associations found between supine sleep, stillbirth, and small-for-gestation infants. The data underlying these previous associations are of suboptimal quality because they are based on subjective self-reported recollection of sleeping position and do not account for intra- and inter-night variability in sleeping position [17,18,40]. Currently, there are few clinically-approved products to monitor people’s sleep positions; however, given the unique physiology and sleep behaviors characterizing pregnancy, these products are not appropriate for use in sleep-in-pregnancy research.

To advance the field of sleep-in-pregnancy efficiently, there is a need for simple, readily accessible research tools that can be easily and widely employed in the home setting by the participant without the need for a research assistant to visit the participant’s home. Herein, we have demonstrated that models can be developed to automatically process any infrared video (e.g., from any available home-surveillance camera) as long as the camera is positioned above the head of the bed. These tools should be accurate. The American Academy of Sleep Medicine’s Manual for the Scoring of Sleep and Associated Events states that body position reporting is “required” for polysomnographic studies and “optional” for home-based studies; however, there is currently no consensus on how accurate body position reporting should be. Despite training our models on less than 10% of our collected dataset, our models achieved an overall mAP@0.50 of 0.76 (0.81 without bed sheets, 0.71 with bed sheets; see Fig 4) in the testing phase on unseen images across 24 classes. The tools must account for factors unique to pregnancy anatomy and physiology including, but not limited to, the impact of the pelvis position on uteroplacental hemodynamics and fetal physiology, the location of the low-pressure, thin-walled, and collapsible IVC on the right side of the spine, and the challenge that pregnancy places on the respiratory system, especially during sleep [19,38], and especially when supine [19,38,88,89]. The models we developed may meet this requirement–we were able to train them to detect sleeping position at a high resolution in that it accounts for the position of the pelvis and the thorax and the direction (right vs. left) at varying degrees (recovery, lateral, tilt) for a total of eleven sleeping postures. The tools, if CVT-based, must be able to compensate for the natural sleeping environment including the presence or absence of a bed partner, bed sheets, pillows, and dark or low-light conditions, which our model partially accounts for but is discussed later as a major limitation of our study. With few exceptions, all performance parameters for detected classes in the absence of bed sheets were equal to or greater than the respective value in the presence of bed sheets (see Fig 4), which was not unanticipated given the expected negative effect on performance of bed sheets obscuring the participant’s body. Sleep in the third trimester is punctuated by frequent position changes due to discomfort and frequent rising to void due to decreased bladder capacity from compression by the gravid uterus–our models can account for this and is trained to detect sitting at the edge of the bed, which signifies entry/exit events.

Over the last few years, several vision-based sleeping posture classification studies have been published including Grimm et al. (2016) [90], Liu et al. (2017) [91], Mohammadi et al. (2018) [92], Wang et al. (2019) [93], Li et al. (2022) [94], and Akbarian et al. (2019) [54]. Like Mohammadi et al. [92] and Li et al. [94], we used video from a readily available home-security camera, simulated sleeping position data, and incorporated the presence and absence of bed sheets. Mohammadi et al. [92] used a CNN algorithm (as we did), trained and validated their model using approximately 10,000 images, and completed resampling via leave-one-out (LOO) cross-validation (one participant was “held out”, and a model was trained on the remaining participants, and this was repeated for each participant). Note that LOO cross-validation is a form of k-fold where k (the number of folds) is set equal to the number of samples, n. Similarly, we used a cross-validation approach to resampling but with k-fold cross-validation (with k = 6). We were able to calculate the average recall (“average sensitivity”) from Mohammadi et al.’s testing data as 0.64 (SD 0.10) and 0.79 (SD 0.09) with and without bed sheets, respectively, which is comparable to the average recall across our six models at 0.67 (0.08) and 0.76 (SD 0.09) with and without bed sheets, respectively (see Fig 4). Comparison of Li et al.’s [94] testing performance to ours is not possible because they only present classification accuracy (not recall, precision, nor mAP) but a direct comparison of accuracy is not possible because we cannot compute it for our results–accuracy computation requires the number of true negatives [95], which is not computed by YOLO, which is a detector and does not generate negative predictions. Furthermore, standard research and clinical scoring of body position is limited to left, right, supine, prone, or upright [96]; however, for physiologic reasons unique to pregnancy, our models score body position at a higher resolution by accounting for body twist and hybrid positions (e.g., supine thorax with left pelvic tilt). As such, even if there was consensus on how accurate body position reporting should be, this would need to be extrapolated as eight of our models’ eleven detected sleeping positions are non-standard positions.

Our study has two main limitations that prevent our model from being ready for deployment in the real-world. The first limitation is related to our models’ generalization performance due to the biases in the video data. The range of our participants’ BMI’s was relatively narrow and clustered in the normal and overweight category, which limits generalizability to pregnancies with higher BMI categories (e.g., class II obesity), which are common and a specific concern vis-à-vis sleeping position. Our models were built on video data that included only one subject in the bed, which limits our models’ generalizability for multi-subject posture detection. Simultaneous multi-subject posture detection is important given the high prevalence (78–85%) of co-sleeping in pregnancy [22,24]. Moreover, our participants were asked to use thin, pattern-free bed sheets and to clear their beds of any pillows and objects except for head pillows, which is not realistic of the natural sleeping environment in pregnancy where it is common to use multiple pillows (in addition to head pillows) to support one’s body against while sleeping; therefore, it is anticipated that the performance of our model would deteriorate with patterned and/or thick bed sheets (e.g., duvet) and in the presence of a bed partner and multiple pillows. In addition, we did not account for the prone posture; however, note that the occurrence of prone posture during natural sleep in the third trimester is exceedingly rare due to increasing abdominal size [22,23,3438]. Lastly, our study was relatively small with only 24 participants. As such, our model could benefit from increased heterogeneity in participants and their environments. Currently, we are collecting a real-world video dataset of sleep in pregnancy, which will address each of these issues.

The second limitation of this study is related to data protection and privacy considerations with long-term recording of continuous nocturnal video data in the home setting. This issue limits the translation of our models into research (and possibly clinical) practice. A viable and more likely alternative to continuous long-term use is periodic sampling (e.g., recording one night per week throughout the third trimester), which should yield a good surrogate of sleeping position across the third trimester.

Supporting information

S1 Appendix. Additional methodological details.

(PDF)

S2 Appendix. Collapsed-resolution model.

(PDF)

S1 Fig. Heatmap of precision, recall, AP@0.50, and AP@.50-.95 (columns) from the testing phase averaged across the six models for each of the predicted collapsed-resolution (CR) classes (rows) under the “without bed sheets” (upper blue row header) and “with bed sheets” condition (lower yellow row header).

The value of the respective performance parameter is mapped to a colour spectrum from red to yellow to green where values of 0.50 or less are represented by red at the lower end of the spectrum, values around 0.75 are shades around yellow (oranger if lower than 0.75; greener if higher than 0.75), and values of 0.90 or more are represented by green at the higher end of the spectrum. The “all class average” is provided as the averaged value of the respective performance parameter across the six models’ test sets and the five collapsed-resolution classes under each bed sheets condition, and the combined “24 class average” is given (red column) as the average of the former two values combined. For these “all class average” rows, the value in the AP@0.50 column is a mAP@0.50, and the value in the AP@.50-.95 column is a mAP@.50-.95 since these values represent averages across multiple classes.

(TIF)

Acknowledgments

The authors would like to acknowledge and thank Ms. Alexandra Gratton for her assistance in design and promotion of recruitment advertisements for this study on social media.

Data Availability

The authors, nor the owner of the data (Shiphrah Biomedical Inc.), do not have the REB's nor the participants' permission to share the study data given that the study data are videos of study participants that cannot be de-identified. Should other researchers have questions about the data, they should contact the Research Ethics Manager, Health Sciences at the University of Toronto Research Ethics Board, whose contact information is available online (https://research.utoronto.ca/ethics-human-research/research-ethics-boards).

Funding Statement

This study was funded by a Mitacs Accelerate Program grant (No. IT 26263). Mitacs Accelerate (Ottawa, Canada), which connects companies with over 50 research-based universities through graduate students and postdoctoral fellows, who apply their specialized expertise to business challenges. Interns transfer their skills from theory to real-world application, while the companies gain a competitive advantage by accessing high-quality research expertise. In this study, the intern was HH. The university was the University of Toronto. The professor was ED. The company was Shiphrah Biomedical Inc. (Toronto, Canada). The total study funding was $15,000 CAD and was provided through Mitacs to the University of Toronto for ED to administer for the intern (HH) and the study expenses. For the grant (No. IT 26263), Mitacs provided 50% of the study funding and had no other role in the study. Mitacs contribution to the grant (No. IT 26263) was matched by SBI, which provided the remaining 50%. SBI also provided an internship experience for HH. HH was co-supervised by ED (University of Toronto) and AJK (SBI). Mitacs had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript, whereas SBI had a role in all these aspects via AJK. Mitacs Accelerate website: https://www.mitacs.ca/en/programs/accelerate Shiphrah Biomedical Inc. website: https://shiphrahbiomedical.com.

References

  • 1.Romero R, Badr MS. A Role for Sleep Disorders in Pregnancy Complications: Challenges and Opportunities. Am J Obstet Gynecol. 2014;210: 3–11. doi: 10.1016/j.ajog.2013.11.020 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Ding X-X, Wu Y-L, Xu S-J, Zhang S-F, Jia X-M, Zhu R-P, et al. A systematic review and quantitative assessment of sleep-disordered breathing during pregnancy and perinatal outcomes. Sleep Breath Schlaf Atm. 2014;18: 703–713. doi: 10.1007/s11325-014-0946-4 [DOI] [PubMed] [Google Scholar]
  • 3.Li L, Zhao K, Hua J, Li S. Association between Sleep-Disordered Breathing during Pregnancy and Maternal and Fetal Outcomes: An Updated Systematic Review and Meta-Analysis. Front Neurol. 2018;9: 91. doi: 10.3389/fneur.2018.00091 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Warland J, Dorrian J, Morrison JL, O’Brien LM. Maternal sleep during pregnancy and poor fetal outcomes: A scoping review of the literature with meta-analysis. Sleep Med Rev. 2018;41: 197–219. doi: 10.1016/j.smrv.2018.03.004 [DOI] [PubMed] [Google Scholar]
  • 5.Pamidi S, Pinto LM, Marc I, Benedetti A, Schwartzman K, Kimoff RJ. Maternal sleep-disordered breathing and adverse pregnancy outcomes: a systematic review and metaanalysis. Am J Obstet Gynecol. 2014;210: 52.e1-52.e14. doi: 10.1016/j.ajog.2013.07.033 [DOI] [PubMed] [Google Scholar]
  • 6.Xu T, Feng Y, Peng H, Guo D, Li T. Obstructive sleep apnea and the risk of perinatal outcomes: a meta-analysis of cohort studies. Sci Rep. 2014;4: 6982. doi: 10.1038/srep06982 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Pien GW, Schwab RJ. Sleep disorders during pregnancy. Sleep. 2004;27: 1405–1417. doi: 10.1093/sleep/27.7.1405 [DOI] [PubMed] [Google Scholar]
  • 8.Lu Q, Zhang X, Wang Y, Li J, Xu Y, Song X, et al. Sleep disturbances during pregnancy and adverse maternal and fetal outcomes: A systematic review and meta-analysis. Sleep Med Rev. 2021;58: 101436. doi: 10.1016/j.smrv.2021.101436 [DOI] [PubMed] [Google Scholar]
  • 9.Luque-Fernandez MA, Bain PA, Gelaye B, Redline S, Williams MA. Sleep-disordered breathing and gestational diabetes mellitus: a meta-analysis of 9,795 participants enrolled in epidemiological observational studies. Diabetes Care. 2013;36: 3353–3360. doi: 10.2337/dc13-0778 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Brown NT, Turner JM, Kumar S. The intrapartum and perinatal risks of sleep-disordered breathing in pregnancy: a systematic review and metaanalysis. Am J Obstet Gynecol. 2018;219: 147–161.e1. doi: 10.1016/j.ajog.2018.02.004 [DOI] [PubMed] [Google Scholar]
  • 11.Liu L, Su G, Wang S, Zhu B. The prevalence of obstructive sleep apnea and its association with pregnancy-related health outcomes: a systematic review and meta-analysis. Sleep Breath Schlaf Atm. 2019;23: 399–412. doi: 10.1007/s11325-018-1714-7 [DOI] [PubMed] [Google Scholar]
  • 12.Stacey T, Thompson JMD, Mitchell EA, Ekeroma AJ, Zuccollo JM, McCowan LME. Association between maternal sleep practices and risk of late stillbirth: a case-control study. BMJ. 2011;342: d3403. doi: 10.1136/bmj.d3403 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Gordon A, Raynes-Greenow C, Bond D, Morris J, Rawlinson W, Jeffery H. Sleep position, fetal growth restriction, and late-pregnancy stillbirth: the Sydney stillbirth study. Obstet Gynecol. 2015;125: 347–355. doi: 10.1097/AOG.0000000000000627 [DOI] [PubMed] [Google Scholar]
  • 14.McCowan LME, Thompson JMD, Cronin RS, Li M, Stacey T, Stone PR, et al. Going to sleep in the supine position is a modifiable risk factor for late pregnancy stillbirth; Findings from the New Zealand multicentre stillbirth case-control study. PLoS ONE. 2017;12: e0179396. doi: 10.1371/journal.pone.0179396 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Heazell A, Li M, Budd J, Thompson J, Stacey T, Cronin RS, et al. Association between maternal sleep practices and late stillbirth—findings from a stillbirth case-control study. BJOG Int J Obstet Gynaecol. 2018;125: 254–262. doi: 10.1111/1471-0528.14967 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.O’Brien LM, Warland J, Stacey T, Heazell AEP, Mitchell EA, STARS Consortium. Maternal sleep practices and stillbirth: Findings from an international case-control study. Birth Berkeley Calif. 2019;46: 344–354. doi: 10.1111/birt.12416 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Cronin RS, Li M, Thompson JMD, Gordon A, Raynes-Greenow CH, Heazell AEP, et al. An Individual Participant Data Meta-analysis of Maternal Going-to-Sleep Position, Interactions with Fetal Vulnerability, and the Risk of Late Stillbirth. EClinicalMedicine. 2019;10: 49–57. doi: 10.1016/j.eclinm.2019.03.014 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Anderson NH, Gordon A, Li M, Cronin RS, Thompson JMD, Raynes-Greenow CH, et al. Association of Supine Going-to-Sleep Position in Late Pregnancy With Reduced Birth Weight. JAMA Netw Open. 2019;2: e1912614. doi: 10.1001/jamanetworkopen.2019.12614 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Wilson DL, Fung AM, Pell G, Skrzypek H, Barnes M, Bourjeily G, et al. Polysomnographic analysis of maternal sleep position and its relationship to pregnancy complications and sleep-disordered breathing. Sleep. 2022;45: zsac032. doi: 10.1093/sleep/zsac032 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Flenady V, Wojcieszek AM, Middleton P, Ellwood D, Erwich JJ, Coory M, et al. Stillbirths: recall to action in high-income countries. Lancet Lond Engl. 2016;387: 691–702. doi: 10.1016/S0140-6736(15)01020-X [DOI] [PubMed] [Google Scholar]
  • 21.Lawn JE, Blencowe H, Waiswa P, Amouzou A, Mathers C, Hogan D, et al. Stillbirths: rates, risk factors, and acceleration towards 2030. Lancet Lond Engl. 2016;387: 587–603. doi: 10.1016/S0140-6736(15)00837-5 [DOI] [PubMed] [Google Scholar]
  • 22.Kember AJ, Scott HM, O’Brien LM, Borazjani A, Butler MB, Wells JH, et al. Modifying maternal sleep position in the third trimester of pregnancy with positional therapy: a randomised pilot trial. BMJ Open. 2018;8: e020256. doi: 10.1136/bmjopen-2017-020256 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Warland J, Dorrian J, Kember AJ, Phillips C, Borazjani A, Morrison JL, et al. Modifying Maternal Sleep Position in Late Pregnancy Through Positional Therapy: A Feasibility Study. J Clin Sleep Med JCSM Off Publ Am Acad Sleep Med. 2018;14: 1387–1397. doi: 10.5664/jcsm.7280 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Coleman J, Okere M, Seffah J, Kember A, O’Brien LM, Borazjani A, et al. The Ghana PrenaBelt trial: a double-blind, sham-controlled, randomised clinical trial to evaluate the effect of maternal positional therapy during third-trimester sleep on birth weight. BMJ Open. 2019;9: e022981. doi: 10.1136/bmjopen-2018-022981 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Flenady V, Koopmans L, Middleton P, Frøen JF, Smith GC, Gibbons K, et al. Major risk factors for stillbirth in high-income countries: a systematic review and meta-analysis. The Lancet. 2011;377: 1331–1340. doi: 10.1016/S0140-6736(10)62233-7 [DOI] [PubMed] [Google Scholar]
  • 26.Schummers L, Hutcheon JA, Bodnar LM, Lieberman E, Himes KP. Risk of adverse pregnancy outcomes by prepregnancy body mass index: a population-based study to inform prepregnancy weight loss counseling. Obstet Gynecol. 2015;125: 133–143. doi: 10.1097/AOG.0000000000000591 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Couper S, Clark A, Thompson JMD, Flouri D, Aughwane R, David AL, et al. The effects of maternal position, in late gestation pregnancy, on placental blood flow and oxygenation: an MRI study. J Physiol. 2021;599: 1901–1915. doi: 10.1113/JP280569 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Humphries A, Mirjalili SA, Tarr GP, Thompson JMD, Stone P. The effect of supine positioning on maternal hemodynamics during late pregnancy. J Matern-Fetal Neonatal Med Off J Eur Assoc Perinat Med Fed Asia Ocean Perinat Soc Int Soc Perinat Obstet. 2019;32: 3923–3930. doi: 10.1080/14767058.2018.1478958 [DOI] [PubMed] [Google Scholar]
  • 29.Stone PR, Burgess W, McIntyre JPR, Gunn AJ, Lear CA, Bennet L, et al. Effect of maternal position on fetal behavioural state and heart rate variability in healthy late gestation pregnancy. J Physiol. 2017;595: 1213–1221. doi: 10.1113/JP273201 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Kienzl D, Berger-Kulemann V, Kasprian G, Brugger PC, Weber M, Bettelheim D, et al. Risk of inferior vena cava compression syndrome during fetal MRI in the supine position–a retrospective analysis. J Perinat Med. 2014;42: 301–306. doi: 10.1515/jpm-2013-0182 [DOI] [PubMed] [Google Scholar]
  • 31.De-Giorgio F, Grassi VM, Vetrugno G, d’Aloja E, Pascali VL, Arena V. Supine Hypotensive Syndrome as the Probable Cause of Both Maternal and Fetal Death. J Forensic Sci. 2012;57: 1646–1649. doi: 10.1111/j.1556-4029.2012.02165.x [DOI] [PubMed] [Google Scholar]
  • 32.Rossi A, Cornette J, Johnson MR, Karamermer Y, Springeling T, Opic P, et al. Quantitative cardiovascular magnetic resonance in pregnant women: cross-sectional analysis of physiological parameters throughout pregnancy and the impact of the supine position. J Cardiovasc Magn Reson Off J Soc Cardiovasc Magn Reson. 2011;13: 31. doi: 10.1186/1532-429X-13-31 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Higuchi H, Takagi S, Zhang K, Furui I, Ozaki M. Effect of lateral tilt angle on the volume of the abdominal aorta and inferior vena cava in pregnant and nonpregnant women determined by magnetic resonance imaging. Anesthesiology. 2015;122: 286–293. doi: 10.1097/ALN.0000000000000553 [DOI] [PubMed] [Google Scholar]
  • 34.McIntyre JPR, Ingham CM, Hutchinson BL, Thompson JMD, McCowan LM, Stone PR, et al. A description of sleep behaviour in healthy late pregnancy, and the accuracy of self-reports. BMC Pregnancy Childbirth. 2016;16: 115. doi: 10.1186/s12884-016-0905-0 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Warland J, Dorrian J. Accuracy of Self-Reported Sleep Position in Late Pregnancy. PLOS ONE. 2014;9: e115760. doi: 10.1371/journal.pone.0115760 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.O’Brien LM, Warland J. Typical sleep positions in pregnant women. Early Hum Dev. 2014;90: 315–317. doi: 10.1016/j.earlhumdev.2014.03.001 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Wilson DL, Barnes M, Ellett L, Permezel M, Jackson M, Crowe SF. Decreased sleep efficiency, increased wake after sleep onset and increased cortical arousals in late pregnancy. Aust N Z J Obstet Gynaecol. 2011;51: 38–46. doi: 10.1111/j.1479-828X.2010.01252.x [DOI] [PubMed] [Google Scholar]
  • 38.Dunietz GL, Sever O, DeRowe A, Tauman R. Sleep position and breathing in late pregnancy and perinatal outcomes. J Clin Sleep Med. 2020;16: 955–959. doi: 10.5664/jcsm.8416 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Maasilta P, Bachour A, Teramo K, Polo O, Laitinen LA. Sleep-related disordered breathing during pregnancy in obese women. Chest. 2001;120: 1448–1454. doi: 10.1378/chest.120.5.1448 [DOI] [PubMed] [Google Scholar]
  • 40.National Institute for Health and Care Excellence, National Guideline Alliance, Royal College of Obstetricians and Gynaecologists. Antenatal Care: [W] Maternal sleep position during pregnancy—NICE guideline NG201—Evidence reviews underpinning recommendations 1.3.24 to 1.3.25. 2021. Available: https://www.ncbi.nlm.nih.gov/books/NBK573947/pdf/Bookshelf_NBK573947.pdf
  • 41.Herring SJ, Foster GD, Pien GW, Massa K, Nelson DB, Gehrman PR, et al. Do pregnant women accurately report sleep time? Sleep Breath Schlaf Atm. 2013;17: 10.1007/s11325-013-0835–2. doi: 10.1007/s11325-013-0835-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Wilson DL, Fung A, Walker SP, Barnes M. Subjective reports versus objective measurement of sleep latency and sleep duration in pregnancy. Behav Sleep Med. 2013;11: 207–221. doi: 10.1080/15402002.2012.670674 [DOI] [PubMed] [Google Scholar]
  • 43.Russo K, Bianchi MT. How Reliable Is Self-Reported Body Position during Sleep? J Clin Sleep Med JCSM Off Publ Am Acad Sleep Med. 2016;12: 127–128. doi: 10.5664/jcsm.5410 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Berndt C, Diekelmann S, Alexander N, Pustal A, Kirschbaum C. Sleep fragmentation and false memories during pregnancy and motherhood. Behav Brain Res. 2014;266: 52–57. doi: 10.1016/j.bbr.2014.02.030 [DOI] [PubMed] [Google Scholar]
  • 45.Zinke K, Lehnert V, Fritsche A, Preissl H, Hallschmid M. Pregnant women do not display impaired memory formation across one night of sleep. J Sleep Res. 2021;30: e13204. doi: 10.1111/jsr.13204 [DOI] [PubMed] [Google Scholar]
  • 46.Skarpsno ES, Mork PJ, Nilsen TIL, Holtermann A. Sleep positions and nocturnal body movements based on free-living accelerometer recordings: association with demographics, lifestyle, and insomnia symptoms. Nat Sci Sleep. 2017;9: 267–275. doi: 10.2147/NSS.S145777 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Kai-Ching Yu C. Why is Self-Report of Sleep Position Sometimes Unreliable? Sleep Hypn—Int J. 2017. [cited 19 Aug 2021]. doi: 10.5350/Sleep.Hypn.2017.19.0140 [DOI] [Google Scholar]
  • 48.How Artificial Intelligence Revolutionized Computer Vision: A Brief History. In: Motion Metrics [Internet]. 16 May 2019 [cited 26 Jul 2021]. Available: https://www.motionmetrics.com/how-artificial-intelligence-revolutionized-computer-vision-a-brief-history/
  • 49.Szeliski R. Computer Vision: Algorithms and Applications. 2nd ed. London: Springer London; 2021. doi: 10.1007/978-1-84882-935-0 [DOI] [Google Scholar]
  • 50.Aroeira RMC, de Las Casas EB, Pertence AEM, Greco M, Tavares JMRS. Non-invasive methods of computer vision in the posture evaluation of adolescent idiopathic scoliosis. J Bodyw Mov Ther. 2016;20: 832–843. doi: 10.1016/j.jbmt.2016.02.004 [DOI] [PubMed] [Google Scholar]
  • 51.Li MH, Yadollahi A, Taati B. Noncontact Vision-Based Cardiopulmonary Monitoring in Different Sleeping Positions. IEEE J Biomed Health Inform. 2017;21: 1367–1375. doi: 10.1109/JBHI.2016.2567298 [DOI] [PubMed] [Google Scholar]
  • 52.Akbarian S, Ghahjaverestan NM, Yadollahi A, Taati B. Noncontact Sleep Monitoring With Infrared Video Data to Estimate Sleep Apnea Severity and Distinguish Between Positional and Nonpositional Sleep Apnea: Model Development and Experimental Validation. J Med Internet Res. 2021;23: e26524. doi: 10.2196/26524 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53.Akbarian S, Montazeri Ghahjaverestan N, Yadollahi A, Taati B. Distinguishing Obstructive Versus Central Apneas in Infrared Video of Sleep Using Deep Learning: Validation Study. J Med Internet Res. 2020;22: e17252. doi: 10.2196/17252 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Akbarian S, Delfi G, Zhu K, Yadollahi A, Taati B. Automated Non-Contact Detection of Head and Body Positions During Sleep. IEEE Access. 2019;7: 72826–72834. doi: 10.1109/ACCESS.2019.2920025 [DOI] [Google Scholar]
  • 55.Zhu K, Li M, Akbarian S, Hafezi M, Yadollahi A, Taati B. Vision-Based Heart and Respiratory Rate Monitoring During Sleep–A Validation Study for the Population at Risk of Sleep Apnea. IEEE J Transl Eng Health Med. 2019;7: 1–8. doi: 10.1109/JTEHM.2019.2946147 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Yue S, Yang Y, Wang H, Rahul H, Katabi D. BodyCompass: Monitoring Sleep Posture with Wireless Signals. Proc ACM Interact Mob Wearable Ubiquitous Technol. 2020;4: 66:1–66:25. doi: 10.1145/3397311 [DOI] [Google Scholar]
  • 57.Ferrer-Lluis I, Castillo-Escario Y, Montserrat JM, Jané R. SleepPos App: An Automated Smartphone Application for Angle Based High Resolution Sleep Position Monitoring and Treatment. Sensors. 2021;21: 4531. doi: 10.3390/s21134531 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 58.Ferrer-Lluis I, Castillo-Escario Y, Montserrat JM, Jané R. Enhanced Monitoring of Sleep Position in Sleep Apnea Patients: Smartphone Triaxial Accelerometry Compared with Video-Validated Position from Polysomnography. Sensors. 2021;21: 3689. doi: 10.3390/s21113689 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Ferrer-Lluis I, Castillo-Escario Y, Montserrat JM, Jané R. Analysis of Smartphone Triaxial Accelerometry for Monitoring Sleep-Disordered Breathing and Sleep Position at Home. IEEE Access. 2020;8: 71231–71244. doi: 10.1109/ACCESS.2020.2987488 [DOI] [Google Scholar]
  • 60.Castillo-Escario Y, Ferrer-Lluis I, Montserrat JM, Jané R. Entropy Analysis of Acoustic Signals Recorded With a Smartphone for Detecting Apneas and Hypopneas: A Comparison With a Commercial System for Home Sleep Apnea Diagnosis. IEEE Access. 2019;7: 128224–128241. doi: 10.1109/ACCESS.2019.2939749 [DOI] [Google Scholar]
  • 61.Loube DI, Poceta JS, Morales MC, Peacock MD, Mitler MM. Self-reported snoring in pregnancy. Association with fetal outcome. Chest. 1996;109: 885–889. doi: 10.1378/chest.109.4.885 [DOI] [PubMed] [Google Scholar]
  • 62.Oksenberg A, Dynia A, Nasser K, Gadoth N. Obstructive sleep apnoea in adults: body postures and weight changes interactions. J Sleep Res. 2012;21: 402–409. doi: 10.1111/j.1365-2869.2011.00988.x [DOI] [PubMed] [Google Scholar]
  • 63.Jung S, Zaremba S, Heisig A, Eikermann M. Elevated body position early after delivery increased airway size during wakefulness, and decreased apnea hypopnea index in a woman with pregnancy related sleep apnea. J Clin Sleep Med JCSM Off Publ Am Acad Sleep Med. 2014;10: 815–817. doi: 10.5664/jcsm.3886 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 64.Zaremba S, Mueller N, Heisig AM, Shin CH, Jung S, Leffert LR, et al. Elevated upper body position improves pregnancy-related OSA without impairing sleep quality or sleep architecture early after delivery. Chest. 2015;148: 936–944. doi: 10.1378/chest.14-2973 [DOI] [PubMed] [Google Scholar]
  • 65.Khatib N, Weiner Z, Beloosesky R, Vitner D, Thaler I. The effect of maternal supine position on umbilical and cerebral blood flow indices. Eur J Obstet Gynecol Reprod Biol. 2014;175: 112–114. doi: 10.1016/j.ejogrb.2013.12.043 [DOI] [PubMed] [Google Scholar]
  • 66.Nakai Y, Mine M, Nishio J, Maeda T, Imanaka M, Ogita S. Effects of maternal prone position on the umbilical arterial flow. Acta Obstet Gynecol Scand. 1998;77: 967–969. [PubMed] [Google Scholar]
  • 67.Ryo E, Okai T, Kozuma S, Kobayashi K, Kikuchi A, Taketani Y. Influence of compression of the inferior vena cava in the late second trimester on uterine and umbilical artery blood flow. Int J Gynaecol Obstet Off Organ Int Fed Gynaecol Obstet. 1996;55: 213–218. doi: 10.1016/s0020-7292(96)02760-9 [DOI] [PubMed] [Google Scholar]
  • 68.Abaci Turk E, Abulnaga SM, Luo J, Stout JN, Feldman HA, Turk A, et al. Placental MRI: Effect of maternal position and uterine contractions on placental BOLD MRI measurements. Placenta. 2020;95: 69–77. doi: 10.1016/j.placenta.2020.04.008 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 69.Sahin FK, Koken G, Cosar E, Saylan F, Fidan F, Yilmazer M, et al. Obstructive sleep apnea in pregnancy and fetal outcome. Int J Gynaecol Obstet Off Organ Int Fed Gynaecol Obstet. 2008;100: 141–146. doi: 10.1016/j.ijgo.2007.08.012 [DOI] [PubMed] [Google Scholar]
  • 70.Fung AM, Wilson DL, Lappas M, Howard M, Barnes M, O’Donoghue F, et al. Effects of maternal obstructive sleep apnoea on fetal growth: a prospective cohort study. PloS One. 2013;8: e68057. doi: 10.1371/journal.pone.0068057 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 71.Wilson DL, Howard ME, Fung AM, O’Donoghue FJ, Barnes M, Lappas M, et al. The presence of coexisting sleep-disordered breathing among women with hypertensive disorders of pregnancy does not worsen perinatal outcome. PloS One. 2020;15: e0229568. doi: 10.1371/journal.pone.0229568 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 72.Olivarez SA, Maheshwari B, McCarthy M, Zacharias N, van den Veyver I, Casturi L, et al. Prospective trial on obstructive sleep apnea in pregnancy and fetal heart rate monitoring. Am J Obstet Gynecol. 2010;202: 552.e1–7. doi: 10.1016/j.ajog.2009.12.008 [DOI] [PubMed] [Google Scholar]
  • 73.Lucchini M, Wapner RJ, Chia-Ling N-C, Torres C, Yang J, Williams IA, et al. Effects of maternal sleep position on fetal and maternal heart rate patterns using overnight home fetal ECG recordings. Int J Gynaecol Obstet Off Organ Int Fed Gynaecol Obstet. 2020;149: 82–87. doi: 10.1002/ijgo.13096 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 74.The R Foundation for Statistical Computing. R Statistical Software. 2021.
  • 75.FFmpeg Developers. FFmpeg. 2021. Available: https://ffmpeg.org/
  • 76.Bochkovskiy A. Projects · AlexeyAB/darknet. In: GitHub [Internet]. [cited 1 Jun 2022]. Available: https://github.com/AlexeyAB/darknet
  • 77.Tzutalin. LabelImg Free Software. 2015. Available: https://github.com/heartexlabs/labelImg
  • 78.Home · ultralytics/yolov5 Wiki. In: GitHub [Internet]. [cited 7 Jun 2022]. Available: https://github.com/ultralytics/yolov5
  • 79.YOLOv5 Documentation. [cited 7 Jun 2022]. Available: https://docs.ultralytics.com/
  • 80.NVIDIA Tesla P100: The Most Advanced Data Center Accelerator. In: NVIDIA [Internet]. [cited 7 Jun 2022]. Available: https://www.nvidia.com/en-us/data-center/tesla-p100/
  • 81.Google Colaboratory. [cited 7 Jun 2022]. Available: https://research.google.com/colaboratory/faq.html
  • 82.Fujita N, Higuchi H, Sakuma S, Takagi S, Latif MAHM, Ozaki M. Effect of Right-Lateral Versus Left-Lateral Tilt Position on Compression of the Inferior Vena Cava in Pregnant Women Determined by Magnetic Resonance Imaging. Anesth Analg. 2019;128: 1217–1222. doi: 10.1213/ANE.0000000000004166 [DOI] [PubMed] [Google Scholar]
  • 83.Bamber JH, Dresner M. Aortocaval Compression in Pregnancy: The Effect of Changing the Degree and Direction of Lateral Tilt on Maternal Cardiac Output. Anesth Analg. 2003;97: 256–258. doi: 10.1213/01.ane.0000067400.79654.30 [DOI] [PubMed] [Google Scholar]
  • 84.Saravanakumar K, Hendrie M, Smith F, Danielian P. Influence of reverse Trendelenburg position on aortocaval compression in obese pregnant women. Int J Obstet Anesth. 2016;26: 15–18. doi: 10.1016/j.ijoa.2015.09.007 [DOI] [PubMed] [Google Scholar]
  • 85.Humphries A, Thompson JMD, Stone P, Mirjalili SA. The effect of positioning on maternal anatomy and hemodynamics during late pregnancy. Clin Anat. 2020;33: 943–949. doi: 10.1002/ca.23614 [DOI] [PubMed] [Google Scholar]
  • 86.Cluver C, Novikova N, Hofmeyr GJ, Hall DR. Maternal position during caesarean section for preventing maternal and neonatal complications. Cochrane Database Syst Rev. 2013; CD007623. doi: 10.1002/14651858.CD007623.pub3 [DOI] [PubMed] [Google Scholar]
  • 87.Fields JM, Catallo K, Au AK, Rotte M, Leventhal D, Weiner S, et al. Resuscitation of the pregnant patient: What is the effect of patient positioning on inferior vena cava diameter? Resuscitation. 2013;84: 304–308. doi: 10.1016/j.resuscitation.2012.11.011 [DOI] [PubMed] [Google Scholar]
  • 88.Prodromakis E, Trakada G, Tsapanos V, Spiropoulos K. Arterial oxygen tension during sleep in the third trimester of pregnancy. Acta Obstet Gynecol Scand. 2004;83: 159–164. doi: 10.1111/j.0001-6349.2004.00289.x [DOI] [PubMed] [Google Scholar]
  • 89.Hignett R, Fernando R, McGlennan A, McDonald S, Stewart A, Columb M, et al. A randomized crossover study to determine the effect of a 30° head-up versus a supine position on the functional residual capacity of term parturients. Anesth Analg. 2011;113: 1098–1102. doi: 10.1213/ANE.0b013e31822bf1d2 [DOI] [PubMed] [Google Scholar]
  • 90.Grimm T, Martinez M, Benz A, Stiefelhagen R. Sleep position classification from a depth camera using Bed Aligned Maps. 2016 23rd International Conference on Pattern Recognition (ICPR). 2016. pp. 319–324. doi: 10.1109/ICPR.2016.7899653 [DOI] [Google Scholar]
  • 91.Liu S, Yin Y, Ostadabbas S. In-Bed Pose Estimation: Deep Learning with Shallow Dataset. IEEE J Transl Eng Health Med. 2019;7: 1–12. doi: 10.1109/JTEHM.2019.2892970 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 92.Mohammadi SM, Alnowami M, Khan S, Dijk D-J, Hilton A, Wells K. Sleep Posture Classification using a Convolutional Neural Network. Annu Int Conf IEEE Eng Med Biol Soc IEEE Eng Med Biol Soc Annu Int Conf. 2018;2018: 1–4. doi: 10.1109/EMBC.2018.8513009 [DOI] [PubMed] [Google Scholar]
  • 93.Wang Y-K, Chen H-Y, Chen J-R. Unobtrusive Sleep Monitoring Using Movement Activity by Video Analysis. Electronics. 2019;8: 812. doi: 10.3390/electronics8070812 [DOI] [Google Scholar]
  • 94.Li Y-Y, Wang S-J, Hung Y-P. A Vision-Based System for In-Sleep Upper-Body and Head Pose Classification. Sensors. 2022;22: 2014. doi: 10.3390/s22052014 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 95.Baratloo A, Hosseini M, Negida A, El Ashal G. Part 1: Simple Definition and Calculation of Accuracy, Sensitivity and Specificity. Emergency. 2015;3: 48–49. [PMC free article] [PubMed] [Google Scholar]
  • 96.The AASM Manual for the Scoring of Sleep and Associated Events. Version 2.6. American Academy of Sleep Medicine; 2020
PLOS Digit Health. doi: 10.1371/journal.pdig.0000353.r001

Decision Letter 0

Alexander Wong, Heather Mattie

20 Apr 2023

PDIG-D-22-00350

Vision-based detection and quantification of maternal sleeping position in the third trimester of pregnancy in the home setting – building the dataset and model

PLOS Digital Health

Dear Dr. Kember,

Thank you for submitting your manuscript to PLOS Digital Health. After careful consideration, we feel that it has merit but does not fully meet PLOS Digital Health's publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process.

Please submit your revised manuscript within 60 days Jun 19 2023 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at digitalhealth@plos.org. When you're ready to submit your revision, log on to https://www.editorialmanager.com/pdig/ and select the 'Submissions Needing Revision' folder to locate your manuscript file.

Please include the following items when submitting your revised manuscript:

* A rebuttal letter that responds to each point raised by the editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

* A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

* An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.

We look forward to receiving your revised manuscript.

Kind regards,

Heather Mattie

Academic Editor

PLOS Digital Health

Journal Requirements:

1. We ask that a manuscript source file is provided at Revision. Please upload your manuscript file as a .doc, .docx, .rtf or .tex.

Additional Editor Comments (if provided):

Please address all comments and suggestions noted by Reviewers.

[Note: HTML markup is below. Please do not edit.]

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. Does this manuscript meet PLOS Digital Health’s publication criteria? Is the manuscript technically sound, and do the data support the conclusions? The manuscript must describe methodologically and ethically rigorous research with conclusions that are appropriately drawn based on the data presented.

Reviewer #1: Partly

Reviewer #2: Yes

--------------------

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: I don't know

Reviewer #2: Yes

--------------------

3. Have the authors made all data underlying the findings in their manuscript fully available (please refer to the Data Availability Statement at the start of the manuscript PDF file)?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception. The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: No

Reviewer #2: No

--------------------

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS Digital Health does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

--------------------

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: This study reports on an attempt to assess body position during sleep using video imaging and computer technology. The goal is to fill the gap in this technology by including pregnant people in order to better assess sleep position and pregnancy prospectively. The need to fill the scab is adequately established and the modeling is detailed and extensive. My primary concern with the study is the possibility of generalization to real world views. The fact that they required no additional pillows in the sleeping area set up an unrealistic sleep environment for the pregnant person. In the third trimester, the majority of pregnant people support their bodies in various positions using a combination of traditional pillows, body pillows, and sleep wedges. These additions may make this technology no longer functional, and I would have liked to see at least some attempts at incorporating these sleep aids in the videos.

1. Author summary, line 46: use the phrase “sleeping on the back” but the more common term used in the literature is “supine sleep”. You could consider replacing this for consistency.

2. Introduction, line 76–77: there are other risk factors with far larger effect sizes and then many of these, such as pregestational diabetes, lupus, and previous pregnancy morbidity. Consider limiting this to a list of potentially modifiable factors. I appreciate, however, that you acknowledge that weight and body size is not realistically modifiable for the majority of people.

3. Introduction, lines 81–88: this paragraph could be moved to the discussion.

4. Introduction, lines 1 27–1 43: the majority of this could also be moved to discussion.

5. Materials and methods, line 194–195: this is incorrect. You did, in fact, collect personal health information as names and addresses are part of personal health information.

6. Materials and methods, lines 211–212: this is my main challenge and accepting the importance of this paper. Removal of all pillows and objects from the bed except for head pillows is not consistent with how the majority of their trimester pregnant people sleep. Please either include an arm in which people do have pillows and wedges or justify the exclusion of this.

7. Materials and methods, line 306: this is a typo; the IVC runs up the right side of the spinal column.

8. Results, table one: this is a fairly narrow and low range of BMIs. A limitation of your study is also generalizability to hire VMI, which is common in pregnancy and is a specific concern with regards to sleep position.

9. Discussion, lines 494–495: this is conjecture and not clear from what you present.

10. Discussion, lines 538–545: I would emphasize these limitations more strongly and included acknowledgment that many pregnant people sleep in a bed full of support pillows. Also acknowledge limited BMI range.

Reviewer #2: This article presents an automated analysis technique to identify sleep position in pregnancy. This is a worthwhile tool to develop, due to the lack of data on changes in sleep position in late pregnancy, where supine sleep is a modifiable risk factor for stillbirth. Participants were videoed sleeping in their own homes, but on beds with light unpatterned sheets (or no sheets) and with no pillows interfering with the field of view.

The motivation methods and results are well written and clear. However, given the results are limited by the set up of the participant imaging I would expect more detailed comment on the possible loss ability of the method to detect sleeping positions with these simplifying factors removed. Patterned sheets or a co-sleeper would reduce accuracy, are there possible (more advanced?) techniques that could be tried in the future to remedy this?

Related to this is the need for a clearer discussion on what kind of accuracy might be acceptable for the algorithms to meet their purpose in clinical and research studies. It is clear that the accuracy in your method is comparable to other methods for detecting sleep position, but what would be an acceptable accuracy for this type of study for this type of algorithm to replace, say, manual identification of sleep position? How close is your algorithm to this desired accuracy?

The article refers to a website that will in the future allow researchers to conduct similar analyses. When clicking on the weblink the website states “Coming august 2023” – if the website is not currently available, it can’t be reviewed and I question whether the link should be provided.

--------------------

6. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

Do you want your identity to be public for this peer review? If you choose “no”, your identity will remain anonymous but your review may still be made public.

For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

--------------------

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com/. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at figures@plos.org. Please note that Supporting Information files do not need this step.

PLOS Digit Health. doi: 10.1371/journal.pdig.0000353.r003

Decision Letter 1

Alexander Wong, Chrystinne Oliveira Fernandes

17 Aug 2023

Vision-based detection and quantification of maternal sleeping position in the third trimester of pregnancy in the home setting – building the dataset and model

PDIG-D-22-00350R1

Dear Dr. Kember,

We are pleased to inform you that your manuscript 'Vision-based detection and quantification of maternal sleeping position in the third trimester of pregnancy in the home setting – building the dataset and model' has been provisionally accepted for publication in PLOS Digital Health.

Before your manuscript can be formally accepted you will need to complete some formatting changes, which you will receive in a follow-up email from a member of our team. 

Please note that your manuscript will not be scheduled for publication until you have made the required changes, so a swift response is appreciated.

IMPORTANT: The editorial review process is now complete. PLOS will only permit corrections to spelling, formatting or significant scientific errors from this point onwards. Requests for major changes, or any which affect the scientific understanding of your work, will cause delays to the publication date of your manuscript.

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they'll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact digitalhealth@plos.org.

Thank you again for supporting Open Access publishing; we are looking forward to publishing your work in PLOS Digital Health.

Best regards,

Chrystinne Oliveira Fernandes

Academic Editor

PLOS Digital Health

***********************************************************

Reviewer Comments (if any, and for reference):

Reviewer's Responses to Questions

Comments to the Author

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #1: (No Response)

Reviewer #2: All comments have been addressed

**********

2. Does this manuscript meet PLOS Digital Health’s publication criteria? Is the manuscript technically sound, and do the data support the conclusions? The manuscript must describe methodologically and ethically rigorous research with conclusions that are appropriately drawn based on the data presented.

Reviewer #1: Yes

Reviewer #2: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: Yes

**********

4. Have the authors made all data underlying the findings in their manuscript fully available (please refer to the Data Availability Statement at the start of the manuscript PDF file)?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception. The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: No

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS Digital Health does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: 1.Title: I appreciate the changes in language to emphasize this is a simulation and not evaluation of actual sleep. I suggest changing the title to reflect this, for example “Vision-based detection and quantification of simulated maternal sleeping position in the third trimester of pregnancy – building the dataset and model.”

2.Introduction, lines 78-80: I think I was unclear with my previous comment about this section. I am realizing that by “leading” you may mean “most common in the population.” Chronic HTN and diabetes have larger effect sizes and could be argued to be leading in that sense.

3.Introduction, lines 83-90: as you explain in the paragraph lines 100-109, the data on sleep position and stillbirth is mostly retrospective and limited. Because of this, I would put qualifiers on your calculations of attributable risk. The causality of this relationship is weak.

4.Introduction – it is not clear that the authors have notably edited the introduction to be more brief/concise. It remains quite long and includes details that could be in the discussion, as previously mentioned.

Reviewer #2: The authors have addressed my concerns. Thank you for making these revisions.

**********

7. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

Do you want your identity to be public for this peer review? If you choose “no”, your identity will remain anonymous but your review may still be made public.

For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

**********

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 Appendix. Additional methodological details.

    (PDF)

    S2 Appendix. Collapsed-resolution model.

    (PDF)

    S1 Fig. Heatmap of precision, recall, AP@0.50, and AP@.50-.95 (columns) from the testing phase averaged across the six models for each of the predicted collapsed-resolution (CR) classes (rows) under the “without bed sheets” (upper blue row header) and “with bed sheets” condition (lower yellow row header).

    The value of the respective performance parameter is mapped to a colour spectrum from red to yellow to green where values of 0.50 or less are represented by red at the lower end of the spectrum, values around 0.75 are shades around yellow (oranger if lower than 0.75; greener if higher than 0.75), and values of 0.90 or more are represented by green at the higher end of the spectrum. The “all class average” is provided as the averaged value of the respective performance parameter across the six models’ test sets and the five collapsed-resolution classes under each bed sheets condition, and the combined “24 class average” is given (red column) as the average of the former two values combined. For these “all class average” rows, the value in the AP@0.50 column is a mAP@0.50, and the value in the AP@.50-.95 column is a mAP@.50-.95 since these values represent averages across multiple classes.

    (TIF)

    Attachment

    Submitted filename: Response to Reviewers.docx

    Data Availability Statement

    The authors, nor the owner of the data (Shiphrah Biomedical Inc.), do not have the REB's nor the participants' permission to share the study data given that the study data are videos of study participants that cannot be de-identified. Should other researchers have questions about the data, they should contact the Research Ethics Manager, Health Sciences at the University of Toronto Research Ethics Board, whose contact information is available online (https://research.utoronto.ca/ethics-human-research/research-ethics-boards).


    Articles from PLOS Digital Health are provided here courtesy of PLOS

    RESOURCES