Evaluación comparativa de arquitecturas basadas en ViT y CNN para la clasificación de imágenes dermatológicas
Resumen
La piel, como el órgano más grande del cuerpo humano, es susceptible a lesiones que en algunos casos pueden ser ocasionadas por fenómenos como la sobreexposición a rayos ultravioleta, y que pueden generar consecuencias tan nefastas como un cáncer de piel. El monitoreo de las características y comportamiento de estas lesiones y su correspondiente identificación es fundamental para el tratamiento de las lesiones cutáneas. Actualmente, este proceso de identificación puede apoyarse en técnicas basadas en imagen y aprendizaje profundo, con modelos basados en CNN, basados en Transformers, o modelos que usan una combinación de ambos. Entre las arquitecturas más populares para la clasificación de imágenes se encuentran ResNet y EfficientNet (caso CNN), y ViT y Swin Transformer (caso Transformer). Sin embargo, la superioridad de un esquema u otro para un problema específico puede depender de aspectos como el tamaño del dataset, la capacidad de cómputo disponible, o la resolución espacial. Bajo este contexto, el objetivo de esta investigación consistió en la realización de un estudio comparativo sobre el rendimiento de modelos basados en CNN y ViT para la clasificación automatizada de siete lesiones cutáneas utilizando el dataset DermaMNIST, caracterizado por un desbalance de clases. La metodología empleada consistió en realizar la comparación bajo un mismo entorno experimental mediante un pipeline unificado con normalización, particiones estratificadas, aumento de datos y entrenamiento desde cero o por transferencia. Los resultados se evaluaron en términos de exactitud, AUC, F1-score y exactitud balanceada, alcanzando valores de 85.99 %, 97.38 %, 75.98 % and 80.78 %, respectivamente. Finalmente, se concluye que EfficientNetV2-L alcanzó la mayor exactitud, F1-score y exactitud balanceada (aunque con mayor costo computacional en entrenamiento e inferencia), mientras que DenseNet201 obtuvo el AUC más alto, dado que prioriza la clase mayoritaria. Además, los modelos basados en ViT requieren preentrenamiento para ser competitivos, debido al reducido número de muestras.
Referencias bibliográficas
A. Shah et al., “A comprehensive study on skin cancer detection using artificial neural network (ANN) and convolutional neural network (CNN),” Clin. eHealth, vol. 6, pp. 76-84, Dec. 2023. https://doi.org/10.1016/j.ceh.2023.08.002
B. Ozdemir, and I. Pacal, “An innovative deep learning framework for skin cancer detection employing ConvNeXtV2 and focal self-attention mechanisms,” Results Eng., vol. 25, p. 103692, Mar. 2025. https://doi.org/10.1016/j.rineng.2024.103692
S. Shafeena et al., “Automated skin cancer diagnosis using deep learning: a systematic review of state-of-the-art architectures, techniques and performance evaluation,” Inf., Automat. Pomiary, vol. 16, no. 1, pp. 10-20, Mar. 2026. https://doi.org/10.35784/iapgos.7427
D. Dey et al., “CNNs, Transformers, Hybrid, and Vision Language Models for Skin Cancer Detection,” arXiv, 2026. [Online]. Available: https://arxiv.org/pdf/2605.26294
B. Durgabhavani et al., “Classification of Skin Disease using CNN,” in 2023 Int. Conf. Evolutionary Algorithms Soft Comput. Techniques, EASCT 2023, Bengaluru, India, 2023, pp. 1-6. https://doi.org/10.1109/EASCT59475.2023.10393477
S. Abbas et al., “Intelligent skin disease prediction system using transfer learning and explainable artificial intelligence,” Sci. Rep., vol. 15, no. 1, p. 1746, Dec. 2025. https://doi.org/10.1038/s41598-024-83966-4
Y. Hu et al., “Artificial intelligence in the task of segmentation and classification of brain metastases images: current challenges and future opportunities,” Front. Neurol., vol. 16, p. 1581422, Sep. 2025. https://doi.org/10.3389/fneur.2025.1581422
I. Aruk et al., “A novel hybrid ConvNeXt-based approach for enhanced skin lesion classification,” Expert Syst. Appl., vol. 283, p. 127721, Jul. 2025. https://doi.org/10.1016/j.eswa.2025.127721
V. Gabani et al., “Multimodal skin lesion classification for early cancer diagnosis using deep learning,” Front. Physiol., vol. 17, p. 1717517, Feb. 2026. https://doi.org/10.3389/fphys.2026.1717517
S. A. Amiri et al., “Skin Lesion Classification via ensemble method on deep learning,” Multimed. Tools Appl., vol. 84, no. 18, pp. 19379-19397, May. 2025. https://doi.org/10.1007/s11042-024-19837-x
A. Shaik et al., “An attention based hybrid approach using CNN and BiLSTM for improved skin lesion classification,” Sci. Rep., vol. 15, no. 1, p. 15680, May. 2025. https://doi.org/10.1038/s41598-025-00025-2
M. Shafiq et al., “A novel Skin lesion prediction and classification technique: ViT-GradCAM,” Skin Res. Technol., vol. 30, no. 9, p. e70040, Sep. 2024. https://doi.org/10.1111/srt.70040
L. Gamage et al., “Melanoma Skin Cancer Identification with Explainability Utilizing Mask Guided Technique,” Electronics, vol. 13, no. 4, p. 680, Feb. 2024. https://doi.org/10.3390/electronics13040680
Q. Abbas et al., “Assist-Dermo: A Lightweight Separable Vision Transformer Model for Multiclass Skin Lesion Classification,” Diagnostics, vol. 13, no. 15, p. 2531, Aug. 2023. https://doi.org/10.3390/diagnostics13152531
M. A. Farooq et al., “Derm-T2IM: Harnessing Synthetic Skin Lesion Data via Stable Diffusion Models for Enhanced Skin Disease Classification using ViT and CNN,” in 2024 46th Annual Int. Conf. IEEE Eng. Med. Biol. Soc. (EMBC), Orlando, FL, USA, 2024, pp. 1-5. https://doi.org/10.1109/EMBC53108.2024.10781852
X. Zhang et al., “DermViT: Diagnosis-Guided Vision Transformer for Robust and Efficient Skin Lesion Classification,” Bioengineering, vol. 12, no. 4, p. 421, Apr. 2025. https://doi.org/10.3390/bioengineering12040421
Z. Yu et al., “Hierarchical skin lesion image classification with prototypical decision tree,” NPJ Digit. Med., vol. 8, no. 1, p. 26, Dec. 2025. https://doi.org/10.1038/s41746-024-01395-z
Y. Fu, and C. Guo, “SkinFormer: a hybrid vision transformer and ConvNeXtV2 approach for skin cancer detection and segmentation,” Sci. Rep., vol. 16, p. 19283, Jun. 2026. https://doi.org/10.1038/s41598-026-48633-w
W. Fendzi Mbasso et al., “Scalable HMO-CNN-SVM Framework for Skin Lesion Classification: A Metaheuristic-Driven Approach with Parallelizable Optimization for Cluster Deployment,” Biomed. Eng. Comput. Biol., vol. 17, Jun. 2026. https://doi.org/10.1177/11795972261453621
H. Ghazouani, “Multi-residual attention network for skin lesion classification,” Biomed. Signal Process. Control, vol. 103, p. 107449, May. 2025. https://doi.org/10.1016/j.bspc.2024.107449
F. He et al., “Skin lesion classification network based on improved MobileViT,” Eng. Appl. Artif. Intell., vol. 159, no. Part C, p. 111726, 2025. https://doi.org/10.1016/j.engappai.2025.111726
N. Yousaf et al., “Advanced hybrid transformer CNN framework for improved skin lesion classification and segmentation,” Sci. Rep., vol. 16, p. 13592, Mar. 2026. https://doi.org/10.1038/s41598-026-43376-0
X. Wang et al., “Non-Local Neural Networks,” in Proc. IEEE Conf. Comput. Vision Pattern Recogn. (CVPR), Salt Lake City, UT, USA, 2018, pp. 7794-7803. https://doi.org/10.1109/CVPR.2018.00813
S. Aladhadh et al., “An Effective Skin Cancer Classification Mechanism via Medical Vision Transformer,” Sensors, vol. 22, no. 11, p. 4008, May. 2022. https://doi.org/10.3390/s22114008
A. Dosovitskiy et al., “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale,” arXiv, Jun. 2021. [Online]. Available: http://arxiv.org/abs/2010.11929
M. A. Arshed et al., “Multi-Class Skin Cancer Classification Using Vision Transformer Networks and Convolutional Neural Network-Based Pre-Trained Models,” Inform., vol. 14, no. 7, p. 415, Jul. 2023. https://doi.org/10.3390/info14070415
A. Vaswani et al., “Attention Is All You Need,” arXiv, Aug. 2023. [Online]. Available: http://arxiv.org/abs/1706.03762
G. H. Dagnaw et al., “Skin cancer classification using vision transformers and explainable artificial intelligence,” J. Med. Artif. Intell., vol. 7, Jun. 2024. https://doi.org/10.21037/jmai-24-6
J. Yang et al., “MedMNIST v2 - A large-scale lightweight benchmark for 2D and 3D biomedical image classification,” Sci. Data, vol. 10, no. 1, p. 41, Jan. 2023. https://doi.org/10.1038/s41597-022-01721-8
P. Tschandl et al., “Data descriptor: The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions,” Sci. Data, vol. 5, p. 180161, Aug. 2018. https://doi.org/10.1038/sdata.2018.161
K. He et al., “Deep Residual Learning for Image Recognition,” in Proc. IEEE Conf. Comput. Vision Pattern Recogn. (CVPR), Las Vegas, NV, USA, 2016, pp. 770-778. https://doi.org/10.1109/CVPR.2016.90
G. Huang et al., “Densely Connected Convolutional Networks,” GitHub, 2023. [Online]. Available: https://github.com/liuzhuang13/DenseNet
M. Tan, and Q. Le, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks,” in Int. Conf. Mach. Learn. (ICML), PMLR, Long Beach, CAL, USA, 2019, pp. 6105-6114. https://doi.org/10.48550/arXiv.1905.11946
A. E. Villamarín Olmos, “Comparative-eval-of-ViT-and-CNN-for-derma-image-classification,” GitHub, 2026. [Online]. Available: https://github.com/realV1LL4/Comparative-eval-of-ViT-and-CNN-for-derma-image-classification
Descargas
Derechos de autor 2026 TecnoLógicas

Esta obra está bajo una licencia internacional Creative Commons Atribución-NoComercial-CompartirIgual 4.0.
Datos de los fondos
-
Universidad Militar Nueva Granada
Números de la subvención INV-ING-4157
| Estadísticas de artículo | |
|---|---|
| Vistas de resúmenes | 14 |
| Vistas de PDF | 11 |
| Descargas de PDF | 11 |
| Vistas de HTML | 0 |
| Otras vistas | 0 |





