Skip to Content
InformationInformation
  • Article
  • Open Access

2 December 2024

31 Pages

In-Bed Posture Classification Using Pressure Data from a Sensor Sheet Under the Mattress

,
and
1
Polytechnic Institute of Castelo Branco, 6000-081 Castelo Branco, Portugal
2
CISeD—Research Center in Digital Services, Instituto Politécnico de Viseu, 3504-510 Viseu, Portugal
*
Author to whom correspondence should be addressed.

Abstract

Monitoring and controlling the condition of bedridden individuals can help reduce health risks, as improper nocturnal habits or body positioning can exacerbate issues such as apnea, insomnia, sleep disorders, spinal problems, and pressure ulcers. Techniques using pressure maps from sensors placed on top of the mattress, along with machine learning (ML) algorithms to classify main postures (prone, supine, left side, right side), have achieved up to 99% accuracy. This study evaluated the feasibility of using a sensor sheet placed under the mattress to minimize patient discomfort. Experiments with ten commonly used ML algorithms achieved average accuracy values ranging from 79.14% to 98.93% using K-Fold cross-validation and from 80.03% to 97.14% using Leave-One-Group-Out (LOGO) for classifying the four main postures. The classification was extended to include 28 posture variations (7 variations for each of the 4 main postures), with the SVM algorithm achieving an accuracy of 65.18% in K-Fold validation, marking a significant improvement over previous studies, particularly regarding the number of postures considered. Comparisons with previous studies that used pressure sensors placed both under and on top of the mattress show that this approach achieves comparable accuracy to other methods, surpassing them with some algorithms and achieving the highest average accuracy. In conclusion, using sensors under the mattress is an effective and less invasive alternative for posture classification.

1. Introduction

Controlling and monitoring the condition of individuals during periods when they are bedridden can contribute to reducing health risks, as poor nocturnal habits or improper body positioning can exacerbate various health issues. In this context, the postures assumed while lying down have been studied as potential factors in increasing health risks associated with conditions such as apnea, insomnia, sleep disorders, spinal issues, and pressure ulcers [1,2,3]. Monitoring patients’ conditions can be a time-consuming task for healthcare professionals, therefore, various approaches utilizing different technologies have been developed to monitor how individuals position themselves while bedridden. These technologies include polysomnography, sensors, wristbands, and video cameras [4,5].
Some methods use pressure maps obtained from sensors placed on top of the mattress to be less intrusive for patients, employing machine learning (ML) techniques to classify the patient’s postures. These methods are less intrusive than those involving devices or sensors placed directly on the patient or video imaging and typically achieve high classification accuracy, generally above 95% and up to 99% in some cases when considering the four main postures (prone, supine, left side, and right side) (e.g., [6,7,8,9]).
Sensor sheets placed on top of the mattress generate pressure maps representing the postures of bedridden individuals and generally provide good classification accuracy but have some drawbacks. They can lead to discomfort such as friction or shifting due to movement. Thus, the quest for less intrusive solutions for posture classification has led to the exploration of sensor sheets placed under the mattress. This approach, being less intrusive, presents an interesting challenge and is the focus of this study.
The objective of this study was to evaluate the feasibility of using ML algorithms to classify the postures of bedridden individuals by analyzing pressure maps collected from sensor sheets placed under the mattress. The experiments conducted using ten of the most used ML algorithms in related work show that it is possible to classify the four main postures with an accuracy close to 95%. This suggests that posture classification based on sensor sheets placed under the mattress may be feasible and less intrusive for bedridden individuals.
More specifically, the main contributions of this work are:
  • Analyze and validate the use of ML algorithms in classifying bedridden individuals’ postures based on sensor sheets placed under the mattress. This approach differs from existing methods which commonly use sensor sheets placed on top of the mattress, making it a less intrusive option for bedridden patients.
  • Validate the use of the data layer from the PoPu dataset [10] obtained from the sensor sheet placed under the mattress. To the best of our knowledge, this is the first study to use this data layer from this dataset that validates its use with 10 ML algorithms and compares the results in posture classification with those achieved using sensor sheets placed on top of the mattress.
This article is organized into six sections. The initial section presents the general framework, motivation, and specific objectives of this work. Section II provides an analysis of related work that has addressed posture recognition in bedridden patients, specifically focusing on posture classification based on information obtained from pressure sensors placed underneath the mattress. Section III describes the proposed methodology. Section IV details the results which are discussed in Section V. Section VI presents the conclusions and identifies potential future research directions.

3. Methodology

3.1. Dataset

The PoPu dataset [10] includes two layers of pressure maps from 60 bedridden individuals: one layer was obtained from a sensor sheet placed on top of the mattress and the other from a sensor sheet placed under the mattress, with records of their pressure map, weight, height, and sex. Participants were positioned in 28 different configurations, divided into 7 variations of the four main postures: supine, prone, left side, and right side. These posture variations included body positioning such as legs extended, crossed, or bent, and the presence of a pillow measuring 50 cm by 70 cm and 30 cm by 50 cm under the head, body, or between the legs. Data collection resulted in 50,400 pressure data samples and the dataset was formatted in JavaScript Object Notation (JSON) and organized into two folders representing each sensor. The sensor placed above the mattress was a Tactilus sensor sheet with 1729 piezoelectric sensors arranged in a 64 × 27 matrix, whereas the sensor placed under the mattress was a SensoMatt sensor sheet containing 72 pressure sensors placed in a 12 × 6 matrix covering a surface area of 170 cm by 84 cm. Only the data obtained through the SensoMatt sensor sheet are used in this study to classify the postures of bedridden individuals”.

3.2. Data Analysis

Initially, the data were analyzed and pre-processed to ensure consistency and suitability for the different models implemented. This involved formatting the data, splitting the dataset into training and testing sets, and organizing it by participant. To prevent data from the same participant appearing in both the training and testing sets, the data was first grouped by participant ID, then randomized and allocated to the respective groups.
Each algorithm underwent initial training and testing to be evaluated using metrics such as accuracy, F1-score, and recall. During the training stage, methods were applied to optimize model parameters, with GridSearchCV being the primary technique. This technique uses cross-validation to find the best parameter combinations for improving model accuracy. In certain cases, other optimization techniques, like Keras Tuner, were employed, especially for Keras or TensorFlow models.
The models were then assessed using Group K-Fold Cross-Validation and Leave-One-Group-Out (LOGO). Group K-Fold ensures that groups do not overlap, and that each participant’s data is used either in the training or testing set, but not both. LOGO divides the dataset by participants, leaving all instances of one participant out as the test set in each iteration. In each iteration, one subset serves as the test set while the others are used for training. This process was repeated based on the total number of participants.

3.3. Algorithms

The selection of algorithms for processing and classifying the dataset was a crucial step, as the model’s performance depends significantly on the chosen algorithm. Initially, the choice of algorithms was based on the literature review (described in Section 2) but due to the limited number of studies, it was further informed by the systematic review in [11] which highlighted the effectiveness and performance of various algorithms and models based on pressure sensor data.
Study [15] employed a FeedForward Neural Network (FNN) to effectively capture complex relationships between input and output data and performed well in classification problems with numerous features. Study [16] used Temporal Convolutional Networks (TCN) which are well-suited for sequential data as they capture long-term temporal dependencies and use causal convolutions to ensure that the model relies only on past data for predictions. Convolutional Neural Networks (CNN) and Deep Neural Networks (DNN) demonstrated strong performance and accuracy in posture classification. Furthermore, while the k-Nearest Neighbors (KNN) algorithm is often used, it mainly serves as a comparative benchmark. Despite the generally superior performance of neural networks, the Support Vector Machine (SVM) model was an exception, achieving accuracy above 99%. Finally, the algorithms and models selected for this study included: KNN, SVM, Decision Trees (DT), Gradient Boosting (GB), Random Forest (RF), Naive Bayes (NB), TCN, Feedforward Artificial Neural Network (FFANN), CNN, and ResNet-18. Hyperparameter tuning was performed using techniques like GridSearchCV (sklearn 1.2.2) to identify the best parameter combinations to fine-tune the models to achieve the highest possible accuracy while avoiding overfitting. Key metrics such as accuracy, recall, and F1-score were calculated to assess the model performance, and cross-validation techniques such as GroupKFold and LOGO were employed to further validate the selected models.

4. Results

In the following sections, the experiments and results of applying each of the 10 selected algorithms for classifying the 4 main postures are described, along with an additional experiment for classifying 28 postures. For each experiment, the parameter optimization and the results for the metrics Accuracy, Recall, and F1-Score are presented, using Group K-Fold Cross-Validation and LOGO.

4.1. Classification of the Four Main Postures

In the following sections, the experiments and results of applying each of the selected algorithms for classifying the 4 main postures are described.

4.1.1. K-Nearest Neighbors

During the training process, GridSearchCV identified that the optimal parameters were n_neighbors = 6 and metric = manhattan, achieving an accuracy of 97.38%. In the testing process, these optimal parameters achieved an accuracy of 93.66% (Table 1).
Table 1. Initial KNN results.
The classification report in Table 2 and the confusion matrix in Figure 1 provide a detailed view of true positives, true negatives, false positives, and false negatives for each posture. The model exhibited higher accuracy for the left and right postures but lower recall, whereas the prone and supine postures had higher recall but lower accuracy. The overall accuracy was 93.66, and the F1-score was balanced, ranging between 92.93% and 94.66%
Table 2. KNN classification report.
Figure 1. KNN confusion matrix.
The GroupKFold cross-validation showed an average accuracy of 92.02%, with values ranging from 87.59% to 96.06% (Table 3). The most frequently used parameters were n_neighbors between 6 and 8, with the Manhattan distance metric (Figure 2).
Table 3. KNN cross-validation results.
Figure 2. KNN frequency of best parameters.
For the LOGO cross-validation, the model achieved an average accuracy of 93.28%, a recall of 93.28%, and an F1-score of 93.28%, as shown in Figure 3, indicating that the KNN model performed well and maintained high performance across participants, demonstrating strong generalization.
Figure 3. KNN LOGO performance (due to the similarity between the recall and accuracy values, both lines overlap, making the recall line not visible).

4.1.2. Support Vector Machine

During the training process, the optimal parameters were identified as C = 1, kernel = rbf, and gamma = scale, achieving an accuracy of 97.16%. In the testing process using these best parameters, the result was an accuracy of 98.54% (Table 4).
Table 4. Initial results of SVM.
The model performed exceptionally well, achieving high and balanced accuracy, recall, and F1-score across all postures, with an average score of 98.54%. The confusion matrix in Figure 4 further confirms that the model accurately classifies each posture without significant discrepancies, indicating strong and consistent performance. Table 5 and Figure 4 show that the model maintains a high degree of accuracy and consistency across different evaluations.”
Figure 4. SVM confusion matrix.
Table 5. SVM classification report.
In the cross-validation of the SVM model (Table 6) demonstrate consistent accuracy, ranging from 94.70% to 98.65%, with an average of 96.55%. Figure 5 illustrates the frequency of the best parameters, showing that the values for C were either 10 or 1, the gamma parameter was consistently ‘scale’, and the kernel was always ‘rbf’.
Table 6. SVM cross-validation results.
Figure 5. SVM frequency of best parameters.
In the final cross-validation using the LOGO method, the SVM algorithm achieved an average accuracy of 97.14%, a recall of 97.07%, and an F1-score of 97.14%. Figure 6 illustrates the participants’ performance during the cross-validation, demonstrating that the SVM maintained strong performance with consistently high values.
Figure 6. SVM LOGO performance.

4.1.3. Decision Trees

The initial training identified the best combination of parameters as criterion = ‘gini’, max_depth = None, max_features = None, max_leaf_nodes = None, min_samples_leaf = 4, min_samples_split = 2, and splitter = ‘random’, which achieved an accuracy of 83.21%. In the testing phase, the model achieved an accuracy of 77.08% (Table 7).
Table 7. Initial results of DT.
The model did not perform as well in classifying the postures compared to other models, as shown in Table 8 and Figure 7. The postures supine and right achieved higher accuracy rates of 80.21% and 81.14%, respectively, but with lower recall, indicating difficulties in classifying these postures. Conversely, the postures left and prone had lower accuracy rates of 73.80% and 74.33%, respectively, but higher recall values of 84.37% and 76.46%.
Table 8. DT classification report.
Figure 7. DT confusion matrix.
In the cross-validation evaluation of the DT model (Table 9), accuracy values ranged between 76.23% and 83.23%, with the highest precision achieved in the first iteration. The average precision across the cross-validation was 79.14%. Figure 8 shows the frequency of the best parameters used in each iteration, with min_samples_leaf and max_depth being the parameters that varied the most.
Table 9. DT cross-validation results.
Figure 8. DT frequency of best parameters.
In the LOGO cross-validation, the DT algorithm achieved an average accuracy of 80.03%, a recall of 79.60%, and an F1-score of 80.00% (Figure 9). Although these values are lower than those of some other models, the DT model still effectively classifies postures and, in some cases, achieves high accuracy percentages for certain participants.
Figure 9. DT LOGO performance.

4.1.4. Random Forest

The initial training of the model resulted in an accuracy of 95.95% with the parameter combination: n_estimators = 300, max_features = ‘log2’, min_samples_split = 2, min_samples_leaf = 1, and criterion = ‘gini’. In the testing phase, the model achieved an accuracy of 93.79% (Table 10).
Table 10. Initial results of RF.
According to Table 11 and Figure 10, the model demonstrated strong performance in classifying postures, with an average accuracy of 93.80%. The postures left, right, and supine had the highest accuracy. Left and right postures had lower recall, indicating that the model struggled more to classify these postures accurately. The supine posture, which had both high accuracy (96.81%) and recall (97.14%), showed the model’s capability to classify it more consistently. On the other hand, the prone posture had the lowest accuracy at 85.47% but the highest recall at 98.65%.
Table 11. RF classification report.
Figure 10. RF confusion matrix.
In the cross-validation results presented in Table 12, the accuracy values ranged from 92.09% to 96.37%, with an average accuracy of 94.19%. Figure 11 shows the frequency of parameters used during cross-validation, where the min_samples_split parameter exhibited the most variation.
Table 12. RF Cross-validation results.
Figure 11. RF frequency of best parameters.
In LOGO cross-validation, the RF algorithm achieved an average accuracy of 94.70%, a recall of 94.52%, and an F1-score of 94.70%, as demonstrated in Figure 12, which represents the performance of participants during the validation iterations. This shows that the RF algorithm maintained strong performance in posture classification throughout the validation process.
Figure 12. RF LOGO performance graph.

4.1.5. Gradient Boosting

In the training process, the model achieved an accuracy of 96.52% with a parameter combination of n_estimators = 300 and learning_rate = 0.5. In the testing phase, the model attained an accuracy of 94.61% (Table 13).
Table 13. Initial results of GB.
As observed in Table 14 and in Figure 13, the model demonstrated strong performance in classifying postures, with an average accuracy of 94.62%. The left posture achieved the highest precision at 99.04%, but its recall was the lowest at 87.41%, indicating that the model had more difficulty correctly classifying this posture. In contrast, the prone posture had the lowest accuracy at 87.17%, but it was the easiest for the model to classify, as shown by its highest recall value of 99.58%.
Table 14. GB classification report.
Figure 13. GB confusion matrix.
The cross-validation results for the GB model are presented in Table 15, with accuracy values ranging from 94.43% to 97.90%, resulting in an average cross-validation accuracy of 95.77%. Figure 14 shows the frequency of parameters used during cross-validation, where both parameters remained consistent across iterations.
Table 15. GB cross-validation results.
Figure 14. GB frequency of best parameters.
In the LOGO method, the GB algorithm achieved an average accuracy of 96.63%, a recall of 96.54%, and an F1-score of 96.63%, as demonstrated in Figure 15. The figure illustrates that the GB model performed well in classifying postures during the validation iterations, showing consistent performance across participants.
Figure 15. GB LOGO performance.

4.1.6. Naive Bayes

In the initial training phase, the model achieved an accuracy of 83.22% with a parameter value of var_smoothing = 0.04329. In the testing phase, the model achieved an accuracy of 84.58% (Table 16).
Table 16. Initial results of NB.
According to Table 17 and Figure 16, the model’s performance in classifying postures varied. The supine posture achieved the highest precision at 94.32%, while the right posture had the lowest precision at 76.92%. The left and prone postures achieved accuracy values of 83.74% and 84.92%, respectively.
Table 17. NB Classification report.
Figure 16. NB confusion matrix.
The cross-validation results for the NB model are presented in Table 18, with accuracy values ranging from 80.64% to 91.61%, resulting in an average cross-validation accuracy of 84.87%. Figure 17 illustrates the frequency of parameters used in the cross-validation, showing that different values of var_smoothing were used in each iteration.
Table 18. NB cross-validation results.
Figure 17. NB frequency of best parameters.
In the LOGO method, the NB algorithm achieved an average accuracy of 85.00%, a recall of 84.30%, and an F1-score of 85.00%, as shown in Figure 18. These accuracy values are lower compared to those obtained by other models evaluated previously.
Figure 18. NB LOGO performance.

4.1.7. Feed Forward Artificial Neural Network

In the training process of the FFANN, the model achieved an accuracy of 97.19% with the following parameter combination: activation = ‘relu’, learning_rate = ‘adaptive’, hidden_layer_sizes = (100,), alpha = 0.0001, learning_rate_init = 0.001, and batch_size = 128. In the testing phase, the model achieved an accuracy of 96.48% (Table 19).
Table 19. Initial results of FFANN.
Analyzing Table 20 and Figure 19, it can be observed that the model achieved higher precision values in classifying the left, right, and supine postures, with accuracies of 97.93%, 99.37%, and 97.92%, respectively. Although the prone posture had a lower accuracy of 91.33%, it achieved the highest recall value of 98.60%, followed by the supine posture with a recall of 98.25%. This indicates that despite the lower accuracy, the model was better able to identify these postures. The average accuracy was 96.49%.
Table 20. FFANN Classification report.
Figure 19. FFANN confusion matrix.
The cross-validation results for the FFANN model are presented in Table 21. The model demonstrated strong performance across all cross-validation iterations, with an average precision of 98.93%. Figure 20 illustrates the frequency of parameters used in cross-validation, showing that the same values were used for each parameter in every iteration.
Table 21. FFANN cross-validation results.
Figure 20. FFANN frequency of best parameters.
In the LOGO method, the FFANN algorithm achieved an average accuracy of 96.69%, a recall of 96.60%, and an F1-score of 96.69%, as observed in Figure 21. This figure shows the performance of each participant during the LOGO cross-validation.
Figure 21. FFANN LOGO performance.

4.1.8. Temporal Convolutional Network

During the training process of the TCN, the model achieved an accuracy of 94.97% with the parameter combination of dense_uni = 512 and filters = 512. In the testing phase, the model achieved an accuracy of 91.01% (Table 22).
Table 22. Initial results of TCN.
Table 23 and Figure 22, indicate that the supine posture achieved the highest accuracy at 97.36%. In contrast, the prone posture had a significantly lower accuracy of 79.84%. However, despite this lower accuracy, the prone posture was the easiest for the model to classify, with a recall value of 98.68%. The average accuracy across all postures was 91.01%.
Table 23. TCN classification report.
Figure 22. TCN confusion matrix.
The cross-validation results for the TCN model are presented in Table 24. Although the model did not achieve as high results as some of the previous models, it still obtained accuracy values greater than 89.22%, with an average precision of 90.98%. Figure 23 shows the frequency of the parameters used during cross-validation, indicating some variation in both parameters across iterations.
Table 24. TCN cross-validation results.
Figure 23. TCN frequency of best parameters.
In the cross-validation using the LOGO method, the TCN algorithm achieved an average accuracy of 93.00%, a recall of 92.78%, and an F1-score of 93.00%, as shown in Figure 24. This figure illustrates the performance of each participant during the LOGO cross-validation, indicating that the TCN model can achieve good results in classifying postures for certain participants.
Figure 24. TCN LOGO performance.

4.1.9. Convolutional Neural Network

In the initial training phase, the model CNN achieved an accuracy of 99.55% with the combination of parameters of Conv1 Filters = 112, Conv1 Kernel = 3, Conv2 Filters = 80, Conv2 Kernel = 3, Conv3 Filters = 112, Conv3 Kernel = 3, Dense Units = 512, and Dropout Rate = 0.0. In the testing phase, the model achieved an accuracy of 93.08% (Table 25).
Table 25. Initial results of CNN.
From Table 26 and Figure 25, it can be observed that the model achieved an average accuracy of 93.08%. The accuracy values ranged from 90.68% to 94.52%, with the latter value obtained for the left posture, which also had the highest accuracy. The supine posture had a high recall, but its accuracy was 90.68%. The right posture was the easiest for the model to classify, with a recall of 97.38%
Table 26. CNN Classification report.
Figure 25. CNN confusion matrix.
The cross-validation results for the CNN model are presented in Table 27. Despite using an image format for training and testing instead of matrices, the model achieved high precision values, with an average accuracy of 94.91%. Figure 26 shows the frequency of parameters used during cross-validation, indicating that there was no variation in parameters across iterations.
Table 27. CNN cross-validation results.
Figure 26. CNN frequency of best parameters.
In the cross-validation using the LOGO method, the CNN algorithm achieved an average accuracy of 91.99%, a recall of 91.73%, and an F1-score of 91.99%, as shown in Figure 27. This figure demonstrates the performance of each participant during the LOGO cross-validation. Despite some variation in results, the model was able to achieve good posture classification outcomes for various participants using a different data format.
Figure 27. CNN LOGO performance.

4.1.10. ResNet-18

During the training process of ResNet-18, the model achieved an accuracy of 96.04% with the parameter combination of lr = 0.0001 and batch_size = 32. In the testing phase, the model achieved an accuracy of 95.99% (Table 28).
Table 28. Initial results of ResNet-18.
Table 29 and Figure 28 indicate high classification values for the postures, ranging from 94.85% to 98.99%, to with an average of 95.99%. The left posture achieved the highest accuracy at 98.99%, but the right posture had a recall of 97.70%, indicating that this posture was easily classified by the model.
Table 29. ResNet-18 classification report.
Figure 28. ResNet-18 confusion matrix.
The cross-validation results for ResNet-18, in Table 30, demonstrate high accuracy indicating efficient posture classification. The average accuracy across cross-validation was 95.76%, which is higher than the CNN model of 94.91%, which also uses image data for evaluation. Figure 29 shows the frequency of parameters used during cross-validation, revealing some variation in the parameters across iterations.
Table 30. ResNet-18 cross-validation results.
Figure 29. ResNet-18 frequency of best parameters.
In the cross-validation using the LOGO method, the ResNet-18 algorithm achieved an average accuracy of 95.71%, a recall of 95.72%, and an F1-score of 95.71% (Figure 30). The precision for each participant remained above 94%, demonstrating that the model is efficient and consistent across various scenarios.
Figure 30. ResNet-18 LOGO performance graph.

4.2. Experiments for the Classification of the 28 Postures

The classification of 28 posture variants (7 variants for each of the main postures) using the FFANN and SVM algorithms achieved the best average accuracy in the classification of the four postures (98.93% and 96.55%, respectively). Table 31 shows the classification results for the 28 postures that are lower, with the highest average value of 65.18% achieved by the SVM algorithm. Figure 31 presents the confusion matrices for both the FFANN and SVM algorithms, showing that, despite the drop in accuracy when classifying the 28 postures compared to the four postures, both algorithms can classify most postures effectively.
Table 31. Classification of the 28 postures by the FFANN and SVM algorithms.
Figure 31. Confusion matrix of FFANN and SVM.

5. Discussion

This section presents the discussion of the results of the experiments described in the previous section. The results are discussed in relation to the initial study objectives and compared with findings from other studies that analyzed pressure data from sensors placed under and over mattresses.
Table 32 summarizes the results obtained at each stage: initial training and testing, K-Fold cross-validation, and LOGO for each algorithm showing that eight out of the ten algorithms achieved an average accuracy above 90% in both K-Fold cross-validation and LOGO, with the SVM and FFANN algorithms achieving the highest average accuracy values. Figure 32 presents a comparison of the average accuracy values of all algorithms.
Table 32. Results of all algorithms.
Figure 32. Comparison of the average accuracy values of all algorithms.
As mentioned in a previous study [11], the best algorithms are typically neural network-based, except for SVM, which consistently shows strong accuracy. In most cases, Neural Network (NN) continues to outperform other algorithms, except for TCN, which in this case showed a slightly lower average accuracy. The FFANN algorithm achieved the highest average accuracy at 98.93%. SVM remains an exception by performing well and keeping pace with neural networks [11]. The RF and GB algorithms also prove to be competitive, reaching accuracy levels close to those of neural networks, although slightly lower. Regarding, recognition using image formats, CNN and ResNet-18 algorithms demonstrated strong performance, with CNN ranked 5th and ResNet-18 ranked 4th in average K-Fold accuracy, confirming that these algorithms can accurately analyze and classify posture in most cases.
The comparison of these results with those from other studies that used posture recognition with pressure sensors reveals the predominant use of NN algorithms (Table 33 and Table 34) and underscores the effectiveness of these algorithms in classification problems. The use of pressure sensor matrices placed under the mattress is a viable, efficient, and less intrusive approach that can achieve good results. Although [14] used a combination of algorithms and a larger number of positions, direct comparison with these results is limited because they refer to the person’s position in relation to the bed rather than their posture. However, even when considering only four postures, the accuracy obtained in this study is significantly higher, for example, FFANN achieved an average accuracy of 98,93% using K-Fold cross-validation and 96.69% using LOGO.
Table 33. Studies that use pressure sensors over mattresses.
Table 34. Studies that use pressure sensors under and on top of mattresses.
Five algorithms were used, KNN, SVM, DT, RF, and MLP, in [9] to investigate how the number of classes and pressure map resolution affect the classification of bedridden individuals’ postures. The accuracy of these algorithms was analyzed across different combinations of posture counts (4 and 28) and input data resolutions, varying the matrix resolution, showing that NN-based algorithms, particularly MLP, tended to achieve higher accuracy, reaching up to 99% in some scenarios when considering four postures, while the other algorithms were primarily used for comparison. Also, reducing the matrix resolution from 64 × 27 to 16 × 7 slightly decreases accuracy but becomes more significant for sensor map resolutions lower than 16 × 7. A comparison of the four posture results to the present study results revealed similar accuracies in both studies. Slightly higher values were obtained for the 64 × 27 matrix (Table 35), except for SVM, but slightly lower values were recorded for the 16 × 7 matrix (Table 36) [9]. In the present study, the average accuracy values recorded using a 12 × 6 matrix were higher in some instances, even considering that the sensor sheet was placed underneath the mattress, unlike in [9], where the sensor sheet was placed on top of the mattress. Indeed, the highest average accuracy value of 96.55% was achieved using the SVM algorithm.
Table 35. Comparison with study [9], with matrix 64 × 27 and 4 postures.
Table 36. Comparison with study [9], with matrix 16 × 7 and 4 postures.
Regarding 28 postures, the accuracies were lower in both studies [9] compared to the four main postures (Table 37). Although the algorithms used in the 28-posture experiments differ between the two studies, direct comparison is possible only for the SVM algorithm, showing that the SVM achieved higher accuracy in the present study (65.18% vs. 58.25%). Although the accuracy was lower compared to the 4-posture experiment, it is important to note that classifying 28 postures is inherently more complex due to the increased number of classes. Hence, these results are in line with expectations, as adding more classes typically leads to a reduction in accuracy due to the higher complexity of classification.
Table 37. Comparision with study [9], with 28 postures.
The algorithms used in this study, despite being applied to the data from the 12 × 6 sensor sheet placed under the mattress, achieved highly positive results, even when compared to data obtained from the sensor sheet placed on top of the mattress [9]. This was particularly evident for the SVM algorithm for classifying 28 postures and may be partly due to the methods employed in training the models and the use of optimization techniques to find the best parameters. In the present study, GridSearchCV was used to help identify the most suitable configuration for the SVM model, possibly allowing the model to better adapt to the complexity of classifying 28 postures, resulting in higher accuracy. However, the feasibility of classifying the four main postures using sensor sheets placed under the mattress is evident, with promising results for a more rigorous classification of the postures when considering all 28 postures.

6. Conclusions

This study demonstrated the feasibility of using machine learning (ML) algorithms to classify postures based on pressure maps obtained from sensor sheets placed underneath the mattress. This approach is not only less intrusive but also effective, with average classification accuracies reaching up to 98.93% using K-Fold cross-validation and 97.14% using LOGO with the FFANN and SVM algorithms achieving the highest accuracy. When considering 28 postures, this study shows a significant improvement over previous studies, both in terms of the number of postures considered and the accuracy achieved. Although the accuracy was lower than when only the 4 main postures were considered, in this case, with the SVM achieving 65.18% in K-Fold validation, it demonstrates that the proposed approach remains effective even with more complex tasks.
This study also compared outcomes with previous research that used data from pressure sensors placed under the mattress to classify postures, noting that even with fewer postures, the accuracy achieved was significantly higher. Comparisons with other studies that used sensor sheets placed on top of the mattress show that the results are very similar and, in some cases, surpass them when a similar number of sensors is considered.
Future research could explore approaches using sensor sheets with different numbers of sensors and consider a greater number of postures or variations of the four main postures to assess the feasibility of this approach under different conditions.

Author Contributions

Conceptualization, A.S., F.R. and J.M.; methodology, A.S., F.R. and J.M.; software, A.S.; validation, A.S., F.R. and J.M.; investigation, A.S., F.R. and J.M.; writing—original draft preparation, A.S., F.R. and J.M.; writing—review and editing, A.S., F.R. and J.M.; supervision, F.R. and J.M.; All authors have read and agreed to the published version of the manuscript.

Funding

This work was funded by National Funds through the Foundation for Science and Technology (FCT), I.P., within the scope of the project UIDB/05583/2020 and DOI identifier https://doi.org/10.54499/UIDB/05583/2020. Furthermore, we would like to thank the Research Centre in Digital Services (CISeD) and the Instituto Politécnico de Viseu for their support.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Data is contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ozeke, O.; Erturk, O.; Gungor, M.; Hızel, S.B.; Aydın, D.; Celenk, M.K.; Dıncer, H.; Ilıcın, G.; Ozgen, F.; Ozer, C. Influence of the right-versus left-sided sleeping position on the apnea-hypopnea index in patients with sleep apnea. Sleep Breath. 2012, 16, 617–620. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Cary, D.; Jacques, A.; Briffa, K. Examining relationships between sleep posture, waking spinal symptoms and quality of sleep: A cross sectional study. PLoS ONE 2021, 16, e0260582. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  3. Cary, D.; Briffa, K.; McKenna, L. Identifying relationships between sleep posture and non-specific spinal symptoms in adults: A scoping review. BMJ Open 2019, 9, e027633. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  4. Jeng, P.-Y.; Wang, L.-C.; Hu, C.-J.; Wu, D. A Wrist Sensor Sleep Posture Monitoring System: An Automatic Labeling Approach. Sensors 2021, 21, 258. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  5. Kwasnicki, R.M.; Cross, G.W.; Geoghegan, L.; Zhang, Z.; Reilly, P.; Darzi, A.; Yang, G.Z.; Emery, R. A lightweight sensing platform for monitoring sleep quality and posture: A simulated validation study. Eur. J. Med. Res. 2018, 23, 28. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Hudec, R.; Matúška, S.; Kamencay, P.; Benco, M. A Smart IoT System for Detecting the Position of a Lying Person Using a Novel Textile Pressure Sensor. Sensors 2020, 21, 206. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  7. Vázquez-Santacruz, E.; Cruz-Santos, W.; Gamboa-Zúñiga, M. Design and Implementation of an Intelligent System for Controlling a Robotic Hospital Bed for Patient Care Assistance. Comput. Y Sist. 2015, 19, 467–474. [Google Scholar] [CrossRef] [Scilit]
  8. Stern, L.; Roshan Fekr, A. In-Bed Posture Classification Using Deep Neural Network. Sensors 2023, 23, 2430. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Fonseca, L.; Ribeiro, F.; Metrôlho, J. Effects of the Number of Classes and Pressure Map Resolution on Fine-Grained In-Bed Posture Classification. Computation 2023, 11, 239. [Google Scholar] [CrossRef] [Scilit]
  10. Fonseca, L.; Ribeiro, F.; Metrôlho, J.; Santos, A.; Dionisio, R.; Amini, M.M.; Silva, A.F.; Heravi, A.R.; Sheikholeslami, D.F.; Fidalgo, F.; et al. PoPu-Data: A Multilayered, Simultaneously Collected Lying Position Dataset. Data 2023, 8, 120. [Google Scholar] [CrossRef] [Scilit]
  11. Fonseca, L.; Ribeiro, F.; Metrôlho, J. Pressure-Based Posture Classification Methods and Algorithms: A Systematic Review. Computers 2023, 12, 104. [Google Scholar] [CrossRef] [Scilit]
  12. Elsharif, E.; Drawil, N.; Kanoun, S. Automatic Posture and Limb Detection for Pressure Ulcer Risk Assessment. In Proceedings of the in 2021 IEEE 1st International Maghreb Meeting of the Conference on Sciences and Techniques of Automatic Control and Computer Engineering MI-STA, Tripoli, Libya, 25–27 May 2021; IEEE: Piscataway, NJ, USA; pp. 142–149. [Google Scholar] [CrossRef] [Scilit]
  13. Page, M.J.; McKenzie, J.E.; Bossuyt, P.M.; Boutron, I.; Hoffmann, T.C.; Mulrow, C.D.; Shamseer, L.; Tetzlaff, J.M.; Akl, E.A.; Brennan, S.E.; et al. The PRISMA 2020 statement: An updated guideline for reporting systematic reviews. BMJ 2021, 372, n71. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  14. Viriyavit, W.; Sornlertlamvanich, V.; Kongprawechnon, W.; Pongpaibool, P. Bed Posture Classification Using Noninvasive Bed Sensors for Elderly Care. In European-Japanese Conference on Information Modelling and Knowledge Bases; IOS Press: Amsterdam, The Netherlands, 2017; Available online: https://api.semanticscholar.org/CorpusID:5754620 (accessed on 5 July 2020).
  15. Enayati, M.; Skubic, M.; Keller, J.M.; Popescu, M.; Farahani, N.Z. Sleep Posture Classification Using Bed Sensor Data and Neural Networks. In Proceedings of the 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Honolulu, HI, USA, 18–21 July 2018; IEEE: Piscataway, NJ, USA; pp. 461–465. [Google Scholar] [CrossRef] [Scilit]
  16. Green, C.; Bouchard, M.; Goubran, R.; Robillard, R.; Higginson, C.; Lee, E.; Knoefel, F. Sleep-Wake and Body Position Classification with Deep Learning using Pressure Sensor Mat Measurements. In Proceedings of the 2023 IEEE International Symposium on Medical Measurements and Applications (MeMeA), Jeju, Republic of Korea, 14–16 June 2023; IEEE: Piscataway, NJ, USA; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.