Classification of Skin Disease Using Transfer Learning in Convolutional
  Neural Networks
Automatic classification of skin disease plays an important role in
healthcare especially in dermatology. Dermatologists can determine different
skin diseases with the help of an android device and with the use of Artificial
Intelligence. Deep learning requires a lot of time to train due to the number
of sequential layers and input data involved. Powerful computer involving a
Graphic Processing Unit is an ideal approach to the training process due to its
parallel processing capability. This study gathered images of 7 types of skin
disease prevalent in the Philippines for a skin disease classification system.
There are 3400 images composed of different skin diseases like chicken pox,
acne, eczema, Pityriasis rosea, psoriasis, Tinea corporis and vitiligo that was
used for training and testing of different convolutional network models. This
study used transfer learning to skin disease classification using pre-trained
weights from different convolutional neural network models such as VGG16,
VGG19, MobileNet, ResNet50, InceptionV3, Inception-ResNetV2, Xception,
DenseNet121, DenseNet169, DenseNet201 and NASNet mobile. The MobileNet model
achieved the highest accuracy, 94.1% and the VGG16 model achieved the lowest
accuracy, 44.1%.
Jessica S. Velasco, Jomer V. Catipon, Edmund G. Monilar, Villamor M. Amon, Glenn C. Virrey, Lean Karlo S. Tolentino
# International Journal of Emerging Technology and Advanced Engineering

###### Abstract

Automatic classification of skin disease plays an important role in healthcare especially in dermatology. Dermatologists can determine different skin diseases with the help of an android device and with the use of Artificial Intelligence. Deep learning requires a lot of time to train due to the number of sequential layers and input data involved. Powerful computer involving a Graphic Processing Unit is an ideal approach to the training process due to its parallel processing capability. This study gathered images of 7 types of skin disease prevalent in the Philippines for a skin disease classification system. There are 3400 images composed of different skin diseases like chicken pos, acne, eczema, Pityriasis rosea, psoriasis, Tinea corporis and utiligo that was used for training and testing of different convolutional network models. This study used transfer learning to skin disease classification using pre-trained weights from different convolutional neural network models such as VGG16, VGG19, MobileNet, ResNet50, InceptionV3, Inception-ResNetV2, Xception, DenseNet121, DenseNet169, DenseNet201 and NASNet mobile. The MobileNet model achieved the highest accuracy, 94.1% and the VGG16 model achieved the lowest accuracy, 44.1%.

 Skin Disease Classification, Deep Learning, Convolutional Neural Networks, Transfer Learning, Python

## I Introduction

Skin diseases are defined as conditions that typically develop inside the body or on the skin and manifest outside. There are 3000 types known skin disease [1]. Some conditions are uncommon while some occurs commonly. Generally, this condition brings rich, pain, and sleep deprivation. Other effects of skin diseases include emotional and social impact due to its detectable visual sensation. However, dermatologists assures that majority of skin diseases can be controlled with proper medication and properly diagnosed.

An implementation of an accurate and precise automated skin disease detection application that can be used by dermatologists can help in reducing their job.

Big Data refers to gathering and processing dataset sets to the level where its size and complexity transcends the capacity of conventional data processing applications. It is distinguished by 5Vs: (1) huge volume of data, (2) wide variety of data types, (3) velocity of data processing, (4) variability of data, and (5) value of data [2]. Some of the repositories available online includes molecular, clinical, and epidemiology data. This provides a vast possibility for research opportunities for different scientific advancements [3]. By combining the use of big data, image recognition technology, and the field of dermatology, patients, dermatologists, and the research community might reap a great benefit. This is due to many skin diseases that be diagnosed by medical professionals by inspecting it with naked eye. The different visual feature of each condition makes them easy to diagnose with the use of artificial intelligence and deep learning technologies. Moreover, skin diseases that are common in the Philippines can be easily identified with the of image recognition technologies. These skin diseases include chicken pos, acne, eczema, pityriasis rosea, psoriasis, tinea corporis, and utiligo.

Previously, MobileNet was only used as the model in skin disease classification [4]. In this paper, additional learning models are implemented such has VGG16, VGG19, Xception, ResNet50, InceptionV3, InceptionResNetV2, DenseNet121, DenseNet169, DenseNet201, and NASNet Mobile. They were used to classify skin diseases with the use of images gathered from websites that are professional and open to public use like photo atlas of dermatology. They were tested if they will outperform the previously implemented MobileNet.
## II Conceptual Literature

### _Transfer Learning_

Human learners have the ability to naturally transfer their knowledge between one task to another. In other words, when faced with new challenges, people can recognize and use the pertinent information from past experiences. The ease of learning a new task depends on how resembles our previous knowledge. Contrarily, typical machine learning algorithms focus on small tasks. Transfer learning aims to change this b y creating strategies to use knowledge acquired in one or more source activities and apply it to enhance learning in a related target activity. To make machine learning as effective as human learning, knowledge transfer techniques are being pushed to advance [5].

### _Keras Platform_

A Fully Convolutional Network (FCN) was implemented, designed and developed using Keras, Python, and Theano in the research "Fully convolutional networks for segmenting pictures from an embedded camera" [6]. The FCN is used in this research to perform basic computer vision operations on images from a robot-mounted small stereo imaging sensor.

The network's design was prototyped using the Keras library, which accelerated the search for a network with high accuracy and minimal computing resource usage. The dataset of images is modified to fit the stereo camera imaging acquisition presets for the robot. It was also used for the training and validation of the proposed network.

### _Inception V3_

The Inception-v3 model of the Tensor Flow platform was used by the researchers in the study "Inception-v3 for flower classification" [7] to categorize flowers. The flower category dataset was retrained using transfer learning technology, which can significantly increase flower classification accuracy. In comparison to previous methods, the model's classification accuracy was 95% for the Oxford-17 flower dataset and 94% for the Oxford-102 flower dataset.

### _MobileNet_

Researchers utilized a Convolutional Neural Network model called MobileNet in the study "Driver distraction detection using single convolutional neural network" [8] to identify driver distraction.

The findings for MobileNet accuracy are seen to be higher compared to the Inception ResNet. Moreover, system results vary widely depending on how quickly CPU/GPU processing time is.

### _Inception-ResNet-V2_

The researchers introduced a brand-new family of modules called the PolyInception in their paper "PolyNet: A Pursuit of Structural Diversity in Very Deep Networks" [9]. It can replace various network components in a composition or isolated form with flexibility. Architectural efficiency can be used to choose PolyInception modules to increase expressive capability while maintaining a similar computational cost.

Based on the Inception-ResNet-v2 has the highest documented single model accuracy on ImageNet. Inception blocks are utilized to capture the residuals in the most recent version of the residual structure, which combines the two. The building blocks of GoogleNet are inception blocks. Their structures have undergone multiple iterations of optimization and refinement.

### _Vgg-16_

Different CNNs have been introduced with various architectural designs. With lower convolutional size and strides, the VGG-16 consists of 16 layers (13 convolutional layers and 3 fully linked layers). 4096 channels are present in the first two fully connected layers, while 1000 channels are present in the third layer. With the exception of sampling the inputs from the cropped multi-scale training images, VGG 16 uses a nearly identical training process to AlexNet. Using a convolutional neural network, the marine industry can recognize visual objects [10].

### _Vgg-19_

The researchers suggested a method to help the blind by delivering contextual information of the surroundings using 360\({}^{\circ}\) view cameras mixed with deep learning in the study "360\({}^{\circ}\) view camera based visual assistive technology for contextual scene information" [11]. The feed gives the user contextual information in the form of audio. That is accomplished by utilizing CNN transfer learning properties with the pre-trained VGG-19 network to classify data using convolutional neural networks (CNN).

VGG-19 convolutional neural network is a 19-layers network. It is composed of convolutional layers, Maxpooling, fully connected layers, and an output Softmax layer.
## 3 Methodology

### _Dataset_

The photos required for the project's development are sourced from the www.dermweb.com photo atlas, notably www.dermnetnz.org, as well as many clinical dermatological photo atlas publications. Acne, Varicella (chickenpox), eczema, Pityriasis rosea, psoriasis, vitiligo, and Tinea corporis are examples of skin diseases depicted in Figure 1. The datasets were compiled using a combination of publicly accessible dermatological repositories, dermatology color picture atlases, and photographs acquired by hand. Dermatologists have approved them as the categorization of skin disorders.

The dataset comes from a combination of open-access dermatological website, color atlas of dermatology and taken manually. The dataset composed of 7 categories of skin diseases and each image is in.jpeg extension. There is a total of 3,406 images.

### _Experiment_

The system will be built on the Keras platform and will use Tensorflow as its backend. The Pycharm IDE will be used to develop the app. The method can detect skin problems such as acne, eczema, psoriasis, vitiligo, Tinea corporis, chicken pox, and Pityriasis rosea. This is accomplished through the use of convolutional neural network transfer learning models such as the VGG 16, VGG 19, Inception, Xception, ResNet50, DenseNet, and Mobilenet.

Figure 1: Sample Images of Dataset

Figure 2: Program flowchart of the Python Code
## International Journal of Emerging Technology and Advanced Engineering

**Website: www.jetae.com (E-ISSN 2250-2459, Scopus Indexed, ISO 9001:2008 Certified Journal, Volume 13, Issue 04, April 2023)**

Referring to Figure 2, imports such as Numpy, Keras, Scikit-Learn, and Matplotlib are organized first by the application.

The dataset should then be configured into several directories to separate the training and testing data (training, testing and validation). The third step is to load photographs of skin conditions from category subfolders. Making a foundation model of various pretrained convolutional neural networks is the next step. Next, the data is preprocessed to get the features. To handle this automatically, Keras includes tools. The model's testing and training configuration comes next. The model is trained using the Adam optimizer. In order to determine which architecture is optimal for classifying skin diseases, various architectures will be assessed and compared based on model accuracy, confusion matrix, loading time, and weight size after training.

Using pretrained convolutional networks, size of the input image differs for each model. The input image is equal to the size of the image (width and height) and the number of channels. Table I shows the fixed size of the input image for each model.

## IV Results

The following criteria were looked at to compare and validate each pre-trained convolutional neural network's performance in classifying skin diseases: the confusion matrix, loading speed, accuracy, and weight size.

### _Confusion Matrices_

The confusion matrices of several models over the seven types of skin diseases are displayed in Figures 3-12. The row denotes a projected class, while the column denotes the actual class [13]. It is also known as a matching matrix. This demonstrates the commonality in misclassification across several convolutional neural networks.
Figure 5: InceptionResNetV2 Confusion Matrix

Figure 6: ResNet50 Confusion Matrix

Figure 7: VGG16 Confusion Matrix
Figure 10: DenseNet121 Confusion Matrix

Figure 9: VGG19 Confusion Matrix

Figure 11: DenseNet169 Confusion Matrix

Figure 12: NASNet Mobile Confusion Matrix

Figure 10: DenseNet121 Confusion Matrix
## V Conclusion

The MobileNet model outperforms the others with an accuracy of 94.1% and a weight size of 16.823MB. It offers the highest precision and the smallest weight size. VGG16 and VGG19, on the other hand, load pages faster than MobileNet, taking 3.543 and 3.809 seconds, respectively.

### _Acknowledgement_

The authors would like to express their acknowledgement for the assistance of the following: Jean Wilmar Alberio, Jonathan Apuang, John Stephen Cruz, Mark Angelo Gomez, Benjamin Molina Jr., and Lyndon Tuala, for their utmost contribution and effort on the completion of this study.
