Performance Comparison of CNN and ResNet50 for Skin Cancer Classification Using U-Net Segmented Images
Abstract
Skin cancer is a significant global health issue, with melanoma, basal cell carcinoma, and actinic keratosis being the most common types. Early and accurate detection is critical to improve survival rates and treatment outcomes. This study evaluates the performance of Convolutional Neural Networks (CNN) and ResNet50 in classifying segmented images of skin lesions. The dataset, sourced from Kaggle, was pre-processed using U-Net for lesion segmentation to enhance the quality of input data. Both models were trained and evaluated using accuracy, precision, recall, and F1-score metrics. The CNN model demonstrated a balanced performance across classes, with a weighted F1-score of 47%, but suffered from overfitting, as indicated by the divergence between training and validation losses. ResNet50 achieved better recall for basal cell carcinoma (100%) but failed to classify actinic keratosis and melanoma, resulting in a macro F1-score of 23%. The findings reveal that U-Net segmentation improved classification focus but was insufficient to address dataset imbalance and model-specific limitations. This study highlights the challenges of skin cancer classification using deep learning and underscores the importance of addressing data imbalance and overfitting. Future research should explore advanced techniques, such as ensemble methods, data augmentation, and transfer learning, to improve the generalization and clinical applicability of these models. The proposed framework serves as a foundation for further investigation into automated skin cancer detection systems.
Downloads
References
S. Prasher, “Resnet 50 Based Classification Model for Skin Cancer Detection Using Dermatoscopic Images,” 2023 3rd Asian Conference on Innovation in Technology, ASIANCON 2023. 2023, doi: 10.1109/ASIANCON58793.2023.10270158.
Y. Filali, “Analysis and Classification of Skin Cancer Based on Deep Learning Approach,” 2022 International Conference on Intelligent Systems and Computer Vision, ISCV 2022. 2022, doi: 10.1109/ISCV54655.2022.9806087.
A. Vatsa, “Comparing the Performance of Classification Algorithms for Melanoma Skin Cancer,” 13th IEEE Integrated STEM Education Conference, ISEC 2023. pp. 375–380, 2023, doi: 10.1109/ISEC57711.2023.10402205.
T. S. Kumar, “Classification of Skin Cancer Images using Lightweight Convolutional Neural Network,” 2023 4th International Conference for Emerging Technology, INCET 2023. 2023, doi: 10.1109/INCET57972.2023.10170637.
S. G. Ahmed, “Skin Cancer Classification Utilizing a Hybrid Model of Machine Learning Models Trained on Dermoscopic Images,” 2023 3rd International Conference on Emerging Smart Technologies and Applications, eSmarTA 2023. 2023, doi: 10.1109/eSmarTA59349.2023.10293619.
N. V. Y. Lankadasu, “Skin Cancer Classification Using a Convolutional Neural Network: An Exploration into Deep Learning,” 2024 ASU International Conference in Emerging Technologies for Sustainability and Intelligent Systems, ICETSIS 2024. pp. 1047–1052, 2024, doi: 10.1109/ICETSIS61505.2024.10459368.
S. A. Alshawi, “Skin Cancer Image Detection and Classification by CNN based Ensemble Learning,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 5, pp. 710–717, 2023, doi: 10.14569/IJACSA.2023.0140575.
I. Lihacova, “Multi-Class CNN for Classification of Multispectral and Autofluorescence Skin Lesion Clinical Images,” J. Clin. Med., vol. 11, no. 10, 2022, doi: 10.3390/jcm11102833.
A. Panthakkan, “Concatenated Xception-ResNet50 — A novel hybrid approach for accurate skin cancer prediction,” Comput. Biol. Med., vol. 150, 2022, doi: 10.1016/j.compbiomed.2022.106170.
E. Firasari, “Performance Evaluation of ResNet50 and MobileNetV2 in Skin Cancer Image Classification with Various Optimizers,” Proceeding - 2024 International Conference on Information Technology Research and Innovation, ICITRI 2024. pp. 376–380, 2024, doi: 10.1109/ICITRI62858.2024.10698943.
S. D. Thepade, “Enhancing Melanoma Skin Cancer Detection Through Feature Fusion of Pre-Trained Deep Convolutional Neural Network ResNet50 and Thepade Sorted Block Truncation Coding,” SN Comput. Sci., vol. 5, no. 4, 2024, doi: 10.1007/s42979-024-02821-5.
M. N. Hasan, “Fetal Brain Planes Classification Using Deep Ensemble Transfer Learning from U-Net Segmented Fetal Neurosonography Images,” Int. J. Image, Graph. Signal Process., vol. 16, no. 4, pp. 74–86, 2024, doi: 10.5815/ijigsp.2024.04.06.
T. T. Fousiya, “Diabetic Retinopathy Classification Based on Segmented Retinal Vasculature of Fundus Images Using Attention U-NET,” INDICON 2022 - 2022 IEEE 19th India Council International Conference. 2022, doi: 10.1109/INDICON56171.2022.10039734.
M. A. Arshed, “Multi-Class Skin Cancer Classification Using Vision Transformer Networks and Convolutional Neural Network-Based Pre-Trained Models,” Inf., vol. 14, no. 7, 2023, doi: 10.3390/info14070415.
S. Deshmukh, “Skin Cancer Classification Using CNN,” International Conference on Applied Intelligence and Sustainable Computing, ICAISC 2023. 2023, doi: 10.1109/ICAISC58445.2023.10199440.
R. Bharti, “Comparative Analysis of Potato Leaf Disease Classification Using CNN and ResNet50,” 2024 International Conference on Data Science and Its Applications, ICoDSA 2024. pp. 87–91, 2024, doi: 10.1109/ICoDSA62899.2024.10651649.
G. B. Alghanimi, “CNN and ResNet50 Model Design for Improved Ultrasound Thyroid Nodules Detection,” 2024 ASU International Conference in Emerging Technologies for Sustainability and Intelligent Systems, ICETSIS 2024. pp. 1000–1004, 2024, doi: 10.1109/ICETSIS61505.2024.10459588.
M. Singla, “ResNet50 Utilization for Bag Classification: A CNN Model Visualization Approach in Deep Learning,” 2024 IEEE International Conference on Information Technology, Electronics and Intelligent Communication Systems, ICITEICS 2024. 2024, doi: 10.1109/ICITEICS61368.2024.10624847.
A. P. Wibowo, M. Taruk, T. E. Tarigan, and ..., “Improving Mental Health Diagnostics through Advanced Algorithmic Models: A Case Study of Bipolar and Depressive Disorders,” Indones. J. …, 2024, doi: 10.56705/ijodas.v5i1.122.
R. Setiawan and H. Oumarou, “Classification of Rice Grain Varieties Using Ensemble Learning and Image Analysis Techniques,” Indones. J. Data …, 2024, doi: 10.56705/ijodas.v5i1.129.
B. S. W. Poetro, E. Maria, H. Zein, and ..., “Advancements in Agricultural Automation: SVM Classifier with Hu Moments for Vegetable Identification,” Indones. J. …, 2024, doi: 10.56705/ijodas.v5i1.123.

Copyright (c) 2024 Indonesian Journal of Data and Science

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
License and Copyright Agreement
In submitting the manuscript to the journal, the authors certify that:
- They are authorized by their co-authors to enter into these arrangements.
- The work described has not been formally published before, except in the form of an abstract or as part of a published lecture, review, thesis, or overlay journal.
- The work is not under consideration for publication elsewhere.
- The work has been approved by all the author(s) and by the responsible authorities – tacitly or explicitly – of the institutes where the work has been carried out.
- They secure the right to reproduce any material that has already been published or copyrighted elsewhere.
- They agree to the following license and copyright agreement.
Copyright
Authors who publish with Indonesian Journal of Data and Science agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. (CC BY-NC 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.