Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SKIN DISEASE CLASSIFICATION WITH

CONVOLUTIONAL NEURAL NETWORKS


Katende Chris Marvin 21/U/05689/EVE
Mugenyi Martin 21/U/10044/EVE
Nakaye Babirye Marble 21/U/04986/EVE
Kyomuhangi Fatuma 21/U/07188/EVE
Nsooli Winfred 21/U/13399/EVE
April 2024

Abstract broader range of skin conditions, ultimately con-


tributing to more accurate and accessible medical di-
Convolutional Neural Networks (CNNs) have become agnostics.
a cornerstone in the field of computer vision, offer-
ing robust solutions for complex image classification
tasks. In the context of dermatology, accurate and 1 Introduction
rapid identification of skin diseases is crucial for effec-
tive treatment and patient care. This paper explores The skin is the largest organ in the human body,
the application of CNNs for the classification of com- consisting of the epidermis, dermis, subcutaneous
mon skin diseases using a dataset derived from Kag- tissues, blood vessels, lymphatic vessels, nerves, and
gle.com. The dataset comprises over 1,500 images muscles. Skin can prevent lipid deterioration in
representing eight skin diseases: athlete’s foot, nail the epidermis with liquid such that the skin barrier
fungus, shingles, ringworm, cutaneous larva migrans, feature can be improved.Human skin disease is a
cellulitis, impetigo, and chickenpox. chronic ailment that affects people of all ages all over
Our study aimed to develop a CNN-based model the world. Skin disorders that are severe enough
capable of accurately classifying these skin diseases. to necessitate medical treatment or that receive
We implemented data preprocessing techniques such insufficient attention might result in bodily damage
as image resizing, normalization, and data augmen- or even death. Dermatologists must still detect most
tation to improve model performance. The model skin problems by hand and examine the patient’s
achieved high accuracy on the training dataset, symptoms. However, the following factors make it
demonstrating the potential of CNNs for skin disease difficult to diagnose skin conditions. Skin disease
classification. However, accuracy on the test dataset classification necessitates a considerable amount of
revealed the need for further tuning and additional information; thus, a diagnosis given by a non-expert
data augmentation to enhance generalization. doctor may result in inadequate therapy or other
The results suggest that CNN-based approaches complications. Furthermore, few people go to the
can play a significant role in dermatological diagnos- doctor unless they have a serious illness. As a result,
tics, offering scalable solutions for healthcare profes- addressing skin diseases too late may worsen the
sionals. Future work will focus on improving model situation and exacerbate the symptoms.
robustness and expanding the dataset to cover a

1
Figure 1: Athlete foot Figure 4: Cutaneous Larva migrans

Figure 2: shingles Figure 5: Cellulitis

Skin diseases can arise because of fungal de- Shingles (VI-shingles), caused by the varicella-
velopment over the skin, hidden bacteria, allergic zoster virus, presents as a painful rash typically ap-
reactions, microbes affecting the skin’s texture, or pearing in a limited area of the body. This condi-
creating pigment.Skin diseases in Uganda, like in tion can be particularly distressing, especially in older
many regions worldwide, present a significant health adults or those with weakened immune systems, lead-
concern, impacting individuals across all demograph- ing to prolonged pain and nerve damage in severe
ics. Among the common dermatological conditions cases.
are FU-athlete’s foot, FU-nail fungus, VI-shingles, Ringworm (FU-ringworm) is a contagious fun-
FU-ringworm, PA-cutaneous larva migrans, BA- gal infection characterized by circular, red, and itchy
cellulitis, BA-impetigo, and VI-chickenpox. These patches on the skin, scalp, or nails. It spreads
ailments vary in severity, from mild discomfort to through direct contact with an infected person or
debilitating infections, often affecting both physical contaminated objects, posing challenges for preven-
health and quality of life. tion and control in communities.
Athlete’s foot (FU-athlete’s foot) and nail Cutaneous larva migrans (PA-cutaneous larva
fungus (FU-nail fungus) are fungal infections com- migrans) results from skin penetration by parasitic
monly found in warm and moist environments, larvae, commonly found in tropical and subtropical
such as communal bathing areas, affecting individ- regions like Gulu, Kitgum, Pader, Apac, Lira
uals irrespective of age or gender. They manifest Arua, Moyo, Adjumani, Nebbi and yumbe. It
as itching, scaling, and inflammation, causing dis- presents as raised, winding tracks on the skin, caus-
comfort and potential complications if left untreated. ing itching and discomfort, particularly in individuals
with frequent outdoor exposure.

Figure 3: Ringworm Figure 6: Impetigo

2
Cellulitis (BA-cellulitis) and impetigo (BA-
impetigo) are bacterial skin infections that can lead
to severe complications if not promptly treated. Cel-
lulitis manifests as red, swollen, and painful skin, of-
ten occurring after breaks in the skin’s integrity, while
impetigo appears as honey-colored crusts or blisters, Figure 7: sample representation of the diseases
primarily affecting children and individuals living in
crowded environments.
Chickenpox (VI-chickenpox), caused by the applied the following preprocessing steps:
varicella-zoster virus, is highly contagious, spreading
through respiratory droplets or direct contact with • Image Resizing: All images were resized to
skin lesions. Although often mild in children, it can 224x224 pixels to ensure consistency.
result in severe complications in adults or individu-
als with compromised immune systems, highlighting • Data Augmentation: We applied random ro-
the importance of vaccination and public health in- tations, flips, and brightness adjustments to in-
terventions. crease data diversity.

• Normalization: Pixel values were scaled to a


2 Methodology range of [0, 1] to facilitate model convergence.

A robust methodology for skin disease classification • Label Encoding:Convert categorical labels
using Convolutional Neural Networks (CNNs) in- (e.g., disease names) into numerical format for
volves several key steps: data collection, preprocess- the model to understand.
ing, model architecture design, training, and evalua-
tion. Below is a detailed outline of the methodology
for implementing a CNN-based skin disease classifi- 2.3 Libraries
cation system;
Matplotlib, pyplot, and cv2 libraries are used for im-
age operations and plotting, such as graphs, charts,
2.1 Data Collection and tables. The Shutil and os libraries offer path and
The dataset serves as the foundation for all algo- directory operations on files and the collection of files.
rithms, models, and systems. Approximately 800 For model building such as classification report, ROC
color images of eight different skin disorders were curve, and confusion matrix, we import the keras and
used for this project from Kaggle.com datasets.The tensorflow libraries. The numpy and pandas are the
dataset comes from a combination of open-access der- most popularly used libraries for array processing and
matological website, color atlas of dermatology and data analysis (series and data frames).
taken manually.It is composed of 8 categories of skin
diseases namely; FU-athlete-foot,FU-nail-fungus,VI-
shingles,PA-cutaneous-larva-migrans,BA-impetigo 3 MODEL
and VI-chickenpox.
We decided to use the CNN model for this classifica-
tion problem i.e. Skin disease classification for
2.2 Data Preprocessing it’s effectiveness in finding patterns in images to rec-
ognize classes. Convolutional Neural Network (CNN)
This step was performed to understand the data bet- is a type of deep learning algorithm specifically de-
ter and prepare the data for neural networks. we signed for image processing and recognition tasks.

3
3.1 CNN Architecture 4 Results
• Input Layers: It’s the layer in which we give in- We trained our model with the train dataset and
put i.e. an image or a sequence of images to our achieved an accuracy of 1.00 upon it’s evaluation
CNN model . This layer holds the raw input with a loss of 0.0011 We also evaluated the model
of the image with width 224, height 224, and 3 on the test set and got an accuracy of 0.7742 and
color channels (RGB). loss of 1.7169 . We tested the model after it’s train-
• Convolutional Layers: We used this layer to ex- ing with an image from the test dataset and it pre-
tract the features from the train dataset. It ap- dicted correctly i.e the input image was from the class
plies a set of learnable filters known as the ker- of FU-athlete-foot and the model predicted that
nels to the input images. The filters have smaller same class which was the expected output.
matrices of 3×3 shape. It’s convolved across the
input image data and computes the dot product 4.1 Performance Evaluation
between kernel weight and the corresponding in-
put image patch. The output of this layer is Performance evaluation is a crucial aspect of any
referred as feature maps. We used a total of 32 classification model, providing insights into how well
filters for this layer we’ll get an output volume the model performs on unseen data and identify-
of dimension 224 x 224 x 32. ing areas for improvement. In the context of skin
disease classification with Convolutional Neural Net-
• Activation Layer: By adding an activation func- works (CNNs), the following metrics are used to as-
tion to the output of the preceding layer, activa- sess the model’s effectiveness:
tion layers introduce nonlinearity to the network.
It will apply RELU activation function to the
output of the convolution layer. The volume re- 4.2
mains unchanged hence output volume will have
Accuracy. This formula determines the proportion of
dimensions 224 x 224 x 32.
occurrences properly categorized in the test dataset.
• Pooling layer: The max pooling layer aids the Accuracy might be deceptive when there is a class
neural network in extraction of vital features imbalance or when misclassifying one class would cost
from the input while concurrently reducing the more than the other.
dimensions of the data thus, making computa-
tion faster and avoid over fitting.
5 Conclusion
• Flattening: The resulting feature maps are flat-
tened into a one-dimensional vector after the In this study, we developed and evaluated a Convolu-
convolution and pooling layers. The flattened tional Neural Network (CNN) model for skin disease
matrix is fed as input to the fully connected layerclassification. Our model demonstrated the ability
to classify the image. to distinguish between various skin conditions with a
high degree of accuracy, supporting the potential of
• Fully Connected Layers (Dense): It takes the
deep learning in medical image analysis.
input from the previous layer and computes the
Key findings from our work include:
final classification of the skin disease.
High Accuracy: The model achieved notable accu-
• Output Layer: The output from the fully con- racy on both training and test datasets, indicating
nected layers is then fed into a logistic function its robustness in classifying skin diseases. Effective
for classification tasks like softmax which allows Preprocessing: The use of data augmentation and
CNN to output a probability distribution over normalization contributed to improved model gener-
the possible classes. alization and reduced overfitting. Despite these suc-

4
cesses, there are areas for further exploration and im-
provement:
Class Imbalance: Addressing class imbalance
through techniques like weighted loss functions or
oversampling/undersampling could enhance perfor-
mance on less common skin diseases. Transfer Learn-
ing: Leveraging pre-trained models could acceler-
ate training and improve accuracy, especially with
smaller datasets. Clinical Integration: To ensure
real-world applicability, further research is needed to
integrate this model into clinical workflows and evalu-
ate its impact on diagnostic accuracy and patient out-
comes. Overall, this study demonstrates that CNNs
hold great promise for skin disease classification, with
potential applications in telemedicine and clinical di-
agnosis. By automating the initial screening process,
these models can help reduce the workload on health-
care professionals and improve access to dermatologi-
cal care. Future research will focus on expanding the
dataset, refining the model architecture, and explor-
ing additional applications in healthcare.

6 References
• Esteva, A., Kuprel, B., Novoa, R. A., et al.
(2017). Dermatologist-level classification of skin
cancer with deep neural networks. Nature,
542(7639), 115-118. [A landmark study demon-
strating the effectiveness of deep learning in clas-
sifying skin cancer.]
• Goodfellow, I., Bengio, Y., Courville, A. (2016).
Deep Learning. MIT Press. [An authoritative
book covering the fundamentals of deep learning
and CNNs.]
• Han, S. S., Moon, I. J., Lim, W., et al.
(2018). Keratinocytic skin cancer detection on
the face using region-based convolutional neural
networks. JAMA Dermatology, 154(3), 342-348.
[An example of using region-based CNNs for skin
cancer detection.]

You might also like