SDC Mini Project Paper

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, Dr. Santoshi Pote, Prof. Merrin Mary Solomon
Department of Data Science, Usha Mittal Institute of Technology, SNDT Women’s University, India

clinical
Abstract
The skin being the largest organ in the human body, comprises the
epidermis, dermis, subcutaneous tissues, blood vessels, lymphatic laboratories. The goal of this topic is to develop an automated
vessels, nerves, muscles etc. Allergies, Pigmentation, Fungal image-based system for skin disease detection and classification,
development, bacteria, microbes are some of the major grounds for which will improve diagnostic accuracy and alleviate the
the causation of several variations of skin diseases in humans. Such scarcity of human specialists.
infections have chances of worsening as time progresses if proper
treatment is not provided immediately. Hence, skin diseases or
Skin disease classification is a crucial field of study because
infections must be nursed promptly with the aim of avoiding the of the high prevalence of skin diseases and the need for accurate
proliferation of such illnesses which might have fatal repercussions in and timely diagnosis. Deep learning-based techniques, such as
the future. Advanced techniques and procedures for the classification convolutional neural networks (CNNs), have produced
of such illnesses based on Artificial Intelligence and machine encouraging results in accurately classifying skin diseases.
learning models are now in increasing demand in the industry. But CNNs are a kind of neural network that can automatically learn
not all of them are freely available for the commoners. For that features from input data, making them well-suited for image
reason, the proponents came up with the suggestion of a classification tasks. The first step in developing a CNN-based
Convolutional Neural Networks (CNN) based model for the
skin disease classification model is data acquisition. This
identification of different skin diseases. We introduce a multiclass
CNN model which helps categorize Healthy skin and skin being involves collecting a large dataset of skin disease images that are
affected by 23 different classes of skin diseases. Our Purpose of the labelled with their corresponding disease categories. The quality
project is to detect the category of skin disease easily with increased and diversity of the dataset are critical for the model's
accuracy. First stage includes the image of the skin illness being performance. Once the data is acquired, it is pre-processed to
subjected to various kinds of pre-processing techniques which is remove noise and enhance image quality. The pre-processed
followed by feature extraction. Then the second stage involves Deep images are then split into training, validation, and testing sets.
learning algorithms to identify diseases on the basis of analyzation The next step is model development, which involves
and observation of the skin. The proposed system is highly beneficial designing a CNN architecture that can learn features from the
in rural areas where access to dermatologists is limited.
input images and put them in the appropriate disease category.
The architecture typically comprises several convolutional layers
Keywords: for feature extraction from the input images., followed by
CNN, Feature extraction, Deep Learning, Skin diseases, FastAPI pooling layers that lessen the number of dimensions in the
feature maps. After being flattened, the convolutional layers'
output is fed into fully connected layers that perform the final
1. INTRODUCTION classification. The model is trained using the training set and
validated using the validation set. Once the model is trained and
With an approximate surface area of 20 square feet, the skin validated, it is tested on the testing set to evaluate its
is the largest organ in the body. In addition to helping to control performance. Developing a CNN-based skin disease
body temperature and shielding us from germs and the classification model involves several steps, including data
environment, skin also allows us to feel touch, heat, and cold. acquisition, pre-processing, and model development, and has the
One of the most prevalent categories of disorders that individuals ability to greatly increase the precision and effectiveness of
of all ages deal with is skin disease. The skin plays a significant diagnosing skin diseases.
role in maintaining the core temperature and in general
protecting our body from various skin maladies which is why the 2. RELATED WORKS
skin being healthy or illness free is of extreme importance.
The diagnosis of skin conditions mostly depends on the The field of skin disease classification using Convolutional
dermatologists' experience and the findings of skin biopsies, Neural Networks (CNN) has witnessed significant
which is, usually, a very time-consuming process. Even though advancements, with several notable studies contributing to the
skin diseases may seem harmless, they can pose a serious health understanding and improvement of this critical domain.
risk if not treated effectively. Early symptoms of numerous In a study conducted by Velasco et al. (October 2019),
diseases are similar, so diagnosing them at an early stage is titled "A Smartphone-Based Skin Disease Classification Using
challenging. MobileNet CNN," the authors introduced a novel approach to
As technology continues to advance, as well as with different skin disease identification. They employed a CNN MobileNet
data mining approaches, treatments of skin predictive model along with App Development, showcasing the potential of
classification are becoming increasingly accurate and highly mobile technology in facilitating efficient and accessible disease
predictive. Consequently, automated assessment of these classification. Their emphasis on oversampling and data
illnesses has become more valuable because of its capacity to augmentation techniques highlighted the importance of
provide accurate results faster than human analysis involving preprocessing strategies in achieving optimal classification
accuracy. 10. Light Diseases and Disorders of Pigmentation
11. Lupus and other Connective Tissue diseases
12. Melanoma Skin Cancer Nevi and Moles

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


Plant’s Disease Classification using CNN and Transfer
Learning" (July 2022), explored the transferability of CNNs to 13. Nail Fungus and other Nail Disease
agricultural contexts. Their work demonstrated that Transfer 14. Poison Ivy Photos and other Contact Dermatitis
Learning models, when applied to plant pathology, offer 15. Psoriasis pictures Lichen Planus and related diseases
simplicity in implementation coupled with a high degree of 16. Scabies Lyme Disease and other Infestations and Bites
accuracy. This cross-disciplinary application underscores the 17. Seborrheic Keratoses and other Benign Tumors
adaptability of CNNs in diverse domains, including agriculture. 18. Systemic Disease
In the realm of medical image analysis, Kritika Sujay Rao et 19. Tinea Ringworm Candidiasis and other Fungal Infections
al. delved into "Skin Disease Detection using Machine 20. Urticaria Hives
Learning." Their research focused on the application of 21. Vascular Tumors
Convolutional Neural Networks, a deep learning paradigm well- 22. Vasculitis Photos
suited for image-based tasks. Their emphasis on the role of 23. Warts Molluscum and other Viral Infections
validation data in refining the accuracy of the system shed light
on the crucial aspect of dataset quality in skin disease 3.2 Data Preprocessing
classification. There are 19500 dermatoscopic images in this dataset.
A noteworthy contribution by A. Kalaivani and Dr. S. The data is divided into training data, which consists of 15500
Karpagavalli involved the "Detection and classification of skin images overall, and testing data, which consists of 4000 images,
diseases with ensembles of deep learning networks in medical using a random (rand) function. In which the training data is
imaging." The researchers employed a multi-model ensemble further divided into 90% as actual training dataset (215 images)
approach, combining various deep learning techniques to achieve and the remaining 10% as validation dataset (25 images). For
a remarkable accuracy of 96.1 percent. This approach reflects the Data cleaning and preprocessing, we will be using tf data set and
potential of ensemble methods in enhancing the resilience of data augmentation. The dataset under consideration exhibits a
models used to classify skin diseases. slight imbalance, with certain skin diseases having a higher
Lastly, the study by Ashwaq Alsayed and team on the frequency than others. We employed data augmentation, a
"Classification of Apple Tree Leaves Diseases using Deep technique that balances the data and produces additional images
Learning Methods" introduced insights from the application of by rotating or transforming the preexisting data, to solve such
ResNet-V2, a CNN architecture. Their findings emphasized the issues.
effectiveness of the Adam optimizer in transfer learning, and
they suggested that increasing the quantity 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 utilizing 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
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 model's functionality.
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
the existence and positioning of different features in the input
Fig.2. Sample Dataset data. By learning the filter during training, the convolutional
layer may automatically identify important patterns in the input.

3.3 Model Building


We employed the activation function "relu," which is commonly
used 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 result of the previous layer needs to go through
the Flattening layer which is a process of transforming the
output from the convolutional layers into a one-dimensional
feature vector that can be fed into a fully connected layer for
Fig.3. CNN Architecture classification or regression. The fully connected layers require a
1-dimensional input vector, whereas the convolutional layers
Once the dataset is acquired and preprocessed, a produce a 3-dimensional tensor, necessitating this flattening
significant step in our skin disease classification project step. Important spatial information from the input picture is
involves model building using Convolutional Neural Networks retained in the flattened feature vector, but in a way that the fully
(CNNs). CNNs are considered a standard and effective connected layers can handle it.
approach for image classification tasks. Leveraging this deep The dense layer is the next layer which is a fully
learning architecture, our objective is to train the model to connected layer that comes after the convolutional and pooling
recognize patterns and features indicative of different skin layers. The convolutional and pooling layers' newly discovered
diseases. features are used by the dense layer to categorize the input
This stage focuses on building a Convolutional neural image. Every neuron in the earlier layer is connected to every
network and training that network on the train dataset. Followed neuron in the present layer by a dense layer, resulting in a matrix
by measuring the accuracy on the test dataset. CNN multiplication operation that produces a vector of scores that
(Convolutional Neural Network) is a particular kind of deep indicates the likelihood that the input image belongs to each
learning method that's mainly employed for image potential class. The softmax activation function, which
identification and classification jobs. CNN's many layers normalizes the scores and generates a probability distribution
include convolutional, pooling, and fully connected layers. To over the various classes, is often fed the dense layer output. The
extract features from the image, a sequence of learnable filters predicted class for the input image is then determined by
is convolved with the input image in the convolutional layers. selecting the class with the greatest probability.
The feature maps created by the convolutional layers are
subsequently down sampled by the pooling layers. The
classification operation is then carried out by the fully linked
layers using the extracted features. 3.4 Methodology and Implementation
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
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 precise
development, a pivotal step to make the skin disease categorization of the skin condition.
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 android 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 precise categorization of various skin diseases. Users can
input a picture of the affected region 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
capture intricate patterns and hierarchical features present in
Fig.6. Mobile App Result (2)
5. FUTURE WORK accessibility. By providing a user-friendly interface for skin
disease detection and classification, this project contributes to
India boasts a rich heritage of traditional natural remedies the productivity and responsiveness 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