*5.1. Exercise 1: Elbow Side Flexion*

The first experiment was the elbow side flexion exercise. Figure 7a shows the left elbow angle calculated with both approaches for all positions in the exercise. The left elbow angle varied between 50◦ and 180◦ with OpenPose and between 40◦ and 180◦ with

Detectron 2. For OpenPose, the root-mean-square error (RMSE) was 9.23◦ and the mean absolute error (MAE) was 7.53◦, while for Detectron 2, the RMSE was 13.64◦ and the MAE was 9.32◦.

**Figure 7.** Exercise 1: elbow side flexion angles for two iterations (**a**); exercise 2: elbow flexion for three iterations (**b**).

#### *5.2. Exercise 2: Elbow Flexion*

The second experiment was the left elbow flexion exercise where the angle of view of the main points was not the most favorable. Figure 7b shows the results of the calculation of angles. The left elbow angle varied between 11 and 180◦ (i.e., straight arm) with OpenPose and between 30◦ and 180◦ with Detectron 2. For OpenPose, RMSE = 15.84◦ and MAE = 9.74◦, while for Detectron 2, RMSE = 27.27◦ and MAE = 20.03◦.

#### *5.3. Exercise 3: Shoulder Extension*

The third and fourth experiments aimed to measure the precision of both approaches when performing rehabilitation exercises with both arms in shoulder extension and abduction. Figure 8 shows the angles for the left and right shoulder in the shoulders' extension exercise. The left shoulder angle varied between 5◦ and 91◦ with OpenPose and between 4◦ and 98◦ with Detectron 2. The right shoulder angle varied between 7◦ and 102◦ with OpenPose and between 3◦ and 95◦ with Detectron 2. For the left shoulder, RMSE = 3.57◦ and MAE = 2.96◦ for OpenPose, while RMSE = 7.99◦ and MAE = 7.15◦ for Detectron 2. For the right shoulder, RMSE = 8.67◦ and MAE = 8.16◦ for OpenPose, while RMSE = 11.70◦ and MAE = 9.24◦ for Detectron 2.

**Figure 8.** Exercise 3: angles of both shoulders in extension rehabilitation exercise for two iterations.
