Project archive · 2024-08
Error Analysis and Validation of Posture Metrics in a Novel AI-assisted Posture Monitor Software
The VDU Posture Monitor VDU software, currently under development, utilizes the webcam of a desktop computer to analyze the posture of individuals working at a video display unit. By employing a pre-trained neural model, the software evaluates various posture metrics and alerts users when their posture deviates from the optimal position. This paper presents a formal analysis of the errors associated with certain metric estimates, aiming to validate the accuracy of these fundamental values.
- Computer Vision
- OpenCV
- Optical Flow
- Rust
- Python
- Machine Learning
This page reproduces a (unfortunately) unpublished work. The experiments and the content were produced together with Riccardo Iena1 and Alessandro Iena2. Special thanks to Prof. Francesco Pegreffi3 for recommending,supporting this work and his valuable feedback.
So this page simply reproduces the content of the drafted paper.
The impact of prolonged seated work on health and well-being has become a significant concern, particularly in relation to postural alterations and musculoskeletal disorders. Many workers are compelled to maintain non-physiological positions due to insufficient ergonomic support, leading to long-term negative health consequences. While preventive programs and postural education initiatives have been introduced in various workplaces, the high costs of ergonomic aids often prevent widespread implementation 4.
This paper focuses on validating the measurements provided by the VDU Posture Monitor software, which aims to mitigate these issues by using webcam-based analysis to monitor and correct posture in real-time. By ensuring the accuracy of the software’s metrics, we aim to provide a reliable tool that can be widely adopted to promote better ergonomic practices and prevent musculoskeletal disorders 5.
Goal
The primary goal of this study is to validate the accuracy of the posture metrics provided by the VDU Posture Monitor software. By conducting a formal analysis of the errors in these metrics, we seek to confirm the reliability of the software in detecting and correcting incorrect postures.
This validation process is crucial for establishing the software as a practical and effective tool for real-time posture monitoring and correction. The long-term objective is to integrate this validated software into workplace environments, providing an accessible and non-invasive solution to improve ergonomic conditions and reduce the incidence of posture-related musculoskeletal disorders.
Materials and methods
To determine the sample size, a power analysis was conducted to ensure the reliability of statistical testing. A representative sample was established, and 5 subjects were recruited, positioned in front of their monitors during normal working hours. The exclusion criteria included prior fractures, scoliosis, deformities, contractures, limb length discrepancies, presence of pain, lumbar-sacral issues, herniated discs, osteoarthritis, previous surgeries, ischial support problems, and prostate issues. For this study, we utilized our software, “VDU Posture Monitor,” developed by Luca Ciucci, Riccardo Iena, and Alessandro Iena, and registered with SIAE under progressive number D000020440, registration number D000019326. The software is adaptive and intelligent, based on markerless technology and machine learning using the Mediapipe library 6. It monitors the posture of a subject using a video display terminal. The software uses the computer’s front camera to recognize the subject and monitor their posture at regular intervals during a computer work session. It operates in the background, monitoring the subject’s posture and alerting them if it is incorrect and potentially harmful to their health.
The software is capable of computing several metrics, whose values are geometrically inferred from the video frames elaborated by the MediaPipe Pose 7 which provides a set of 33 keypoints and a segmentation mask. The software only uses a subset of these keypoints, i.e. the shoulder and above points to compute the parameters.
The model is not capable, in general, of providing accurate joint angles as the camera image does not provide enough information to infer the precise position of the joints and the model intrinsically has inference limitations and errors. Asking for an estimate of the joint angles error is not a well posed question, as:
- a proper formal definition of the keypoints would be required, but the geometrical internal structure of subjects is not obtainable from the image and also clothing and other factors may change the appearance of the subject figure in the image.
- the uncertainties and errors depends on the specific pose and conditions of both the subject and the lighting-camera setup. Given this, 7 provides some order of magnitude of the errors for the joint angles, which were in the order of 10 deg (cfr. 7 §4.1 Table 2), but we prove that the errors can be much smaller for our specific use case.
Out goal is to provide some statistically meaningful estimates for the uncertainties on the metrics computed by the software.
The set of computed parameters may change in the future developments of the software, but some of them are the core of the ??? and are simple to define and compare with more accurate methods:
- shoulder tilt (or roll?) angle
- head tilt angle
- neck horizontal displacement Other parameters may be added and investigated with further developments of the software and model.
To estimate the errors, reference measures are needed through the use of systems for which we are able to provide a correct estimate of the errors and, possibly, are more accurate than the software measures we want to investigate.
Two reference systems were used to provide the reference measures:
- a 9-DOF IMU sensor (NOME)
- a 3D stereo motion capture system
IMU sensor WT9011DCL-BTL5.0
Our choice for the IMU sensor is a Wit BWT901 series module 8 with 9-DOF which, according to the datasheet 9, it measures tilt angles with an accuracy of 0.05°. The sensor provides a calibration functionality that we use before each test in order to reduce drift related errors and uses a Kalman filter 9 that combines the readings of the accelerometer, gyroscope and magnetometer sensor into a 3d orientation (or tilt angle??).
Given the accuracy of the tilt angle is 0.05°, we suppose that the actual dominant error from this sensing method will be due to anchoring lash and skin deformation under the adhesive.
If only the sensor error is considered, we see that this error will certainly be smaller than the measures we can perform from the image analysis.
In fact, the pre-trained pose landmarker model accepts an input image with shape . The best case scenario for angle measurements is the shoulder angle, since it represents the biggest visible segment in the body, when (typically) half of the available image width is taken by the shoulders. In this case we get that a movement of 0.05° results in a movement on the image of , i.e. a sub-pixel movement.
Since the sensor filter is a black-box and we do not know the actual implementation, we will also verify the correctness of the provided tilt angles by comparing them with the angle computed from the rad accelerometer measures. In fact, the BWT901 module provides acceleration with a standard deviation of 9, this gives a variance an the estimated angle of where is the terrestrial gravity acceleration constant. This error has a low time correlation (order of milliseconds), but we can retrieve high frequency reading of this value (up to 200 Hz) and then smoothing over the relevant time period. This virtually cancels this kind of error and the dominant error is the non-linearity of the accelerometer which is 0.5% nominally 10.
We conclude that the readings of this sensor are suitable for this application, and the main source of error will be anchoring and skin deformation.
3D stereo motion capture system

This system allows to track both the 3D position of a number of markers applied on the subject and the movement of his back skin.
Due to the excessive cost of this instrumentation on the market, we created our own system consisting of two industrial cameras (HikRobot MV-CE060-10UM and iCube NS1500CU) with fixed optics for 3D marker tracking and a smartphone as higher resolution non-fixed optics for skin movement analysis (see Appendix B).
A description of the marker tracking procedure and error analysis is presented in section Appendix C.
Data comparison
Early experiments
In the early test we performed, we tried to get an estimate of how accurate our shoulder angle measure was.
To do this, we tried placed the IMU sensor approximately on the C7 and T1 vertebrae of the subject using a kinesiology tape.
Typical results are shown in Figure 2.


In all the analyzed test cases, the provided angle was systematically underestimated by the software but also an important and inconsistent non-linearity was observed (an example can be seen in figure).
Two hypotheses were formulated to explain the observed behavior:
- The model is not able to correctly infer the position of the shoulder joint, which is not directly visible in the image.
- The IMU sensor is not giving a correct measure of the shoulder angle.
To investigate the first hypothesis, we tried to perform a visual check of the key points, an example is shown in Figure 4.

As Figure 4 shows, the angle obtained using the shoulder key points provided by the MediaPipe library (green line), looks noticeably smaller than what we would visually expect, which is better represented by the angle defined by the upper position of the shoulder extremities (red line). For small angles though, we intuitively do not expect a large non-linearity from this inconsistency though, so we also investigated the second hypothesis.
Given this observation, we decided to use this latter method to estimate the shoulder angle with greater precision by combining both the key points and the segmentation mask provided by MediaPipe6 in order to consistently identify the upper points of the shoulders.
By visually inspecting and palpating the skin where the sensor was placed, we found that it tilts and stretches differently depending on the movement performed by the subject.

We concluded that variation in the skin’s skew was likely the main cause of the non-linearity observed in the early measurements. This meant improving the shoulder-angle estimation algorithm and finding a better reference system.
Experiments with the stereo system
In order to get more accurate reference measures, we decided to place markers on the subject and use a 3D stereo motion-capture system. As we did not own such a system, we developed our own system composed of two industrial cameras, shown in Figure 1. The target workflow was to capture a calibration plate with roughly a size and position similar to the subject, and then take images of the subject with markers placed on the back of the shoulders.
The first tests were related to back-skin movement, aimed at finding the best positioning for the markers. The procedure is described in Back skin movement, where we found that a reasonably good marker placement is the back side of the scapula.
Each marker consisted of two magnets: one was attached to the skin and the other sat above the shirt. This prevented the marker from following the shirt while still allowing it to follow movements of the back.

We then proceeded with tests consisting of recordings of the subject during lateral shoulder tilt, and also some realistic scenarios where the subject maintained a static position.
Shoulder comparison results
We analysed the images captured by the stereo system in order to create a 3D tracking of the markers during the trials. This tracking is used to extract an accurate measure of the actual shoulder angle as described in Marker tracking.

We aligned the marker-tracking and software signals using the correlation-based procedure described in Data synchronization.


Compared to the early experiments, we now notice visually good correspondence between the predicted shoulder angle and the value measured by the stereo system.
Head comparison results
For the head-tilt tests we used the IMU sensor, because the head does not introduce the same skin-deformation issue as the upper back. We placed the sensor first on C7 and then on the occipital bone, and repeated the lateral-tilt tests.

The C7 comparison produced a least-squares proportionality factor of 2.4 rather than the ideal 1. This is expected: the IMU measures the C7 angle, while the software estimates head tilt.

With the IMU on the head, the least-squares proportionality factor was 0.8 for small angles. A correction factor could therefore compensate for this bias in software. Agreement decreased for larger angles (about 20–30°), where non-linear effects became evident; in the intended use case, these angles would already be classified as poor posture.
Statistical analysis
We performed a linear least-squares fit on the overlapped data obtained from the shoulder comparison and found a proportionality factor in the range 0.95–1.07, against an expected value of 1. This means that the proportionality factor in our tests was in the expected range, with a variation of approximately 5°. The fit residuals showed a standard deviation in the order of 0.5° (with a maximum of 1.5° across the tests).
We performed the same analysis for the head data and found a proportionality factor for small angles of about 0.8 which, as previously noted, can be corrected in the software. The residuals’ standard deviation is 2°.
We finally computed the autocorrelation for the residuals in both cases in order to understand how the error of a single measure is influenced by previous values. This is crucial since large autocorrelation times would mean that measures close in time give essentially the same amount of information.

Computing the correlations, we observed that the half-width at half-maximum of the autocorrelation functions is less than 0.1 s for shoulder angles, using the measurements from the segmentation mask, and less than 0.25 s for head angles. This is desirable, as such small autocorrelation times mean that the software can effectively average several measures in order to reduce stochastic errors before evaluating whether the angles accord with the safety ranges.
We believe these results to be satisfactory, as the errors are likely to be negligible in the context of detecting incorrect posture. However, to obtain a formal estimate of sensitivity and specificity, we need a prior distribution estimate that we do not have. We plan to perform tests on a wider range of subjects in order to obtain information on this distribution and provide an estimate for these parameters.
Discussion
Our study marks a turning point in the prevention of musculoskeletal disorders by introducing an innovative, simple, repeatable, and scalable software solution. This tool not only reduces biases associated with traditional assessment methods but also represents a significant step towards a practical and widespread approach to preventing posture-related conditions. The unobtrusive observation of subjects during their daily computer use allows for the capture of authentic and spontaneous postural behaviours, eliminating potential distortions that might arise in a controlled laboratory environment.
A distinctive aspect of our approach is the analysis of posture during the subject’s regular working hours. The reduction in self-correction when subjects are unaware they are being observed provides genuine insight into daily postural habits, overcoming the limitations of assessments conducted in controlled settings. The link between sedentary behaviour, postural alterations, and the development of musculoskeletal disorders is well documented. Our software acts as a preventive tool by timely intervention to correct poor posture and reduce the risks of long-term musculoskeletal issues.11
Traditional prevention campaigns often face challenges such as difficulty accessing biomechanics laboratories and errors induced by the subject’s familiar environment. Our software allows for accurate and repeatable assessment directly within the user’s everyday context, without the need for travel or unfamiliar settings. Our methodology differs from laboratory assessments, where subjects often maintain more appropriate postures during observation. By using our software during daily activities, we provide a more realistic and meaningful analysis of postural habits, enhancing the external validity and applicability of the results to everyday life.
Our study not only opens new avenues for preventing musculoskeletal disorders but also offers a replicable and adaptable model for future research in this field.
Conclusion
The joint angles related to various body segments used as validation parameters in this study, aimed at preventing musculoskeletal issues during work activities, are in accordance with the UNI ISO 11226 and ISO 9355-2 standards.1213 This study will require further validation to confirm the software’s efficacy, showcasing its potential not only in the field of prevention but also potentially in other areas of medicine in the future.
Appendices
Data synchronization
The video analysis and the reference system had no shared time reference. Rather than induce abrupt movements to create synchronization spikes, we aligned the signals by computing their correlation at different time offsets and selecting the offset with the greatest correlation:
where is the video-analysis signal and is the accelerometer or marker-tracking signal.
Back-skin movement
To investigate the suspected skin motion, we recorded a shoulder-tilt trial with the high-resolution smartphone camera. OpenCV optical flow tracked points on the skin; a Delaunay triangulation of the initial points was then followed over the video.14

The subject attempted both a rigid tilt of the torso, shoulders, and head, and a shoulder tilt with the head and back held still. The observed deformation confirmed the suspected skew: an IMU attached in this region is not necessarily representative of the underlying shoulder tilt.


Marker placement
The stereo system required markers on the subject’s back so that they would not be visible to the webcam and influence the pose model. There is no single, unambiguous definition of shoulder tilt because the scapular complex does not move as a rigid body.15

Markers near the spine were subject to the same soft-tissue effects as the IMU, while points at the outer shoulder could translate appreciably relative to the shoulder. We therefore adopted an intermediate location, approximately halfway across the shoulder width. The magnetic attachment minimized shirt motion but introduced its own soft-tissue uncertainty, which was not quantified separately.
Marker tracking
The motion-capture system used two cameras focused on the subject’s working area. Before each capture session—and whenever the rig was moved—we calibrated the cameras using a static reference grid captured in multiple orientations. The calibration estimates the cameras’ intrinsic and extrinsic parameters.

The recorded image pairs were later analysed to locate the markers and triangulate their three-dimensional positions. Typical average reprojection error was about one pixel, which was considered negligible relative to the pose-model and soft-tissue uncertainties discussed above.
Footnotes
- Istituto Nazionale di Statistica. "Salute e sicurezza sul lavoro in Italia". In: *Eurostat*. Nov. 29, 2021 ↩
- "World Health Organization (WHO)". https://www.who.int/ ↩
- Google Inc.. "Pose landmark detection guide | MediaPipe | Google for Developers". https://developers.google.com/mediapipe/solutions/vision/pose_landmarker ↩ ↩2
- Kim, Jong-Wook, Choi, Jin-Young, Ha, Eun-Ju, Choi, Jae-Ho. "Human Pose Estimation Using MediaPipe Pose and Optimization Method Based on a Humanoid Model". In: *Applied Sciences*, vol. 13, no. 4. Feb. 2023 ↩ ↩2 ↩3
- Wit Motion. "Tilt Angle Sensor (IMU) — WitMotion Shenzhen Co., Ltd". https://www.wit-motion.com/ahrs.html ↩
- Wit Motion. "Bluetooth AHRS IMU sensor | BWT901". https://drive.google.com/file/d/1LuiTIqTvfK57TcUEyncxxqBCqE-MFrhR/view (Datasheet) ↩ ↩2 ↩3
- InvenSense. "MPU-9250 Product Specification Revision 1.1". https://invensense.tdk.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf (Datasheet) ↩
- "International Association for the Study of Pain (IASP)". https://www.iasp-pain.org/ ↩
- ISO. *UNI ISO 11226: Valutazione delle posture statiche di lavoro*. UNI. 2019 ↩
- ISO. *ISO 9355-2: Ergonomic requirements for the design of displays and control actuators*. ISO. 1999 ↩
- "OpenCV: Optical Flow". https://docs.opencv.org/4.9.0/d4/dee/tutorial_optical_flow.html ↩
- "Scapular Force Couple — Muscle collaboration in the shoulder". https://www.youtube.com/watch?v=IN2-lqX_mFc ↩