Preprint
Article

Detection of the Leg-Crossing Position Using Pressure Distribution Sensor and Machine Learning

This version is not peer-reviewed.

Submitted:

01 November 2024

Posted:

01 November 2024

You are already at the latest version

A peer-reviewed article of this preprint also exists.

Abstract
Human often cross their legs unconsciously while sitting, which can lead to issues like shifting the center of gravity, lower back pain, decreased blood flow and pelvic distortion. Detecting unconscious leg-crossing is important for maintaining correct posture. In this study, we explored the detection of leg-crossing postures using machine learning on data from body pressure distribution sensors. Collected 180 seconds of pressure data from 4 male subjects (25.8 ± 6.29 y.o.) in three conditions: no leg crossing, right leg crossed, and left leg crossed. Seven classifiers, including SVM and RF, were evaluated using Accuracy, Recall, Precision, and Specificity. As a result, SVM was difficult to classify.
Keywords: 
Subject: 
Public Health and Healthcare  -   Other

1. Introduction

It is known that many people unconsciously cross their legs in everyday life. However, maintaining the leg-crossing posture for long periods of time can have a variety of negative effects on the body. For example, if the center of gravity of the body shifts to one side or the other due to leg-crossing, the pelvis will become distorted, causing lower back pain and twisting of the body. It has also been pointed out that a decrease in blood flow can cause coldness and circulatory disorders in the lower limbs [1-4]. For this reason, it is important to detect the unconscious act of crossing legs at an early stage and encourage improvements in posture in order to maintain good health.
In addition, people today spend a lot of time sitting, which is a factor that increases health risks. Japanese people in particular spend a lot of time sitting, and a survey of 20 countries around the world found that the average amount of time Japanese people spend sitting on weekdays is 7 hours (420 minutes) per day, the longest in the world. This is about three times longer than the 2.5 hours (150 minutes) spent sitting in Portugal, which is the shortest [5]. It has been pointed out that sitting for long periods of time can lead to a reduction in muscle metabolism and blood flow, and an increase in obesity, diabetes, cancer, cerebrovascular disease, and dementia, which can shorten life expectancy. In particular, it is well known that leg-crossing while sitting can cause high blood pressure [6-15].
The reason that blood pressure rises when you cross our legs is because the blood vessels that run through the hip joint are compressed. Also, the peroneal nerve, which controls the sensation of the leg, branches off at the back of the knee, and when you cross our legs, this nerve is compressed. When you cross our legs, your heart will think that there is a lack of blood in every part of your body, and your heart rate will increase and your blood pressure will rise. If you sit with your back straight, it will not have a negative effect on your posture, but if we cross our legs, your posture will lean forward. For this reason, it is desirable to be able to detect unconscious leg-crossing.
In previous research on posture estimation, the main methods used were those that used cameras and image analysis [16,17]. While these methods can analyze the position and posture of the skeleton using image processing technology, they have the problem that it takes time to perform advanced image processing and load model data. In addition, there are environments where it is difficult to use cameras from the perspective of protecting human privacy.
In this study, we focus on a non-contact body pressure distribution sensor that enables immediate data processing, and evaluate the accuracy of leg posture detection using this sensor. Specifically, we propose a method for detecting leg posture with high accuracy by applying machine learning to the data acquired from the body pressure distribution sensor. The aim of this research is to provide the basis for a system that can detect the leg-crossing posture in real time and contribute to improving the sitting posture.

2. Materials and Methods

2.1. Data collection

In this data measurement, we will verify the extent to which it is possible to detect leg-crossing postures using pressure distribution sensors.
We measured seat pressure using a pressure distribution sensor (Azwil, Takano Corporation, Japan), and obtained data on three patterns of leg positioning (with no leg positioning, with the right leg on top, and with the left leg on top) for more than 120 seconds of sitting pressure distribution data for at least two male subjects (25.8 ± 6.29 years old) in each case. The pressure distribution sensor is in the shape of a seat, with 16×16 pressure sensors built in, for a total of 256 sensors. The external size of the sensor is 600mm square, and the detection area is 397mm square. The sensor is capable of detecting pressures up to 200 mmHg, and the data is sampled at 5Hz. In this study, the pressure data acquired from each sensor was recorded as a heat map showing the change in pressure distribution over time. The three different sitting postures recorded (center position (without legs crossed), right leg crossed, left leg crossed) were labeled as “C”, “R” and “L”, respectively.
.2. Data Analysis
The collected data was analyzed using seven different classifiers. The classifiers used were Support Vector Machine (SVM), Random Forest (RF), K-neighbors (KNN), Multi Layer Perceptron (MLP), AdaBoost (ADB), ⑥Quadratic Discriminant Analysis (QDA), ⑦Naïve Bayes (NAB). And we calculated the pressure data obtained from the 256 pressure sensors as features and performed classification for each posture. The features were classified into three categories in advance: C (center position, no leg crossing), R (right leg crossed over left leg), and L (left leg crossed over right leg). To evaluate the accuracy of the classification, we performed K-fold cross-validation. First, we trained the classifier using 90 seconds of data for each posture, and then we verified the accuracy using 10 seconds of test data. As evaluation metrics, we calculated Accuracy (percentage of correct answers), Recall (reproduction rate), Precision (accuracy), and F-score, used Python 3.6.5 to compare the performance of each classifier.
Machine learning was performed in Python (Ver 3.6.5) using Spyder (editor, Ver 3.2.8) obtained from the open data science platform Anaconda. The machine learning library used was scikit-learn. Table 1. shows the hyperparameters for each classifier. n_estimators and max_depth for RF are the number of decision trees and the maximum depth of decision trees, respectively. n_neighbors for KNN is the value of k, and is an odd number. The max_iter of MLP is the maximum number of iterations, and the n_estimators of ADB is the maximum number of estimators when boosting is finished. The hyperparameters of QDA and NAB are the default values. We changed the hyperparameters using grid search, and calculated the AUC of the ROC curve for Accuracy, Precision, Recall, F-score, True positive rate and false positive rate, and the AUC of the Precision-Recall curve (PR curve) for the optimal hyperparameters. These six indices were used as the accuracy indices. Accuracy, Recall, Precision and F-score are defined by the following equations (1) to (4).
Accuracy = (TP + TN) / (TP + TN + FP + FN)
Recall = TP / (TP + FN)
Precision = TP / (TP + FP)
F-score = 2* Recall* Precision / (Recall + Precision)
The feature values used 196 pressure values (100 seconds each) for each of three postures for each person (196 x 100 x 5Hz = 98,000 pressure values for each posture). In addition, the first 10 seconds of measurement and the last 10 seconds before the end of measurement were removed.TP, TN, FP and FN are true positive, true negative, false positive and false negative, respectively. In addition, the average value of the discrimination accuracy index was calculated for each value of k using the k-fold cross-validation method (k=2,5,10) for each subject.
k=2 (150 seconds learning, 150 seconds testing)
k=5 (240 seconds learning, 60 seconds testing), and
K=10 (270 seconds learning, 30 seconds testing)
The accuracy evaluation metrics were Accuracy, Precision, Recall, F-score, AUC-tpfp, and AUC-pr.

2.4. Ethics Review Committee

This research was conducted after receiving approval from the Ethics Review Committee of the Graduate School of Information Sciences, Tohoku University (approval date: November 27, 2003, approval number 85: 5-2).

3. Results

3.1. Pressure distribution heat map

The pressure distribution heat map used to detect the leg-crossing posture is shown in Figure 1. The changes in pressure distribution are shown visually for each of the three postures: C (center position, no leg-crossing), R (right leg crossed over), and L (left leg crossed over). In particular, when the legs are crossed, the pressure on the left and right sides changes markedly, and the bias in the center of gravity can be confirmed.
Figure (a) shows the heat map for L (left leg crossed over), (b) for C (center position), and (c) for R (right leg crossed over). When the left leg is placed on the right leg, the right isthmus bears the weight, so the heat map on the right side is displayed more intensely.

3.2. Comparison of Accuracy Evaluation Metrics

ROC curves (true positive rate and false positive rate) to evaluate the performance of the seven classifiers (Figure 2 and Table 2). And we calculated the evaluation index for each subject and then expressed the results as the average value for all subjects. As a result, the evaluation index for all classifiers except SVM was 99% or more when k was 5 or more. The discrimination accuracy improved as the training time increased. Therefore, a training time of around 240 seconds (80 seconds for each; center, right and left) is appropriate. In addition, SVM proved to be difficult to classify, in particular, the Center position was difficult to misclassify for SVM.
Figure show the total sum of the confusion matrices for all subjects. The confusion matrices for each classifier are (a) SVM, (b) RF, (c) KNN, (d) MLP, (e) ADB, (f) QDA, and (g) NAB.

4. Discussion

In this study, we attempted to detect leg positioning posture using a body pressure distribution sensor, and evaluated the accuracy of the detection using machine learning. As a result, the classifier other than SVM showed high classification, and was confirmed to be effective for detecting leg positioning posture. The main points of the results obtained are discussed below.
First, regarding the result that the SVM results are significantly lower than those of other classifiers; SVM is an algorithm that classifies and performs regression by determining boundaries and hyperplanes that divide the data groups of two classes, it was considered that it was basically for two class classification, that preprocessing of data was necessary, that there were few parameters, but that it was difficult to adjust the parameters and interpret the results.
Next, the body pressure data acquired by the pressure sensor provided sufficient information to identify the leg crossing posture even at a sampling rate of 5 Hz. Not only could the heat map visually confirm that the pressure distribution on the left and right sides of the body changed significantly when crossing the legs, but it was also demonstrated that this change in pressure was effective as a feature quantity for machine learning. In contrast to conventional posture estimation methods using depth cameras, which suffer from a delay when tracking posture changes in real time, the body pressure sensor can acquire data in real time without contact, and so was considered to be superior in terms of efficiency and privacy protection.
In comparison with other classifiers, RF, KNN and MLP also showed high accuracy and were to some extent effective in identifying leg-crossing postures. These classifiers have the ability to capture complex data patterns, showed stable performance in identifying different pressure distributions. On the other hand, ADB and NAB showed a little poorer performance than the other classifiers excluding SVM. This is thought to be because these methods have specific assumptions about the distribution of data, and so they may not have been able to fully reflect the nonlinear and complex changes in pressure data.
The results of this study demonstrate the effectiveness of posture detection using body pressure distribution sensors. However, there are still further issues to be addressed before practical application. For example, the experiment classified static postures, but in real-life sitting postures, dynamic changes occur frequently. In order to be able to detect dynamic sitting postures in real time, it is necessary to collect more diverse data and improve the classification algorithm. In addition, since the number of subjects is limited, it is necessary to collect data from more subjects and improve the generality of the algorithm. For example, it is possible that elderly people and female subjects may show slightly different pressure distributions, so it is necessary to verify the effects of gender and age differences on the data. In our preliminary experiments, even for women and the elderly, the heat map displays a load on the ischium of the leg that is on top (right side if it is the right leg), and there is no significant difference in the shape of the ischium of healthy people, so we can predict that there will be no significant difference [18], but it is also necessary to analyze the chronological changes due to long-term leg-crossing. In recent years, some studies have suggested that the crossed leg sign may indicate a good outcome after a severe stroke [19]. In addition, research is being conducted on applying the comfort of leg-crossing to interior design[20], and there are various potential applications for detecting the action of crossing one's legs from the pressure of sitting.

5. Conclusions

In this study, we attempted to detect the leg-crossing posture in a sitting position using a body pressure distribution sensor, and evaluated its accuracy using machine learning. As a result of comparing seven different classifiers, it was found that classifiers other than SVM can identify with high accuracy when the K value (number of clusters) is 5 or more, with an evaluation index of 95% or more. It was also shown that the accuracy of identification improves as the learning time increases. This study demonstrated excellent performance in detecting the leg-crossing posture. In addition, RF, KNN and MLP exhibited high classification accuracy, demonstrating that body pressure distribution data is an effective feature. The results of this research will contribute to the development of a system that can detect unconscious leg-crossing posture in real time in everyday life. Since leg-crossing posture can cause a shift in the center of gravity of the body and back pain, the detection method verified in this research can detect posture without using a camera, taking privacy into consideration, and it is expected that this detection will encourage posture improvement.

Author Contributions

Conceptualization, E.Y. and Y.Y.; methodology, E.Y.; software, Y.Y.; validation, E.Y. and Y.Y.; investigation, E.Y. and T.A; resources, E.Y.; data curation, E.Y.; writing—original draft preparation, E.Y.; writing—review and editing, E.Y.; visualization, Y.Y.; supervision, E.Y.; project administration, E.Y.; funding acquisition, E.Y. All authors have read and agreed to the published version of the manuscript.

Funding

Please add: This research was funded by New Energy and Industrial Technology Development Organization (NEDO), Public-Private Support Program for Identifying Young Researchers, grant number P20004.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki, and approved by the Institutional Ethics Committee of Graduate School of Information Science, Tohoku University (protocol code 85:5-2 and approved on November 27, 2023).

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ferreira-Santos, L.; Martinez-Lemus, L.A.; Padilla, J. Sitting leg vasculopathy: potential adaptations beyond the endothelium. Am. J. Physiol. Heart Circ. Physiol. 2024, 326, H760–H771. [Google Scholar] [CrossRef]
  2. Parry, S.P.; Coenen, P.; Shrestha, N.; O'Sullivan, P.B.; Maher, C.G.; Straker, L.M. Workplace interventions for increasing standing or walking for decreasing musculoskeletal symptoms in sedentary workers. Cochrane Database Syst. Rev. 2019, 2019(11), CD012487. [Google Scholar] [CrossRef] [PubMed]
  3. de Oliveira, E.L.; Coutinho, P.F.F.; Braga, U.M.; Barsante, L.D. Postural hypervigilance and perception of correct sitting posture in individuals with and without low back pain. Rev. Bras. Ortop. 2022, 57, 947–952. doi: 10.1055/s-0042-1756154. (eCollection Dec 2022).
  4. Snijders, C.J.; Slagter, A.H.; van Strik, R.; Vleeming, A.; Stoeckart, R.; Stam, H.J. Why leg crossing? The influence of common postures on abdominal muscle activity. Spine 1995, 20, 1989–1993. [Google Scholar] [CrossRef] [PubMed]
  5. Kai, Y.; Kakuta, K.; Nagamatsu, T.; Kuchiki, T.; Uchida, K. Association between Sedentary Behavior and Mental Health among Japanese Workers. Res. Rep. Tech. Rep. 2016, 114, 1–10. [Google Scholar] [CrossRef]
  6. Reiss, M. Leg-crossing: incidence and inheritance. Neuropsychologia 1994, 32, 747–750. [Google Scholar] [CrossRef] [PubMed]
  7. Harms, M.P.; Wieling, W.; Colier, W.N.; Lenders, J.W.; Secher, N.H.; van Lieshout, J.J. Central and cerebrovascular effects of leg crossing in humans with sympathetic failure. Clin. Sci. 2010, 118, 573–581. [Google Scholar] [CrossRef]
  8. van Groningen, L.F.; Adiyaman, A.; Elving, L.; Thien, T.; Lenders, J.W.; Deinum, J. Which physiological mechanism is responsible for the increase in blood pressure during leg crossing? J. Hypertens. 2008, 26, 433–437. [Google Scholar] [CrossRef] [PubMed]
  9. Pinar, R.; Sabuncu, N.; Oksay, A. Effects of crossed leg on blood pressure. Blood Press. 2004, 13, 252–254. [Google Scholar] [CrossRef] [PubMed]
  10. Adiyaman, A.; Tosun, N.; Elving, L.D.; Deinum, J.; Lenders, J.W.; Thien, T. The effect of crossing legs on blood pressure. Blood Press. Monit. 2007, 12, 189–193. [Google Scholar] [CrossRef] [PubMed]
  11. Kaur, G.; Arora, A.S.; Jain, V.K. Comparative analysis of hybrid models for prediction of BP reactivity to crossed legs. J. Healthc. Eng. 2017, 2017, 2187904. [Google Scholar] [CrossRef] [PubMed]
  12. Scheen, A.J.; Marchand, M.; Philips, J.C. [Crossed eyes on arterial blood pressure in sitting position]. Rev. Med. Liege 2021, 76, 221–223. [Google Scholar] [PubMed]
  13. Scheen, A.J.; Marchand, M.; Philips, J.C. [Crossed eyes on arterial blood pressure in sitting position]. Rev. Med. Liege 2021, 76, 221–223. [Google Scholar] [PubMed]
  14. Keele-Smith, R.; Price-Daniel, C. Effects of crossing legs on blood pressure measurement. Clin. Nurs. Res. 2001, 10, 202–213. [Google Scholar] [CrossRef]
  15. Snijders, C.J.; Slagter, A.H.; van Strik, R.; Vleeming, A.; Stoeckart, R.; Stam, H.J. Why leg crossing? The influence of common postures on abdominal muscle activity. Spine 1995, 20, 1989–1993. [Google Scholar] [CrossRef] [PubMed]
  16. Wan, Q.; Zhao, H.; Li, J.; Xu, P. Hip positioning and sitting posture recognition based on human sitting pressure image. Sensors 2021, 21, 426. [Google Scholar] [CrossRef]
  17. Lee, Y.; Kim, Y.M.; Pyo, S.; Yun, M.H. Development of a sitting posture monitoring system for children using pressure sensors: An application of convolutional neural network. Work 2022, 72, 351–366. [Google Scholar] [CrossRef] [PubMed]
  18. Reiss, M. A study of leg-crossing in a German sample. Anthropol. Anz. 1995, 53, 263–268. [Google Scholar] [CrossRef] [PubMed]
  19. Rémi, J.; Pfefferkorn, T.; Owens, R.L.; Schankin, C.; Dehning, S.; Birnbaum, T.; Bender, A.; Klein, M.; Adamec, J.; Pfister, H.W.; Straube, A.; Feddersen, B. The crossed leg sign indicates a favorable outcome after severe stroke. Neurology 2011, 77, 1453–1456. [Google Scholar] [CrossRef] [PubMed]
  20. Stanglmeier, M.J.; Schulte, F.; Schauberger, G.; Bichler, R.J.; Schwirtz, A.; Paternoster, F.K. Effect of legroom proportions and individual factors for sitting with crossed legs: implications on the interior design of automated driving vehicles. Ergonomics 2021, 64, 1393–1404. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Heat map of pressure distribution in the leg-crossed posture.
Figure 1. Heat map of pressure distribution in the leg-crossed posture.
Preprints 138257 g001
Figure 2.   Confusion Matrix by Classifier.
Figure 2.   Confusion Matrix by Classifier.
Preprints 138257 g002aPreprints 138257 g002b
Table 1. Hyperparameters for each classifier.
Table 1. Hyperparameters for each classifier.
Classifier Hyperparameter
SVM C 0.001, 0.01, 0.1, 1, 10, 100, 1000
gamma 0.001, 0.01, 0.1, 1, 10, 100, 1000
RF n_estimators 16, 32, 64, 128, 256, 512, 1024
max_depth 16, 32, 64, 128, 256, 512, 1024
criterion gini
KNN n_neighbors 3, 5, 7, 9, 11, 13, 15, 17, 19, 21
MLP alpha 0.001, 0.01, 0.1, 1
max_iter 16, 32, 64, 128, 256, 512, 1024
ADB n_estimators 16, 32, 64, 128, 256, 512, 1024
algorithm SAMME.R
QDA Default
NAB Default
* In Secondary discriminant analysis (QDA), no regularization is applied and 'full' was used for the covariance matrix estimation. Naive Bayes (Gaussian naive Bayes), smoothing parameter var_smoothing = 1e−9 (default setting).
Table 1. Performance indicators for each classifier.
Table 1. Performance indicators for each classifier.
    Accuracy
Classifier k-value
2 5 10
SVM 0.698 ± 0.039 0.881 ± 0.025 0.939 ± 0.010
RF 0.980 ± 0.009 0.996 ± 0.003 0.999 ± 0.001
KNN 0.992 ± 0.005 0.998 ± 0.002 0.999 ± 0.001
MLP 0.988 ± 0.007 0.993 ± 0.003 0.998 ± 0.001
ADB 0.983 ± 0.007 0.998 ± 0.002 0.992 ± 0.004
QDA 0.946 ± 0.014 0.995 ± 0.002 0.995 ± 0.002
NAB 0.962 ± 0.013 0.991 ± 0.004 0.992 ± 0.002
    Precision
Classifier k-value
2 5 10
SVM 0.853 ± 0.015 0.910 ± 0.020 0.947 ± 0.011
RF 0.983 ± 0.007 0.997 ± 0.003 0.999 ± 0.001
KNN 0.993 ± 0.004 0.998 ± 0.001 0.999 ± 0.001
MLP 0.990 ± 0.005 0.995 ± 0.003 0.998 ± 0.001
ADB 0.986 ± 0.006 0.999 ± 0.001 0.995 ± 0.003
QDA 0.961 ± 0.010 0.996 ± 0.002 0.996 ± 0.001
NAB 0.971 ± 0.010 0.993 ± 0.003 0.994 ± 0.002
    Recall
Classifier k-value
2 5 10
SVM 0.698 ± 0.039 0.881 ± 0.025 0.939 ± 0.010
RF 0.980 ± 0.009 0.996 ± 0.003 0.999 ± 0.001
KNN 0.992 ± 0.005 0.998 ± 0.002 0.999 ± 0.001
MLP 0.983 ± 0.007 0.993 ± 0.003 0.998 ± 0.001
ADB 0.983 ± 0.007 0.998 ± 0.002 0.992 ± 0.004
QDA 0.946 ± 0.014 0.995 ± 0.002 0.995 ± 0.002
NAB 0.962 ± 0.013 0.991 ± 0.004 0.992 ± 0.002
    F-score
Classifier k-value
2 5 10
SVM 0.659 ± 0.046 0.853 ± 0.027 0.931 ± 0.012
RF 0.980 ± 0.009 0.995 ± 0.004 0.998 ± 0.001
KNN 0.992 ± 0.005 0.997 ± 0.002 0.999 ± 0.001
MLP 0.988 ± 0.007 0.992 ± 0.003 0.998 ± 0.001
ADB 0.983 ± 0.007 0.997 ± 0.002 0.991 ± 0.005
QDA 0.942 ± 0.016 0.995 ± 0.002 0.994 ± 0.002
NAB 0.961 ± 0.013 0.989 ± 0.004 0.992 ± 0.003
    AUC_tpfp
Classifier k-value
2 5 10
SVM 0.788 ± 0.003 0.927 ± 0.017 0.959 ± 0.007
RF 0.991 ± 0.004 0.998 ± 0.002 0.999 ± 0.001
KNN 0.998 ± 0.001 1.000 ± 0.000 1.000 ± 0.000
MLP 0.996 ± 0.002 0.998 ± 0.002 0.999 ± 0.001
ADB 0.989 ± 0.005 0.999 ± 0.001 0.994 ± 0.003
QDA 0.954 ± 0.016 0.995 ± 0.004 0.995 ± 0.004
NAB 0.971 ± 0.015 0.993 ± 0.004 0.992 ± 0.004
    AUC_pr
Classifier k-value
2 5 10
SVM 0.797 ± 0.037 0.937 ± 0.015 0.964 ± 0.007
RF 0.989 ± 0.005 0.998 ± 0.002 0.999 ± 0.001
KNN 0.997 ± 0.001 0.999 ± 0.001 1.000 ± 0.000
MLP 0.996 ± 0.002 0.997 ± 0.002 0.999 ± 0.001
ADB 0.985 ± 0.008 0.998 ± 0.002 0.993 ± 0.003
QDA 0.953 ± 0.015 0.995 ± 0.003 0.995 ± 0.003
NAB 0.970 ± 0.014 0.994 ± 0.003 0.992 ± 0.003
Evaluation index was calculated for each subject, and the average value for all subjects was shown. Each subject was measured 10 times (S.E. indicates the standard error.).
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.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Alerts
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2025 MDPI (Basel, Switzerland) unless otherwise stated