Journals / Balkan Journal of Electrical and Computer Engineering / 2026 / Cilt: 14

A Hybrid Swin Transformer–ResNet50 Architecture for Skin Lesion Classification

Cilt Lezyonlarının Sınıflandırılması için Hibrit Swin Transformer–ResNet50 Mimarisi

Hüseyin Bulduk(KARAMANOĞLU MEHMETBEY ÜNİVERSİTESİ)0009-0009-5765-8659
Kadir Sabancı(KARAMANOĞLU MEHMETBEY ÜNİVERSİTESİ)0000-0003-0238-9606
Pages
267–276
Publication Date
2026-10-19
🏛️Bibliographic metadata and full text access for this article are provided via DergiPark.
DergiPark Record ↗
✨

AI Summary & Key Takeaways

AI Insight
⚡ TL;DR(Too Long; Didn't Read)

The results demonstrate that the proposed hybrid model provides an effective and reliable solution for skin lesion classification, achieving high accuracy and balanced performance across different lesion categories.

📌 3 Key Takeaways

🎯
Objective & Hypothesis:This study presents a hybrid architecture combining local attention and deep feature extraction for the classification of skin lesions.
📊
Key Findings & Data:A hybrid structure was developed by integrating the shifted window-based local attention mechanism of Swin Transformer with the deep feature extraction capability of ResNet50.
💡
Conclusion & Impact:The results demonstrate that the proposed hybrid model provides an effective and reliable solution for skin lesion classification, achieving high accuracy and balanced performance across different lesion categories.
🔬Design:Modeling & Simulation
📍Scope:Comprehensive Sample
⚙️Variables:Swin Transformer · ResNet50 · Hibrit Model

Abstract

This study presents a hybrid architecture combining local attention and deep feature extraction for the classification of skin lesions. A hybrid structure was developed by integrating the shifted window-based local attention mechanism of Swin Transformer with the deep feature extraction capability of ResNet50. In experiments conducted on the HAM10000 dataset, the standalone Swin Transformer model achieved a maximum validation accuracy of 88.82%, while the proposed Swin Transformer–ResNet50 hybrid model reached a maximum validation accuracy of 90.01%. When evaluated on the independent test set, the Swin Transformer and hybrid models achieved classification accuracies of 89.0% and 90.0%, respectively. The performance of the proposed model was comprehensively evaluated using ROC curves, confusion matrices, and class-based performance metrics. To improve classification performance in minority classes, focal loss, class-based data augmentation, CutMix, and MixUp techniques were employed. The results demonstrate that the proposed hybrid model provides an effective and reliable solution for skin lesion classification, achieving high accuracy and balanced performance across different lesion categories.

Özet

Bu çalışma, cilt lezyonlarının sınıflandırılması için yenilikçi bir hibrit derin öğrenme modeli sunmaktadır. Swin Transformer'ın kaydırılmış pencere tabanlı yerel dikkat mekanizması ile ResNet50'nin derin özellik çıkarma yeteneği birleştirilerek yeni bir hibrit yapı oluşturulmuştur. HAM10000 veri kümesi üzerinde yapılan deneylerde, Swin Transformer modeli tek başına %88,82 doğruluk oranına ulaşırken, önerilen hibrit model bu oranı %90,01'e çıkarmıştır. Modelin performansı, ROC eğrileri, karışıklık matrisi ve sınıf tabanlı metrikler kullanılarak kapsamlı bir şekilde değerlendirilmiştir. Azınlık sınıflarında performansı iyileştirmek için odak kaybı, sınıf tabanlı veri artırma, CutMix ve MixUp teknikleri uygulanmıştır. Sonuçlar, önerilen hibrit modelin yüksek doğruluk oranı, dengeli sınıflandırma yeteneği ve yenilikçi mimarisi ile cilt lezyonlarının güvenilir sınıflandırılması için etkili bir çözüm sağladığını göstermektedir.

🔖

Cite This Article

Bulduk, H., Sabancı, K. (2026). A Hybrid Swin Transformer–ResNet50 Architecture for Skin Lesion Classification. Balkan Journal of Electrical and Computer Engineering, Cilt: 14, 267–276. https://doi.org/10.17694/bajece.1925042

📄 Full Text PDF Viewer

📄

PDF görüntüleyici hazırlanıyor...

References (39)

  1. R. L. Siegel, K. D. Miller, H. E. Fuchs, and A. Jemal, "Cancer statistics, 2021," CA: A Cancer Journal for Clinicians, vol. 71, no. 1, pp. 7–33, 2021, doi: 10.3322/caac.21654.
  2. H. W. Rogers, M. A. Weinstock, S. R. Feldman, and B. M. Coldiron, "Incidence estimate of nonmelanoma skin cancer (keratinocyte carcinomas) in the US population, 2012," JAMA Dermatology, vol. 151, no. 10, pp. 1081–1086, 2015, doi: 10.1001/jamadermatol.2015.1187.
  3. American Cancer Society, "Cancer Facts & Figures 2022," American Cancer Society, Atlanta, GA, 2022.
  4. American Cancer Society, "Key statistics for basal and squamous cell skin cancers," 2019. [Online]. Available: https://www.cancer.org
  5. M. Vestergaard, P. Macaskill, P. Holt, and S. Menzies, "Dermoscopy compared with naked eye examination for the diagnosis of primary melanoma: a meta-analysis of studies performed in a clinical setting," British Journal of Dermatology, vol. 159, no. 3, pp. 669–676, 2008, doi: 10.1111/j.1365-2133.2008.08713.x.
  6. M. Binder et al., "Epiluminescence microscopy: a useful tool for the diagnosis of pigmented skin lesions for formally trained dermatologists," Archives of Dermatology, vol. 131, no. 3, pp. 286–291, 1995, doi: 10.1001/archderm.1995.01690150050007.
  7. P. Tschandl, C. Rosendahl, and H. Kittler, "The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions," Scientific Data, vol. 5, no. 1, pp. 1–9, 2018, doi: 10.1038/sdata.2018.161.
  8. O. Russakovsky et al., "ImageNet large scale visual recognition challenge," International Journal of Computer Vision, vol. 115, no. 3, pp. 211–252, 2015, doi: 10.1007/s11263-015-0816-y.
  9. Z. Rahman, M. S. Hossain, M. R. Islam, M. M. Hasan, and R. A. Hridhee, "An approach for multiclass skin lesion classification based on ensemble learning," Informatics in Medicine Unlocked, vol. 25, p. 100659, 2021, doi: 10.1016/j.imu.2021.100659.
  10. M. S. Ali, M. S. Miah, J. Haque, M. M. Rahman, and M. K. Islam, "An enhanced technique of skin cancer classification using deep convolutional neural network with transfer learning models," Machine Learning with Applications, vol. 5, p. 100036, 2021, doi: 10.1016/j.mlwa.2021.100036.
  11. G. M. S. Himel, M. M. Islam, K. A. Al-Aff, S. I. Karim, and M. K. U. Sikder, "Skin cancer segmentation and classification using Vision Transformer for automatic analysis in dermatoscopy-based noninvasive digital system," International Journal of Biomedical Imaging, vol. 2024, p. 3022192, Feb. 2024, doi: 10.1155/2024/3022192.
  12. M. Arshad et al., "A computer-aided diagnosis system using deep learning for multiclass skin lesion classification," Computational Intelligence and Neuroscience, vol. 2021, p. 9619079, 2021, doi: 10.1155/2021/9619079.
  13. O. Sevli, "A deep convolutional neural network-based pigmented skin lesion classification application and experts evaluation," Neural Computing and Applications, vol. 33, no. 18, pp. 12039–12050, 2021, doi: 10.1007/s00521-021-05929-4.
  14. A. Ameri, "A deep learning approach to skin cancer detection in dermoscopy images," Journal of Biomedical Physics and Engineering, vol. 10, no. 6, pp. 801–806, 2020, doi: 10.31661/jbpe.v0i0.2004-1107.
  15. Q. Su, H. N. A. Hamed, M. A. Isa, X. Hao, and X. Dai, "A GAN-based data augmentation method for imbalanced multi-class skin lesion classification," IEEE Access, vol. 12, pp. 16498–16513, 2024, doi: 10.1109/ACCESS.2024.3360215.
  16. S. Shen et al., "A low-cost high-performance data augmentation for deep learning-based skin lesion classification," BME Frontiers, vol. 2022, p. 9765307, Apr. 2022, doi: 10.34133/2022/9765307.
  17. G. Yang, S. Luo, and P. Greer, "A novel Vision Transformer model for skin cancer classification," Neural Processing Letters, vol. 55, pp. 9335–9351, 2023, doi: 10.1007/s11063-023-11204-5.
  18. M. Wei, Q. Wu, H. Ji, J. Wang, T. Lyu, J. Liu, and L. Zhao, "A skin disease classification model based on DenseNet and ConvNeXt fusion," Electronics, vol. 12, no. 2, p. 438, 2023, doi: 10.3390/electronics12020438.
  19. S. Aladhadh, M. Alsanea, M. Aloraini, T. Khan, S. Habib, and M. Islam, "An effective skin cancer classification mechanism via Medical Vision Transformer," Sensors, vol. 22, no. 11, p. 4008, 2022, doi: 10.3390/s22114008.
  20. T. M. Alam, K. Shaukat, W. A. Khan, I. A. Hameed, L. A. Almuqren, M. A. Raza, M. Aslam, and S. Luo, "An efficient deep learning-based skin cancer classifier for an imbalanced dataset," Diagnostics, vol. 12, no. 9, p. 2115, 2022, doi: 10.3390/diagnostics12092115.
  21. K. Mridha, M. M. Uddin, J. Shin, S. Khadka, and M. F. Mridha, "An interpretable skin cancer classification using optimized convolutional neural network for a smart healthcare system," IEEE Access, vol. 11, pp. 41003–41018, 2023, doi: 10.1109/ACCESS.2023.3269694.
  22. M. A. Khan, T. Akram, M. Sharif, and S. Kadry, "Computer decision support system for skin cancer localization and classification," Computers, Materials & Continua, vol. 68, no. 1, pp. 1041–1064, 2021, doi: 10.32604/cmc.2021.016307.
  23. I. Kousis, I. Perikos, I. Hatzilygeroudis, and M. Virvou, "Deep learning methods for accurate skin cancer recognition and mobile application," Electronics, vol. 11, no. 9, p. 1294, 2022, doi: 10.3390/electronics11091294.
  24. H. L. Gururaj, N. Manju, A. Nagarjun, V. N. M. Aradhya, and F. Flammini, "DeepSkin: A deep learning approach for skin cancer classification," IEEE Access, vol. 11, pp. 50205–50214, 2023, doi: 10.1109/ACCESS.2023.3274848.
  25. N. Girdhar, A. Sinha, and S. Gupta, "DenseNet-II: an improved deep convolutional neural network for melanoma cancer detection," Soft Computing, vol. 27, pp. 13285–13304, 2023, doi: 10.1007/s00500-022-07406-z.
  26. L. Wang, A. Chen, Y. Zhang, X. Wang, Y. Zhang, Q. Shen, and Y. Xue, "AK-DL: A shallow neural network model for diagnosing actinic keratosis with better performance than deep neural networks," Diagnostics, vol. 10, no. 4, p. 217, 2020, doi: 10.3390/diagnostics10040217.
  27. T. H. H. Aldhyani, A. Verma, M. H. Al-Adhaileh, and D. Koundal, "Multi-class skin lesion classification using a lightweight dynamic kernel deep-learning-based convolutional neural network," Diagnostics, vol. 12, no. 9, p. 2048, 2022, doi: 10.3390/diagnostics12092048.
  28. M. Elshahawy, A. Elnemr, M. Oproescu, A.-G. Schiopu, A. Elgarayhi, M. M. Elmogy, and M. Sallah, "Early melanoma detection based on a hybrid YOLOv5 and ResNet technique," Diagnostics, vol. 13, no. 17, p. 2804, 2023, doi: 10.3390/diagnostics13172804.
  29. Y. Aydin, "A comparative analysis of skin cancer detection applications using histogram-based local descriptors," Diagnostics, vol. 13, no. 19, p. 3142, 2023, doi: 10.3390/diagnostics13193142.
  30. B. Shetty, R. Fernandes, A. P. Rodrigues et al., "Skin lesion classification of dermoscopic images using machine learning and convolutional neural network," Scientific Reports, vol. 12, p. 18134, 2022, doi: 10.1038/s41598-022-22644-9.
  31. S. Mustafa, A. Jaffar, M. Rashid, S. Akram, and S. M. Bhatti, "Deep learning-based skin lesion analysis using hybrid ResUNet++ and modified AlexNet-Random Forest for enhanced segmentation and classification," PLOS ONE, vol. 20, no. 1, p. e0315120, 2025, doi: 10.1371/journal.pone.0315120.
  32. Y. Nie, P. Sommella, M. Carratù, M. O'Nils, and J. Lundgren, "A deep CNN Transformer hybrid model for skin lesion classification of dermoscopic images using focal loss," Diagnostics, vol. 13, no. 1, p. 72, 2023, doi: 10.3390/diagnostics13010072.
  33. F. S. Prity, A. J. Hasan, M. M. H. Anik et al., "RvXmBlendNet: A multi-architecture hybrid model for improved skin cancer detection," Human-Centric Intelligent Systems, vol. 4, pp. 545–570, 2024, doi: 10.1007/s44230-024-00083-1.
  34. S. Mavaddati, "Skin cancer classification based on a hybrid deep model and long short-term memory," Biomedical Signal Processing and Control, vol. 100, Part A, p. 107109, 2025, doi: 10.1016/j.bspc.2024.107109.
  35. U. K. Lilhore, Y. K. Sharma, S. Simaiya et al., "SkinEHDLF: A hybrid deep learning approach for accurate skin cancer classification in complex systems," Scientific Reports, vol. 15, p. 14913, 2025, doi: 10.1038/s41598-025-98205-7.
  36. S. Padhy, S. Dash, N. Kumar, S. P. Singh, G. Kumar, and P. Moral, "Temporal integration of ResNet features with LSTM for enhanced skin lesion classification," Results in Engineering, vol. 25, p. 104201, 2025, doi: 10.1016/j.rineng.2025.104201.
  37. A. Mehmood, Y. Gulzar, Q. M. Ilyas, A. Jabbari, M. Ahmad, and S. Iqbal, "SBXception: A shallower and broader Xception architecture for efficient classification of skin lesions," Cancers, vol. 15, no. 14, p. 3604, 2023, doi: 10.3390/cancers15143604. [38] H. Bulduk and K. Sabancı, “A Hybrid Model Approach Based on Swin Transformer and EfficientNetV2 for Maize Variety Classification”, J. Appl. Methods Electron. Comput., vol. 13, no. 3, pp. 84–92, Sep. 2025, doi:10.58190/ijamec.2025.132.
  38. Z. Liu, Y. Lin, Y. Cao, H. Hu, Y. Wei, Z. Zhang, S. Lin, and B. Guo, "Swin Transformer: Hierarchical Vision Transformer using shifted windows," in Proc. IEEE/CVF International Conference on Computer Vision (ICCV), Oct. 2021, pp. 9992–10002, doi: 10.1109/ICCV48922.2021.00986.
  39. K. He, X. Zhang, S. Ren, and J. Sun, "Deep residual learning for image recognition," in Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 2016, pp. 770–778, doi: 10.1109/CVPR.2016.90.