Draft Skin Disease Detection Using ResNet-50
Draft Skin Disease Detection Using ResNet-50
ABSTRACT Skin disease is one of the most common diseases, and its visual
representation is more prominent compared with the other types of diseases.
Accordingly, the use of machine learning methods for skin disease image recognition is
of great significance and has attracted the attention of researchers. The early and
accurate detection of skin diseases is crucial for effective treatment and management.
This paper explores the application of ResNet-50, a convolutional neural network
(CNN), for the classification of various skin diseases. By leveraging a large dataset of
dermatological images, the model achieves high accuracy and demonstrates the potential
of deep learning in dermatology. Our study shows that ResNet-50 can distinguish
between different types of skin diseases with highest accuracy can making it a valuable
tool in clinical practice. The tendency of skin diseases to manifest in a unique and yet
similar appearance, absence of enough competent dermatologists, and urgency of
diagnosis and classification on time and accurately, makes the need of machine aided
diagnosis blatant. This study is conducted with the purpose of broadening the research in
skin disease diagnosis with computer by traversing the capabilities of ResNet-50. A
customized 50 layers ResNet-50 architecture of convolutional neural network is used to
detect skin disease with 92% to 96% of accuracy. We analyze these studies from the
aspects of disease type, data set and model performance.
I. INTRODUCTION
The skin disease affects millions of people a state-of-the-art convolutional neural
worldwide. It causing significant discomfort and network, for detecting and classifying skin
healthcare costs. Early detection and accurate diseases from images. In human productive
diagnosis are essential for effective treatment, life, the skin health status is affected by
but traditional methods often rely on the many factors, such as solar radiation,
expertise of dermatologists. This is not smoking, drinking, sports activities, viruses,
surprising considering that the skin serves as the and working environment. These factors not
largest organ in the human body, making it only affect the integrity of skin function but
naturally susceptible to the highest incidence of also cause certain damage to the skin, have
cancer among all types skin disease is an adverse effect on human health, and can
Melanoma, it is a dangerous, uncommon, and even threaten human life in severe cases.
fatal form of skin cancer. Advances in machine Therefore, skin disease has become one of
learning, particularly deep learning, have paved the common diseases of human beings. Skin
the way for automated systems capable of high disease covers all cultural regions and occurs
accuracy in image-based diagnostics. This paper in all ages. The associate editor coordinating
investigates the use of ResNet-50, the review of this manuscript and approving
it for publication was Yudong Zhang. 208264 to create highly accurate classification and
Approximately 30% to 70% of people are in risk assessment systems.
high-risk groups. According to the British Skin
Foundation Report in 2018, approximately 60%
of the British people suffer from skin disease. II. LITERATURE REVIEW
5.4 million new cases of skin disease are This Section indicates multiple skin cancer
recorded in the United States every year; one in binary classification and detection
five Americans will be diagnosed with a approaches.. The application of deep learning
cutaneous malignancy in their lifetime. Skin in medical image analysis has garnered
disease brings not only a significant impact to significant attention in recent years due to its
human beings, such as daily activities damage, potential to automate and enhance diagnostic
loss of the interpersonal relationship, and processes. Esteva et al. conducted a
internal organ damage, but also death. This groundbreaking study where they utilized
condition can also constitute mental illness, convolutional neural networks (CNNs) to
leading to isolation, depression. Accordingly, achieve dermatologist-level classification of
skin disease has become one of the major topics skin cancer. This study highlighted the
in the eld of medicine. The treatment of skin potential of deep learning in dermatology and
disease, early detection is the critical condition paved the way for further research into
to cure the disease, effectively reduce its impact, automated skin disease detection. Various
and improve the survival rate. The accurate CNN architectures have been explored for
diagnosis and effective treatment of a this task. The VGG16 model, proposed by
dermatological ailment within the domain of Simonyan and Zisserman, demonstrated that
dermatology are notably contingent upon the increasing the depth of the network can
morphological attributes and visual presentation improve performance in image recognition
of diverse cutaneous lesions. The diagnostic tasks. Similarly, the InceptionV3 model,
procedure encompassing dermatoses and skin introduced by Szegedy et al. employed
disorders necessitates the assimilation of inception modules to efficiently capture
multifarious data points, including the patient’s spatial hierarchies in images. Another
medical background, clinical manifestations, notable architecture is DenseNet, presented
dermatological imagery, and periodic by Huang et al. which connects each layer to
histopathological assessments conducted by a every other layer, promoting feature reuse
seasoned dermatologist. Nonetheless, given the and improving gradient flow. ResNet-50,
pro-fusion of skin maladies and their perceptible introduced by He et al. represents a
similarities, relying solely on human significant advancement in deep learning
observation oftentimes proves insufficient for with its deep residual learning framework.
achieving precise diagnostic outcomes. This architecture addresses the vanishing
Consequently, this predicament engenders gradient problem by introducing residual
perplexity in attaining an unequivocal diagnosis. blocks, allowing for the training of much
Early detection and accurate classification of deeper networks. ResNet-50 has been
skin disease play a crucial role in improving successfully applied to various image
patient outcomes and reducing harmful disease classification tasks, including medical image
rates. In recent years, computer vision and deep analysis, due to its robustness and ability to
learning techniques have shown promising learn complex features. In the context of skin
results in skin lesion localization and disease detection, several studies have
classification, offering automated and efficient employed deep learning models to classify
analysis of dermatological images. By dermatological images. For instance,
leveraging the potential of computer vision Tschandl et al. used a deep learning
algorithms, researchers aim to enhance the algorithm to classify pigmented skin lesions,
speed and accuracy of skin cancer diagnosis, achieving high accuracy. Han et al. utilized a
enabling timely interventions and personalized multi-task deep learning model to
treatment strategies. However, skin cancer simultaneously classify and segment skin
classification using machine learning still faces lesions, demonstrating the versatility of deep
several challenges. The integration of machine learning in dermatological applications.
learning and deep learning techniques is utilized
III. METHODOLOGY connections allow gradients to bypass one or
This paper proposed one ResNet-50 architecture more layers, mitigating the vanishing
in skin disease classification and tested several gradient problem and enabling the training of
classification techniques and compared their deeper models. ResNet-50, or Residual
results on the same dataset. This Section Network-50, is a deep convolutional neural
demonstrates the used dataset, the preprocessing network (CNN) architecture that has
steps, feature extraction, and the system model significantly impacted the field of deep
with the proposed methods. learning and computer vision. Introduced by
A. DATASET
Kaiming He, Xiangyu Zhang, Shaoqing Ren,
The dataset used in this study comprises and Jian Sun in their 2015 paper "Deep
images of various skin diseases, including Residual Learning for Image Recognition,"
Bacterial Infections- cellulitis ResNet-50 is a specific version of the ResNet
Bacterial Infections- impetigo architecture designed to address the
Fungal Infections - athlete -foot degradation problem in deep networks,
Fungal Infections - nail-fungus allowing for the training of very deep neural
Fungal Infections - ringworm networks. the primary method of skin disease
image recognition is to use a convolution
Parasitic Infections - cutaneous-larva-
neural network in deep learning, convolution,
migrans Viral skin infections - chickenpox
Viral skin infections - shingles. and pooling operation of convolutional
network in image recognition, which has
These images were sourced from publicly
translation, rotation, and scale invariances.
available dermatological repositories, ensuring
The CNN has excellent superiority in feature
a diverse and representative sample. The dataset
representation.
was divided into training, validation, and test
sets to facilitate the training and evaluation of D. MODEL PREPARATION
the model. The ResNet-50 model was initialized with
weights pre-trained on the ImageNet dataset.
B. DATA PREPROCESSING
Transfer learning was employed to adapt the
Data preprocessing is a critical step to ensure
model to the specific task of skin disease
the quality and consistency of input images. To
classification. The final layers of the network
ensure the integrity of the input data and
were modified to include a
optimize the final results, pre-processing steps
GlobalAveragePooling2D layer, followed by
were employed. A notable disparity was
a dense layer with ReLU activation, and a
observed in the width and height of the files,
softmax layer for multi-class classification.
rendering them incompatible with the ResNet-
This approach leverages the pre-trained
50 model. Consequently, resizing of the files
feature representations while allowing the
became necessary to achieve a consistent size.
model to learn task-specific features. The
All images were resized to 224x224 pixels to
identity shortcut connections (skip
match the input size required by ResNet-50.
connections) allow the network to learn
Data augmentation techniques, such as random
residual functions with reference to the input
rotations, horizontal flips, and zooming, were
layer, enabling the model to maintain the
applied to increase the diversity of the training
integrity of the learned features across many
data and improve the model's generalization
layers. This effectively addresses the
ability. Normalization was also performed to
vanishing gradient problem and allows
scale pixel values to the range [0, 1].
deeper networks to be trained efficiently.
C. MODEL ARCHITECTURE
E. TRAINING
ResNet-50 is a deep convolutional neural
ResNet-50 is a deep residual network with
network with 50 layers, incorporating residual
50 convolutional layers. The residual
learning to facilitate the training of very deep
learning approach addresses the vanishing
networks. The architecture consists of
gradient problem, a common challenge in
convolutional layers, batch normalization,
training deep neural networks. The pre-
ReLU activations, and identity mappings
trained ResNet-50 model will be fine-tuned
(residual connections). These residual
on the selected skin disease dataset. Fine-
tuning involves modifying the final layers of
the
pre-trained network to adapt to the specific leverages the general feature representations
classification task of skin disease detection. learned from a large and diverse dataset,
Categorical cross-entropy was used as the loss adapting them to the specific characteristics
function, appropriate for multi-class of dermatological images. Keras has become
classification tasks. Training was conducted a popular framework owing to its consistent
over 50 epochs with early stopping and model and concise API, which can Signiant reduce
checkpointing to prevent overfitting and ensure the workload of users. Six articles have used
the best possible performance. The training the framework. Tensor ow is often used with
process involved monitoring the validation loss, Keras. The framework can deploy training
and the model with the lowest validation loss models on various servers and mobile
was selected for evaluation. devices without executing a separate model
decoder or loading a Python interpreter.
IV. PROPOSED METHODOLOGY Pytorch is a deep learning framework
A. DATA AUGMENTATION released by Facebook AI research in 2017.
To address the issue of dataset imbalance, This framework has the advantages of
extensive data augmentation techniques were exibility, ease of use, and fast speed.
employed. These techniques included random PyTorch is a rookie in the deep learning
rotations, flips, zooms, and shifts to artificially framework.
increase the size and diversity of the training C. HYPERPARAMETER OPTIMIZATION
dataset. Data augmentation helps the model Hyperparameter optimization was performed
generalize better by exposing it to a variety of to identify the best configuration for the
transformations of the original images, thereby model. This process involved tuning
reducing overfitting and improving robustness. parameters such as the learning rate, batch
In deep learning, small-scale datasets can easily size, and the number of epochs using grid
lead to insufficient model learning and over search and cross-validation. Optimal
thing. To solve the problem of small skin hyperparameters were selected based on their
disease dataset and improve the network models performance on the validation set, ensuring
generalization ability, researchers use data that the model achieved the highest possible
augmentation technology to expand the amount accuracy while maintaining generalization to
of training data. Data augmentation uses unseen data.
existing data to create new data under the D. EVALUATION METRICS
guidance of task objectives. The traditional The performance of the ResNet-50 model
image data augmentation expands the dataset by was evaluated using standard metrics such as
introducing geometric transformation and image accuracy, precision, recall, F1-score, and the
operation to the original data without changing area under the receiver operating
the data label. The leading technologies are characteristic curve (AUC-ROC). These
rotation, mirror image, adding noise, and metrics provide a comprehensive evaluation
dimension reduction. The new data amplication of the model's ability to classify skin diseases
technology produces simulation data on the accurately. The confusion matrix was also
basis of the original data and by generating analyzed to identify any specific classes
Gansmode. The internal distribution law of where the model's performance could be
pictures indicates that the generated improved.
confrontation network is not only limited to E. IMPLEMENTATION DETAILS
within-class information but also uses the The model was implemented using
information between categories to synthesize TensorFlow and Keras libraries. Training
pictures. was conducted on a high-performance GPU
B. MODEL FINE-TUNING to accelerate the computational process.
Transfer learning was utilized by initializing the Early stopping and model checkpointing
ResNet-50 model with weights pre-trained on were employed to monitor the validation loss
the ImageNet dataset. Fine-tuning involved and save the best-performing model. The
freezing the initial layers of the network to final model was evaluated on the test set to
retain the pre-trained features while allowing the assess its generalization performance and
deeper layers to learn task-specific features from ensure its readiness for potential clinical
the skin disease dataset. This approach applications.
RESNET-50: A RESIDUAL LEARNING neural network architecture known for its
APPROACH depth and performance in image classification
ResNet-50 stands for Residual Network with 50 tasks. Its deeper architecture allows for more
layers. It's a specific type of convolutional complex feature extraction, which is crucial
neural network (CNN) architecture introduced for accurately distinguishing between subtle
in the 2015 paper "Deep Residual Learning for differences in skin diseases. Additionally,
Image Recognition" by He et al. [6]. CNNs are a ResNet-50 has been widely adopted and
type of deep learning model that excels at image extensively studied in the field of medical
recognition tasks by learning patterns from image analysis, including dermatology,
image data. One of the key innovations of demonstrating strong performance in various
ResNet-50 is its use of residual connections. disease classification The performance of the
Traditional deep neural networks can suffer model was notably influenced by manual fine-
from the vanishing gradient problem, where the tuning of parameters and meticulous control
signal weakens as it propagates through the over the learning process. In the compile stage
layers, hindering training. Residual connections of the model, the Adam optimizer30 was
address this by creating a shortcut path that selected. This optimizer effectively manages
allows the gradients to flow directly through the the exponential decay average during the
network, facilitating better learning. training process. To optimize the learning
RESNET-50 ARCHITECTURE process, the learning rate parameter was
The ResNet-50 architecture consists of several dynamically configured based on the number
building blocks called residual blocks. These of epochs. Fine-tuning the learning rate is
blocks contain convolutional layers, batch crucial for achieving optimal performance.
normalization layers, and activation functions. Through multiple trial and error experiments,
The residual connection bypasses these it was determined that setting the number of
transformations, adding the original input to the epochs to 20 and the batch size to 32 yielded
output of the block. This approach allows the the best results. the images undergo resizing
network to learn residual functions that build and the selection of the region of interest.
upon the underlying structure of the input data. This step ensures consistency in the
PRE-TRAINED MODEL AND FINE-TUNING dimensions of the images and focuses on the
ResNet-50 is often used as a pre-trained model, specific areas relevant to the skin diseases
meaning it has already been trained on a under examination. The fourth section
massive dataset of general images (e.g., involves the insertion of the pre-processed
ImageNet). This pre-trained model can then be data into the proposed ResNet-50 model. This
fine-tuned for specific tasks like skin disease step utilizes the modified architecture to
classification. Fine-tuning involves modifying extract meaningful features and classify the
the final layers of the pre-trained network to skin diseases effectively. Finally, in the fifth
adapt to the new classification problem. This section, the performance of the model is
approach leverages the learned features from the evaluated through two approaches: K-fold
pre-trained model and improves training cross-validation and random train-test
efficiency for the specific task. splitting. These techniques assess the model’s
By incorporating residual connections and ability to accurately classify Psoriasis and
leveraging pre-training, ResNet-50 has achieved Lichen planus skin diseases, providing
state-of-the-art performance in various image insights into its overall performance and
classification applications, making it a strong efficacy. the application of data augmentation
candidate for tasks like skin disease detection. and class balancing, the accuracy significantly
improved. In terms of data augmentation, the
The selection of ResNet-50 for our study was difference in accuracies between the cases
based on several factors that contribute to its with and without implementation was not
suitability for the problem at hand. Firstly, substantial.
ResNet-50 is a well-established convolutional
FIGURE 1: ResNet-50 Architecture