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

Major Project Phase II-A on

Skin Disease Classification Using CNN

Submitted in partial fulfillment for the degree of Bachelor of Technology in

Data Science

Submitted by
Shruti Sakpal (2015061)
Sakshi Zagade (2015074)

Under the guidance of


Prof. Merrin Solomon

Usha Mittal Institute of Technology


S.N.D.T. Women’s University Juhu Tara Road, Santacruz (West),
Mumbai-400049
2023-2024
Approval Sheet

This is to certify that Shruti Sakpal and Sakshi Zagade have completed the
Major Project Phase II-A report on the topic of Skin Diseases Classification
using CNN satisfactorily in partial fulfillment for the Bachelor’s Degree in
Data Science under the guidance of Ms. Merrin Solomon during the year
2023-2024 as prescribed by S.N.D.T. Women’s University, Mumbai.

Guide Head Of Department

Prof.Merrin Solomon Mr.Rajesh Kolte

Principal
Dr. Yogesh Nerkar

Examiner 1 Examiner 2
Acknowledgements

We would like take up this opportunity to express gratitude to everyone who


supported us throughout the course of this project. We are thankful for their
aspiring guidance, invaluably constructive criticism and friendly advice during
the project work. We are highly indebted to our project guide Ms. Merrin
Solomon for her guidance and constant supervision as well as for providing
necessary information regarding the project also for her support in working towards
the project. We also express our sincere gratitude to our friends and family who
provided us with the facilities being required and conductive conditions for our
project and being a part of the literature survey.

Date:
8th February, 2023
Shruti Sakpal, Sakshi Zagade
Abstract

Skin diseases are one of the most common types of health illnesses faced by
people for ages. The skin is vital in managing core temperature and protecting the
body from skin disorders, it’s important to keep it healthy. The identification of skin
disease mostly relies on the expertise of the doctors and skin biopsy results, which is
a time-consuming process.
Skin diseases may appear harmless, yet they can be dangerous if not treated
properly. Many diseases have early symptoms, but most of them are identical,
making it difficult to diagnose the condition at an initial point.
In recent years, with the fast advancement of technology and the use of different
data mining approaches, treatment of skin predictive classification has really become
highly predictive as well as accurate. As an outcome, automated assessment of these
illnesses has become more important due to its ability to produce accurate results in
a short space of time when applied to human analysis utilizing clinical laboratory
processes.
An automated computer-based system for skin disease identification and
classification through images is proposed to improve diagnostic accuracy as well as to
handle the scarcity of human experts.
Keywords: CNN, Deep Learning, Feature Extraction, Fast API.
Declaration
I declare that this written submission represents my ideas in my own
words and where others’ ideas or words have been included, I have
adequately cited and referenced the original sources. I also declare that
I have adhered to all principles of academic honesty and integrity and have not
misrepresented fabricated or falsified any idea/data/fact/source in my
submission. I understand that any violation of the above will be cause for
disciplinary action by the Institute and can also evoke penal action from
the sources that have thus not been properly cited or from whom proper
permission has not been taken when needed.

Shruti Sakpal – 2015061


Sakshi Zagade - 2015074

8th February, 2023


i
Contents
List of Tables iii

List of Figures iv
1
1 Introduction
1.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Project choice Rationale: . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 The Solution: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Literature Survey 3
2.1 Technical Papers. . . . . . . . . . . . . . . . . . . . . . . 3

3 Existing System 5

4 Proposed System 6

5 Requirement Analysis 7
5.1 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.2 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . 7

6 Architecture 8

7 Implementation 11
7.1 Screenshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

8 Conclusion and Future Scope 13

References 15

ii
List of Tables

6.1 Performance of models 9


iii
List of Figures
6.1 Methodology....................................................................................................8

7.1 Sample Image................................................................................................11


7.2 Real time image detection............................................................................11
7.3 Fast API Execution..........................................................................................12

iv
Chapter 1
Introduction
The skin is the substantial organ of the body, with a total area of about 20
square feet. The skin protects us from microbes and the elements, helps regulate
body temperature, and permits the sensations of touch, heat, and cold. Skin diseases
are one of the 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 body from various skin maladies which is
why the skin being healthy or illness-free is of extreme importance.

The identification of skin diseases majorly relies on the expertise of the


dermatologists and skin biopsy results, which is, usually, a very time-consuming
process. Even though skin diseases may seem harmless, they can pose a serious
health risk if not treated effectively. Early symptoms of numerous diseases are
similar, so diagnosing a disease at an early stage is challenging.

As technology continues to advance, as well as with different data mining


approaches, treatments of skin predictive classification are becoming increasingly
accurate and highly predictive. Consequently, automated assessment of these
illnesses has become more valuable due to its ability to provide accurate results
faster than human analysis involving clinical laboratories. The goal of this study is to
develop an automated image-based system for skin disease identification and
classification, which will improve diagnostic accuracy and alleviate the shortage of
human experts.

1.1 Problem Statement


The skin being the largest organ in the human body, comprises the epidermis,
dermis, subcutaneous tissues, blood vessels, lymphatic vessels, nerves, muscles etc.
Allergies, Pigmentation, Fungal development, bacteria, microbes are some of the
major grounds for the causation of several types of skin diseases in humans. Such
infections have chances of worsening as time progresses if proper treatment is not
provided immediately.

Hence, skin diseases or infections must be nursed promptly in order to avoid

1
the proliferation of such illnesses which might have fatal repercussions in the future.
Advanced techniques and procedures for the classification of such illnesses based on
Artificial Intelligence and machine learning models are now in increasing demand in
the industry. But not all of them are freely available for the commoners. For that
reason, the proponents came up with the suggestion of a CNN-based model for the
classification of different skin diseases. We introduce a multiclass CNN model that
helps categorize Healthy skin and skin being affected by 14 different classes of skin
diseases.

Our objective of the project is to detect the type of skin disease easily with
increased accuracy. The first stage includes the image of the skin disease being
subjected to various kinds of pre-processing techniques followed by feature
extraction. Then the second stage involves the Deep learning algorithms to identify
diseases based on the analysis and observance of the skin. The proposed system is
highly beneficial in rural areas where access to dermatologists is limited.

1.2 Project Choice Rationale:


We have chosen to work on the "Skin Disease Classification" project, which focuses
on using Convolutional Neural Networks for classifying skin diseases. Our main goal is
to revolutionize diagnostics by harnessing the power of CNNs. We want to make a
impact embrace technological innovation prioritize patient centered care gain
valuable insights, from data analysis contribute to global health efforts and promote
collaborative research between dermatology and artificial intelligence. This is more,
than a project; it represents our dedication to advancing care through state of
the art technology.

1.3 The Solution:


This undertaken project has the potential to revolutionize the field of skin
disease diagnostics through its technology. By utilizing Convolutional Neural
Networks (CNNs) it aims to provide timely identification of dermatological
conditions. This innovative system will analyze images of the skin delivering
precise insights, into the presence of skin diseases. The ultimate goal is to
streamline the process enabling treatment decisions and ultimately improving
patient outcomes. This project represents an approach to enhancing care by
combining cutting edge technology with a commitment, to advancing the field
and benefiting individuals affected by skin diseases.
2
Chapter 2
Literature Survey
2.1 Technical papers

1. Docaid: Predictive Healthcare Analytics Using Naive Bayes Classification (August 2013)
Authors: Zeon Trevor Fernando, Priyank Trivedi, Abhinandan Patni, Priyal Trivedi
Technology Used: Machine Learning, Visual Analytics, Naive Bayes Classification
Accuracy: 91 percent
Observations: The sophisticated tools for visual analytics, particularly of high dimensional data,
are a suitable complement to the inferences drawn from the machine learning multi-class
classification algorithm.

2. Comparison of skin disease prediction by feature selection using ensemble data mining techniques
(2019)
Authors: Anurag Kumar Vermaa, Saurabh Palb, Surjeet Kumarb
Technology Used: Six machine learning classification techniques: PAC, LDA, RNC, BNB, NB, ETC
are used to classify the prediction of skin disease, and three ensemble techniques: Bagging,
AdaBoost, and Gradient Boosting classifiers are applied to improve the accuracy obtained by
machine learning algorithms.
Accuracy: 96.71 percent
Observations: Efficient use in detecting erythmato-squamous disease, with improvement in
speed and accuracy.

3. A Smartphone-Based Skin Disease Classification Using MobileNet CNN (October 2019)


Authors: Jessica Velasco, Cherry Pascion, Jean Wilmar Alberio, Jonathan Apuang, John Stephen
Cruz, Mark Angelo Gomez, Benjamin Jr. Molina, Lyndon Tuala, August Thio-ac, Romeo Jr. Jorda
Technology Used: CNN MobileNet model, App Development
Accuracy: 94.4 percent
Observations: Oversampling and data augmentation generate the most accurate result.

3
4. The Implementation Of An Expert System In Diagnosing Skin Diseases Using The Dempster-Shafer
Method (2020)
Authors: M L C Buono, N Pandiangan, S H D Loppies
Technology Used: Dempster-Shafer Method
Accuracy: 68.8 percent
Observations: Calculation of belief and reasoning functions combine separate information
(evidence) to calculate probability functions.

5. Classification of Skin Disease Using Deep Learning Neural Networks with MobileNet V2 and LSTM
(April 2021)
Authors: Parvathaneni Naga Srinivasu, Jalluri Gnana SivaSai, Muhammad Fazal Ijaz, Akash Kumar
Bhoi, Wonjoon Kim, and James Jin Kang
Technology Used: MobileNet V2 and Long Short-Term Memory (LSTM).
Accuracy: 85.34 percent
Observations: Computationally effective, and the use of the LSTM module with the MobileNet
V2 enhances the prediction accuracy by maintaining the previous timestamp data.

6. Intelligent System for Skin Disease Prediction Using Machine Learning (2021)
Authors: Ahmed A. Elngar, Rishabh Kumar, Amber Hayat, Prathamesh Churi
Technology Used: Convolutional Neural Network, Support Vector Machine Classifier, Mobile Android
Application.
Observations: CNN and SVM are the most suitable algorithm for skin disease detection.

7. Skin Disease Detection using Machine Learning (2021)


Authors: Kritika Sujay Rao, Pooja Suresh Yelkar, Omkar Narayan Pise, Dr. Swapna Borde
Technology Used: Convolutional Neural Network
Accuracy: 93.35 percent
Observations: Validation Data makes the system more accurate

8. Detection and classification of skin diseases with ensembles of deep learning networks in medical
imaging. (2022)
Authors: A. Kalaivani, Dr. S. Karpagavalli
Technology Used: Data Mining and Ensemble Approaches
Accuracy: 96.1 percent
Observations: A multi-model ensemble approach to combine these two data mining techniques
to get the greatest accuracy of 96.1 percent.

4
Chapter 3
Existing System

1. Manual Dermatological Diagnosis:


Advantages: It depends on the knowledge and experience of dermatologists to ensure
diagnoses.
Disadvantages: Prone, to errors, which can result in differences in interpretation. Also it can
be time consuming. May not be easily scalable for handling a number of cases.

2. Traditional Imaging Techniques:


Advantages: These techniques involve using tools like dermoscopy and microscopy to capture
images of the skin.
Disadvantages: Invasive procedures may sometimes be required and these techniques may
have limitations in capturing cues. Additionally they might not always be suitable, for
real time diagnosis.

3. Methods for Biopsies:


Strengths: Offers histological data necessary for precise diagnosis.
Limitations: Not always feasible for routine screening, time-consuming, invasive, and
uncomfortable for people.

4. Manual Evaluation of the Skin:


Advantages: encourages people to keep an eye out for changes to their skin.
Limitations: Requires accurate and frequent self-examination; depends on self-awareness; may
not be useful for early detection of small changes.

5. Limited Dermatologists' Accessibility:


Advantages: Dermatologists offer specific knowledge.
Limitations include difficulties with accessibility, protracted appointment wait times, and
geographic limitations that cause delayed diagnosis and treatment.

5
Chapter 4
Proposed System
Convolutional Neural Networks (CNN):

Leveraging state-of-the-art CNN technology, "DermInsight" will employ


deep learning algorithms to analyze dermatological images. This enables
accurate and efficient classification of various skin diseases based on learned
patterns and features.
User-Friendly Interface:
This Project will feature an intuitive and user-friendly interface, ensuring
accessibility for individuals with varying levels of technological proficiency.
The design will prioritize simplicity, making it easy for users to navigate and
interact with the system.
Camera Integration:
The system will integrate seamlessly with standard cameras, such as
those on smartphones or dedicated dermatoscopes. This allows users to
capture high-quality images of their skin, facilitating easy input for disease
classification.
Real-Time Disease Prediction:
It will provide real-time disease prediction, offering instant feedback on
the likelihood of different skin conditions. This feature enables users to
receive timely information about their skin health, promoting proactive
management and early intervention.

6
Chapter 5
Requirement Analysis
1.1 Software Requirements
Software:

Python 3.7/3.8 : Generally the language of choice for machine learning today.
Tools: Google Colab And Visual Studio Code
Tensorflow: An open-source machine learning and neural network toolkit. It is
the go-to library for numerical computation and large-scale machine learning.
Fast API: FastAPI is a Python web framework that combines simplicity, performance,
and automatic documentation. It leverages Python's type hints for automatic
validation and generates interactive API documentation, making it an excellent
choice for building efficient and well-documented APIs.
Docker: Docker is a containerization platform that allows you to package
applications and their dependencies into lightweight containers. These
containers can be easily deployed and run consistently across different
environments, making it easier to manage and scale applications.
Postman: Postman provides a user-friendly interface for testing and working with APIs,
allowing users to send HTTP requests, view responses, and automate testing workflows.
Documentation tool: Overleaf

1.2 Hardware R e q u i r e m e n t s
Operating System: Windows 7 , 8, 10 (64 bit)
Hard Disk: 500GB and Above
RAM : 4GB and Above
Processor : I3 and Above
Web cam: Logitech C270 / Web Camera (960-000694)

7
Chapter 6
Architecture
The architecture of this machine learning project described in the provided text
involves multiple stages, from data collection and preprocessing to model building
and deployment using FastAPI and TensorFlow Serving. Here's an overview of the
architecture:

Figure 6.1:
Methodology

1. Data Collection and Preprocessing:


- Data is collected manually from web, consisting of approximately 3,000
dermatologically tested images of 14 different skin diseases.
- Data is randomly split into a training dataset and a testing dataset.
- The training dataset is further divided into 90% for actual training and 10% for
validation. Data augmentation techniques are applied to balance the dataset and
8
generate more images.

2. Model Building:
- The core of the architecture involves building a skin disease classification model
using Convolutional Neural Networks (CNNs).
- The CNN model is designed to capture hierarchical features in skin disease images,
using convolutional layers, max-pooling, densely connected layers, batch
normalization, and dropout layers to improve generalization and mitigate overfitting.
- The model is trained using the preprocessed dataset. Categorical cross-entropy is
used as the loss function, and an adaptive optimizer like Adam is employed to
minimize classification errors and enhance predictive capabilities.
- Hyperparameters are fine-tuned based on validation metrics, and the model's
performance is evaluated using various metrics, including accuracy and precision, to
ensure it can correctly classify skin diseases.

3. Performance of Models:
- Several different neural network architectures are tested and evaluated, including
a basic CNN model, VGG19, EfficientNetB2, and customized CNN models.
- The architecture undergoes iterative adjustments to metrics, epochs, and other
parameters to fine-tune the models.
- The best-performing model achieves an accuracy of 86%, marking a significant
milestone in the pursuit of optimal model performance.

Table 6.1: Performance of models

9
4. FastAPI and TensorFlow Serving:
- After model training, the CNN model is integrated into a FastAPI application for
real-time interactions and user experiences.
- TensorFlow Serving is introduced to handle the deployment of machine learning
models efficiently and at scale. It allows for the management of multiple model
versions.
- The system supports the creation of distinct model versions, including an original
version and a beta version. Beta users get access to cutting-edge features and
updates, while regular users use the stable, original version.
- TensorFlow Serving ensures seamless switching between model versions, making
it valuable for iterative development and feature rollout.

This architecture provides a comprehensive framework for collecting, processing,


training, and deploying a skin disease classification model, with an emphasis on
model versioning and serving to ensure a smooth and controlled deployment
process.

4. Android Application Development:

The Android application for skin disease classification utilizes a simple yet
intuitive interface, offering users two distinct options for input: capturing an image
using the device's camera or selecting an image from the gallery. Upon choosing
either option, the selected image is seamlessly transferred to the application's
backend. Here, the Convolutional Neural Network (CNN) model is deployed to
process the input image.

Leveraging the power of deep learning, the model meticulously analyzes the
image, extracting intricate patterns and features indicative of various skin conditions.
After rigorous computation, the model generates a conclusive result, accurately
classifying the skin condition depicted in the input image. This result is then
seamlessly relayed back to the frontend of the application, where it is promptly
displayed to the user. Through this seamless integration of frontend and backend
components, the application empowers users to swiftly and accurately identify skin
diseases, aiding in timely medical interventions and treatments.

10
Chapter 7
Implementation
7.1 Screenshots

Figure 7.1.1: Sample Image

Figure 7.1.2: Real time image detection with picture

The Api is used to test the model for classification by using Docker and Postman.

11
Figure 7.1.3: The server successfully able to receive image and provide a predicted class and thus
giving successful prediction code, i.e., 200 OK

12
Chapter 8
Conclusion and Future Scope
In conclusion, the Skin Disease Classification using CNN project represents a
significant stride in leveraging advanced technology for healthcare. The utilization of
Convolutional Neural Networks has proven instrumental in achieving a commendable
level of accuracy in the classification of skin diseases, offering a robust solution for
timely diagnosis. The project not only showcases the power of CNNs in discerning
complex patterns within medical images but also emphasizes the potential for
technology to enhance healthcare accessibility. By providing a user-friendly interface
for skin disease identification and classification, this project contributes to the
efficiency and effectiveness of medical diagnostics. Beyond its technical
achievements, the project has broader implications for healthcare, bridging the gap
between cutting-edge technology and the critical need for accurate and quick disease
identification in the field of dermatology.

India boasts a rich heritage of traditional natural remedies and authentic


medicinal practices that have been integral to its culture. These natural remedies,
deeply rooted in traditional medicine, continue to hold immense value as potent
medicinal resources in the country. They have proven effective in alleviating
troublesome symptoms and have been a reliable source of healthcare
for generations.

However, with the rapid pace of modernization, there is a growing concern that
the upcoming generations may lack awareness about the potent remedies available
at home. These remedies, often derived from natural sources, have the potential to
address health issues at their early stages, providing quick and effective relief.
Recognizing this gap in knowledge, our application seeks to bridge the generational
divide by not only detecting and classifying skin diseases but also by offering insights
into relevant home remedies that can be employed for holistic well-being.

Skin diseases can be influenced by various factors, both direct and indirect. These
factors include environmental conditions, food allergies, irritants, genetic makeup,
certain diseases, and the immune system. Additionally, the geographical location of
an individual can play a vital role in understanding the root cause of a skin condition.
For instance, in urban areas like Delhi, where issues like eczema and allergies are
13
exacerbated by toxic air, there is a growing concern about the impact of the
environment on skin health. This application can be implemented to further use the
user’s location as one of the parameters in classifying skin diseases, offering a more
tailored and contextualized healthcare solution.

This system can also help in providing the user with the nearby hospitals and
dermatologists details which would be helpful. This feature can serve as a valuable
resource, facilitating prompt medical attention and further enhancing the user's
experience with a seamless transition from disease detection to
medical consultation.

In essence, our application not only leverages technology to identify and


classify skin diseases but also integrates traditional wisdom and local context. By
incorporating home remedies and considering geographical factors, it strives to
empower users with a comprehensive healthcare solution that aligns with India's rich
tradition of natural remedies while addressing the evolving healthcare needs of the
present generation.

14
References
1. https://codebasics.io/blogs/programming.
2. https://codebasics.io/blog/what-is-a-neural-network
3. https://youtube.com/playlistlist=PLeo1K3hjS3uu7CxAacxVndI4bo3BDtO
4. Geron Aurelien, Hands-On Machine Learning with Scikit-Learn and
TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems,
2017.
5. Adam Gibson, Josh Patterson, Deep Learning, A Practitioner’s Approach,
Shroff Publisher /O’Reilly Publisher Media
6. https://youtube.com/playlist?list=PLeo1K3hjS3uv5U-Lmlnucd7gqF3ehIh0
7. Dan Ward, React Native Cookbook - Second Edition, 2019
8. Artemij Fedosejev, React.js Essentials: A fast-paced journey, 2015
9. https://www.frontiersin.org/articles/10.3389/fpls.2016.01419/full
10.
https://www.who.int/news-room/questions-and-answers/item/radiationultraviole
t-(uv)-radiation-and-skin-cancer
11. https://towardsdatascience.com/
12. https://cjme.springeropen.com/articles/10.1186/s10033-021-00629-5
13. Hafiz, A.M.; Bhat, G.M. A Survey of Deep Learning Techniques for Medical
Diagnosis. In Information and Communication Technology for Sustainable
Development; Advances in Intelligent Systems and Computing; Tuba, M.,
Akashe, S., Joshi, A., Eds.; Springer: Singapore, 2020; Volume 933.
14. D.A. Okuboyejo, O.O. Olugbara and S.A. Odunaike, “Automating skin
disease diagnosis using image classification,” In proceedings of the world
congress on engineering and computer science 2013 Oct 23, Vol. 2, pp.
850-854.
18
15. Avanzato, R.; Beritelli, F. Automatic ECG Diagnosis Using Convolutional
Neural Network. Electronics 2020, 9, 951. [Google Scholar]
16. A.A. Amarathunga, E.P. Ellawala, G.N. Abeysekar and C.R Amalraj,
“Expert system for diagnosis of skin diseases,” International Journal of
Scientific and Technology Research, 2015 Jan 4;4(01):174-8.
17. S. Chakraborty, K. Mali, S. Chatterjee, S. Anand, A. Basu, S. Banerjee, M.
Das and A. Bhattacharya, “Image based skin disease detection using hybrid
neural network coupled bag-of-features,” In 2017 IEEE 8th

15

You might also like