A Hybrid CNN Framework DLI-Net for Acne Detection with XAI
Abstract
:1. Introduction
- Firstly, an acne image dataset [10]. has been utilized, originally consisting of 1725 images of inflammatory acne, 594 images of non-inflammatory acne, and 8460 images of clear skin. To address the class imbalance, oversampling techniques such as data augmentation (rotation and flipping) were applied, resulting in a balanced dataset with 5051 images of inflammatory acne, 1962 images of non-inflammatory acne, and 5325 images of clear skin. This balanced dataset enhances model training, ensuring better classification reliability and generalization.
- Secondly, we integrate DeepLabV3 for segmentation and a modified InceptionV3 for classification. DeepLabV3 accurately segments acne-affected regions, and the classifier processes these regions to distinguish between inflammatory and non-inflammatory acne types, significantly improving detection accuracy.
- Thirdly, we conduct extensive experiments and comparative analyses with four baseline models to validate the superiority of DLI-Net. To optimize training efficiency, we utilize mixed-precision (FP16) computations, the AdamW optimizer, and a OneCycleLR scheduler, enabling faster convergence. Our evaluations demonstrate that DLI-Net effectively handles subtle inter-class similarities that challenge classification.
- Finally, we apply Grad-CAM to visualize the critical regions influencing the model’s predictions. This enhances interpretability and provides valuable insights into the decision-making process, fostering transparency and trust in the model’s outputs.
2. Literature Review
3. Methodology
3.1. Proposed Framework
3.2. Image Acquisition
3.3. Data Preprocessing
3.4. Proposed Models
3.4.1. Deep Learning Models
3.4.2. DeepLabV3 Model Architecture for Acne Detection
3.4.3. Modified-Inception V3 Model
- Fully Connected Layer: The fully connected (FC) layer in a neural network maps the input features to the final output space. In this case, the modified InceptionV3 model uses two linear layers, where the first layer has 512 units, which is followed by a ReLU activation and a dropout layer to reduce overfitting. The output of the first linear layer is passed through ReLU and then through the second linear layer to produce the classification results. This structure helps to learn complex relationships in the data by transforming the high-dimensional feature map into a desired output size.
3.5. Training Objectives and Optimization Strategies
3.6. Training Hyperparameters and Setup
4. Evaluation Metrics
4.1. Proposed Model Outcome
4.2. Model Testing Performance
4.3. Class-Wise Performance Evaluation and Handling Imbalanced Data
4.4. Ablation Study and Component-Wise Evaluation
4.5. Explainable AI (XAI) Using Class Activation Mapping Techniques
4.6. Comparative Analysis
4.7. Comparison of FP16 vs. FP32 Precision Modes
4.8. Clinical Applicability and Limitations
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Kim, S.; Yoon, H.; Lee, J. Semi-Supervised Facial Acne Segmentation Using Bidirectional Copy–Paste. Diagnostics 2024, 14, 1040. [Google Scholar] [CrossRef] [PubMed]
- Veni, P.K.; Gupta, A. Revolutionizing Acne Diagnosis With Hybrid Deep Learning Model Integrating CBAM, and Capsule Network. IEEE Access 2024, 12, 82867–82880. [Google Scholar] [CrossRef]
- Prokhorov, K.; Kalinin, A.A. Improving Acne Image Grading with Label Distribution Smoothing. In Proceedings of the 2024 IEEE International Symposium on Biomedical Imaging (ISBI), Athens, Greece, 27–30 May 2024. [Google Scholar]
- Sarshar, R.; Heydari, M.; Noughabi, E.A. Convolutional Neural Networks Towards Facial Skin Lesions Detection. In Proceedings of the 2024 CSI International Symposium on Artificial Intelligence and Signal Processing (AISP), Babol, Iran, 21–22 February 2024. [Google Scholar]
- Paluri, K.V.; Gupta, N.; Mishra, A.K.; Gupta, A.; Nain, G. An Explainable AI-Based Automated Acne Diagnosis Using Transfer Learning and DenseNet121. In Proceedings of the 2024 10th International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, 14–15 March 2024. [Google Scholar]
- Zhang, D.; Li, H.; Shi, J.; Shen, Y.; Zhu, L.; Chen, N.; Wei, Z.; Lv, J.; Chen, Y.; Hao, F. Advancements in Acne Detection: Application of the CenterNet Network in Smart Dermatology. Front. Med. 2024, 11, 1344314. [Google Scholar] [CrossRef]
- Khalid, U.; Li, C.; Khan, A.A.; Mehmood, F. AC-Skin: Facial Acne Detection Based on Intelligent Learning and Large Data Collection of Internet of Things (IoT) for Smart Skincare. IEEE Sens. J. 2024, 24, 30769–30783. [Google Scholar] [CrossRef]
- Nguyen, P.K.; Le, T.D.; Nguyen, B.A.; Nguyen, P.A. ACNE8M—An Acnes Detection and Differential Diagnosis System Using AI Technologies. Sci. Technol. Dev. J. 2024, 27, 1–12. [Google Scholar] [CrossRef]
- Ridha, A.M.; Isa, N.A.M.; Tawfik, A. Acne Detection Based on Reconstructed Hyperspectral Images. J. Imaging 2024, 10, 174. [Google Scholar] [CrossRef]
- XTVgie. Face Datasets. Kaggle Datasets. 2023. Available online: https://www.kaggle.com/datasets/xtvgie/face-datasets (accessed on 15 February 2025).
- Rashataprucksa, K.; Chuangchaichatchavarn, C.; Triukose, S.; Nitinawarat, S.; Pongprutthipan, M.; Piromsopa, K. Acne Detection with Deep Neural Networks. In Proceedings of the 2020 2nd International Conference on Image Processing and Machine Vision, Bangkok, Thailand, 5–7 August 2020; pp. 1–5. [Google Scholar]
- Islam, M.; Rahman, A.; Akhter, S. Acne Vulgaris Detection and Classification: A Dual Integrated Deep CNN Model. Biomed. Signal Process. Control 2022, 73, 103–110. [Google Scholar] [CrossRef]
- Femi, O.; Aliyu, T.; Mustapha, M. A Web-Based Fuzzy Logic System for Severe Acne Diagnosis. Int. J. Comput. Inf. Syst. 2020, 8, 321–330. [Google Scholar]
- Quattrini, C.; Mainardi, F.; Leone, D.; Bastino, F. Acne Detection and Severity Evaluation with Interpretable Convolutional Neural Networks. IEEE Access 2022, 10, 35123–35134. [Google Scholar]
- Junayed, M.; Haque, A.; Islam, T.; Khan, R. ScarNet Development and Validation of a Novel Deep CNN Model for Acne Scar Classification. J. Digit. Imaging 2021, 34, 1157–1168. [Google Scholar] [CrossRef]
- Smith, J.; Johnson, K.; Williams, L. Advances in Acne Detection Using AI Techniques. Med. Imaging 2022, 50, 55–65. [Google Scholar]
- Lee, K.; Park, J.; Choi, S. Acne Detection with Deep Neural Networks: An Overview. Comp. Sci. Rev. 2020, 39, 45–60. [Google Scholar]
- Kim, H.; Jung, Y.; Seo, K. Transfer Learning Approaches in Dermatology. Health Inform. 2021, 28, 123–130. [Google Scholar] [CrossRef]
- Wang, T.; Zhao, L.; Huang, Y. Hybrid Models for Acne Detection. IEEE J. Biomed. Health Inform. 2020, 24, 657–664. [Google Scholar]
- Zhang, X.; Li, Y.; Zhao, Q. Advances in Acne Detection: Deep Learning Models. IEEE Access 2020, 8, 211256–211269. [Google Scholar]
- Sun, L.; Peng, J.; Li, H. Acne Classification Using Generative Adversarial Networks. Int. J. Biomed. Imaging 2021, 12, 435627. [Google Scholar]
- Wang, R.; Xu, Y.; Zhang, M. Comprehensive Acne Grading Using Machine Learning. Med. Image Anal. 2021, 35, 102–115. [Google Scholar]
- Li, J.; Zhang, Q.; Liu, R. Acne Scar Detection and Evaluation Using Convolutional Neural Networks. Health Inform. Res. 2020, 26, 245–252. [Google Scholar]
- Yao, Y.; Zhai, J.; Sun, J. Deep Learning Framework for Acne Classification. IEEE Access 2020, 9, 154–164. [Google Scholar]
- Chen, H.; Zhou, L.; Liu, Y. Acne Detection with Enhanced CNN Models. J. Biomed. Inform. 2022, 123, 103746. [Google Scholar]
- Wang, Y.; Liu, C.; Zhang, X. Advances in Image Processing for Acne Detection. J. Image Process. 2022, 20, 1023–1033. [Google Scholar]
- Li, H.; Zhao, Y.; Sun, R. Comparative Analysis of AI-Based Acne Classification Models. IEEE J. Biomed. Health Inform. 2022, 26, 213–219. [Google Scholar]
- Wu, L.; Tang, Q.; Zhang, F. Novel Approaches in Automated Acne Grading. IEEE Access 2020, 8, 655–669. [Google Scholar]
- Szegedy, C.; Ioffe, S.; Vanhoucke, V.; Alemi, A. Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning. In Proceedings of the AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4–9 February 2017; Volume 31, pp. 4278–4284. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. In Proceedings of the International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Chen, L.-C.; Papandreou, G.; Schroff, F.; Adam, H. Rethinking Atrous Convolution for Semantic Image Segmentation. arXiv 2017, arXiv:1706.05587. [Google Scholar]
- Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the inception Architecture for Computer Vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 2818–2826. [Google Scholar]
- Howard, A.; Sandler, M.; Chu, G.; Chen, L.-C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for MobileNetV3. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 1314–1324. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- 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. arXiv 2021, arXiv:2010.11929. [Google Scholar]
- Khan, S.A.; Rana, Z.A. Evaluating Performance of Software Defect Prediction Models Using Area under Precision-Recall Curve (AUC-PR). In Proceedings of the 2019 2nd International Conference on Advancements in Computational Sciences (ICACS), Lahore, Pakistan, 18–20 February 2019; pp. 1–6. [Google Scholar] [CrossRef]
- Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. Densely Connected Convolutional Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 4700–4708. [Google Scholar]
- Tan, M.; Le, Q. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In Proceedings of the International Conference on Machine Learning (ICML), Long Beach, CA, USA, 9–15 June 2019; pp. 6105–6114. [Google Scholar]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar]
- Wang, H.; Wang, Z.; Du, M.; Yang, F.; Zhang, Z.; Ding, X.; Mardziel, P.; Hu, X. Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, Seattle, WA, USA, 13–19 June 2020. [Google Scholar]
- Ramaswamy, H.; Liu, A.; Choi, J. Ablation-CAM: Visual Explanations for Deep Convolutional Networks via Gradient-Free Localization. arXiv 2020, arXiv:2007.01285. [Google Scholar]
- Fu, Y.; You, S.; Wang, F.; Ma, Y.; Ma, L. Axiom-based Grad-CAM: Towards Accurate Visualization and Explanation of CNNs. arXiv 2020, arXiv:2008.02312. [Google Scholar]
Classes | Total Images |
---|---|
Inflammatory | 5051 |
Non-Inflammatory | 1962 |
Clear Skin | 5325 |
Total | 12,338 |
Layer Name | Dimensions |
---|---|
Initial Conv Block | 128 × 128 |
Inception Block 1 | 64 × 64 |
Inception Block 2 | 32 × 32 |
Inception Block 3 | 16 × 16 |
Atrous Block 1 (DeepLabV3) | 8 × 8 |
Atrous Block 2 (DeepLabV3) | 4 × 4 |
ASPP Module | 4 × 4 |
Up-Sampling Stage | Dimensions | Number of Filters |
---|---|---|
Stage 1 | 4 × 4 to 8 × 8 | 512 |
Stage 2 | 8 × 8 to 16 × 16 | 256 |
Stage 3 | 16 × 16 to 32 × 32 | 128 |
Stage 4 | 32 × 32 to 64 × 64 | 64 |
Stage 5 | 64 × 64 to 128 × 128 | 32 |
Hyperparameter | Value |
---|---|
Optimizer | AdamW |
Learning Rate | Initial = , Maximum (OneCycleLR) = |
Learning Rate Scheduler | OneCycleLR |
Batch Size | 16 |
Number of Epochs | 30 |
Classification Loss Function | Cross-Entropy Loss |
Segmentation Loss Function | Binary Cross-Entropy Loss |
Data Augmentation | Horizontal Flip, Vertical Flip, Rotation (), Color Jitter, Random Erasing |
Normalization | Mean = [0.485, 0.456, 0.406]; Std = [0.229, 0.224, 0.225] (ImageNet-based) |
Image Resolution | 299 × 299 pixels |
Training–Validation–Test Split | 70%–15%–15% (stratified sampling) |
Model | F1 Score | Precision | Recall | Validation Accuracy |
---|---|---|---|---|
Hybrid DLI-Net (Proposed) | 0.97 | 0.97 | 0.97 | 0.97 |
InceptionV3 | 0.94 | 0.94 | 0.94 | 0.94 |
MobileNetV3 | 0.93 | 0.94 | 0.93 | 0.93 |
ResNet50 | 0.94 | 0.94 | 0.94 | 0.94 |
ViT | 0.92 | 0.92 | 0.92 | 0.92 |
DeepLabV3 | 0.94 | 0.94 | 0.95 | 0.95 |
VGG-19 | 0.65 | 0.78 | 0.67 | 0.83 |
InceptionResNet101V2 | 0.93 | 0.95 | 0.91 | 0.92 |
Class | Precision | Recall | F1-Score |
---|---|---|---|
Clear Skin | 1.00 | 1.00 | 1.00 |
Inflammatory Acne | 0.98 | 0.95 | 0.97 |
Non-Inflammatory Acne | 0.89 | 0.95 | 0.92 |
Model Configuration | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
DLI-Net (Proposed Model) | 97.30% | 0.974 | 0.973 | 0.973 |
Modified InceptionV3 | 95.41% | 0.94 | 0.95 | 0.95 |
DeepLabV3 Only | 95.00% | 0.94 | 0.95 | 0.94 |
DeepLabV3 + Pre-Trained InceptionV3 | 96.65% | 0.967 | 0.966 | 0.967 |
Pre-Trained InceptionV3 | 94.29% | 0.87 | 0.88 | 0.87 |
DeepLabV3 + ViT | 95.00% | 0.95 | 0.95 | 0.95 |
DeepLabV3 + DenseNet | 96.60% | 0.966 | 0.966 | 0.966 |
DeepLabV3 + EfficientNetB0 | 96.43% | 0.963 | 0.964 | 0.963 |
Authors | Classification | Image Segment | Hybrid Model DLI-Net | Aug | Model Compare |
---|---|---|---|---|---|
Proposed DeeplabV3 Model | ✓ | ✓ | ✓ | ✓ | ✓ |
Islam et al. (2022) [12] | ✓ | X | X | ✓ | X |
Rashataprucksa et al. (2020) [11] | ✓ | X | X | X | X |
Femi et al. (2020) [13] | ✓ | X | X | X | X |
Metric | FP16 (Mixed Precision) | FP32 (Standard Precision) |
---|---|---|
Test Accuracy | 96.49% | 97.30% |
Precision (Weighted Avg) | 0.967 | 0.974 |
Recall (Weighted Avg) | 0.965 | 0.973 |
F1 Score (Weighted Avg) | 0.965 | 0.973 |
Training Time (minutes) | 329.75 | 327.30 |
F1 Score: Clear Skin | 1.00 | 1.00 |
F1 Score: Inflammatory Acne | 0.96 | 0.97 |
F1 Score: Non-Inflammatory Acne | 0.90 | 0.92 |
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. |
© 2025 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
Sharmin, S.; Farid, F.A.; Jihad, M.; Rahman, S.; Uddin, J.; Rafi, R.K.; Hossan, R.; Karim, H.A. A Hybrid CNN Framework DLI-Net for Acne Detection with XAI. J. Imaging 2025, 11, 115. https://doi.org/10.3390/jimaging11040115
Sharmin S, Farid FA, Jihad M, Rahman S, Uddin J, Rafi RK, Hossan R, Karim HA. A Hybrid CNN Framework DLI-Net for Acne Detection with XAI. Journal of Imaging. 2025; 11(4):115. https://doi.org/10.3390/jimaging11040115
Chicago/Turabian StyleSharmin, Shaila, Fahmid Al Farid, Md. Jihad, Shakila Rahman, Jia Uddin, Rayhan Kabir Rafi, Radia Hossan, and Hezerul Abdul Karim. 2025. "A Hybrid CNN Framework DLI-Net for Acne Detection with XAI" Journal of Imaging 11, no. 4: 115. https://doi.org/10.3390/jimaging11040115
APA StyleSharmin, S., Farid, F. A., Jihad, M., Rahman, S., Uddin, J., Rafi, R. K., Hossan, R., & Karim, H. A. (2025). A Hybrid CNN Framework DLI-Net for Acne Detection with XAI. Journal of Imaging, 11(4), 115. https://doi.org/10.3390/jimaging11040115