Myo Transformer Signal Classification for an Anthropomorphic Robotic Hand
Abstract
:1. Introduction
2. Materials and Methods
2.1. Anthropomorphic Robotic Hand
2.2. Database
Processing Data
2.3. Mio-Transformer Network
2.3.1. Embedding Patches
2.3.2. Transformer Encoder
2.3.3. Model Configuration
- seq_len: This parameter defines the length of the input sequence to the model, which, in this case, is set to 512 sample points. This means that the model processes sequences of 512 data points at a time.
- channels: The number of input channels refers to the six channels used to sense the EMG signal data.
- patch_size: This parameter controls the sizes of the patches used in the model, which are set to 4, 8, 16, and 32.
- num_classes: The number of distinct classes the model is designed to classify is set to 4, which depends on the number of different hand gestures you want to identify in the EMG signals.
- dim: The dimension of the embedding space into which the input sequences are transformed. The embedding space was trained with 1024 and 2048 dimensions.
- depth: The depth of the transformer network, i.e., the number of transformer layers in the model. The model was tested with 6, 8, and 10 transformer layers.
- heads: The number of multi-head attention layers, set to 8, 12, and 16 layers in this case.
- dim_head: The dimension of each MHSA of the transformer layers. In this case, each head has a dimension of 32 or 64.
- mlp_dim: The dimension of the MLP layer, which was set to 1024 and 2048.
- dropout: The dropout rate applied to the transformer encoder layers was set to 0.05.
- emb_dropout: The dropout rate applied to the embedded patch was set to 0.05.
2.4. Training Details
2.5. Framework
3. Results
3.1. Parameters Tuning
3.2. MuCBiT Classification Results
3.3. Classification Results: Testing Dataset
4. Discussion
Limitations and Future Directions
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Campanini, I.; Disselhorst-Klug, C.; Rymer, W.Z.; Merletti, R. Surface EMG in Clinical Assessment and Neurorehabilitation: Barriers Limiting Its Use. Front. Neurol. 2020, 11, 4–7. [Google Scholar] [CrossRef]
- Ambikapathy, B.; Krishnamurthy, K. Analysis of Electromyograms Recorded Using Invasive and Noninvasive Electrodes: A Study Based on Entropy and Lyapunov Exponents Estimated Using Artificial Neural Networks. J. Ambient Intell. Humaniz. Comput. 2018, 1–9. [Google Scholar] [CrossRef]
- Merletti, R.; Rainoldi, A.; Farina, D. Surface Electromyography for Noninvasive Characterization of Muscle. Exerc. Sport Sci. Rev. 2001, 29, 20–25. [Google Scholar] [CrossRef] [PubMed]
- Choi, C.; Micera, S.; Carpaneto, J.; Kim, J. Development and Quantitative Performance Evaluation of a Noninvasive EMG Computer Interface. IEEE Trans. Biomed. Eng. 2009, 56, 188–191. [Google Scholar] [CrossRef] [PubMed]
- Lee, D.-H.; Park, J.-H.; Park, S.-W.; Baeg, M.-H.; Bae, J.-H. KITECH-Hand: A Highly Dexterous and Modularized Robotic Hand. IEEE ASME Trans. Mechatron. 2017, 22, 876–887. [Google Scholar] [CrossRef]
- Shin, Y.J.; Kim, S.; Kim, K.-S. Design of Prosthetic Robot Hand with High Performances Based on Novel Actuation Principles. IFAC Proc. Vol. 2013, 46, 313–318. [Google Scholar] [CrossRef]
- Zhou, J.; Chen, X.; Chang, U.; Lu, J.-T.; Leung, C.C.Y.; Chen, Y.; Hu, Y.; Wang, Z. A Soft-Robotic Approach to Anthropomorphic Robotic Hand Dexterity. IEEE Access 2019, 7, 101483–101495. [Google Scholar] [CrossRef]
- Zhang, J.; Zhao, Y.; Shone, F.; Li, Z.; Frangi, A.F.; Xie, S.Q.; Zhang, Z.-Q. Physics-Informed Deep Learning for Musculoskeletal Modeling: Predicting Muscle Forces and Joint Kinematics from Surface EMG. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 484–493. [Google Scholar] [CrossRef]
- Unanyan, N.N.; Belov, A.A. Design of Upper Limb Prosthesis Using Real-Time Motion Detection Method Based on EMG Signal Processing. Biomed. Signal Process. Control 2021, 70, 103062. [Google Scholar] [CrossRef]
- Xu, Z.; Todorov, E. Design of a Highly Biomimetic Anthropomorphic Robotic Hand towards Artificial Limb Regeneration. IEEE Int. Conf. Robot. Autom. 2016, 2016, 3485–3492. [Google Scholar]
- Mohammadi, A.; Lavranos, J.; Zhou, H.; Mutlu, R.; Alici, G.; Tan, Y.; Choong, P.; Oetomo, D. A Practical 3D-Printed Soft Robotic Prosthetic Hand with Multi-Articulating Capabilities. PLoS ONE 2020, 15, e0232766. [Google Scholar] [CrossRef]
- Chung, E.A.; Benalcázar, M.E. Real-Time Hand Gesture Recognition Model Using Deep Learning Techniques and EMG Signals. In Proceedings of the 2019 27th European Signal Processing Conference (EUSIPCO), A Coruna, Spain, 2–6 September 2019. [Google Scholar] [CrossRef]
- Wang, J.; Tang, L.; Bronlund, J.E. Pattern Recognition-Based Real Time Myoelectric System for Robotic Hand Control. In Proceedings of the 2019 14th IEEE Conference on Industrial Electronics and Applications (ICIEA), Xi’an, China, 19–21 June 2019; pp. 1598–1605. [Google Scholar] [CrossRef]
- Yang, D.; Zhao, J.; Gu, Y.; Wang, X.; Li, N.; Jiang, L.; Liu, H.; Huang, H.; Zhao, D. An Anthropomorphic Robot Hand Developed Based on Underactuated Mechanism and Controlled by EMG Signals. J. Bionic. Eng. 2009, 6, 255–263. [Google Scholar] [CrossRef]
- Nunez-Montoya, B.; Valarezo Anazco, M.; Saravia-Avila, A.; Loayza, F.R.; Valarezo Anazco, E.; Teran, E. Supervised Machine Learning Applied to Non-Invasive EMG Signal Classification for an Anthropomorphic Robotic Hand. In Proceedings of the 2022 IEEE ANDESCON: Technology and Innovation for Andean Industry, ANDESCON 2022, Barranquilla, Colombia, 16–19 November 2022. [Google Scholar]
- Betthauser, J.L.; Krall, J.T.; Bannowsky, S.G.; Lévay, G.; Kaliki, R.R.; Fifer, M.S.; Thakor, N.V. Stable Responsive EMG Sequence Prediction and Adaptive Reinforcement with Temporal Convolutional Networks. IEEE Trans. Biomed. Eng. 2020, 67, 1707–1717. [Google Scholar] [CrossRef]
- Stashuk, D. EMG Signal Decomposition: How Can It Be Accomplished and Used? J. Electromyogr. Kinesiol. 2001, 11, 151–173. [Google Scholar] [CrossRef]
- Phinyomark, A.; Khushaba, R.N.; Scheme, E. Feature Extraction and Selection for Myoelectric Control Based on Wearable EMG Sensors. Sensors 2018, 18, 1615. [Google Scholar] [CrossRef] [PubMed]
- Chen, X.; Zhang, X.; Zhao, Z.Y.; Yang, J.H.; Lantz, V.; Wang, K.Q. Multiple Hand Gesture Recognition Based on Surface EMG Signal. In Proceedings of the 2007 1st International Conference on Bioinformatics and Biomedical Engineering, Wuhan, China, 6–8 July 2007; pp. 506–509. [Google Scholar] [CrossRef]
- Xin, W.; Liu, R.; Liu, Y.; Chen, Y.; Yu, W.; Miao, Q. Transformer for Skeleton-Based Action Recognition: A Review of Recent Advances. Neurocomputing 2023, 537, 164–186. [Google Scholar] [CrossRef]
- Putri, F.T.; Caesarendra, W.; Królczyk, G.; Glowacz, A.; Prawibowo, H.; Ismail, R.; Indrawati, R.T. Human Walking Gait Classification Utilizing an Artificial Neural Network for the Ergonomics Study of Lower Limb Prosthetics. Prosthesis 2023, 5, 647–665. [Google Scholar] [CrossRef]
- Riaz, Z.; Khan, B.; Abdullah, S.; Khan, S.; Islam, M.S. Lung Tumor Image Segmentation from Computer Tomography Images Using MobileNetV2 and Transfer Learning. Bioengineering 2023, 10, 981. [Google Scholar] [CrossRef]
- McGeown, J.P.; Pedersen, M.; Hume, P.A.; Theadom, A.; Kara, S.; Russell, B. A Novel Method to Assist Clinical Management of Mild Traumatic Brain Injury by Classifying Patient Subgroups Using Wearable Sensors and Exertion Testing: A Pilot Study. Biomechanics 2023, 3, 20. [Google Scholar] [CrossRef]
- Gulshan, V.; Peng, L.; Coram, M.; Stumpe, M.C.; Wu, D.; Narayanaswamy, A.; Venugopalan, S.; Widner, K.; Madams, T.; Cuadros, J.; et al. Development and Validation of a Deep Learning Algorithm for Detection of Diabetic Retinopathy in Retinal Fundus Photographs. JAMA 2016, 316, 2402–2410. [Google Scholar] [CrossRef]
- Liu, Y.; Huang, W.; Jiang, S.; Zhao, B.; Wang, S.; Wang, S.; Zhang, Y. TransTM: A Device-Free Method Based on Time-Streaming Multiscale Transformer for Human Activity Recognition. Def. Technol. 2023. [Google Scholar] [CrossRef]
- Li, B.; Cui, W.; Wang, W.; Zhang, L.; Chen, Z.; Wu, M. Two-Stream Convolution Augmented Transformer for Human Activity Recognition. Proc. AAAI Conf. Artif. Intell. 2021, 35, 286–293. [Google Scholar] [CrossRef]
- Che, C.; Zhang, P.; Zhu, M.; Qu, Y.; Jin, B. Constrained Transformer Network for ECG Signal Processing and Arrhythmia Classification. BMC Med. Inform. Decis. Mak. 2021, 21, 184. [Google Scholar] [CrossRef] [PubMed]
- Xiao, S.; Wang, S.; Huang, Z.; Wang, Y.; Jiang, H. Two-Stream Transformer Network for Sensor-Based Human Activity Recognition. Neurocomputing 2022, 512, 253–268. [Google Scholar] [CrossRef]
- Dong, Y.; Zhang, M.; Qiu, L.; Wang, L.; Yu, Y. An Arrhythmia Classification Model Based on Vision Transformer with Deformable Attention. Micromachines 2023, 14, 1155. [Google Scholar] [CrossRef] [PubMed]
- Shukla, N.; Pandey, A.; Shukla, A.P.; Neupane, S.C. ECG-ViT: A Transformer-Based ECG Classifier for Energy-Constraint Wearable Devices. J. Sens. 2022, 2022, 2449956. [Google Scholar] [CrossRef]
- Hu, R.; Chen, J.; Zhou, L. A Transformer-Based Deep Neural Network for Arrhythmia Detection Using Continuous ECG Signals. Comput. Biol. Med. 2022, 144, 105325. [Google Scholar] [CrossRef]
- de Godoy, R.; Lahr, G.; Dwivedi, A.; Reis, T.; Polegato, P.; Becker, M.; Caurin, G.; Liarokapis, M. Electromyography-Based, Robust Hand Motion Classification Employing Temporal Multi-Channel Vision Transformers. IEEE Robot. Autom. Lett. 2022, 7, 10200–10207. [Google Scholar] [CrossRef]
- Montazerin, M.; Zabihi, S.; Rahimian, E.; Mohammadi, A.; Naderkhani, F. ViT-HGR: Vision Transformer-Based Hand Gesture Recognition from High Density Surface EMG Signals. Proc. Annu. Int. Conf. IEEE Eng. Med. Biol. Soc. EMBS 2022, 2022, 5115–5119. [Google Scholar] [CrossRef]
- The BioDigital Human Platform Interactive 3D Anatomy—Upper Limb. Available online: https://human.biodigital.com/view?id=production/maleAdult/male_region_upper_limb_18&lang=en (accessed on 5 November 2023).
- Van Beek, N.; Stegeman, D.F.; Jonkers, I.; de Korte, C.L.; Veeger, D.; Maas, H. Single Finger Movements in the Aging Hand: Changes in Finger Independence, Muscle Activation Patterns and Tendon Displacement in Older Adults. Exp. Brain Res. 2019, 237, 1141–1154. [Google Scholar] [CrossRef] [PubMed]
- Mehta, S.; Rastegari, M. Mobilevit: Light-Weight, General-Purpose, and Mobile-Friendly Vision Transformer. arXiv 2021, arXiv:2110.02178. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image Is Worth 16 × 16 Words: Transformers for Image Recognition at Scale. In Proceedings of the ICLR 2021—9th International Conference on Learning Representations, Virtual Event, Austria, 3–7 May 2021. [Google Scholar] [CrossRef]
- Nalmpantis, C.; Vrakas, D. Signal2Vec: Time Series Embedding Representation. In Engineering Applications of Neural Networks. EANN 2019. Communications in Computer and Information Science; Springer: Cham, Switzerland, 2019; Volume 1000, pp. 80–90. ISBN 978-3-030-20257-6. [Google Scholar] [CrossRef]
- Uribarri, G.; Mindlin, G.B. Dynamical Time Series Embeddings in Recurrent Neural Networks. Chaos Solitons Fractals 2022, 154, 111612. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. arXiv 2023, arXiv:1706.03762. [Google Scholar]
- Hendrycks, D.; Gimpel, K. Gaussian Error Linear Units (GELUs). arXiv 2023, arXiv:1606.08415. [Google Scholar]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. BERT: Pre-Training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of theNAACL HLT 2019—2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies—Proceedings of the Conference, Minneapolis, MN, USA, 2–7 June 2018; Volume 1, pp. 4171–4186. [Google Scholar] [CrossRef]
- Radford, A.; Narasimhan, K.; Salimans, T.; Sutskever, I. Improving Language Understanding by Generative Pre-Training. Technical Report, OpenAI. 2018. Available online: https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf (accessed on 5 November 2023).
- Lewis, M.; Liu, Y.; Goyal, N.; Ghazvininejad, M.; Mohamed, A.; Levy, O.; Stoyanov, V.; Zettlemoyer, L. BART: Denoising Sequence-to-Sequence Pre-Training for Natural Language Generation, Translation, and Comprehension. Proc. Annu. Meet. Assoc. Comput. Linguist. 2019, 58, 7871–7880. [Google Scholar] [CrossRef]
- Raffel, C.; Shazeer, N.; Roberts, A.; Lee, K.; Narang, S.; Matena, M.; Zhou, Y.; Li, W.; Liu, P.J. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer. J. Mach. Learn. Res. 2019, 21, 5485–5551. [Google Scholar]
- Hu, Y.; Ye, K.; Kim, H.; Lu, N. BERT-PIN: A BERT-Based Framework for Recovering Missing Data Segments in Time-Series Load Profiles. arXiv 2023, arXiv:2310.17742. [Google Scholar]
Index | Middle | Ring | Little | |
---|---|---|---|---|
Index | x | x | - | - |
Middle | x | x | x | - |
Ring | - | - | x | x |
Little | - | - | x | x |
Batch | Patch Size | Dim | Depth | Heads | Dim Head | MLP Dim | Accuracy |
---|---|---|---|---|---|---|---|
10 | 4 | 1024 | 6 | 8 | 32 | 2048 | 70.00 |
10 | 8 | 1024 | 6 | 8 | 32 | 1024 | 72.50 |
10 | 16 | 2048 | 8 | 12 | 32 | 2048 | 73.75 |
5 | 4 | 1024 | 6 | 8 | 32 | 1024 | 75.00 |
30 | 16 | 1024 | 8 | 12 | 64 | 2048 | 76.87 |
10 | 8 | 1024 | 10 | 16 | 32 | 1024 | 79.00 |
5 | 4 | 1024 | 10 | 16 | 32 | 2048 | 80.00 |
30 | 4 | 1024 | 10 | 16 | 64 | 1024 | 80.55 |
5 | 4 | 1024 | 6 | 8 | 32 | 1024 | 81.87 |
10 | 4 | 1024 | 10 | 16 | 64 | 1024 | 85.00 |
N° Epochs | Weight Decay | Learning Rate | Validation Accuracy |
---|---|---|---|
100 | 85.00% | ||
100 | 83.12% | ||
100 | 0.01 | 81.87% | |
100 | 0.01 | 80.62% | |
120 | 83.75% | ||
120 | 81.25% | ||
120 | 0.01 | 84.00% | |
120 | 0.01 | 86.25% |
Model | Validation Accuracy | N° Hand Gestures |
---|---|---|
KNN | 72.28% | 4 |
Polynomial | 80.98% | 4 |
MLPC | 84.78% | 4 |
MuCBiT | 86.25% | 4 |
ED-TCN | 72.10% | 7 |
ViT-HGR 1 | 84.62% | 66 |
TMC-ViT 2 | 89.60% | 17 |
Accuracy | Precision | Recall | F1 Score | AUCROC |
---|---|---|---|---|
0.8678 | 0.8750 | 0.8678 | 0.8652 | 0.9598 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Núñez Montoya, B.; Valarezo Añazco, E.; Guerrero, S.; Valarezo-Añazco, M.; Espin-Ramos, D.; Jiménez Farfán, C. Myo Transformer Signal Classification for an Anthropomorphic Robotic Hand. Prosthesis 2023, 5, 1287-1300. https://doi.org/10.3390/prosthesis5040088
Núñez Montoya B, Valarezo Añazco E, Guerrero S, Valarezo-Añazco M, Espin-Ramos D, Jiménez Farfán C. Myo Transformer Signal Classification for an Anthropomorphic Robotic Hand. Prosthesis. 2023; 5(4):1287-1300. https://doi.org/10.3390/prosthesis5040088
Chicago/Turabian StyleNúñez Montoya, Bolivar, Edwin Valarezo Añazco, Sara Guerrero, Mauricio Valarezo-Añazco, Daniela Espin-Ramos, and Carlos Jiménez Farfán. 2023. "Myo Transformer Signal Classification for an Anthropomorphic Robotic Hand" Prosthesis 5, no. 4: 1287-1300. https://doi.org/10.3390/prosthesis5040088
APA StyleNúñez Montoya, B., Valarezo Añazco, E., Guerrero, S., Valarezo-Añazco, M., Espin-Ramos, D., & Jiménez Farfán, C. (2023). Myo Transformer Signal Classification for an Anthropomorphic Robotic Hand. Prosthesis, 5(4), 1287-1300. https://doi.org/10.3390/prosthesis5040088