FOREX Press I. J. of Electrical & Electronics Research
Support Open Access

Research Article |

Handling Class Imbalance in Video-Based Pain Intensity Estimation Using ResNetBiLSTM: A Study on Loss Functions and Optimizers

Author(s): Lu Zhicui1, Farizuwana Akma Binti Zulkifle2, Ahmad Zia Ul-saufie Bin Mohamad Japeri3, Mohd Razif Bin Shamsuddin4, and Aisyah Binti Mat Jasin3*

Publisher : FOREX Publication

Published : 20 December 2025

e-ISSN : 2347-470X

Page(s) : 820-829




Lu Zhicui, Centre for Sustainability in Advanced Electrical and Electronic Systems (CSAEES), Faculty of Engineering, Built Environment and Information Technology ,SEGi University, 47810 Petaling Jaya, Selangor, Malaysia; Hebei Vocational University of Technology and Engineering,No.473, Quannan West Street, Xindu District, Xingtai, Hebei, China, 054000

Farizuwana Akma Binti Zulkifle, Centre for Sustainability in Advanced Electrical and Electronic Systems (CSAEES), Faculty of Engineering, Built Environment and Information Technology ,SEGi University, 47810 Petaling Jaya, Selangor, Malaysia

Ahmad Zia Ul-saufie Bin Mohamad Japeri, Centre for Sustainability in Advanced Electrical and Electronic Systems (CSAEES), Faculty of Engineering, Built Environment and Information Technology ,SEGi University, 47810 Petaling Jaya, Selangor, Malaysia

Mohd Razif Bin Shamsuddin, Centre for Sustainability in Advanced Electrical and Electronic Systems (CSAEES), Faculty of Engineering, Built Environment and Information Technology ,SEGi University, 47810 Petaling Jaya, Selangor, Malaysia

Aisyah Binti Mat Jasin*, School of Physics and Electronic Engineering, Sichuan University of Science and Engineering, Zigong 643000, China; Email: pangshangzhen@suse.edu.cn

    [1] J. O. Allen, B. Zebrack, D. Wittman, K. Hammelef, and A. M. Morris, "Expanding the NCCN guidelines for distress management: a model of barriers to the use of coping resources," The Journal of community and supportive oncology, vol. 12, no. 8, pp. 271-277, 2014.
    [2] S. Taggart, K. Skylas, A. Brannelly, G. Fairbrother, M. Knapp, and J. Gullick, "Using a clinical judgement model to understand the impact of validated pain assessment tools for burn clinicians and adult patients in the ICU: A multi-methods study," Burns, vol. 47, no. 1, pp. 110-126, Feb 2021, doi: 10.1016/j.burns.2020.05.032.
    [3] M. Kunz, D. Meixner, and S. Lautenbacher, "Facial muscle movements encoding pain-a systematic review," Pain, vol. 160, no. 3, pp. 535-549, Mar 2019, doi: 10.1097/j.pain.0000000000001424.
    [4] X. Xiang, F. Wang, Y. Tan, and A. L. Yuille, "Imbalanced regression for intensity series of pain expression from videos by regularizing spatio-temporal face nets," Pattern Recognition Letters, vol. 163, pp. 152-158, 2022, doi: 10.1016/j.patrec.2022.09.022.
    [5] P. Ekman et al., "Universals and cultural differences in the judgments of facial expressions of emotion," Journal of personality and social psychology, vol. 53, no. 4, p. 712, 1987.
    [6] K. M. Prkachin and P. E. Solomon, "The structure, reliability and validity of pain expression: evidence from patients with shoulder pain," Pain, vol. 139, no. 2, pp. 267-274, Oct 15 2008, doi: 10.1016/j.pain.2008.04.010.
    [7] G. Bargshady, X. Zhou, R. C. Deo, J. Soar, F. Whittaker, and H. Wang, "Enhanced deep learning algorithm development to detect pain intensity from facial expression images," Expert Systems with Applications, vol. 149, 2020, doi: 10.1016/j.eswa.2020.113305.
    [8] A. Semwal and N. D. Londhe, "A multi-stream spatio-temporal network based behavioural multiparametric pain assessment system," Biomedical Signal Processing and Control, vol. 90, p. 105820, 2024.
    [9] K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for image recognition," 2016 2016, pp. 770-778.
    [10] G. Bargshady, "A Joint Deep Neural Network Model for Pain Recognition from Face.pdf," 2019, doi: 10.1109/CCOMS.2019.8821779.
    [11] E. Othman, P. Werner, F. Saxen, A. Al-Hamadi, S. Gruss, and S. Walter, "Classification networks for continuous automatic pain intensity monitoring in video using facial expression on the X-ITE Pain Database," Journal of Visual Communication and Image Representation, vol. 91, 2023, doi: 10.1016/j.jvcir.2022.103743.
    [12] A. Semwal and N. D. Londhe, "Automated Facial Expression based Pain Assessment Using Deep Convolutional Neural Network," presented at the 2020 3rd International Conference on Intelligent Sustainable Systems (ICISS), 2020.
    [13] P. Rodriguez et al., "Deep Pain: Exploiting Long Short-Term Memory Networks for Facial Expression Classification," IEEE Trans Cybern, vol. 52, no. 5, pp. 3314-3324, May 2022, doi: 10.1109/TCYB.2017.2662199.
    [14] Y. Huang, L. Qing, S. Xu, L. Wang, and Y. Peng, "HybNet: a hybrid network structure for pain intensity estimation," The Visual Computer, vol. 38, no. 3, pp. 871-882, 2022/03/01 2022, doi: 10.1007/s00371-021-02056-y.
    [15] T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár, "Focal loss for dense object detection," 2017 2017, pp. 2980-2988.
    [16] L. Wang, C. Wang, Z. Sun, S. Cheng, and L. Guo, "Class balanced loss for image classification," IEEE access, vol. 8, pp. 81142-81153, 2020.
    [17] P. Nabila and E. B. Setiawan, "Adam and AdamW Optimization Algorithm Application on BERT Model for Hate Speech Detection on Twitter," in 2024 International Conference on Data Science and Its Applications (ICoDSA), 10-11 July 2024 2024, pp. 346-351, doi: 10.1109/ICoDSA62899.2024.10651619.
    [18] Y. You et al., "Large batch optimization for deep learning: Training bert in 76 minutes," arXiv preprint arXiv:1904.00962, 2019.
    [19] J. Zhuang et al., "Adabelief optimizer: Adapting stepsizes by the belief in observed gradients," Advances in neural information processing systems, vol. 33, pp. 18795-18806, 2020.
    [20] B. Ginsburg et al., "Training deep networks with stochastic gradient normalized by layerwise adaptive second moments," 2019.
    [21] H. D. Nguyen, P. M. Le, and K. H. Truong, "Searching Optimal Placement and Operations of Energy Storage Systems based on Equilibrium Optimizer," Engineering, Technology & Applied Science Research, vol. 15, no. 4, pp. 24174-24180, 08/02 2025, doi: 10.48084/etasr.11238.
    [22] A. Negi, M. G. Prasad, R. Kumar, H. K. Gupta, H. N. N. Kumar, and M. Shuaib, "Hybrid Feature Fusion based model: Facial Expression Recognition in the Wild," in 2025 5th International Conference on Intelligent Technologies (CONIT), 20-22 June 2025 2025, pp. 1-6, doi: 10.1109/CONIT65521.2025.11166706.
    [23] G. Bargshady, X. Zhou, R. C. Deo, J. Soar, F. Whittaker, and H. Wang, "Ensemble neural network approach detecting pain intensity from facial expressions," Artif Intell Med, vol. 109, p. 101954, Sep 2020, doi: 10.1016/j.artmed.2020.101954.
    [24] P. Thiam, H. A. Kestler, and F. Schwenker, "Two-Stream Attention Network for Pain Recognition from Video Sequences," Sensors, vol. 20, no. 3, doi: 10.3390/s20030839.
    [25] Y. Mao, "Optimization of Facial Expression Recgonition on ResNet-18 using Focal Loss and CosFace Loss," 2022 2022: IEEE, pp. 161-163.
    [26] S. Walter et al., "The biovid heat pain database data for the advancement and systematic validation of an automated pain recognition system," in 2013 IEEE International Conference on Cybernetics (CYBCO), 13-15 June 2013 2013, pp. 128-131, doi: 10.1109/CYBConf.2013.6617456.
    [27] Zhang Shuyu and Chōshō, "AUC Maximization in Deep Neural Network Learning for Imbalanced Classification Problems," 2020.
    [28] G. Bradski, "The openCV library," Dr. Dobb's Journal: Software Tools for the Professional Programmer, vol. 25, no. 11, pp. 120-123, 2000.
    [29] K. A. Majeed, Z. Abbas, M. Bakhtyar, Z. Durrani, J. Baber, and I. Ullah, "Face Detectors Evaluation to Select the Fastest among DLIB, HAAR Cascade, and MTCNN," Pakistan Journal of Emerging Science and Technologies, vol. 2, pp. 1-13, 2021.
    [30] F. Zhang, C. Hu, Q. Yin, W. Li, H.-C. Li, and W. Hong, "Multi-aspect-aware bidirectional LSTM networks for synthetic aperture radar target recognition," Ieee Access, vol. 5, pp. 26880-26891, 2017.
    [31] O. M. Alyasiri and Y.-N. Cheah, "Multi-Class Text Classification using Machine Learning Techniques," Engineering, Technology & Applied Science Research, vol. 15, no. 3, pp. 22598-22604, 2025.
    [32] J. Fan, J. Zhou, X. Deng, H. Wang, L. Tao, and H. K. Kwan, "Combating Uncertainty and Class Imbalance in Facial Expression Recognition," 2022 2022: IEEE, pp. 1-4.

Lu Zhicui, Farizuwana Akma Binti Zulkifle, Ahmad Zia Ul-saufie Bin Mohamad Japeri, Mohd Razif Bin Shamsuddin, Aisyah Binti Mat Jasin (2025), Handling Class Imbalance in Video-Based Pain Intensity Estimation Using ResNetBiLSTM: A Study on Loss Functions and Optimizers. IJEER 13(4), 820-829. DOI: 10.37391/IJEER.130422.