| Literature DB >> 32098082 |
Fernando E Casado1, Germán Rodríguez2, Roberto Iglesias1, Carlos V Regueiro3, Senén Barro1, Adrián Canedo-Rodríguez2.
Abstract
Presently, smartphones are used more and more for purposes that have nothing to do withphone calls or simple data transfers. One example is the recognition of human activity, which isrelevant information for many applications in the domains of medical diagnosis, elderly assistance,indoor localization, and navigation. The information captured by the inertial sensors of the phone(accelerometer, gyroscope, and magnetometer) can be analyzed to determine the activity performedby the person who is carrying the device, in particular in the activity of walking. Nevertheless,the development of a standalone application able to detect the walking activity starting only fromthe data provided by these inertial sensors is a complex task. This complexity lies in the hardwaredisparity, noise on data, and mostly the many movements that the smartphone can experience andwhich have nothing to do with the physical displacement of the owner. In this work, we exploreand compare several approaches for identifying the walking activity. We categorize them into twomain groups: the first one uses features extracted from the inertial data, whereas the second oneanalyzes the characteristic shape of the time series made up of the sensors readings. Due to the lackof public datasets of inertial data from smartphones for the recognition of human activity underno constraints, we collected data from 77 different people who were not connected to this research.Using this dataset, which we published online, we performed an extensive experimental validationand comparison of our proposals.Entities:
Keywords: activity recognition; inertial sensor fusion; pattern classification; smartphones; time series classification; walking recognition
Year: 2020 PMID: 32098082 PMCID: PMC7071017 DOI: 10.3390/s20041189
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Norm of the acceleration experienced by a mobile phone when its owner is walking (a), and not walking, but gesticulating with the mobile in his/her hand (b).
Figure 2Workflow diagram of the shape-based proposal.
Figure 3Subsequence DTW between a query representative pattern (the top black line) and another reference pattern (the bottom red dotted line).
Figure 4Sports armbands holding the mobiles of the legs.
Figure 5Graphical representation of the ground truth (thicker and darker line) over the signal of the vertical component of acceleration in the phone (thinner and clearer line).
Figure 6Graphical representation of the two different CNN architectures used in the experiments.
Details of the CNN architecture a.
| Layer Name | Kernel Size | # Kernels | Stride | Feature Map. | # Params |
|---|---|---|---|---|---|
| conv1_a | 1 × 3 | 10 | 1 | 1 × 248 × 10 | 40 |
| conv2_a | 1 × 3 | 10 | 1 | 1 × 246 × 10 | 310 |
| max_pool_a | 1 × 2 | - | 1 | 1 × 123 × 10 | 0 |
| dropout1_a | - | - | - | 1 × 123 × 10 | 0 |
| flattening_a | - | - | - | 1 × 1230 × 1 | 0 |
| fully_con1_a | - | - | - | 1 × 128 × 1 | 157,568 |
| dropout2_a | - | - | - | 1 × 128 × 1 | 0 |
| fully_con2_a | - | - | - | 1 × 2 × 1 | 258 |
Details of the CNN architecture b.
| Layer Name | Kernel Size | # Kernels | Stride | Feature Map. | # Params |
|---|---|---|---|---|---|
| conv1_b | 1 × 3 | 5 | 1 | 1 × 248 × 5 | 20 |
| max_pool1_b | 1 × 2 | - | 1 | 1 × 124 × 5 | 0 |
| conv2_b | 1 × 3 | 10 | 1 | 1 × 122 × 10 | 160 |
| max_pool2_b | 1 × 2 | - | - | 1 × 61 × 10 | 0 |
| flattening_b | - | - | - | 1 × 610 × 1 | 0 |
| fully_con1_b | - | - | - | 1 × 1024 × 1 | 625,664 |
| dropout_b | - | - | - | 1 × 1024 × 1 | 0 |
| fully_con2 _b | - | - | - | 1 × 2 × 1 | 2050 |
Summary of results using the feature-based proposal with different classifiers.
| Feature Selection Method | Classifier | TP | FP | TN | FN | Sensitivity | Specificity | Accuracy |
|---|---|---|---|---|---|---|---|---|
| Manual selection | Random Forests | 4708 | 19 | 500 | 237 | 0.9521 | 0.9634 | 0.9531 |
| RBF SVM | 4703 | 19 | 500 | 242 | 0.9511 | 0.9634 | 0.9522 | |
| GBM | 4707 | 29 | 490 | 238 | 0.9519 | 0.9441 | 0.9511 | |
| 4723 | 48 | 471 | 222 | 0.9551 | 0.9075 | 0.9506 | ||
| Linear SVM | 4642 | 44 | 475 | 303 | 0.9387 | 0.9152 | 0.9365 | |
| Naïve Bayes | 4654 | 61 | 458 | 291 | 0.9412 | 0.8825 | 0.9356 | |
| C5.0 | 4633 | 48 | 471 | 312 | 0.9369 | 0.9075 | 0.9341 | |
| Deep learning | CNN (architecture | 4632 | 38 | 481 | 313 | 0.9359 | 0.9282 | 0.9357 |
| CNN (architecture | 4563 | 50 | 469 | 382 | 0.9210 | 0.9115 | 0.9210 | |
| CNN (architecture | 4567 | 32 | 487 | 378 | 0.9251 | 0.9211 | 0.9250 | |
| CNN (architecture | 4596 | 47 | 472 | 349 | 0.9276 | 0.9247 | 0.9275 | |
| Deep learning | CNN (architecture | 3100 | 3 | 3003 | 100 | 0.9834 | 0.9819 | 0.9834 |
| CNN (architecture | 3080 | 17 | 3005 | 92 | 0.9824 | 0.9803 | 0.9824 | |
| CNN (architecture | 3098 | 5 | 3019 | 84 | 0.9857 | 0.9853 | 0.9857 | |
| CNN (architecture | 3069 | 28 | 3016 | 81 | 0.9824 | 0.9830 | 0.9824 |
Summary of results using the shape-based proposal with different classifiers.
| Pattern Selection Method | Classifier | No. of Patterns | TP | FP | TN | FN | Sensitivity | Specificity | Accuracy |
|---|---|---|---|---|---|---|---|---|---|
| RBF SVM | RBF SVM | 1551 | 4724 | 33 | 486 | 221 | 0.9553 | 0.9364 | 0.9535 |
| 221 | 4611 | 121 | 398 | 334 | 0.9325 | 0.7669 | 0.9167 | ||
| 5 | 4586 | 126 | 393 | 359 | 0.9274 | 0.7572 | 0.9112 | ||
| Random Forests | 1551 | 4674 | 35 | 484 | 271 | 0.9452 | 0.9326 | 0.9440 | |
| 221 | 4573 | 75 | 444 | 372 | 0.9248 | 0.8555 | 0.9182 | ||
| 5 | 4378 | 109 | 410 | 567 | 0.8853 | 0.7900 | 0.8763 | ||
| GBM | 1551 | 4668 | 37 | 482 | 277 | 0.9440 | 0.9287 | 0.9425 | |
| 221 | 4547 | 82 | 437 | 398 | 0.9195 | 0.8420 | 0.9122 | ||
| 5 | 4497 | 116 | 403 | 448 | 0.9094 | 0.7765 | 0.8968 | ||
| Linear SVM | 1551 | 4621 | 37 | 482 | 324 | 0.9345 | 0.9287 | 0.9339 | |
| 221 | 4449 | 52 | 467 | 496 | 0.8997 | 0.8998 | 0.8997 | ||
| 5 | 4425 | 115 | 404 | 520 | 0.8948 | 0.7784 | 0.8838 | ||
| 1551 | 4703 | 69 | 450 | 242 | 0.9511 | 0.8671 | 0.9431 | ||
| 221 | 4563 | 68 | 41 | 382 | 0.9228 | 0.8690 | 0.9176 | ||
| 5 | 4330 | 105 | 414 | 615 | 0.8756 | 0.7977 | 0.8682 | ||
| Naïve Bayes | 1551 | 4660 | 146 | 373 | 285 | 0.9424 | 0.7187 | 0.9211 | |
| 221 | 4607 | 132 | 387 | 338 | 0.9316 | 0.7457 | 0.9140 | ||
| 5 | 4541 | 123 | 396 | 404 | 0.9183 | 0.7630 | 0.9036 | ||
| C5.0 | 1551 | 4400 | 56 | 463 | 545 | 0.8898 | 0.8921 | 0.8900 | |
| 221 | 4176 | 84 | 435 | 769 | 0.8445 | 0.8382 | 0.9439 | ||
| 5 | 4683 | 136 | 383 | 262 | 0.9470 | 0.7380 | 0.9272 | ||
| PAM medoids | RBF SVM | 180 | 4651 | 47 | 472 | 294 | 0.9405 | 0.9094 | 0.9376 |
| 10 | 4555 | 81 | 438 | 390 | 0.9211 | 0.8439 | 0.9138 | ||
| 4 | 4623 | 104 | 415 | 322 | 0.9349 | 0.7996 | 0.9220 | ||
| 2 | 4323 | 149 | 370 | 622 | 0.8742 | 0.7129 | 0.8589 | ||
| Random Forests | 180 | 4633 | 57 | 462 | 312 | 0.9369 | 0.8902 | 0.9325 | |
| 10 | 4513 | 77 | 442 | 432 | 0.9126 | 0.8516 | 0.9068 | ||
| 4 | 4410 | 91 | 428 | 535 | 0.8918 | 0.8247 | 0.8854 | ||
| 2 | 3973 | 126 | 393 | 972 | 0.8034 | 0.7572 | 0.7990 | ||
| GBM | 180 | 4598 | 53 | 466 | 347 | 0.9298 | 0.8979 | 0.9268 | |
| 10 | 4468 | 70 | 449 | 447 | 0.9035 | 0.8651 | 0.8999 | ||
| 4 | 4500 | 94 | 425 | 445 | 0.9100 | 0.8189 | 0.9014 | ||
| 2 | 4229 | 120 | 399 | 716 | 0.8552 | 0.7688 | 0.8470 | ||
| Linear SVM | 180 | 4511 | 38 | 481 | 434 | 0.9122 | 0.9268 | 0.9136 | |
| 10 | 4544 | 89 | 430 | 401 | 0.9189 | 0.8285 | 0.9103 | ||
| 4 | 4496 | 123 | 396 | 449 | 0.9092 | 0.7630 | 0.8953 | ||
| 2 | 4311 | 156 | 363 | 634 | 0.8718 | 0.6994 | 0.8554 | ||
| 180 | 4629 | 66 | 453 | 316 | 0.9361 | 0.8728 | 0.9301 | ||
| 10 | 4572 | 97 | 422 | 373 | 0.9246 | 0.8131 | 0.9140 | ||
| 4 | 4434 | 92 | 425 | 445 | 0.9100 | 0.8189 | 0.9014 | ||
| 2 | 4117 | 120 | 399 | 828 | 0.8326 | 0.7688 | 0.8265 | ||
| Naïve Bayes | 180 | 4526 | 113 | 406 | 419 | 0.9153 | 0.7823 | 0.9026 | |
| 10 | 4346 | 79 | 440 | 599 | 0.8789 | 0.8478 | 0.8759 | ||
| 4 | 4395 | 85 | 434 | 550 | 0.8888 | 0.8362 | 0.8838 | ||
| 2 | 4172 | 156 | 363 | 773 | 0.8437 | 0.6994 | 0.8300 | ||
| C5.0 | 180 | 4362 | 76 | 443 | 583 | 0.8821 | 0.8536 | 0.8794 | |
| 10 | 4293 | 77 | 442 | 652 | 0.8681 | 0.8516 | 0.8666 | ||
| 4 | 4593 | 109 | 410 | 352 | 0.9288 | 0.7900 | 0.9156 | ||
| 2 | 4200 | 144 | 375 | 745 | 0.8493 | 0.7225 | 0.8373 | ||
| Exhaustive search | RBF SVM | 2 | 4492 | 93 | 426 | 453 | 0.9084 | 0.8208 | 0.9001 |
| Random Forests | 2 | 4179 | 89 | 430 | 766 | 0.8451 | 0.8285 | 0.8435 | |
| GBM | 2 | 4306 | 78 | 441 | 639 | 0.8708 | 0.8497 | 0.8688 | |
| Linear SVM | 2 | 4360 | 85 | 434 | 585 | 0.8817 | 0.8362 | 0.8774 | |
| 2 | 4293 | 91 | 428 | 625 | 0.8681 | 0.8247 | 0.8640 | ||
| Naïve Bayes | 2 | 4135 | 91 | 428 | 810 | 0.8362 | 0.8247 | 0.8351 | |
| C5.0 | 2 | 4587 | 120 | 399 | 358 | 0.9276 | 0.7688 | 0.9125 | |
| Informed search: | RBF SVM | 4 | 4526 | 68 | 451 | 419 | 0.9153 | 0.8690 | 0.9109 |
| 10 | 4504 | 63 | 456 | 441 | 0.9108 | 0.8786 | 0.9078 | ||
| Random Forests | 4 | 4441 | 68 | 451 | 504 | 0.8981 | 0.8690 | 0.8953 | |
| 10 | 4494 | 60 | 459 | 451 | 0.9088 | 0.8844 | 0.9065 | ||
| GBM | 4 | 4411 | 62 | 457 | 534 | 0.8920 | 0.8805 | 0.8909 | |
| 10 | 4465 | 64 | 455 | 480 | 0.9029 | 0.8767 | 0.9004 | ||
| Linear SVM | 4 | 4376 | 66 | 453 | 569 | 0.8849 | 0.8728 | 0.8838 | |
| 10 | 4443 | 69 | 450 | 502 | 0.8985 | 0.8671 | 0.8955 | ||
| 4 | 4434 | 75 | 444 | 511 | 0.8967 | 0.8555 | 0.8928 | ||
| 10 | 4430 | 74 | 445 | 515 | 0.8959 | 0.8574 | 0.8922 | ||
| Naïve Bayes | 4 | 4623 | 130 | 389 | 322 | 0.9349 | 0.7495 | 0.9173 | |
| 10 | 4645 | 110 | 409 | 300 | 0.9393 | 0.7881 | 0.9250 | ||
| C5.0 | 4 | 4404 | 86 | 433 | 541 | 0.8906 | 0.8343 | 0.8852 | |
| 10 | 4382 | 64 | 455 | 563 | 0.8861 | 0.8767 | 0.8852 | ||
| Informed search: | RBF SVM | 4 | 4656 | 121 | 398 | 289 | 0.9416 | 0.7669 | 0.9250 |
| 10 | 4532 | 92 | 427 | 413 | 0.9165 | 0.8227 | 0.9076 | ||
| Random Forests | 4 | 4414 | 95 | 424 | 531 | 0.8926 | 0.8170 | 0.8854 | |
| 10 | 4496 | 72 | 447 | 449 | 0.9092 | 0.8613 | 0.9046 | ||
| GBM | 4 | 4524 | 110 | 409 | 421 | 0.9128 | 0.7881 | 0.9028 | |
| 10 | 4441 | 83 | 436 | 504 | 0.8981 | 0.8401 | 0.8926 | ||
| Linear SVM | 4 | 4553 | 124 | 395 | 392 | 0.9207 | 0.7611 | 0.9056 | |
| 10 | 4384 | 85 | 434 | 561 | 0.8866 | 0.8362 | 0.8818 | ||
| 4 | 4443 | 114 | 405 | 502 | 0.8985 | 0.7803 | 0.8873 | ||
| 10 | 4471 | 98 | 421 | 747 | 0.9041 | 0.8112 | 0.8953 | ||
| Naïve Bayes | 4 | 4546 | 142 | 377 | 399 | 0.9193 | 0.7264 | 0.9010 | |
| 10 | 4595 | 135 | 384 | 350 | 0.9292 | 0.7399 | 0.9112 | ||
| C5.0 | 4 | 4413 | 101 | 418 | 535 | 0.8924 | 0.8054 | 0.8842 | |
| 10 | 4134 | 71 | 448 | 811 | 0.8360 | 0.8632 | 0.8386 |
Summary of results using an ensemble of both proposals.
| Ensemble Method | TP | FP | TN | FN | Sensitivity | Specificity | Accuracy |
|---|---|---|---|---|---|---|---|
| Top layer RBF SVM | 4766 | 30 | 489 | 179 | 0.9638 | 0.9422 | 0.9617 |
| Top layer C5.0 | 4746 | 24 | 495 | 199 | 0.9598 | 0.9538 | 0.9592 |
| Logistic Regression WA | 4708 | 19 | 500 | 237 | 0.9521 | 0.9634 | 0.9531 |
| Top layer Naïve Bayes | 4539 | 8 | 511 | 406 | 0.9179 | 0.9846 | 0.9242 |
| Top layer Linear SVM | 4441 | 9 | 510 | 504 | 0.8981 | 0.9827 | 0.9061 |
| Top layer GBM | 4426 | 9 | 510 | 519 | 0.8950 | 0.9827 | 0.9034 |
| Top layer Random Forests | 4419 | 7 | 512 | 526 | 0.8936 | 0.9865 | 0.9025 |
| Top layer | 4418 | 9 | 510 | 527 | 0.8934 | 0.9827 | 0.9019 |