IJDSML Vol 4 Iss 4 Paper 4 495 501

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

SKIN DISEASE CLASSIFICATION USING CNN

Sakshi Zagade, Shruti Sakpal


Department of Data Science, Usha Mittal Institute of Technology, SNDT Women’s University, India

Abstract image-based system for skin disease identification and


The skin being the largest organ in the human body, comprises the classification, which will improve diagnostic accuracy and
epidermis, dermis, subcutaneous tissues, blood vessels, lymphatic alleviate the shortage of human experts.
vessels, nerves, muscles etc. Allergies, Pigmentation, Fungal Skin disease classification is an important area of research
development, bacteria, microbes are some of the major grounds for due to the high prevalence of skin diseases and the need for
the causation of several types of skin diseases in humans. Such accurate and timely diagnosis. Deep learning-based techniques,
infections have chances of worsening as time progresses if proper
treatment is not provided immediately. Hence, skin diseases or
such as convolutional neural networks (CNNs), have shown
infections must be nursed promptly in order to avoid the proliferation promising results in accurately classifying skin diseases. CNNs
of such illnesses which might have fatal repercussions in the future. are a type of neural network that can automatically learn features
Advanced techniques and procedures for the classification of such from input data, making them well-suited for image
illnesses based on Artificial Intelligence and machine learning models classification tasks. The first step in developing a CNN-based
are now in increasing demand in the industry. But not all of them are skin disease classification model is data acquisition. This
freely available for the commoners. For that reason, the proponents involves collecting a large dataset of skin disease images that are
came up with the suggestion of a CNN based model for the labelled with their corresponding disease categories. The quality
classification of different skin diseases. We introduce a multiclass
and diversity of the dataset are critical for the performance of the
CNN model which helps categorize Healthy skin and skin being
affected by 23 different classes of skin diseases. Our objective of the model. Once the dataset is acquired, it is pre-processed to
project is to detect the type of skin disease easily with increased remove noise and enhance image quality. The pre-processed
accuracy. First stage includes the image of the skin disease being images are then split into training, validation, and testing sets.
subjected to various kinds of pre-processing techniques followed by The next step is model development, which involves
feature extraction. Then the second stage involves the Deep learning designing a CNN architecture that can learn features from the
algorithms to identify diseases based on the analyzing and observance input images and classify them into their respective disease
of the skin. The proposed system is highly beneficial in rural areas categories. The architecture typically consists of multiple
where access to dermatologists is limited. convolutional layers that extract features from the input images,
followed by pooling layers that reduce the dimensionality of the
Keywords: feature maps. The output of the convolutional layers is then
CNN, Feature extraction, Deep Learning, Skin diseases, Allergies flattened and fed into fully connected layers that perform the
final classification. The model is trained using the training set
and validated using the validation set. Once the model is trained
1. INTRODUCTION and validated, it is tested on the testing set to evaluate its
performance. Developing a CNN-based skin disease
The skin is the substantial organ of the body, with a total area classification model involves several steps, including data
of about 20 square feet. The skin protects us from microbes and acquisition, pre-processing, and model development, and has the
the elements, helps regulate body temperature, and permits the potential to significantly improve the accuracy and efficiency of
sensations of touch, heat, and cold. Skin diseases are one of the skin disease diagnosis.
most common types of health illnesses faced by the people of
different age groups. The skin plays a significant role in
maintaining the core temperature and in general protecting our 2. RELATED WORKS
body from various skin maladies which is why the skin being
healthy or illness free is of extreme importance. The field of skin disease classification using Convolutional
The identification of skin diseases majorly relies on the Neural Networks (CNN) has witnessed significant
expertise of the dermatologists and skin biopsy results, which is, advancements, with several notable studies contributing to the
usually, a very time-consuming process. Even though skin understanding and improvement of this critical domain.
diseases may seem harmless, they can pose a serious health risk In a study conducted by Velasco et al. (October 2019),
if not treated effectively. Early symptoms of numerous diseases titled "A Smartphone-Based Skin Disease Classification Using
are similar, so diagnosing a disease at an early stage is MobileNet CNN," the authors introduced a novel approach to
challenging. skin disease identification. They employed a CNN MobileNet
As technology continues to advance, as well as with different model along with App Development, showcasing the potential of
data mining approaches, treatments of skin predictive mobile technology in facilitating efficient and accessible disease
classification are becoming increasingly accurate and highly classification. Their emphasis on oversampling and data
predictive. Consequently, automated assessment of these augmentation techniques highlighted the importance of
illnesses has become more valuable due to its ability to provide preprocessing strategies in achieving optimal classification
accurate results faster than human analysis involving clinical accuracy.
laboratories. The goal of this study is to develop an automated
12. Melanoma Skin Cancer Nevi and Moles
13. Nail Fungus and other Nail Disease

Amit R.S and colleagues, in their research on "Potato


Plant’s Disease Classification using CNN and Transfer 14. Poison Ivy Photos and other Contact Dermatitis
Learning" (July 2022), explored the transferability of CNNs to 15. Psoriasis pictures Lichen Planus and related diseases
agricultural contexts. Their work demonstrated that Transfer 16. Scabies Lyme Disease and other Infestations and Bites
Learning models, when applied to plant pathology, offer 17. Seborrheic Keratoses and other Benign Tumors
simplicity in implementation coupled with a high degree of 18. Systemic Disease
accuracy. This cross-disciplinary application underscores the 19. Tinea Ringworm Candidiasis and other Fungal Infections
adaptability of CNNs in diverse domains, including agriculture. 20. Urticaria Hives
In the realm of medical image analysis, Kritika Sujay Rao et 21. Vascular Tumors
al. delved into "Skin Disease Detection using Machine 22. Vasculitis Photos
Learning." Their research focused on the application of 23. Warts Molluscum and other Viral Infections
Convolutional Neural Networks, a deep learning paradigm well-
suited for image-based tasks. Their emphasis on the role of
validation data in refining the accuracy of the system shed light 3.2 Data Preprocessing
on the crucial aspect of dataset quality in skin disease This dataset contains a total of 19500 dermatoscopic
classification. images. A random (rand) function is applied to split the data into
A noteworthy contribution by A. Kalaivani and Dr. S. the training data which is a total of 15500 images and testing
Karpagavalli involved the "Detection and classification of skin data containing 4000 images. In which the training data is
diseases with ensembles of deep learning networks in medical further divided into 90% as actual training dataset (215 images)
imaging." The researchers employed a multi-model ensemble and the remaining 10% as validation dataset (25 images). For
approach, combining various deep learning techniques to achieve Data cleaning and preprocessing, we will be using tf data set and
a remarkable accuracy of 96.1 percent. This approach reflects the data augmentation. The considered dataset is slightly imbalanced
potential of ensemble methods in enhancing the robustness of because some skin diseases are more, and some are less in
skin disease classification models. number. To overcome such problems, we used data
Lastly, the study by Ashwaq Alsayed and team on the augmentation, and this technique balances the data and generates
"Classification of Apple Tree Leaves Diseases using Deep more images either by rotations or transformations from the
Learning Methods" introduced insights from the application of existing data.
ResNet-V2, a Convolutional Neural Network architecture. Their
findings emphasized the effectiveness of the Adam optimizer in
transfer learning, and they suggested that increasing the number
of instances could further improve classification accuracy,
offering valuable insights for fine-tuning CNN models in skin
disease classification.
These diverse studies collectively contribute to the evolving
landscape of skin disease classification using CNNs, providing
valuable insights, methodologies, and potential avenues for
further research and improvement in this critical field.

3. PROPOSED MODEL
Fig.1. Dataset Distribution
3.1 Dataset
This machine learning project starts with data collection. Data
which we can use as a training dataset. In this case, we collected Figure 2 shows some sample images from the dataset
images of different skin diseases. The dataset was acquired
through Kaggle which contains 19500 dermatologically tested
images of 23 different skin diseases. The 23 different conditions
of skin disorders that have been included in our dataset are as
follows:
1. Acne and Rosacea Photos
2. Actinic Keratosis Basal Cell Carcinoma and other
Malignant Lesions
3. Atopic Dermatitis Photos
4. Bullous Disease Photos
5. Cellulitis Impetigo and other Bacterial Infections
6. Eczema Photos
7. Exanthems and Drug Eruptions
8. Hair Loss Photos Alopecia and other Hair Diseases
9. Herpes HPV and other STDs Photos
10. Light Diseases and Disorders of Pigmentation
11. Lupus and other Connective Tissue diseases
the pre-processing step are referred to as resizing and rescaling.
Resizing is the process of altering an image's dimensions while
preserving its aspect ratio. When the input images are not all the
same size, this can be helpful. On the other hand, rescaling is the
process of altering an image's range of pixel values. Usually, this
is done to guarantee that the pixel values fall inside a specific
range, such 0 to 1. The input data can be normalized in this way
to enhance the training process and the performance of the
model. The second layer performs data augmentation which is
required as we might not have enough diverse set of images, so
we rotate, flip, and adjust contrast to create more training
samples.
Third layer is the actual convolutional layer whose
function is to execute the mathematical operation of convolution
to extract features from input data, such as an image.
Convolution works by moving a small filter or kernel over the
input data and computing a dot product between the filter and a
small area of the input at each place. A new output tensor is
created as a result of this procedure, and it comprises details on
Fig.2. Sample Dataset the existence and positioning of different features in the input
data. The convolutional layer may automatically find significant

3.3 Model Building

patterns in the input by learning the filter during training. We


used
the activation function ‘relu’ which is a quite popular function
for the hidden layers because it's very fast to compute.
Pooling layer is the next layer in our model. A pooling
layer is used to reduce the spatial dimensions of the input image
while conserving the important features. There are two types of
pooling layer: Max Pooling and Average Pooling. The most
prevalent kind of pooling layer and also the one which we
implemented in our model is termed a max pooling layer, which
divides the input image into a number of non-overlapping
rectangular sub-regions and outputs the highest value of each
sub-region.
Then the output of the previous layer needs to go through
Fig.3. CNN Architecture the Flattening layer which is a process of transforming the
output from the convolutional layers into a one-dimensional
Once the dataset is acquired and preprocessed, a critical feature vector that can be fed into a fully connected layer for
step in our skin disease classification project involves model classification or regression. The fully connected layers require a
building using Convolutional Neural Networks (CNNs). CNNs 1-dimensional input vector, whereas the convolutional layers
are considered a standard and effective approach for image produce a 3-dimensional tensor, necessitating this flattening
classification tasks. Leveraging this deep learning architecture, step. Important spatial information from the input image is
our objective is to train the model to recognize patterns and retained in the flattened feature vector, but in a way that the fully
features indicative of different skin diseases. connected layers can handle it.
This stage focuses on building a Convolutional neural The dense layer is the next layer which is a fully
network and training that network on the train dataset. Followed connected layer that comes after the convolutional and pooling
by measuring the accuracy on the test dataset. CNN layers. The convolutional and pooling layers' newly discovered
(Convolutional Neural Network) is a particular kind of deep features are used by the dense layer to categorize the input
learning method that's mainly employed for image image. Every neuron in the previous layer is connected to every
identification and classification jobs. Convolutional, pooling, neuron in the current layer by a dense layer, resulting in a matrix
and fully connected layers are among the many layers that make multiplication operation that produces a vector of scores that
up a CNN. A series of learnable filters are convolved with the indicates the likelihood that the input image belongs to each
input image in the convolutional layers in order to extract potential class. The softmax activation function, which
features from the image. The feature maps created by the normalizes the scores and generates a probability distribution
convolutional layers are subsequently down sampled by the over the various classes, is often fed the dense layer output. The
pooling layers. The classification operation is then carried out predicted class for the input image is then determined by
by the fully linked layers using the extracted features. selecting the class with the highest probability.
Similarly, this model comprises a set of different
layers and the first layer is resize and rescale. Two distinct
operations that are frequently carried out on images as part of
3.4 Methodology and Implementation
capture intricate patterns and hierarchical features present in
images. The robustness and accuracy exhibited by CNNs make
them a preferred choice when constructing models for image-
related applications.
In our project, we successfully leveraged the power of
CNNs to achieve a commendable model accuracy of 69 percent.
This accuracy is a testament to the effectiveness of CNNs in
discerning complex patterns within skin disease images.
However, it is important to note that the accuracy of any image
classification model is intricately tied to the size and quality of
the dataset used for training. Our achievement of 69 percent
accuracy underscores the significance of a carefully curated
dataset in the model development process.
The observed accuracy is not a fixed metric; rather, it is
influenced by various hyperparameters. These hyperparameters
Fig.4. Methodology include learning rates, optimizer functions, activation functions,
dropouts, batch size, and more. Fine-tuning these parameters
Following the training phase, the next step is to export becomes crucial in optimizing the model's performance, and
the trained model onto our disk for further deployment. This their careful consideration contributes to the overall
exportation process ensures that the model is preserved and can effectiveness of the skin disease classification system.
be readily accessed for subsequent phases of the project. To enhance user interaction and convenience, our
application features an intuitive front end, as depicted in the
attached images. Users are presented with two convenient
options: capturing an image through the camera or uploading
one
Moving forward, we delve into the concept of ML Ops,
where we employ Tensor Flow serving (TF serving). A Tensor
Flow server is configured to run on top of the exported model,
and this server is then invoked from a FastAPI. This integration from the gallery. Once an option is selected, the chosen image is
ensures seamless and efficient serving of the trained model, transmitted to the backend, where the CNN structure is applied.
laying the foundation for the operationalization of machine The backend processing involves the intricate analysis of the
learning processes. image using the trained model. Subsequently, the final output or
The subsequent phase involves mobile app result is presented to the user, offering a swift and accurate
development, a pivotal step to make the skin disease classification of the skin disease.
classification accessible and user-friendly. To deploy the model
on a mobile application, we employ quantization and
conversion techniques to transform the model into a Tensor
Flow Lite (tf lite) format. This optimized version of the model
serves as the core component for the mobile app, enhancing
efficiency and responsiveness.
The mobile application is crafted using Java, ensuring
compatibility with a wide range of devices. This application
becomes a user-friendly interface for individuals seeking quick
and accurate classification of various skin diseases. Users can
input an image of the infected area of their skin into the
prototype. The application, through image processing
techniques, swiftly analyzes the input image, providing an
almost instantaneous output by displaying the detected skin
disease.
In summary, our project integrates data acquisition,
model building with CNNs, ML Ops with TF serving, and
mobile app development to create a comprehensive system for
efficient and user-friendly skin disease classification. The
seamless flow from dataset acquisition to mobile application
demonstrates a holistic approach aimed at providing timely and
accurate assistance in identifying skin diseases.

4. RESULTS AND DISCUSSION

Convolutional Neural Networks (CNNs) stand out as a Fig.5. Mobile App Result (1)
formidable tool in the realm of model building, particularly for
image classification tasks. Their superiority over traditional
Artificial Neural Networks (ANNs) lies in their ability to
Fig.6. Mobile App Result (2)
5. FUTURE WORK accessibility. By providing a user-friendly interface for skin
disease identification and classification, this project contributes
India boasts a rich heritage of traditional natural remedies to the efficiency and effectiveness of medical diagnostics.
and authentic medicinal practices that have been integral to its Beyond its technical achievements, the project has broader
culture. These natural remedies, deeply rooted in traditional implications for healthcare, bridging the gap between cutting-
medicine, continue to hold immense value as potent medicinal edge technology and the critical need for accurate and quick
resources in the country. They have proven effective in disease identification in the field of dermatology.
alleviating troublesome symptoms and have been a reliable
source of healthcare for generations. REFERENCES
However, with the rapid pace of modernization, there is a .
growing concern that the upcoming generations may lack [1] https://codebasics.io/blogs/programming.
awareness about the potent remedies available at home. These
remedies, often derived from natural sources, have the potential [2] https://codebasics.io/blog/what-is-a-neural-network
to address health issues at their early stages, providing quick
and effective relief. Recognizing this gap in knowledge, our [3] Geron Aurelien, Hands-On Machine Learning with Scikit-
application seeks to bridge the generational divide by not only Learn and TensorFlow: Concepts, Tools, and Techniques to
detecting and classifying skin diseases but also by offering Build Intelligent Systems, 2017.
insights into relevant home remedies that can be employed for
holistic well-being. [4] Adam Gibson, Josh Patterson, Deep Learning, A
Skin diseases can be influenced by various factors, both Practitioner’s Approach, Shroff Publisher /O’Reilly Publisher
direct and indirect. These factors include environmental Media
conditions, food allergies, irritants, genetic makeup, certain
diseases, and the immune system. Additionally, the [5] Dan Ward, React Native Cookbook - Second Edition, 2019
geographical location of an individual can play a vital role in
understanding the root cause of a skin condition. For instance, [6] Artemij Fedosejev, React.js Essentials: A fast-paced
in urban areas like Delhi, where issues like eczema and journey, 2015
allergies are exacerbated by toxic air, there is a growing
concern about the impact of the environment on skin health. [7] https://www.frontiersin.org/articles/10.3389/
This application can be implemented to further use the user’s fpls.2016.01419/full
location as one of the parameters in classifying skin diseases,
offering a more tailored and contextualized healthcare solution. [8] https://cjme.springeropen.com/articles/10.1186/s10033-
This system can also help in providing the user with the 021-00629-5
nearby hospitals and dermatologists details which would be
helpful. This feature can serve as a valuable resource, [9] Hafiz, A.M.; Bhat, G.M. A Survey of Deep Learning
facilitating prompt medical attention and further enhancing the Techniques for Medical Diagnosis. In Information and
user's experience with a seamless transition from disease Communication Technology for Sustainable Development;
detection to medical consultation. Advances in Intelligent Systems and Computing; Tuba, M.,
In essence, our application not only leverages technology Akashe, S., Joshi, A., Eds.; Springer: Singapore, 2020; Volume
to identify and classify skin diseases but also integrates 933.
traditional wisdom and local context. By incorporating home
remedies and considering geographical factors, it strives to [10] D.A. Okuboyejo, O.O. Olugbara and S.A. Odunaike,
empower users with a comprehensive healthcare solution that “Automating skin disease diagnosis using image classification,”
aligns with India's rich tradition of natural remedies while In proceedings of the world congress on engineering and
addressing the evolving healthcare needs of the present computer science 2013 Oct 23, Vol. 2, pp. 850-854.
generation.
[11] Avanzato, R.; Beritelli, F. Automatic ECG Diagnosis
6. CONCLUSION Using Convolutional Neural Network. Electronics 2020, 9, 951.
[Google Scholar]
In conclusion, the Skin Disease Classification using
CNN project represents a significant stride in leveraging [12] A.A. Amarathunga, E.P. Ellawala, G.N. Abeysekar and
advanced technology for healthcare. The utilization of C.R Amalraj, “Expert system for diagnosis of skin diseases,”
Convolutional Neural Networks has proven instrumental in International Journal of Scientific Technology Research, 2015
achieving a commendable level of accuracy in the classification Jan 4;4(01):174-8.
of skin diseases, offering a robust solution for timely diagnosis.
The project not only showcases the power of CNNs in [13] S. Chakraborty, K. Mali, S. Chatterjee, S. Anand, A. Basu,
discerning complex patterns within medical images but also S. Banerjee, M. Das and A. Bhattacharya, “Image based skin
emphasizes the potential for technology to enhance healthcare disease detection using hybrid neural network coupled bag-of-
features,” In 2017 IEEE 8th

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy