*2.2. Feature Extraction*

According to the procedure used in our prior study [13], which is depicted in Figure 2 and exemplified by Equations (1)–(5), data for five ratio-based body measurements (HW1, HW2, HW3, A1 and A2) were extracted from image sequences available for slow walk, normal walk, and fast walking. More specifically, among the five ratio-based body measurements defined in our previous study [13], HW1, HW2 and HW3 were calculated using the rectangular boundary box height and width. Bounding boxes were placed around the whole body, mid body and lower body locations in each image, and HW1, HW2 and HW3 were then calculated using Equations (1)–(3). The terms in the equations are presented in Figure 2a–c. A1 and A2 were measured by evaluating the white pixels in the image, boundary box area and area between two legs in each image and then using Equations (4) and (5). The terms in the equations are presented in Figure 2d,e. Lower- body width Full- body height HW3 Full- body area Apparent- body area A1 Full- body area Area between tw o legs A2

**Figure 2.** Detail of the terms used in Equations (1)–(5). Extraction of (**a**) full-body height (H) and full body width (W1) (**b**) mid-body width (W2) (**c**) lower-body width (W3) (**d**) full body area and apparent body area, and (**e**) area between two legs.

Ratio of the full-body height to the full-body width,

$$\text{HW1} = \frac{\text{Full} - \text{body height}}{\text{Full} - \text{body width}} \tag{1}$$

Ratio of the full-body height to the mid-body width,

$$\text{HW2} = \frac{\text{Full} - \text{body height}}{\text{Mid} - \text{body width}} \tag{2}$$

Ratio of the full-body height to the lower-body width,

$$\text{HW3} = \frac{\text{Full} - \text{body height}}{\text{Lower} - \text{body width}} \tag{3}$$

Ratio of the apparent body area to the full-body area,

$$\text{A1} = \frac{\text{Apparent} - \text{bodyarea}}{\text{Full} - \text{bodyarea}} \tag{4}$$

Ratio of the area between two legs to the full-body area,

$$\text{A2} = \frac{\text{Area between two legs}}{\text{Full} - \text{bodyarea}} \tag{5}$$

After extracting data for five ratio-based body measurements from marker-free 2D image sequences, our previous research [13] discovered that each of the five ratio-based body measurements varied over time such that they created quasi-periodic patterns (Figure 3), which is an established pattern of human gait cycle motion while walking [33].

**Figure 3.** Quasi-periodic signals created by five ratio-based body measurements calculated from image sequences of a single individual moving normally while walking. HW1, ratio of the full-body height to the full-body width; HW2, ratio of the full-body height to the mid-body width; HW3, ratio of the full-body height to the lower-body width; A1, ratio of the apparent body area to the full-body area; and A2, ratio of the area between two legs to the full-body area.

### *2.3. Experiment Procedure*

In the current study, for each walking speed condition, coefficient of determination (R<sup>2</sup> ) were calculated among the data of five ratio-based body measurements to determine the ratio-based body measurements with low correlation. R-Square (R<sup>2</sup> ) has been used as a state-of-the-art tool for correlation analysis [34]. The results from the correlation analysis are presented in terms of R<sup>2</sup> in Section 3. The quasi-periodic patterns were then used to establish three types of walk speed patterns for slow, normal and fast walking. Thirty datasets were created using three types of walk speed patterns. Among these datasets, the walk speed patterns in five, ten, ten and five datasets were established using quasi-

> 5(! )! !5

, 2,1 ,...4

−

periodic patterns from one, two, three and four of the five ratio-based body measurements, respectively. The combinations of ratio-based body measurements in the walk patterns obtained with the above-described datasets were established according to the combination rule in Equation (6), and no combinations were repeated for different orders of ratio-based body measurements. This process of creating a combination of features have been used by the current studies [35,36].

$$\mathcal{C}\_{n} = \frac{5!}{n!(5-n)!}, \ n = 1, 2, \dots, 4 \tag{6}$$

In this equation, *C*(*n*) is the number of combinations generated by the included ratiobased body measurements, 5 is the total number of ratio-based body measurements, n is the number of included ratio-based body measurements in the combination, and (5 − n) is the number of ratio-based body measurements excluded from the combination.

Each dataset contained 136 walk speed patterns for each of the three speeds (i.e., slow, normal, and fast). Table 1 provides a description of the walk patterns in all the datasets. After datasets' construction, a biLSTM-based deep learning architecture along with k-fold (where, k = 17) cross validation [13] was performed using all ratio-based body measurements combinations (Table 1) for walking speed classification. A total of 272 cross validation experiments were performed for each deep learning-based walking speed classification task. According to the prior studies, this simple structure is adequate to produce non-overfitting and highly accurate classification problems of the same types [37,38]. Figure 4 presents workflow of the walking speed classification using different combination of ratio-based body measurements. The results from the walking speed classification are presented in terms of mean ± SD classification accuracies and mean ± SD training time in Section 3 and in Supplementary Material (Tables S1–S5).

**Table 1.** Description of the walk patterns in all datasets used in biLSTM-based deep learning architecture.


*Bioengineering* **2022**, *9*, 715


**Table 1.** *Cont.*

**Figure 4.** Workflow of the walking speed classification using different combinations of ratio-based **Figure 4.** Workflow of the walking speed classification using different combinations of ratio-based body measurements (RBBMs).
