LRNet Skin Cancer Classification Using Low-Resolution Images
LRNet Skin Cancer Classification Using Low-Resolution Images
Mumbai, India
Mitt Shah
Computer Science and Engineering
Nirma University
Ahmedabad, India
[email protected]
Abstract—Modern lifestyle and continuous depletion of the neural networks, image processing, machine learning, and
ozone layer have dramatically increased skin cancer cases world- deep learning [5]. Giotis et al. [6], and Ruiz et al. [7] used
wide. Detection of skin cancer at an early stage can increase the neural networks and image processing to develop a deci-
survival rate to 99%. Computer-aided skin cancer classification
has various challenges due to the visual similarity between sion support system. Orzan and Koklu [8] experimented four
different skin cancer classes and model’s lack of generalization different machine learning algorithms out of which artificial
capability. Recent deep learning-based approaches have overcome neural networks gave the best accuracy of 92.5%. Codella et
these challenges and even outperform an expert dermatologist. al. [9] proposed a hybrid system for melanoma classification
However, these models are trained on a large number of high- consisting of support vector machine (SVM), sparse coding
resolution images which makes them computationally expensive.
To elucidate this problem, we propose to train the neural net- and a deep learning algorithm [10]. They achieved an accuracy
works on low-resolution images. We then propose a fast, scalable, of 93.1%. Waheed et al. [11] developed a machine learning
and efficient Deep Convolutional Neural Network, LRNet for algorithm based on colour and texture of skin lesions. Hosny
skin cancer classification on low-resolution images. LRNet is et al. [10] used Convolutional Neural Networks (CNNs) and
trained on 10015 pigmented lesion images belonging to the proposed a modified version of pre-trained AlexNet [12] which
HAM10000 dataset. The proposed model is also deployed to a
publicly available web application. The performance of LRNet is achieved an accuracy of 98.6%. They also demonstrated the
evaluated based on sensitivity, specificity, precision and accuracy, importance of data augmentation in modern deep learning
and the values obtained are 94%, 91.7%, 94.2%, and 90.6%, algorithms. However, all of the above frameworks were trained
respectively. Our proposed approach outperforms all the pre- on smaller datasets. Hence it cannot be guaranteed that they
trained models and drastically reduces the training time. will perform with the stated accuracy when deployed to real-
Index Terms—Convolutional Neural Network, Deep Learning,
Dermatologist, HAM10000, Skin Cancer. world application.
Dorj et al. [5] collected 3753 images from the internet and
I. I NTRODUCTION proposed a transfer learning based approach which achieved
In recent years, people suffering from skin cancer have in- a maximum accuracy of 94.2%. Similar to Hosny et al.
creased significantly, due to modern lifestyle, smoking tobacco [10], they also used pre-trained AlexNet [12] for transfer
and direct exposure to harmful UV radiation from the sun. learning. The generalization capability is the main challenge in
It is estimated that one out of every five American would building a skin cancer classification framework which can be
develop skin cancer by the age of 70. Malignant melanoma, deployed to daily medical practice. A model has to be trained
the deadliest skin cancer kills approximately two people every on photographic images (for example, smartphone images)
hour in the United States of America. Malignant melanoma is of skin lesions along with dermoscopic images to make it
caused due to the abnormal melanocyte cells responsible for more generalized. The photographic images exhibit variability
producing melanin pigments that give colour to the skin [1]. in camera angle, zoom, lighting, and contrast, making it
However, early detection of skin cancer can increase the five- more challenging to train an efficient deep learning algorithm
year survival rate to 99%. [13]. Esteva et al. [13] overcomed this challenge by a data-
Studies have found that early detection of skin cancer driven approach. They used 1.41 million training images to
poses a challenge even for an expert dermatologist due to the train GoogleNet Inception v3 [14] model, which made their
complex visual inputs embedded in a lesion image [2]–[4]. approach independent of photographic variability and achieved
This arises the need to develop a fast, scalable and efficient a maximum sensitivity of 96%.
automatic computational method that can help medical prac- Training the above proposed models on a large number
titioners detect skin cancer at an early stage. of high-resolution images require substantial computational
Previous computer-aided approaches for skin cancer classi- power and time. On the other hand, reducing training data de-
fication employed varied methods such as computer vision, creases the generalization capability and increases over-fitting
978-1-6654-0430-3/21/$31.00 ©2021 IEEE
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:44:28 UTC from IEEE Xplore. Restrictions apply.
Fig. 1. The detailed architecture of LRNet. The size of the outputs of every layer are mentioned in the brackets.
in deep neural networks. To elucidate this issue, we propose to training and thus helps to curb over-fitting. The Dropout layer
use low-resolution images with necessary pre-processing. We acts as a regularizer. It randomly ignores some training param-
then develop LRNet, a Deep Convolutional Neural Network eters and thus making the training noisy. This phenomenon
for skin cancer classification on low-resolution images. We helps to make the model more robust and de-correlating the
also deployed our proposed model by developing a web weights [21]. Finally, the Batch Normalization layer [22]
application. It can be freely accessed on https://new-age-ai. normalizes the activation values batch-wise. It majorly helps
herokuapp.com/. in preventing exploding or vanishing gradients problem in the
Our major contributions are: network.
• Reduced the training time on large datasets by using low- Deep learning algorithms are always data-hungry. Increas-
resolution images. ing dataset size results in a significant increase in computa-
• Developed LRNet, a fast, scalable, and efficient Deep tional cost and time. Reducing the dataset size does no good
Convolutional Neural Network for skin cancer classifi- due to two main reasons: 1) It can cause over-fitting; 2) The
cation on low-resolution images. generalization capability of a skin cancer classification model
• Deployed the model by developing a web application for can only be increased by presenting more samples to the neural
free public use. network.
To overcome this challenge, we propose a novel approach,
II. P ROPOSED A PPROACH LRNet, a simple Deep Convolutional Neural Network for
Convolutional Neural Network (CNN) is a deep learning skin cancer classification which uses low-resolution images
algorithm used in image and video processing. Over the for training. The Convolutional layers are so powerful that
past decade, researchers have used CNNs to develop state- they can extract latent features even from the low-resolution
of-the-art image classification [15], object detection [16], and images. These latent features than can be used by subsequent
semantic segmentation [17] algorithms. CNNs have also been layers to predict the class probabilities. The detailed archi-
extensively used in the medical field [18]–[20]. tecture of LRNet is shown in Fig. 1. The model accepts a
The convolutional layers act as image filters and extract 28 × 28 × 3 image and outputs a seven-dimensional vector
latent features of an image that can be further used to calculate consisting of probabilities of each class. We train the model
the probability in an image classification problem. The Max- with Categorical Cross-Entropy loss function given by:
Pooling layer reduces training time and computational power C
by decreasing the number of trainable parameters. It reduces X
L(y, ŷ) = − [yi · log(ŷi )] , (1)
model complexity by removing less relevant features while i=1
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:44:28 UTC from IEEE Xplore. Restrictions apply.
(a) Number of samples of each class in the dataset. (b) Gender distribution of the dataset.
(c) Body localization of each skin cancer class. (d) Methods used to obtain ground truth labels.
Fig. 2. Data analysis of the HAM10000 dataset.
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:44:28 UTC from IEEE Xplore. Restrictions apply.
The ground truth labels of the dataset are obtained either by IV. R ESULTS
histopathology (histo), expert consensus (consensus), follow- The efficiency of LRNet is evaluated based on four mea-
up examination (follow up), or confirmation by in-vivo con- sures— sensitivity, specificity, precision, and accuracy.
focal microscopy (confocal) [23]. As seen in Fig. 2d majority
of the labels are obtained by histopathology, the microscopic TP
Sensitivity(T P R) = (2)
study of tissues. However, Melanocytic Nevi is an exception, TP + FN
since follow-up examinations obtained the majority of labels. TN
Specif icity(T N R) = (3)
TN + FP
TP
P recision(P V ) = (4)
B. Data Augmentation TP + FP
TP + TN
Data augmentation helps to increase the variance of a Accuracy(ACC) = (5)
TP + TN + FP + FN
dataset by adding marginally modified versions of the origi-
where TP is true positive, TN is true negative, FP is false
nal data. As discussed in Section III-A, HAM10000 dataset
positive, and FN is false negative. The ROC curve is given in
suffers from class imbalance. Our proposed approach uses
Fig. 4. The class-wise values of each evaluation measure are
data augmentation to tackle class imbalance problem. Data
given in Table III.
augmentation also increases the generalization capability and
According to our knowledge, none of the approaches until
curbs over-fitting. The proportions of the minor classes are
now have used low-resolution images. Hence we compare the
increased by artificially augmenting slightly modified copies.
efficiency of LRNet with pre-trained models. It is to be noted
The augmentation techniques used are random horizontal and
that we unfreeze the weights of the last two layers of the pre-
vertical flipping, random jittering, rotating, zooming, changing
trained networks to fine-tune them on low-resolution images of
brightness and contrast, and adding random noise.
HAM10000. Table II shows the results. Since low-resolution
images have significantly fewer features, a simple network like
LRNet out-performs the pre-trained models. Almost all pre-
C. Training Details
trained networks are very dense, and thus they overfit when
We use 9500 images for training and reserve the rest for trained on low-resolution images.
testing. It is ensured that the 515 testing images contain equal Our method drastically reduces training time. The pre-
proportions from all classes. LRNet uses Adam optimizer [24] trained models take around 2 hours to train on the original
with momentum parameters β1 = 0.9 and β2 = 0.999. The resolution, whereas using low-resolution images reduces the
network is trained for 75 epochs with a learning rate of 0.0002 training time to just 20 minutes.
on a V100 GPU. Table I shows the comparison of LRNet with previous
approaches that used large number of high-resolution images.
Although our proposed approach doesn’t out-perform them on
TABLE I
C OMPARATIVE S TUDY B ETWEEN LRN ET A ND P REVIOUS W ORKS all measures, the results are still very close to the state-of-the-
art.
Reference TPR TNR PV ACC
Esteva et al. [13] 96 - - 72.1
Dorj et al. [5] 97.8 90.7 - 94.2
LRNet 94 91.7 94.2 90.6
TABLE II
C OMPARISON O F LRN ET W ITH P RE -T RAINED M ODELS
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:44:28 UTC from IEEE Xplore. Restrictions apply.
TABLE III [8] I. A. OZKAN and M. KOKLU, “Skin lesion classification using machine
P ERFORMANCE O F LRN ET learning algorithms,” International Journal of Intelligent Systems and
Applications in Engineering, vol. 5, no. 4, pp. 285–289, 2017.
Class TPR TNR PV ACC [9] N. Codella, J. Cai, M. Abedini, R. Garnavi, A. Halpern, and J. R. Smith,
“Deep learning, sparse coding, and svm for melanoma recognition in
Actinic keratoses 93.1 89.3 93.5 89.5 dermoscopy images,” in International workshop on machine learning in
Basal cell carcinoma 97.3 95.1 97.4 92 medical imaging, pp. 118–126, Springer, 2015.
[10] K. M. Hosny, M. A. Kassem, and M. M. Foaud, “Skin cancer classi-
Benign keratosis-like lesions 91 88.4 90.7 88.5 fication using deep learning and transfer learning,” in 2018 9th Cairo
International Biomedical Engineering Conference (CIBEC), pp. 90–93,
Dermatofibroma 94.2 92.5 94.2 91
IEEE, 2018.
Melanoma 98.6 97.8 98.4 95.2 [11] Z. Waheed, A. Waheed, M. Zafar, and F. Riaz, “An efficient machine
learning approach for the detection of melanoma using dermoscopic im-
Melanocytic nevi 95.2 94.1 95.5 92.9
ages,” in 2017 International Conference on Communication, Computing
Vascular lesions 89 86.1 89.7 85.3 and Digital Systems (C-CODE), pp. 316–319, IEEE, 2017.
[12] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification
with deep convolutional neural networks,” Communications of the ACM,
vol. 60, no. 6, pp. 84–90, 2017.
V. C ONCLUSION [13] A. Esteva, B. Kuprel, R. A. Novoa, J. Ko, S. M. Swetter, H. M. Blau,
and S. Thrun, “Dermatologist-level classification of skin cancer with
Automatic skin cancer classification is a challenging task deep neural networks,” nature, vol. 542, no. 7639, pp. 115–118, 2017.
due to complex visual inputs embedded in the lesion images, [14] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, “Rethinking
the inception architecture for computer vision,” in Proceedings of the
high visual correlation between different skin cancer classes, IEEE conference on computer vision and pattern recognition, pp. 2818–
and lack of generalization ability. Modern deep learning algo- 2826, 2016.
rithms have proposed state-of-the-art solutions which even out- [15] K. Simonyan and A. Zisserman, “Very deep convolutional networks for
large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014.
perform expert dermatologists. However, these methods are [16] J. Redmon and A. Farhadi, “Yolov3: An incremental improvement,”
expensive in terms of computational power and time. In this arXiv preprint arXiv:1804.02767, 2018.
paper, we propose to use low-resolution images for reducing [17] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille,
“Deeplab: Semantic image segmentation with deep convolutional nets,
training cost and time. We then develop a simple CNN, LRNet atrous convolution, and fully connected crfs,” IEEE transactions on
which, when trained on low-resolution images out-performs pattern analysis and machine intelligence, vol. 40, no. 4, pp. 834–848,
all pre-trained models on four different evaluation measures. 2017.
[18] G. Litjens, T. Kooi, B. E. Bejnordi, A. A. A. Setio, F. Ciompi,
The performance of LRNet is very close to the previous M. Ghafoorian, J. A. Van Der Laak, B. Van Ginneken, and C. I. Sánchez,
state-of-the-art methods that were trained on high-resolution “A survey on deep learning in medical image analysis,” Medical image
images. We also developed a free web application to deploy analysis, vol. 42, pp. 60–88, 2017.
[19] D. Shen, G. Wu, and H.-I. Suk, “Deep learning in medical image
our proposed model. Future work may involve developing analysis,” Annual review of biomedical engineering, vol. 19, pp. 221–
complex deep learning algorithms that segment the lesion from 248, 2017.
the images and then run it through a classification algorithm [20] B. Sahiner, A. Pezeshk, L. M. Hadjiiski, X. Wang, K. Drukker, K. H.
Cha, R. M. Summers, and M. L. Giger, “Deep learning in medical
to get better accuracy. imaging and radiation therapy,” Medical physics, vol. 46, no. 1, pp. e1–
e36, 2019.
R EFERENCES [21] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhut-
[1] M. H. Jafari, N. Karimi, E. Nasr-Esfahani, S. Samavi, S. M. R. dinov, “Dropout: a simple way to prevent neural networks from overfit-
Soroushmehr, K. Ward, and K. Najarian, “Skin lesion segmentation ting,” The journal of machine learning research, vol. 15, no. 1, pp. 1929–
in clinical images using deep learning,” in 2016 23rd International 1958, 2014.
conference on pattern recognition (ICPR), pp. 337–342, IEEE, 2016. [22] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep
[2] G. Annessi, R. Bono, F. Sampogna, T. Faraggiana, and D. Abeni, network training by reducing internal covariate shift,” in International
“Sensitivity, specificity, and diagnostic accuracy of three dermoscopic conference on machine learning, pp. 448–456, PMLR, 2015.
algorithmic methods in the diagnosis of doubtful melanocytic lesions: [23] P. Tschandl, C. Rosendahl, and H. Kittler, “The ham10000 dataset,
the importance of light brown structureless areas in differentiating atyp- a large collection of multi-source dermatoscopic images of common
ical melanocytic nevi from thin melanomas,” Journal of the American pigmented skin lesions,” Scientific data, vol. 5, p. 180161, 2018.
Academy of Dermatology, vol. 56, no. 5, pp. 759–767, 2007. [24] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,”
[3] P. Tschandl, L. Hofmann, C. Fink, H. Kittler, and H. Haenssle, arXiv preprint arXiv:1412.6980, 2014.
“Melanomas vs. nevi in high-risk patients under long-term monitoring [25] G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger, “Densely
with digital dermatoscopy: do melanomas and nevi already differ at connected convolutional networks,” in Proceedings of the IEEE confer-
baseline?,” Journal of the European Academy of Dermatology and ence on computer vision and pattern recognition, pp. 4700–4708, 2017.
Venereology, vol. 31, no. 6, pp. 972–977, 2017. [26] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image
[4] A. Dascalu and E. David, “Skin cancer detection by deep learning and recognition,” in Proceedings of the IEEE conference on computer vision
sound analysis algorithms: A prospective clinical study of an elementary and pattern recognition, pp. 770–778, 2016.
dermoscope,” EBioMedicine, vol. 43, pp. 107–113, 2019.
[5] U.-O. Dorj, K.-K. Lee, J.-Y. Choi, and M. Lee, “The skin cancer
classification using deep convolutional neural network,” Multimedia
Tools and Applications, vol. 77, no. 8, pp. 9909–9924, 2018.
[6] I. Giotis, N. Molders, S. Land, M. Biehl, M. F. Jonkman, and N. Petkov,
“Med-node: a computer-assisted melanoma diagnosis system using non-
dermoscopic images,” Expert systems with applications, vol. 42, no. 19,
pp. 6578–6585, 2015.
[7] D. Ruiz, V. Berenguer, A. Soriano, and B. SáNchez, “A decision support
system for the diagnosis of melanoma: A comparative approach,” Expert
Systems with Applications, vol. 38, no. 12, pp. 15217–15223, 2011.
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:44:28 UTC from IEEE Xplore. Restrictions apply.