Skin Disease Detection: Machine Learning Vs Deep Learning
Skin Disease Detection: Machine Learning Vs Deep Learning
v1
ABSTRACT. Skin disease is a very common disease for humans. In the medical industry detecting skin disease and
recognizing its type is a very challenging task. Due to the complexity of human skin texture and the visual closeness
effect of the diseases, sometimes it is really difficult to detect the exact type. Therefore, it is necessary to detect and
recognize the skin disease at its very first observation.
In today's era, artificial intelligence (AI) is rapidly growing in medical fields. Different machine learning (ML) and deep
learning(DL) algorithms are used for diagnostic purposes. These methods drastically improve the diagnosis process and
also speed up the process. In this paper, a brief comparison between the machine learning process and the deep learning
process was discussed. In both processes, three different and popular algorithms are used. For the machine Learning
process Bagged Tree Ensemble, K-Nearest Neighbor (KNN), and Support Vector Machine(SVM) algorithms were
used. For the deep learning process three pre-trained deep neural network models ResNet50, VGG16, and GoogleNet
were used. It was observed that the accuracy of both processes is much satisfactory.
Keywords: Skin Disease Detection, Machine Learning (ML), Deep Learning(DL), Artificial Intelligence,
1. INTRODUCTION
Skin is the most important and largest body part of the human. The 20 square feet of total body area of a human is
covered by skin. It protects different vital organs of the human body from outside harm and also protects from
microbes and the elements, regulates the body temperature, and allows the sensations of touch, heat, and cold. But
due to the variety of external and genetic factors, the skin may be influenced. Basically, three types of skin diseases
appear on human skin 1) Viral type, 2) Fungal type and 3) Allergic type. The fungal and allergic-type diseases can
be cure if it is diagnosis properly and recognize at its early stages. But for viral types, it is very necessary to identify
the disease in its early stages. Over the past few years, artificial intelligence, machine learning, and deep learning
techniques are rapidly developed in the medical field. With the physical symptoms, image analysis is also very
important to detect different skin diseases. The image analysis process helps to detect skin diseases with higher
accuracy.
In this research paper, three different machine learning processes and three different deep neural networks were used
to predict different skin diseases. Finally, a complete comparison between the machine learning and deep learning
process is developed to understand the whole experimental process.
2. LITERATURE REVIEW
Skin diseases are very common for all humans. Several researchers proposed several methods to detect skin
diseases.
In a research paper, researchers proposed an image processing-based skin disease detection technique. They used the
RGB image of the skin diseases area as input. Then resize the images and extract the features using a pre-trained
convolution neural network model. They apply multi support vector machine for classification. They show that this
method is simple, easy and the accuracy is 100% [1].
Researchers show several studies of skin diseases in their review paper. All the studies are related to the
classification of several skin diseases using the machine learning processes. They show a detailed review of the
applied mechanisms, algorithms, and accuracies of those processes [2]. In another review research article, the
researchers review different deep learning approaches for skin diseases detection. They briefly described different
publicly available datasets, their image acquisitions process, and proposed algorithms [3].
In another research paper, the researchers used five different machine learning algorithms to detect skin diseases.
They used random forest, kernel SVM, Naïve Bayes, Logistic Regression, and Convolution Neural Network
algorithms. Finally from the confusion matrix, they discovered that the convolution neural network model gave the
best result for this disease detection process [4].
Researchers proposed an artificial intelligence system based on a neural network. This system has two parts first
feature extraction, that was done by the image acquisition process. Second part was classification, which was done
by the feed-forward neural network [5].
Other researchers proposed in their study six different data mining algorithms for classifying the different skin
disease classes. The select 15 most salient features for predict the disease classes. Except for these six algorithms,
the authors also create an ensemble method using Bagging, AdaBoost, and Gradient Boosting classifier techniques
for prediction. Finally, they conclude the ensemble method provides a more accurate and effective prediction for
skin disease detection [6].
The authors proposed an artificial intelligence system for skin cancer detection. They used image processing and a
deep neural network for skin cancer detection. First, they segmented the affected area and extracted the features
from the area using the image processing method, and for prediction, they used a convolution neural network. They
achieved 93.7% for training accuracy and 89.5% for test accuracy [7].
Researchers proposed another skin diseases detection model based on an adaptive federated machine learning
process. This approach consists of intelligent local edges (dermoscopy) and a global point (server). This architecture
can able to diagnosis the skin type, skin diseases type and also improve the accuracy constantly [8].
3. DATASET DETAILS
For the experimental purpose here various skin disease datasets are used. All the datasets are collected from Kaggle.
The final dataset contains more than forty thousand images of skin disease data. All the images are divided into 12
skin disease classes. The sample images of the dataset are showing in figure 1.
4. PROPOSED METHODOLOGY
In this research, a comparison of different machine learning and deep learning approaches was described.
4.1. MACHINE LEARNING APPROACHES
Machine learning [1][4][6][9] is a part of Artificial Intelligence (AI). It can learn automatically from input data and
make an output decision. This process involves 4 steps 1) Data Collection, 2) Data Preprocessing, 3) Feature
Extraction, and 4) Classification.
a. Data Collection. The data collection process is described in section 3. All the input images are in RGB color
space.
b. Data Preprocessing. In this experiment, the data processing follows the below steps [10-12].
Step 1: Accept the input RGB images(im) and adjust the brightness and contrast
Contrast (1)
Correlation (2)
Energy (3)
Homogeneity (4)
Mean (5)
Entropy (7)
Variance (8)
After measuring the features using the above equations, the feature values and corresponding class values to the
different diseases are stored in a database. This database is used for the next process.
d. Classification. After calculating the GLCM features from the input images, the next process is classification.
The classification process involves the following steps, 1) Choose a model, 2) Train the model, 3) Evaluate the
model, 4) Tune the parameters, 5) Predict the outcome.
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 13 September 2021 doi:10.20944/preprints202109.0209.v1
In this experiment, three classification models are used. They are Support Vector Machine (SVM) Algorithm, K-
Nearest Neighbour (KNN) Algorithm, and Ensemble Bagged Tree Algorithm.
Support Vector Machine (SVM). It is a supervised learning algorithm. This algorithm transforms the complex data
based on the kernel function. It maximizes the separation between the classes to make a clear prediction. Here
multiclass SVM method is used. This algorithm breaks down the multiclass problem into binary classes. And for
each binary pair, the algorithm executes and finally makes a prediction [14-15].
K-nearest neighbor (KNN). It is also a supervised learning method. In this method, each sample classified its
similar surrounding samples. Therefore, when it is needed to classify an unknown sample, then it could be classified
by its surroundings samples. When a training dataset and an unknown sample are given, then the classifier calculates
the distance between the unknown sample and all datasets. The smallest distance value between the unknown
sample and the training set is accepted. Primarily, the performance of KNN depends on the value of K, the no of
nearest neighbor, to classify an unknown sample. If k is very small then the classification not very good. But the
largest number of k gives the perfect result of classification [16-17].
Ensemble Bagged Tree Algorithm. Ensemble method combines several decision trees to perform the classification
or regression operation. It uses several weak learners to create a strong learner. Tree Bagging is also known as
Bootstrap aggregation. It is used to reduce the variance of a decision tree. This method creates several random
subsets from the training dataset and trains them. And the bagged tree goes deeper for prediction [18-19].
4.2. DEEP LEARNING APPROACHES
Deep Learning [20-21] is also a machine learning technique. It uses the architecture of the neural network that’s
why it's also known as a deep neural network. This network has one input layer, one output layer, more than one
hidden layer. It uses a large amount of labelled data for training. This is the reason that the prediction of a deep
learning network is much more accurate.
Deep Learning process has three steps 1) Dataset Selection, 2) Preprocessing, and 3) Classification.
Dataset Selection. The data selection process is described in section 3.
Preprocessing. Data pre-processing process involves the following steps.
Step 1: Accept the input RGB images(im) and adjust the brightness and contrast
Step 2: Remove the noises from each R, G, B color channel using a median filter.
Step 3: Resize the image with dimension 224 × 224 × 3. Where 224 × 224 is the size of the input image and the
number of channels is 3.
Classification. In this experiment, for classification three pre-trained deep learning network models are used, 1)
VGG16, 2) GoogleNet, and 3) ResNet50. Basically, this classification process is the combination of two processes,
feature selection and training the network model for classification.
VGG-16 [22] is a deep convolution neural network than any other traditional convolution neural model. It is 16
layers deep. This model helps to classify images of 1000 objects. It is a very large network model in the deep neural
network.
The inception network model is very much acceptable in the neural network. This network helps to create a new
state of art for classification and detection. The first version of this model is known as GoogleNet [23]. This network
is 22 layers deep. This model is not large like VGG16. And the error detection rate is much lower than the other
network models.
ResNet or Residual Network is a convolution neural network. It is 50 layers deep, has 4 stages and 1000 neurons. It
is a pre-trained deep neural network that also helps to classify images of 1000 object categories. All the layers of
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 13 September 2021 doi:10.20944/preprints202109.0209.v1
this network help in the deeper classification of an image. Therefore, the classification accuracy of this network is
much more higher and precise than any other model [24-25].
In this experiment, the image dataset for skin disease detection has 12 classes for classification. Therefore the output
of the fully connected layer of all three models is adjusted according to it. For training and testing, the total image
dataset is split into 4:1 ratio. The performance analysis is shown in table 2.
Figure 2: Overall Classification Process for Machine Learning Approach [a) Original Image, b) Grayscale
image, c) After Noise Removal]
Figure 3: Overall Classification Process for Deep Learning Approach [a) Original Image, b) After Noise
Reduction and Resize the image, c) deep learning network process, d) Final Prediction ]
The performance analysis of three machine learning processes is shown in table 1. And the performance analysis of the
deep learning process with three different pre-trained models is shown in table 2.
From table 1 it is observed that both the bagged tree ensemble method and K nearest neighbor classifier predict the
diseases with the highest accuracy. The specificity, sensitivity, and Cohen’s kappa values for these algorithms are
greater than 90%. This indicates fewer false negative predictions and higher true positive predictions. From table 2 it
is observed that ResNet50 gives the highest accuracy. Overall, both the machine learning and the deep learning
methods are showing satisfactory results for skin disease detection. Figure 4 shows the graphical representation of
the performance analysis between the two learning methods.
6. CONCLUSION
Skin is the largest part of the human body. Due to several external and internal factors, skin diseases may occur.
Therefore detecting skin diseases is a very important part of medical science. Because it could help to reduce the
death due to skin disease or disease transmission. The clinical process is very time-consuming and sometimes does
not properly diagnose the exact type of disease. Machine learning and deep learning technique are very much
helpful in these cases.
In this paper, a brief detail of machine learning and deep learning techniques for skin disease detection was
discussed. Three different machine learning algorithms and deep learning networks were used for the performance
comparison. It was observed that both processes were performed very well for skin disease detection.
REFERENCES
[1] Alkolifi Alenezi, N. S. (2019). A Method of Skin Disease Detection Using Image Processing and Machine Learning.
Procedia Computer Science, 163, 85–92. https://doi.org/10.1016/j.procs.2019.12.090
[2] Mohammed, S. S., & Al-Tuwaijari, J. M. (2021). Skin Disease Classification System Based on Machine Learning
Technique: A Survey. IOP Conference Series: Materials Science and Engineering, 1076(1), 012045.
https://doi.org/10.1088/1757-899x/1076/1/012045
[3] Li, H., Pan, Y., Zhao, J., & Zhang, L. (2020). Skin disease diagnosis with deep learning: a review. Hongfeng Li.
http://arxiv.org/abs/2011.05627
[4] Bhadula, S., Sharma, S., Juyal, P., & Kulshrestha, C. (2019). Machine Learning Algorithms based Skin Disease
Detection. International Journal of Innovative Technology and Exploring Engineering, 9(2), 4044–4049.
https://doi.org/10.35940/ijitee.b7686.129219
[5] Jaychandra Reddy, V., & Nagalakshmi, T. J. (2019). Skin disease detection using artificial neural network. Indian
Journal of Public Health Research and Development, 10(11), 3829–3832. https://doi.org/10.5958/0976-
5506.2019.04183.4
[6] Verma, A. K., Pal, S., & Kumar, S. (2019). Comparison of skin disease prediction by feature selection using
ensemble data mining techniques. Informatics in Medicine Unlocked, 16(April), 100202.
https://doi.org/10.1016/j.imu.2019.100202
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 13 September 2021 doi:10.20944/preprints202109.0209.v1
[7] Hasan, M., Barman, S. Das, Islam, S., & Reza, A. W. (2019). Skin cancer detection using convolutional neural
network. ACM International Conference Proceeding Series, March 2020, 254–258.
https://doi.org/10.1145/3330482.3330525
[8] Hashmani, M. A., Jameel, S. M., Rizvi, S. S. H., & Shukla, S. (2021). An adaptive federated machine learning-based
intelligent system for skin disease detection: A step toward an intelligent dermoscopy device. Applied Sciences
(Switzerland), 11(5), 1–19. https://doi.org/10.3390/app11052145
[9] Leelavathy S, Jaichandran R, Shobana R, Vasudevan, S. S. P. and N. (2020). Skin Disease Detection Using
Computer Vision and Machine Learning Technique. European Journal of Molecular & Clinical Medicine, 7(4),
2999–3003.
[10] Talebi, H., & Milanfar, P. (2021). Learning to Resize Images for Computer Vision Tasks. 1.
http://arxiv.org/abs/2103.09950
[11] Koprowski, R. (2017). Image pre-processing. Studies in Computational Intelligence, 682, 21–38.
https://doi.org/10.1007/978-3-319-50490-2_3
[12] Patel, O., P. S. Maravi, Y., & Sharma, S. (2013). A Comparative Study of Histogram Equalization Based Image
Enhancement Techniques for Brightness Preservation and Contrast Enhancement. Signal & Image Processing : An
International Journal, 4(5), 11–25. https://doi.org/10.5121/sipij.2013.4502
[13] Mohanaiah, P., Sathyanarayana, P., & Gurukumar, L. (2013). Image Texture Feature Extraction Using GLCM
Approach. International Journal of Scientific & Research Publication, 3(5), 1–5.
[14] Pathak, D. K., Kalita, S. K., & Bhattacharya, D. K. (2021). Hyperspectral image classification using support vector
machine: a spectral spatial feature based approach. Evolutionary Intelligence, November 2020, 0–13.
https://doi.org/10.1007/s12065-021-00591-0
[15] Greeshma, K. V, College, C., & Gripsy, J. V. (2020). Image Classification using HOG and LBP Feature
Descriptors with SVM and CNN. 8(04), 4–7.
[16] Wang, L. (2019). Research and Implementation of Machine Learning Classifier Based on KNN. IOP Conference
Series: Materials Science and Engineering, 677(5). https://doi.org/10.1088/1757-899X/677/5/052038
[17] Ali, N., Neagu, D., & Trundle, P. (2019). Evaluation of k-nearest neighbour classifier performance for
heterogeneous data sets. SN Applied Sciences, 1(12). https://doi.org/10.1007/s42452-019-1356-9
[18] Ismiguzel, I. (2021, July 30). Practical Guide to Ensemble Learning - Towards Data Science. Medium.
https://towardsdatascience.com/practical-guide-to-ensemble-learning-d34c74e022a0
[19] Lin, E., Lin, C. H., & Lane, H. Y. (2021). Applying a bagging ensemble machine learning approach to predict
functional outcome of schizophrenia with clinical symptoms and cognitive functions. Scientific Reports, 11(1), 1–9.
https://doi.org/10.1038/s41598-021-86382-0
[20] Yadav, S., Rathod, R., Pawar, S. R., Pawar, V. S., & More, S. (2021). Application of deep convulational neural
network in medical image classification. 2021 International Conference on Emerging Smart Computing and
Informatics, ESCI 2021, April, 120–129. https://doi.org/10.1109/ESCI50559.2021.9396854
[21] Santhiya, D. S., Pravallika, S. S. L., Sukrutha, M. A., Nishanth, I., Iswarya, N., & Aishwarya, D. (2019). Skin
Disease Detection using V2 and V3 in Machine Learning. International Journal of Engineering Science and
Computing, 9(4), 21343–21347.
[22] Manasa, K., & Student, M. T. (2021). Skin Cancer Detection Using VGG-16. European Journal of Molecular &
Clinical Medicine, 08(01), 1419–1426.
[23] Alake, R. (2020, December 23). Deep Learning: GoogLeNet Explained - Towards Data Science. Medium.
https://towardsdatascience.com/deep-learning-googlenet-explained-de8861c82765
[24] Yadav, S., Rathod, R., Pawar, S. R., Pawar, V. S., & More, S. (2021). Application of deep convolutional neural
network in medical image classification. 2021 International Conference on Emerging Smart Computing and
Informatics, ESCI 2021, April, 120–129. https://doi.org/10.1109/ESCI50559.2021.9396854
[25] Gouda, N., & Amudha, J. (2020). Skin Cancer Classification using ResNet. 2020 IEEE 5th International
Conference on Computing Communication and Automation, ICCCA 2020, 536–541.
https://doi.org/10.1109/ICCCA49541.2020.9250855.