# Gait Recognition via Deep Learning of the Center-of-Pressure Trajectory
## Materials and Methods  
### Data Collection and Pre-Processing  
The data used in the present study were collected by the author in a previous study aimed at analyzing the influence of voluntary synchronization to external sensory cues on gait variability [24; 25]. Thirty-six healthy adults participated in the study, 14 men and 22 women. The means and standard deviations of their individual characteristics were age: 33 years (10), body height: 1.72 m (0.08), and body mass: 66 kg (13). The experiment consisted of 30 min of treadmill walking under three cueing conditions--no cueing, auditory cueing, and visual cueing. The participants wore their customary shoes, but high heels were forbidden. The treadmill was instrumented with a force platform consisting of six load cells that retrieved the intensity and the position of the vertical force exerted by the subject walking on the treadmill surface [26; 27].  
On a treadmill, the COP trajectory of a walking individual has a typical butterfly-like shape [28], as shown in Figure 1. The \"wings\" of the butterfly correspond to the stance on a single foot, whereas the central crossing corresponds to the double-support phase when the body weight passes from one foot to the other. For a dynamical representation of the process, refer to a short video published in the supplementary material of a previous article [29].  
The 500 Hz two-dimensional (2-D) positional signals were low-pass filtered at 30 Hz and down sampled to 50 Hz. Each stride was identified in the raw signals [24; 26]. Five-hundred strides were kept for each cueing condition and each participant. These 500-stride time series were resampled to a uniform length of 20,000 samples; that is, 40 samples per stride. The aim was to standardize the average stride duration among participants. Thus, the dataset contained three 2-D signals of 20,000 sample length for each of the 36 participants, for a total of 54,000 strides.  
Each 2-D signal of 20,000 samples was split into three parts: the first 16,000 samples were added to the training set, the next 2000 samples to the development set (dev set), and the last 2000 samples to the test set. The signals were stacked across subjects and conditions in arrays of three columns corresponding to the \(x\)-axis, the \(y\)-axis and the subject's identification (ID) number (1-36).  
Finally, a non-overlapping sliding window algorithm sliced the arrays into small segments of 80 samples each (i.e., two strides, or four steps). Four random examples of these segments are shown in Figure 2. Each segment was labeled with the subject's ID, which was converted into a categorical format. Two ensembles of sets were created, the first for developing and testing the CNN models and containing the data of 30 subjects (18,000 segments in the training set and 2250 segments in the dev and test sets) and the second for transfer learning, containing the data of six subjects (4050 segments in the training set, and 450 segments in the test set).  
Figure 1: Center-of-pressure trajectory of walking. Five consecutive strides (gait cycles) recorded by the instrumented treadmill are shown. The raw 500 Hz signal was low-pass filtered at 30 Hz and down-sampled at 50 Hz. The X position corresponds to the movements perpendicular to the direction of progression. The Y position corresponds to the movements parallel to the direction of progression.