| Literature DB >> 31752158 |
Akbar Dehghani1, Omid Sarbishei2, Tristan Glatard1, Emad Shihab1.
Abstract
The sliding window technique is widely used to segment inertial sensor signals, i.e., accelerometers and gyroscopes, for activity recognition. In this technique, the sensor signals are partitioned into fix sized time windows which can be of two types: (1) non-overlapping windows, in which time windows do not intersect, and (2) overlapping windows, in which they do. There is a generalized idea about the positive impact of using overlapping sliding windows on the performance of recognition systems in Human Activity Recognition. In this paper, we analyze the impact of overlapping sliding windows on the performance of Human Activity Recognition systems with different evaluation techniques, namely, subject-dependent cross validation and subject-independent cross validation. Our results show that the performance improvements regarding overlapping windowing reported in the literature seem to be associated with the underlying limitations of subject-dependent cross validation. Furthermore, we do not observe any performance gain from the use of such technique in conjunction with subject-independent cross validation. We conclude that when using subject-independent cross validation, non-overlapping sliding windows reach the same performance as sliding windows. This result has significant implications on the resource usage for training the human activity recognition systems.Entities:
Keywords: activity recognition; inertial sensors; supervised classification
Mesh:
Year: 2019 PMID: 31752158 PMCID: PMC6891351 DOI: 10.3390/s19225026
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Human activity recognition process.
Figure 2Example acceleration data extracted from [16].
Figure 35 s sliding windows. (a) Non-overlapping; (b) Overlapping-2 s sharing.
Figure 4Different types of CV in HAR. (a) Subject-dependent CV; (b) Subject independent CV.
Activity set in dataset 1.
| Activity | Label | Activity | Label |
|---|---|---|---|
| No activity | 0 | Upper trunk and lower body opposite twist (20x) | 18 |
| Walking (1 min) | 1 | Arms lateral elevation (20x) | 19 |
| Jogging (1 min) | 2 | Arms frontal elevation (20x) | 20 |
| Running (1 min) | 3 | Frontal hand claps (20x) | 21 |
| Jump up (20x) | 4 | Arms frontal crossing (20x) | 22 |
| Jump front & back (20x) | 5 | Shoulders high amplitude rotation (20x) | 23 |
| Jump sideways (20x) | 6 | Shoulders low amplitude rotation (20x) | 24 |
| Jump leg/arms open/closed (20x) | 7 | Arms inner rotation (20x) | 25 |
| Jump rope (20x) | 8 | Knees (alternatively) to the breast (20x) | 26 |
| Trunk twist (arms outstretched) (20x) | 9 | Heels (alternatively) to the backside (20x) | 27 |
| Trunk twist (elbows bended) (20x) | 10 | Knees bending (crouching) (20x) | 28 |
| Waist bends forward (20x) | 11 | Knees (alternatively) bend forward (20x) | 29 |
| Waist rotation (20x) | 12 | Rotation on the knees (20x) | 30 |
| Waist bends (reach foot with opposite hand) (20x) | 13 | Rowing (1 min) | 31 |
| Reach heels backwards (20x) | 14 | Elliptic bike (1 min) | 32 |
| Lateral bend (10x to the left + 10x to the right) | 15 | Cycling (1 min) | 33 |
| Lateral bend arm up (10x to the left + 10x to the right) | 16 | - | - |
| Repetitive forward stretching (20x) | 17 | - | - |
Activity set in dataset 2.
| Activity | Label | Activity | Label | Activity | Label |
|---|---|---|---|---|---|
| Arm band adjustment | 1 (Noise) | Lawnmower (both) | 20 | Squat (arms in front) | 33 |
| Arm straight up | 1 (Noise) | Lawnmower (left) | 1 (Noise) | Squat (hands behind head) | 33 |
| Band Pull-Down row | 2 | Lawnmower (right) | 21 | Squat (kettlebell) | 33 |
| Bicep Curl | 3 | Lunge (both legs) | 22 | Squat Jump | 33 |
| Bicep Curl (band) | 3 | Ball Slam | 23 | Squat Rack Shoulder Press | 33 |
| Box Jump | 4 | No Exercise | 1 (Noise) | Static Stretching | 1 (Noise) |
| Burpee | 5 | Note | 1 (Noise) | Stretching | 1 (Noise) |
| Butterfly sit-up | 6 | Triceps Extension (standing) | 24 | Tap IMU | 1 (Noise) |
| Chest Press | 7 | Triceps Extension (both) | 24 | Tap left IMU | 1 (Noise) |
| Crunch | 8 | Plank | 25 | Tap right IMU | 1 (Noise) |
| Device on Table | 1 (Noise) | Power Boat pose | 26 | Triceps Kickback (bench–both) | 34 |
| Dip | 9 | Pushups (foot variation) | 27 | Triceps Kickback (bench–left) | 1 (Noise) |
| Dumbbell Deadlift Row | 10 | Pushups | 27 | Triceps Kickback (bench–right) | 34 |
| Dumbbell Row (both) | 11 | Stretching | 1 (Noise) | Triceps Extension (lying–both) | 35 |
| Dumbbell Row (left) | 1 (Noise) | Rest | 1 (Noise) | Triceps Extension (lying–left) | 1 (Noise) |
| Dumbbell Row (right) | 12 | Rowing Machine | 28 | Triceps Extension (lying–right) | 35 |
| Dumbbell Squat (hands at side) | 13 | Running | 29 | Two-arm Dumbbell Curl (both) | 36 |
| Dynamic Stretch | 1 (Noise) | Russian Twist | 30 | Non-listed | 1 (Noise) |
| Elliptical Machine | 14 | Seated Back Fly | 31 | V-up | 37 |
| Punches | 15 | Shoulder Press | 32 | Walk | 38 |
| Invalid | 1 (Noise) | Side Plank (left) | 25 | Walking lunge | 39 |
| Jump Rope | 16 | Side Plank (right) | 25 | Wall Ball | 40 |
| Jumping Jacks | 17 | Sit-up (hand behind head) | 6 | Wall Squat | 41 |
| Kettlebell Swing | 18 | Sit-up | 6 | Dumbbell Curl (alternating) | 36 |
| Lateral Raise | 19 | Squat | 33 |
Figure 5Experiment 1–Subject-dependent CV–Dataset 1. (a) FS1; (b) FS2; (c) FS3.
Figure 6Experiment 1–Subject-dependent CV–Dataset 2. (a) FS1; (b) FS2; (c) FS3.
Figure 7Experiment 2–Subject-independent CV–Dataset 1. (a) FS1; (b) FS2; (c) FS3.
F1 scores of DT and KNN for several window sizes in overlapping (O) and nonoverlapping (NO) windowing–Subject-independent CV–FS3.
| Dataset | Window Size (sec) | Classifier | F1-Score-O (%) | F1-Score-NO (%) |
|---|---|---|---|---|
| 1 | 1 | DT | 86.42 | 86.0 |
| KNN | 89.04 | 88.78 | ||
| 4 | DT | 81.97 | 83.38 | |
| KNN | 82.05 | 82.18 | ||
| 6 | DT | 80.1 | 80.83 | |
| KNN | 79.08 | 79.30 | ||
| 7 | DT | 80.61 | 80.62 | |
| KNN | 77.74 | 78.68 | ||
| 2 | 1 | DT | 69.26 | 67.38 |
| KNN | 63.61 | 63.94 | ||
| 4 | DT | 74.37 | 73.06 | |
| KNN | 65.52 | 67.01 | ||
| 6 | DT | 75.28 | 73.12 | |
| KNN | 66.0 | 67.8 | ||
| 7 | DT | 75.46 | 73.06 | |
| KNN | 66.0 | 67.93 |
Figure 8Experiment 2–Subject-independent CV–Dataset 2. (a) FS1; (b) FS2; (c) FS3.
The hyperparameters values for KNN and DT in Experiments 2 and 3. When max_depth is set to None, the decision tree is expanded until all leaves are pure [27].
| Classifier | Hyperparameter | Experiment 2 | Experiment 3 |
|---|---|---|---|
| KNN | K (n_neighbors) | 3 | 6 |
| DT | Criterion | ‘gini’ | ‘entropy’ |
| max_depth | None | 20 | |
| max_features | 1 | 0.7 |
Figure 9Experiment 3–Subject-independent CV–Dataset 1. (a) FS1; (b) FS2; (c) FS3.
Figure 10Experiment 3–Subject-independent CV–Dataset 2. (a) FS1; (b) FS2; (c) FS3.
Figure 11Experiment 4–Subject-independent CV–Dataset 1. (a) DT; (b) KNN; (c) NB; (d) NCC.
Figure 12Experiment 4–Subject-independent CV–Dataset 2. (a) DT; (b) KNN; (c) NB; (d) NCC.
Normalized confusion matrix for Experiment 5, i.e., six activities and one noise class representing all other activities and no activity periods from Dataset 2 under subject independent cross validation. Rows are true activities, and columns are predicted ones. Each entry has two values, where the top (bottom) value refers to the scenario with overlapping (non-overlapping) windows.
| Activities | Noise (Others) | Curl | Triceps | Run | Elliptical | JumpJacks | Kettlebell |
|---|---|---|---|---|---|---|---|
| Noise (Others) |
| 0.00094 | 0.00091 | 0.00209 | 0.00127 | 0.00026 | 0.00045 |
| Curl | 0.1426 |
| 0.00659 | 0 | 0 | 0 | 0 |
| Triceps | 0.17235 | 0.00451 |
| 0 | 0 | 0 | 0 |
| Run | 0.20903 | 0 | 0 |
| 0.00429 | 0 | 0 |
| Elliptical | 0.16742 | 0 | 0 | 0.00916 |
| 0 | 0 |
| JumpJacks | 0.20147 | 0 | 0 | 0 | 0 |
| 0 |
| Kettlebell | 0.18938 | 0.00287 | 0 | 0 | 0 | 0 |
|
Overlapping windowing vs. nonoverlapping windowing required resources-Subject independent CV.
| Dataset | Raw Size (GB) | Nonoverlapping Windowing | Overlapping Windowing | ||||
|---|---|---|---|---|---|---|---|
| Segmentation | Training Time (Day) | Segmentation | Training Time (Day) | ||||
| - | - | Time (Hour) | Size (GB) | Time (Hour) | Size (GB) | ||
| 1 | 2.4 | 6.0 | 2.3 | 1.0 | 11.0 | 21 | 4.0 |
| 2 | 3.4 | 12.0 | 5.8 | 2.0 | 20.0 | 51 | 8.0 |