Skip to main content

Research Repository

Advanced Search

TransSLC: skin lesion classification in dermatoscopic images using transformers.


Jinchang Ren


Guang Yang

Angelica Aviles-Rivero

Michael Roberts



Early diagnosis and treatment of skin cancer can reduce patients' fatality rates significantly. In the area of computer-aided diagnosis (CAD), the Convolutional Neural Network (CNN) has been widely used for image classification, segmentation, and recognition. However, the accurate classification of skin lesions using CNN-based models is still challenging, given the inconsistent shape of lesion areas (leading to intra-class variance) and inter-class similarities. In addition, CNN-based models with massive downsampling operations often result in loss of local feature attributes from the dermatoscopic images. Recently, transformer-based models have been able to tackle this problem by exploiting both local and global characteristics, employing self-attention processes, and learning expressive long-range representations. Motivated by the superior performance of these methods, in this paper we present a transformer-based model for skin lesion classification. We apply a transformers-based model using bidirectional encoder representation from the dermatoscopic image to perform the classification task. Extensive experiments were carried out using the public dataset HAM10000, and promising results of 90.22%, 99.54%, 94.05%, and 96.28% in accuracy, precision, recall, and F1 score respectively, were achieved. This opens new research directions towards further exploration of transformers-based methods to solve some of the key challenging problems in medical image classification, namely generalisation to samples from a different distribution.


SARKER, M.M.K., MORENO-GARCÍA, C.F., REN, J. and ELYAN, E. 2022. TransSLC: skin lesion classification in dermatoscopic images using transformers. In Yang, G., Aviles-Rivero, A., Roberts, M. and Schönlieb, C.-B. (eds.) Medical image understanding and analysis: proceedings of 26th Medical image understanding and analysis 2022 (MIUA 2022), 27-29 July 2022, Cambridge, UK. Lecture notes in computer sciences, 13413. Cham: Springer [online], pages 651-660. Available from:

Conference Name 26th Medical image understanding and analysis 2022 (MIUA 2022)
Conference Location Cambridge, UK
Start Date Jul 27, 2022
End Date Jul 29, 2022
Acceptance Date Jun 1, 2022
Online Publication Date Jul 25, 2022
Publication Date Jul 25, 2022
Deposit Date Jul 28, 2022
Publicly Available Date Jul 26, 2023
Publisher Springer
Pages 651-660
Series Title Lecture notes in computer science
Series Number 13413
Series ISSN 0302-9743; 1611-3349
Book Title Medical image understanding and analysis
ISBN 9783031120527
Keywords Computer aided diagnosis; Skin lesion classification; Deep learning; Convolutional neural networks; Transformers
Public URL