Implementation of a Fusion Classification Model for Efficient Pen-Holding Posture Detection
Abstract
:1. Introduction
2. Related Work
3. Materials and Methods
3.1. Data Collection and Processing
3.1.1. Experimental Equipment
3.1.2. Preparation of the Experiment
3.1.3. Data Collection and Processing
3.1.4. Dataset
3.2. Methods
3.2.1. Traditional Machine Learning Models
3.2.2. SimAM-TabNet
3.2.3. SimAM-CNN-MLSTM
4. Results
4.1. Evaluation Metrics
4.2. Setting the Model Parameters
- (1)
- Traditional Machine Learning Models:
- Random forests: the optimal number of trees is set between 130 and 180;
- SVM: the kernel uses the radial basis function (RBF);
- XGBoost: the number of decision tree estimators (n_estimators) is set to 100. The sum of tree depth and minimum leaf weight is the default parameter of 6 and 1.
- (2)
- SimAM-TabNet:
- SimAM-TabNet: Steps of decision (n_Steps) is set to 4. The number of features in the prediction phase (n_d) is set to 30. The number of characteristics in the attention stage (n_a) is set to 10. The attention updating ratio in Attention is 1.3, Epochs = 300, and Batch size = 100. The training set, test set, and prediction set are 6:2:2. The learning rate is 0.001. Adam is selected as the optimizer. The cross-entropy function is selected as the loss function.
- (3)
- SimAM-CNN-MLSTM:
- SimAM-CNN-MLSTM: Epoch = 300, Dropout = 0.2, and Batch size = 25. The training, test, and verification sets are divided into 6:2:2. The learning rate is 0.0001. Adam is selected as the optimizer. The cross-entropy function is selected as the loss function. The hyperparameter of MLSTM is set to 4. The sequence length of the input model is set to 4.
4.3. Experimental Results
4.4. Model Analysis
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
API | Application programming interface |
ATS | All test samples |
AUC | Area under the curve |
BN | Batch normalization |
CCTS | Correctly classified test samples |
CNN | Convolutional neural network |
FC | Fully connected |
FN | False negative |
FP | False positive |
GAN | Generative adversarial network |
GRU | Gate recurrent unit |
LSTM | Long short-term memory |
MLSTM | Mogrifier long short-term memory |
MRPROP | Modified resilient backpropagation |
MSC | Multiple stroke classification |
PHP | Pen holding posture |
RBF | Radial basis function |
RNN | Recurrent neural network |
ROC | Receiver operating characteristic |
SSC | Single stroke classification |
SVM | Support vector machines |
TP | True positive |
References
- Jiang, D.; Shi, B.; Gao, H.; Guo, Y.; Zhou, S.; Zhang, Y. Associations between Reading and Writing Postures and Myopia among School Students in Ningbo, China. Front. Public Health 2022, 10, 713377. [Google Scholar] [CrossRef] [PubMed]
- Wei, L. The Influence of Pen Holding Posture and Writing Task Length on the Writing Quality of Chinese Characters; Shanghai Normal University: Shanghai, China, 2013. [Google Scholar]
- He, S.; Schomaker, L. Deep Adaptive Learning for Writer Identification Based on Single Handwritten Word Images. Pattern Recognit. 2019, 88, 64–74. [Google Scholar] [CrossRef]
- Yang, B.; Zhang, Y.; Liu, Z.; Jiang, X.; Xu, M. Handwriting Posture Prediction Based on Unsupervised Model. Pattern Recognit. 2020, 100, 107093. [Google Scholar] [CrossRef]
- Lemos, N.; Shah, K.; Rade, R.; Shah, D. Personality Prediction Based on Handwriting Using Machine Learning. In Proceedings of the 2018 International Conference on Computational Techniques, Electronics and Mechanical Systems (CTEMS), Belgaum, India, 21–22 December 2018. [Google Scholar]
- Akhtar, S.; Dipti, M.M.; Tinni, T.A.; Khan, P.; Kabir, R.; Islam, M.R. Analysis on Handwriting Using Pen-Tablet for Identification of Person and Handedness. In Proceedings of the 2021 International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD), Dhaka, Bangladesh, 27–28 February 2021. [Google Scholar]
- Dankovičová, Z.; Hurtuk, J.; Feciľak, P. Evaluation of Digitalized Handwriting for Dysgraphia Detection Using Random Forest Classification Method. In Proceedings of the 2019 IEEE 17th International Symposium on Intelligent Systems and Informatics (SISY), Subotica, Serbia, 12–14 September 2019. [Google Scholar]
- Qi, H.; Zhang, R.; Wei, Z.; Zhang, C.; Wang, L.; Lang, Q.; Zhang, K.; Tian, X. A study of auxiliary screening for Alzheimer’s disease based on handwriting characteristics. Front. Aging Neurosci. 2023, 15, 1117250. [Google Scholar] [CrossRef] [PubMed]
- Lu, J.; Qi, H.; Wu, X.; Zhang, C.; Tang, Q. Research on Authentic Signature Identification Method Integrating Dynamic and Static Features. Appl. Sci. 2022, 12, 9904. [Google Scholar] [CrossRef]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Zhang, Y.; Liu, J.; Shen, W. A Review of Ensemble Learning Algorithms Used in Remote Sensing Applications. Appl. Sci. 2022, 12, 8654. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016. [Google Scholar]
- Le, T.-T.-H.; Oktian, Y.E.; Kim, H. XGBoost for Imbalanced Multiclass Classification-Based Industrial Internet of Things Intrusion Detection Systems. Sustainability 2022, 14, 8707. [Google Scholar] [CrossRef]
- Rehman, S.U.; Tu, S.; Huang, Y.; Rehman, O.U. A benchmark dataset and learning high-level semantic embeddings of multimedia for cross-media retrieval. IEEE Access 2018, 6, 67176–67188. [Google Scholar] [CrossRef]
- Rehman, S.U.; Tu, S.; Huang, Y.; Yang, Z. Face recognition: A novel un-supervised convolutional neural network method. In Proceedings of the 2016 IEEE International Conference of Online Analysis and Computing Science (ICOACS), Chongqing, China, 28–29 May 2016. [Google Scholar]
- Arik, S.Ö.; Pfister, T. TabNet: Attentive Interpretable Tabular Learning. In Proceedings of the AAAI Conference on Artificial Intelligence, Virtual, 2–9 February 2021. [Google Scholar]
- Shin, J.; Maniruzzaman, M.; Uchida, Y.; Hasan, M.A.H.; Megumi, A.; Suzuki, A.; Yasumura, A. Important Features Selection and Classification of Adult and Child from Handwriting Using Machine Learning Methods. Appl. Sci. 2022, 12, 5256. [Google Scholar] [CrossRef]
- Yang, L.; Zhang, R.-Y.; Li, L.; Xie, X. SimAM: A Simple, Parameter-Free Attention Module for Convolutional Neural Networks. In Proceedings of the International Conference on Machine Learning, Virtual, 18–24 July 2021. [Google Scholar]
- Wang, Z.; Lu, H.; Jin, J.; Hu, K. Human Action Recognition Based on Improved Two-Stream Convolution Network. Appl. Sci. 2022, 12, 5784. [Google Scholar] [CrossRef]
- Melis, G.; Kočiský, T.; Blunsom, P. Mogrifier LSTM. arXiv 2019, arXiv:1909.01792. [Google Scholar]
- Rehman, S.U.; Tu, S.; Huang, Y.; Liu, G. CSFL: A novel unsupervised convolution neural network approach for visual pattern classification. AI Commun. 2017, 30, 311–324. [Google Scholar] [CrossRef]
- Rehman, S.U.; Tu, S.; Rehman, O.U.; Huang, Y.; Magurawalage, C.M.S.; Chang, C.-C. Optimization of CNN through novel training strategy for visual classification problems. Entropy 2018, 20, 290. [Google Scholar] [CrossRef]
- Qin, X.; Li, N.; Weng, C.; Su, D.; Li, M. Simple Attention Module Based Speaker Verification with Iterative Noisy Label Detectionn. In Proceedings of the ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Singapore, 23–27 May 2022. [Google Scholar]
- Boughorbel, S.; Jarray, F.; Kadri, A. Fairness in TabNet Model by Disentangled Representation for the Prediction of Hospital No-Show. arXiv 2021, arXiv:2103.04048. [Google Scholar]
- Shi, H.; Chikhaoui, B.; Wang, S. Tree-Based Models for Pain Detection from Biomedical Signals. In Proceedings of the Participative Urban Health and Healthy Aging in the Age of AI: 19th International Conference, ICOST 2022, Paris, France, 27–30 June 2022; Springer: Cham, Switzerland, 2022. [Google Scholar]
- Sun, J.; Yang, F. Multi-factor Investment Model Based on TabNet. J. Phys. Conf. Ser. 2022, 2171, 012057. [Google Scholar] [CrossRef]
- Jiang, L.; Yuan, Z.; Zhang, X.; Jiang, H.; Sun, X. 10-Year Prediction of Coronary Heart Disease Based on PCHD-TabNet. Data Analysis and Knowledge Discovery. 2022. Available online: https://manu44.magtech.com.cn/Jwk_infotech_wk3/EN/10.11925/infotech.2096-3467.2022.0603 (accessed on 9 April 2023).
- Huang, C.-J.; Kuo, P.-H. A Deep CNN-LSTM Model for Particulate Matter (PM2.5) Forecasting in Smart Cities. Sensors 2018, 18, 2220. [Google Scholar] [CrossRef]
- Li, J.; Xu, C.; Feng, B.; Zhao, H. Credit Risk Prediction Model for Listed Companies Based on CNN-LSTM and Attention Mechanism. Electronics 2023, 12, 1643. [Google Scholar] [CrossRef]
- Ullah, F.; Chen, X.; Shah, S.B.H.; Mahfoudh, S.; Abul Hassan, M.; Saeed, N. A Novel Approach for Emotion Detection and Sentiment Analysis for Low Resource Urdu Language Based on CNN-LSTM. Electronics 2022, 11, 4096. [Google Scholar] [CrossRef]
- Zhu, L. Emotional Analysis of Brain Waves Based on CNN and Bi-LSTM. J. Appl. Sci. 2022, 40, 12. [Google Scholar]
- Li, H. Human Motion Pattern Recognition Algorithm Based on CNN-Mogrifier LSTM. Electron. Meas. Technol. 2021, 44, 6. [Google Scholar]
- Lian, M.; Liu, J. Single Pollutant Prediction Approach by Fusing MLSTM and CNN. In Knowledge Science, Engineering and Management, Proceedings of the 15th International Conference, KSEM 2022, Singapore, 6–8 August 2022, Part III; Springer: Cham, Switzerland, 2022. [Google Scholar]
- Kushki, A.; Schwellnus, H.; Ilyas, F.; Chau, T. Changes in kinetics and kinematics of handwriting during a prolonged writing task in children with and without dysgraphia. Res. Dev. Disabil. 2011, 32, 1058–1064. [Google Scholar] [CrossRef] [PubMed]
- Wen, X. The Unification and Standardization of Chinese Character Stroke Names. J. Sichuan Univ. Educ. 1999, 109–111. [Google Scholar]
- Lavanya, K.; Bajaj, S.; Tank, P.; Jain, S. Handwritten Digit Recognition Using Hoeffding Tree, Decision Tree, and Random Forests—A Comparative Approach. In Proceedings of the 2017 International Conference on Computational Intelligence in Data Science (ICCIDS), Chennai, India, 2–3 June 2017. [Google Scholar]
- Bandyopadhyay, A.; Hazra, A. A Comparative Study of Classifier Performance on Spatial and Temporal Features of Handwritten Behavioural Data. In Intelligent Human Computer Interaction, Proceedings of the 8th International Conference, IHCI 2016, Pilani, India, 12–13 December 2016; Springer: Cham, Switzerland, 2017; pp. 111–121. [Google Scholar]
- Cheng, H.; Tan, P.-N.; Jin, R. Efficient Algorithm for Localized Support Vector Machine. IEEE Trans. Knowl. Data Eng. 2010, 22, 537–549. [Google Scholar] [CrossRef]
- Ramentol, E.; Caballero, Y.; Bello, R.; Herrera, F. SMOTE-RSB *: A hybrid preprocessing approach based on oversampling and undersampling for high imbalanced data-sets using SMOTE and rough sets theory. Knowl. Inf. Syst. 2012, 33, 245–265. [Google Scholar] [CrossRef]
Name | Description |
---|---|
Crossed lapping | The index finger of the thumb tip. The index finger of the thumb cap. |
Countersunk | The thumb is hidden behind the index finger. |
Twisted | Thumb and index finger pinch each other and bend. |
Hook wrist | Twist of the wrist, pen on itself. |
Straight | Hold the pen with your thumb and index finger straight. |
Dislocation | Hold the pen with your thumb, index, and middle fingers. |
Sleeping | Wrist and hand against the table. |
Fist | Hold a pen like a fist. |
Type of PHP | SSC | MSC |
---|---|---|
Correct | 1788 | 447 |
Crossed lapping | 1789 | 447 |
Countersunk | 1905 | 476 |
Twisted | 1813 | 453 |
Hook wrist | 1843 | 460 |
Straight | 1866 | 466 |
Dislocation | 1729 | 432 |
Sleeping | 1845 | 461 |
Fist | 1814 | 453 |
Network Layer | Matrix Size | Explanation |
---|---|---|
Input | is the number of strokes in a MSS. | |
SimAM | - | |
CNN | “8” is the number of channels. | |
“16” is the number of channels. | ||
“32” is the number of channels. | ||
“64” is the number of channels. | ||
FC | - | |
MLSTM | - | |
MLSTM | Take the result of the last state. | |
FC | Obtain a two-dimensional vector and use the Softmax activation function to recognize the PHPs. |
Type of Model | Name of the Model | Accuracy | F1-Score |
---|---|---|---|
SSC Contrast | Random forest | 67.6% | 69.4% |
SVM | 59.5% | 61.0% | |
XGBoost | 64.3% | 62.2% | |
CNN | 66.3% | 65.6% | |
TabNet | 68.9% | 70.3% | |
SSC | SimAM-TabNet | 69.5% | 70.5% |
MSC Contrast | LSTM | 70.4% | 71.8% |
CNN-LSTM | 70.5% | 71.6% | |
CNN-MLSTM | 71.4% | 72.3% | |
MSC | SimAM-CNN-MLSTM | 72.1% | 74.2% |
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
Wu, X.; Liu, Y.; Zhang, C.; Qi, H.; Jacques, S. Implementation of a Fusion Classification Model for Efficient Pen-Holding Posture Detection. Electronics 2023, 12, 2208. https://doi.org/10.3390/electronics12102208
Wu X, Liu Y, Zhang C, Qi H, Jacques S. Implementation of a Fusion Classification Model for Efficient Pen-Holding Posture Detection. Electronics. 2023; 12(10):2208. https://doi.org/10.3390/electronics12102208
Chicago/Turabian StyleWu, Xiaoping, Yupeng Liu, Chu Zhang, Hengnian Qi, and Sébastien Jacques. 2023. "Implementation of a Fusion Classification Model for Efficient Pen-Holding Posture Detection" Electronics 12, no. 10: 2208. https://doi.org/10.3390/electronics12102208
APA StyleWu, X., Liu, Y., Zhang, C., Qi, H., & Jacques, S. (2023). Implementation of a Fusion Classification Model for Efficient Pen-Holding Posture Detection. Electronics, 12(10), 2208. https://doi.org/10.3390/electronics12102208