Application of Weighted Loss Function in Convolutional Neural Network for Acne Image Classification
DOI:
https://doi.org/10.59934/jaiea.v5i2.1885Keywords:
Acne Classification, Class Imbalance, Convolutional Neural Network, EfficientNetB1, Weighted Loss FunctionAbstract
Automated acne image classification using Convolutional Neural Networks (CNN) holds significant potential in dermatological diagnosis but faces a fundamental challenge of class imbalance. This phenomenon causes standard models to be biased towards majority classes and fail to recognize clinically important minority classes. This study aims to address this bias by applying a Weighted Loss Function to the EfficientNetB1 architecture. The research method employs a comparative experimental approach between two scenarios: the Baseline model (Standard Cross-Entropy) and the Proposed model (Weighted Cross-Entropy). The dataset consists of 5 acne classes with an imbalanced distribution. The results show that the Weighted Loss model significantly outperforms the Baseline model. Overall accuracy increased from 80% to 86%. The most significant improvement occurred in the minority class 'Papules', where the F1-Score surged by 0.10 points (from 0.71 to 0.81). It is concluded that the application of Weighted Loss Function effectively overcomes bias due to imbalanced data without the need for synthetic data augmentation, resulting in a fairer and more reliable model for clinical implementation.
Downloads
References
M. Junayed, M. Islam, A. Jeny, A. Sadeghzadeh, T. Biswas, and A. Shah, “Scarnet: development and validation of a novel deep cnn model for acne scar classification with a new dataset,” Ieee Access, vol. 10, pp. 1245–1258, 2022, doi: 10.1109/access.2021.3138021.
F. Hu et al., “Advances in intelligent recognition and diagnosis of skin scar images: concepts, methods, challenges, and future trends,” Front Med (Lausanne), vol. 12, 2025, doi: 10.3389/fmed.2025.1667087.
Y. Zhang et al., “Ensemble network-based distillation for hyperspectral image classification in the presence of label noise,” Remote Sens (Basel), vol. 16, no. 22, p. 4247, 2024, doi: 10.3390/rs16224247.
U. Çinar, R. Çetin-Atalay, and Y. Çetin, “Human hepatocellular carcinoma classification from h&e stained histopathology images with 3d convolutional neural networks and focal loss function,” J Imaging, vol. 9, no. 2, p. 25, 2023, doi: 10.3390/jimaging9020025.
D. Traini, G. Palmisano, C. Guerriero, and K. Peris, “Artificial intelligence in the assessment and grading of acne vulgaris: a systematic review,” J Pers Med, vol. 15, no. 6, p. 238, 2025, doi: 10.3390/jpm15060238.
J. Mondragón, E. Rendón, R. Alejo, E. Granda-Gutiérrez, and F. López, “Density-based clustering to deal with highly imbalanced data in multi-class problems,” Mathematics, vol. 11, no. 18, p. 4008, 2023, doi: 10.3390/math11184008.
M. Najeeb and A. Alariyibi, “Imbalanced dataset effect on cnn-based classifier performance for face recognition,” International Journal of Artificial Intelligence & Applications, vol. 15, no. 1, pp. 25–41, 2024, doi: 10.5121/ijaia.2024.15102.
Z. Song, Z. Shi, X. Yan, B. Zhang, S. Song, and C. Tang, “An improved weighted cross-entropy-based convolutional neural network for auxiliary diagnosis of pneumonia,” Electronics (Basel), vol. 13, no. 15, p. 2929, 2024, doi: 10.3390/electronics13152929.
B. Guo, S. Chen, H. Zhaobin, and G. Xu, “Pattern recognition and analysis: neural network using weighted cross entropy,” in Journal of Physics Conference Series, 2022, p. 012043. doi: 10.1088/1742-6596/2218/1/012043.
H. Lan et al., “Weakly supervised perivascular spaces segmentation with salient guidance of frangi filter,” Magn Reson Med, vol. 89, no. 6, pp. 2419–2431, 2023, doi: 10.1002/mrm.29593.
X. Chen et al., “Application of efficientnet‐b0 and gru‐based deep learning on classifying the colposcopy diagnosis of precancerous cervical lesions,” Cancer Med, vol. 12, no. 7, pp. 8690–8699, 2023, doi: 10.1002/cam4.5581.
N. Ujilast, N. Firdausita, C. Aditya, and Y. Azhar, “MRI image-based Alzheimer’s disease classification using convolutional neural network: EfficientNet architecture,” Jurnal Resti (Engineering Systems and Information Technology), vol. 8, no. 1, pp. 18–25, 2024, doi: 10.29207/resti.v8i1.5457.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.








