# Human Pose Detection for Robotic-Assisted and Rehabilitation Environments
## 7 Discussion  
In this article, we compared the performance of estimating shoulder and elbow angles for rehabilitation exercises using CNN-based human pose estimation methods: OpenPose and Detectron2. Qualitatively, for the four proposed rehabilitation exercises, better results were obtained with OpenPose. OpenPose had an average RMSE of 7.9\({}^{\circ}\) and Detectron2 had an RMSE of 14.18\({}^{\circ}\). However, for the elbow flexion exercise, which had a worse angle of view, both methods obtained high errors. According to [39], evaluation therapists tend to underestimate the range of motion by 9.41\({}^{\circ}\) on average for any joint movement of the upper limb. Therefore, with the results obtained in this approach, it can be concluded that OpenPose is an adequate library for evaluating patient performance in rehabilitation programs that involve the following exercises: left elbow side flexion, shoulder abduction, and shoulder extension.  
Regarding the response time of the analyzed pose estimators, the performance of these methods is related directly to the available GPU. In our study, we measured a performance between 6.7 and 13 FPS with OpenPose and between 1.8 and 3 FPS with Detectron 2.  
Figure 11: Absolute error for the four rehabilitation exercises compared to ground truth: (**a**) flexion side left elbow, (**b**) flexion left elbow, (**c**) abduction left shoulder, (**d**) abduction right shoulder, (**e**) extension left shoulder, and (**f**) extension right shoulder.  
Figure 10: RMSE of the four rehabilitation exercises compared to ground truth.  
The kind of exercises related to upper limb rehabilitation is smooth and relatively slow, so the performance of OpenPose is high enough to monitor the exercises and provide useful information for rehabilitation therapy.  
The major limitations of the present study were mainly related to the ground truth used; many approaches use three-dimensional motion analysis devices such as the VICON motion system or Optotrak. However, the equipment is expensive, and it requires a conditioned environment and technical skills for attaching sensors. We decided to use Kinect 2 as our ground truth because of the cost and because this sensor has a high accuracy in joint estimation while providing skeletal tracking. Another limitation of the study was that the system was only tested on a single healthy subject who participated in a single experimental session. A study with a larger group of subjects and different positions should be examined to compare the quality of the estimate of the human pose by both methods. In future works, we intend to collect data from more participants and extend this work to lower-limb movement estimations.  
Conceptualization, C.A.J., V.M. and O.G.H.; methodology, C.A.J., V.M. and J.L.R.; software, O.G.H.; validation, C.A.J., V.M., J.L.R. and O.G.H.; investigation, C.A.J., V.M. and O.G.H.; resources, C.A.J.; writing--original draft preparation, C.A.J., V.M., J.L.R. and O.G.H.; writing--review and editing, C.A.J., V.M., J.L.R. and O.G.H. All authors have read and agreed to the published version of the manuscript.  
[PERSON] holds a grant from the Spanish Fundacion Carolina, the University of Alicante, and the National Autonomous University of Honduras.  
Not applicable.  
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.  
Data Availability Statement: Not applicable.  
The authors declare no conflict of interest.