0% found this document useful (0 votes)
28 views67 pages

Skin Diseas Detection Using Machine Learning

The project report details the development of a machine learning-based system for skin disease detection using Convolutional Neural Networks (CNN). It aims to provide accurate, accessible, and early diagnosis of skin conditions, particularly for individuals in rural areas with limited access to dermatologists. The system is designed to be user-friendly, promoting health awareness and reducing the burden on healthcare systems.

Uploaded by

bht.845
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views67 pages

Skin Diseas Detection Using Machine Learning

The project report details the development of a machine learning-based system for skin disease detection using Convolutional Neural Networks (CNN). It aims to provide accurate, accessible, and early diagnosis of skin conditions, particularly for individuals in rural areas with limited access to dermatologists. The system is designed to be user-friendly, promoting health awareness and reducing the burden on healthcare systems.

Uploaded by

bht.845
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

SKIN DISEASE DETECTION

USING
MACHINE LEARNING

PROJECT REPORT
Submitted by

BALAJI.R (731321104003)
PRADEEP.M (731321104023)
VISHVASH.S (731321104037)
DILEEP.G (731321104301)

In partial fulfillment for the award of the degree


of
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING

J.K.K.NATTRAJA COLLEGE OF ENGINEERING AND TECHNOLOGY


NAMAKKAL-638183

ANNA UNIVERSITY: CHENNAI 600 025

MAY 2025
SKIN DISEASE DETECTION
USING
MACHINE LEARNING

PROJECT REPORT
Submitted by

BALAJI.R (731321104003)
PRADEEP.M (731321104023)
VISHVASH.S (731321104037)
DILEEP.G (731321104301)

In partial fulfillment for the award of the degree


of
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING

J.K.K.NATTRAJA COLLEGE OF ENGINEERING AND TECHNOLOGY


NAMAKKAL-638183

ANNA UNIVERSITY: CHENNAI 600 025

MAY 2025
ANNA UNIVERSITY:: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “SKIN DISEASE DETECTION USING


MACHINE LEARNING” is the bonafide work of BALAJI.R
(731321104003), PRADEEP.M (731320104023), VISHVASH.S
(731320104013), DILEEP.G (731320104306) who carried out the project work
under my supervision.

SIGNATURE SIGNATURE

Dr.S.MUNIYAPPAN M.E.,(Ph.D). Mrs.S.SUJI M.E.,

HEAD OF THE DEPARTMENT SUPERVISOR


Department of Computer Department of Computer Science and
Science and Engineering. Engineering

JKKN college of Engineering JKKN college of Engineering and


and Technology, Namakkal-638 Technology, Namakkal-638
183.

Submitted for University Project Viva-Voice Examination held on

Internal Examiner External Examiner


DECLARATION
We affirm that the project work titled “ SKIN DISEASE DETECTION
USING MACHINE LEARNING” being submitted in partial fulfillment for the
award of B.E (Computer Science and Engineering) is the original work carried out
by us. It has not formed the part of any other project work submitted for award of
any degree or diploma, either in this or any other university.

BALAJI.R (731321104003)
PRADEEP.M (731321104023)
VISHVASH.S (731320104013)
DILEEP.G (731320104306)

Signature of the candidates

I certify that the declaration made above by the candidate is true.

Signature of the Guide


Mrs.S.SUJI M.E.,
Assistant Professor
Department of Computer
Science and Engineering
ACKNOWLEGEMENT

I express my heartfelt thanks and submit my findings to our beloved


Chairperson, Smt.N.SENDAMARAAI for providing the necessary facilities
for the completion of this project.

I express my heartier gratitude to our beloved Managing Director,


Mr.S.OMMSAHRRAVANA for his moral support through the project.

It’s pleasure to express to my heart full thanks to our


beloved Principal, Dr.R.SIVAKUMAR MS.,Ph.D., for his constant support
this project.

I express my sincere and grateful thanks to our respected


Dr.S.MUNIYAPPAN M.E.,Ph.D the Head of the Department of Computer
Science and Engineering, who has been the moving spiriting in the
formation of the project.

I extend my sincere thanks to Mrs.S.SUJI M.E., Assistant Professor,


and Department of Computer Science and Engineering, who is the
projectcoordinator giving valuable suggestion to complete the project.
TABLE OF CONTENT

CHAPTE TITLE PAG


R NO E NO

ABSTRACT V

LIST OF FIGURES IX

LIST OF TABLES X

LIST OF ABBREVIATIONS XI

1. INTRODUCTION 09
1.1 OBJECTIVES 10
1.2 PROBLEM DEFINITION
1.3 OVERVIEW OF PROJECT

2. LITERATURE REVIEW 11
2.1 SUPERVISED MACHINE LEARNING
CHATBOTS FOR PERINATAL MENTAL HEALTH
CARE

2.2 MENTAL AND PHYSICAL HEALTH


MANAGEMENT SYSTEM USING ML
2.3 MOBILE MENTAL HEALTH: A REVIEW OF
APPLICATION FOR DEPRESSION ASSISTANCE

2.4 A CHATBOT FOR PSYCHIATRIC COUNSELING IN


MENTAL HEALTH CARE SERVICE BASED
ON EMOTIONAL DIALOGUE ANALYSIS
AND SENTENCE GENERATION DATA SCIENCE
IN PUBLIC MENTAL HEALTH: A NEW ANALYTIC
FRAMEWORK
3. PROJECT METHODOLOGY 13
3.1 EMPHATHIZE 14
3.2 DEFINE 16
3.3 IDEATE
3.4 PROTOTYPE 17
3.5 TESTING
4. SYSTEM ANALYSIS 19
4.1 FEASIBILITY STUDY

4.2 EXISTING SYSTEM 21

4.3 DRAWBACKS

4.4 PROPOSED SYSTEM 22

4.4.1 ADVANTAGES

5. SYSTEM DESIGN 23
5.1 ARCHITECTURE DIAGRAM

6. REQUIREMENRT SPECIFICATION 24
6.1 SOFTWARE REQUIREMENT

6.2 SOFTWARE DESCRIPTION

7. SYSTEM IMPLEMENTATION 26
8. SYSTEM TESTING 29
8.1 UNIT TESTING 30

8.2 USER ACCEPTANCE TESTING 31

9. CONCLUSION & FUTURE WORK 32


9.1 CONCLUSION

9.2 FUTURE ENHANCEMENT 33

10. APPENDIX
10.1 SOURCE CODE 34

10.2 SCREENSHOT 60

REFERENCES 65
ABSTRACTw
Skin diseases are among the most common health issues faced by people worldwide, ranging
from mild conditions like rashes to more serious infections and chronic disorders. Accurate
and timely diagnosis is essential to begin treatment early and avoid complications. However,
in many cases, access to dermatologists and diagnostic facilities is limited, especially in rural
and underdeveloped regions. To address this challenge, this project proposes a machine
learning-based system for skin disease detection using image classification techniques. The
system is developed using a Convolutional Neural Network (CNN), a deep learning model
particularly effective in analyzing visual data. The model is trained on a diverse dataset
containing labeled images of various skin diseases such as eczema, psoriasis, ringworm, and
others. When a user uploads an image of an affected skin area, the system processes the image
and predicts the most probable disease class with significant accuracy. This approach serves as
a preliminary diagnostic tool, providing users with helpful insights before they consult a
medical professional. It is designed to be user- friendly, efficient, and accessible, aiming to
support early detection, reduce the burden on healthcare systems, and promote health
awareness among the general public. By integrating artificial intelligence with healthcare, this
project demonstrates how technology can play a crucial role in enhancing medical support,
particularly in areas lacking expert resources.
CHAPTER 1

INTRODUCTION

1.1 OBJECTIVES

The main objective of this project is,


• To detect skin diseases using machine learning.
• To classify skin conditions from image inputs.
• To use CNN for accurate image analysis.

• To create a simple and user-friendly system..


• To help users in remote areas get quick results.
• To promote early detection and awareness.

1.2 PROBLEM DEFINITION

Skin diseases affect millions of people worldwide, causing discomfort


and sometimes leading to severe health complications if not diagnosed and
treated early. Despite their prevalence, many individuals especially those
living in rural or underdeveloped areas face limited access to qualified
dermatologists and proper diagnostic facilities. This lack of timely and
accurate diagnosis often results in delayed treatment, worsening the
condition and increasing the burden on healthcare systems.

Traditional methods of skin disease diagnosis rely heavily on clinical


examination and expert knowledge, which are not always readily available to
everyone. Moreover, manual diagnosis can be time-consuming and
subjective, leading to inconsistencies in results. To overcome these
challenges, there is a need for an automated, reliable, and user-friendly
solution that can assist in early detection of skin diseases, making healthcare
more accessible and efficient for all populations.

9
1.3 OVERVIEW OF PROJECT
Skin diseases are one of the most common health problems worldwide,
affecting people of all ages and backgrounds. Early and accurate diagnosis is
crucial for effective treatment and prevention of further complications. However,
access to dermatologists and specialized diagnostic tools remains limited in many
rural and underdeveloped areas. To address this issue, this project proposes the
development of an automated skin disease detection system using machine
learning, specifically through a Convolutional Neural Network (CNN). The CNN
model is capable of analyzing visual data such as skin images and classifying
them into different disease categories like eczema, psoriasis, ringworm, and
others. By training the model on a large and diverse dataset, the system can
provide reliable and efficient preliminary diagnoses, thereby assisting users in
identifying their conditions early without the immediate need for a doctor’s visit.
The project aims to deliver a simple, user-friendly interface where users can
upload images of their skin conditions and receive instant predictions with a
confidence score, promoting awareness and encouraging timely medical
consultation.
This project bridges the gap between advanced technology and healthcare
accessibility by providing a scalable solution that can be deployed widely,
including in resource-constrained regions. By leveraging AI-powered image
classification, the system helps reduce the workload on healthcare professionals
and minimizes the time and cost involved in traditional diagnosis methods. The
integration of this technology promotes health education and empowers users to
monitor their skin health independently. Furthermore, the project is designed
with future scalability in mind enabling the addition of more skin disease
categories, multi-language support, and integration with telemedicine platforms
for remote expert consultations. Overall, this initiative highlights the potential of
artificial intelligence to revolutionize medical diagnostics, improve healthcare
delivery, and contribute to public health advancements globally.

10
CHAPTER 2

LITERATURE REVIEW

2.1 TITLE: SKIN DISEASE DETECTION USING


CONVOLUTIONAL NEURAL NETWORKS

AUTHOR: A. Esteva, B. Kuprel, R.A. Novoa, et al.

DESCRIPTION: A. Esteva, B. Kuprel, R.A. Novoa, et al. Esteva et al.


developed a deep learning model based on Convolutional Neural Networks
to classify skin cancer from clinical images with dermatologist-level
accuracy. Their system was trained on a large dataset of labeled skin lesion
images and demonstrated how AI can assist in early skin cancer detection,
reducing the need for invasive biopsies. This work highlights the potential
of CNNs in automated skin disease diagnosis, which forms the foundation
for further research in this domain.

2.2 TITLE: AUTOMATED CLASSIFICATION OF SKIN LESIONS


USING DEEP LEARNING

AUTHOR: M. Codella, D. Nguyen, A. Pankanti

DESCRIPTION: This research focuses on using deep learning


architectures for classifying various skin lesions, including melanoma and
benign nevi. They combined CNN models with image preprocessing
techniques to improve classification accuracy. Their approach provides an
effective tool for preliminary diagnosis, which can help non-experts and
support healthcare professionals.

11
2.3 TITLE: MACHINE LEARNING FOR
DERMATOLOGY: A SYSTEMATIC REVIEW

AUTHOR: T. Tschandl, C. Codella, N. Akay

DESCRIPTION: Tschandl et al. reviewed numerous machine learning


techniques applied in dermatology, emphasizing image classification for
skin disease detection. The paper discusses challenges such as dataset
biases, variability in skin tones, and the importance of large annotated
datasets. They recommend integrating AI tools into clinical workflows to
assist dermatologists and improve patient outcomes.

2.4 TITLE: Skin Disease Diagnosis With Transfer Learning And Cnns

AUTHOR: S. R. Goyal, P. S. Raheja

DESCRIPTION: This study explores the use of transfer learning on pre-


trained CNN models for skin disease classification. Using datasets with
multiple skin disease categories, the authors achieved improved diagnostic
accuracy and faster model convergence. Their work suggests that transfer
learning can reduce the need for extensive dataset collection while
maintaining robust performance.
2.5 TITLE: MOBILE-BASED SKIN DISEASE DETECTION USING
MACHINE LEARNING

AUTHOR: M. A. Rahman, S. S. Islam

DESCRIPTION: Rahman and Islam developed a mobile application


integrating a CNN-based model to detect common skin diseases from
images taken by smartphone cameras. The app aims to provide accessible
diagnostic support in regions with limited healthcare facilities. This project
reflects the increasing trend of AI-powered healthcare solutions delivered
via mobile platforms, increasing accessibility and user engagement.

12
CHAPTER 3

PROJECT METHODOLOGY

Our project employs the Design Thinking methodology to develop an AI-


powered skin disease detection system using image classification. Design
Thinking is an iterative and user focused approach that helps us ensure our
solution is both practical and impactful, especially in healthcare settings.

1. Human-Centered Approach

We begin by understanding the real-world challenges faced by individuals


suffering from skin diseases, especially those in remote or underserved regions.
By empathizing with patients who lack access to dermatologists, we focus on
creating a solution that addresses their need for early and accessible diagnosis.
This human-centered approach ensures the system is user-friendly and beneficial
to those who need it most.

2. Iterative Prototyping

We use rapid prototyping techniques to build and test the image


classification model. Starting with a basic CNN architecture, we iteratively
improve its accuracy and performance based on dataset validation results.
Prototypes of the user interface are also tested for ease of use, ensuring that the
system can be navigated even by non-technical users.
3. Creative Problem Solving
Detecting skin diseases from images needs smart solutions.
We test models and techniques to improve accuracy across skin tones.

13
4. Collaborative Approach

Our methodology includes collaboration with individuals from diverse


domains including medical professionals, AI engineers, UI/UX designers, and
potential users. Dermatologists help validate the dataset and results, while
technical experts fine-tune the model. This interdisciplinary teamwork ensures
the system is both clinically relevant and technically sound.

5. Emphasis on Empathy
Understanding the emotional and psychological stress caused by
visible skin conditions, our design emphasizes empathy in its interface and
results presentation. The system avoids alarming language and provides
suggestions encouraging users to consult medical professionals, ensuring a
supportive experience rather than just a clinical one.

6. User Engagement and Adoption


We involve end-users throughout the design process from feedback
on interface usability to their concerns about accuracy and privacy. This
continuous engagement ensures the solution is built around user needs,
increasing its acceptance and real-world impact. A mobile-first design
further ensures accessibility, even in low-resource settings.

EMPHATHIZE
In our commitment to addressing the widespread and often overlooked
impact of skin diseases, we adopt design thinking as the cornerstone of our
development process, blending empathy with cutting-edge artificial
intelligence to build a user-centered image-based diagnostic system. Through in-
depth empathetic research, we explore the daily challenges faced by individuals
suffering from skin conditions ranging from physical discomfort to emotional
distress and social stigma. This understanding allows us to shape a solution that

14
resonates not only medically but also emotionally, ensuring that users feel
supported and understood.
By defining the problem through the lens of real human experience, we uncover
needs that go beyond clinical accuracy such as accessibility, reassurance, and
trust. Our ideation is rooted in interdisciplinary collaboration across medicine,
AI, UX design, and public health, enabling the creation of an inclusive and
compassionate system. We prototype and refine our CNN-based model and
interface iteratively, incorporating feedback from users and healthcare
professionals to ensure relevance, usability, and emotional sensitivity. By
aligning with design thinking principles, we deliver a solution that goes beyond
diagnosis fostering awareness, confidence, and early intervention, particularly
in communities with limited access to dermatological care.

DEFINE
Based on extensive observation, interviews, and data analysis, we have
identified the core problem our project aims to solve: the lack of accessible,
reliable, and early diagnostic support for skin diseases. In many regions,
especially rural and underdeveloped areas, access to dermatologists is limited,
leading to delayed diagnosis and treatment. Many individuals ignore or
misdiagnose their skin conditions due to a lack of awareness or reliance on
general remedies, which can result in complications or worsening of the disease.
The absence of a quick, non-invasive, and accurate screening method has created
a gap in healthcare that our system seeks to fill using artificial intelligence.

Our AI-based skin disease detection system is particularly designed for


individuals from underserved communities, including those from rural
regions, low-income households, and populations with limited digital health
literacy. These groups often face challenges in accessing specialist care due to
high costs, long travel distances, or stigma around visible skin conditions. We

15
also consider tech-savvy urban users who prefer quick online screening tools
before deciding whether to consult a doctor. The solution is meant to be
inclusive, easy to use, and scalable to support diverse age groups and skin tones,
thereby making dermatological help more equitable and accessible.

The primary needs and expectations of our target users include accurate
detection, instant feedback, and simple, non-technical interaction with the
system. Users seek reassurance and guidance when they notice skin
abnormalities, and they want a system that is both informative and respectful of
their privacy. Our tool not only predicts the skin disease class from an uploaded
image but also educates users about the condition, encouraging them to take
further steps such as seeing a doctor if necessary. By fulfilling these needs, our
system offers an early intervention platform that promotes health awareness,
reduces the burden on healthcare systems, and empowers users to take proactive
control over their skin health.

16
IDEATE
To address the lack of quick skin disease diagnosis, we planned an AI-
based system using CNN to identify diseases from skin images. The goal
was to offer users fast, reliable, and easy-to-understand results.

We discussed building a simple app where users upload photos, and the
model predicts the disease. To improve clarity, we considered adding plain-
language descriptions and basic care suggestions.

We also explored features like role-based access for patients and doctors,
language support, and data privacy to make the system more secure,
accessible, and user-friendly.

PROTOTYPE
To build an effective skin disease detection tool, we followed a design thinking
approach focused on both functionality and user comfort. Using feedback from
users and healthcare professionals, we developed a prototype that allows image
uploads and predicts skin conditions using a CNN model.

In each version, we added useful features like disease highlights, simple


explanations, and next-step suggestions. User testing helped us improve design,
fix confusing elements, and make the tool easier to use especially for non-medical
users.

17
This prototype phase helped us shape a system that is not only accurate but also
user-friendly, accessible, and emotionally supportive, making it a valuable step
toward real-world healthcare use.

TESTING
To evaluate the performance and user-friendliness of our skin disease
detection using machine learning system, we conducted multiple rounds of
testing guided by the principles of design thinking. We collected feedback from
users especially those with limited access to dermatologists to understand their
expectations, challenges, and emotional responses. The system was tested using
both curated datasets and real-world images to assess the CNN model’s accuracy
and how effectively the predictions were communicated to users.

User feedback was crucial in refining the interface, simplifying medical terms,
and improving response clarity. We used metrics such as prediction accuracy,
ease of navigation, and user trust to measure system performance. Through this
iterative testing process, we ensured the platform remains accessible, relevant,
and supportive making it a dependable early diagnostic tool for individuals
seeking quick insights into skin-related issues.

18
CHAPTER 4
SYSTEM ANALYSIS
4.1 FEASIBILITY STUDY

In many rural and underdeveloped areas, timely and accurate diagnosis of


skin diseases is challenging due to the shortage of dermatologists and diagnostic
facilities. To address this, our feasibility study proposes the development of an
AI-powered Skin Disease Detection System using Convolutional Neural
Networks (CNNs) as a cost-effective and scalable solution. This system acts as a
preliminary diagnostic tool, allowing users to upload images of affected skin areas
and receive instant predictions for conditions like eczema, psoriasis, or ringworm.
Through a simple and user-friendly web or mobile interface, it minimizes the need
for immediate physical consultations, promotes early detection, and eases the
burden on the healthcare system. The machine learning model continuously
improves prediction accuracy over time, while secure data handling ensures user
privacy and builds trust, making it an accessible and impactful tool for both urban
and rural populations.
Three key considerations involved in the feasibility analysis are,

• ECONOMICAL FEASIBILITY

• OPERATIONAL FEASIBILITY

• TECHNICAL FEASIBILITY

ECONOMICAL FEASIBILITY

The implementation of the Skin Disease Detection System is cost-effective


in the long run due to early diagnosis reducing expensive treatments and doctor visits.
Initial development and deployment costs are justified by improved healthcare access
and scalability. Funding can be sourced through healthcare innovation grants or public
health budgets, making the solution economically viable.

19
OPERATIONAL FEASIBILITY

The operational feasibility of the Skin Disease Detection System


involves evaluating its practicality and effectiveness within existing
healthcare infrastructure. Key factors include availability of internet access,
ease of use for non-expert users, and support from healthcare providers. A
cost-benefit analysis ensures that the system’s benefits outweigh
implementation efforts. Compliance with data privacy and security standards
is essential. The system is designed to be scalable, accommodating
increasing users and expanding disease databases over time.

TECHNICAL FEASIBILITY
He technical feasibility study for the Skin Disease Detection System
involves assessing the availability and adequacy of technology infrastructure to
support AI-based image processing. Key factors include sufficient server capacity,
internet bandwidth, and computing power to handle image uploads and CNN
model inference. The study also evaluates the capability to integrate machine
learning frameworks and maintain the system’s accuracy through regular model
updates. By conducting this assessment, potential technical challenges can be
identified early, ensuring that all necessary technological requirements are met for
a smooth and successful deployment.

20
4.2 EXISTING SYSTEM

There are several AI-powered skin disease detection apps that help
users identify and manage common skin conditions. These apps typically
offer a user-friendly interface where users can upload images of their skin
issues for analysis. Using machine learning models, they provide preliminary
diagnoses and suggest possible conditions such as eczema, psoriasis, or fungal
infections. Many apps include educational content about skin health,
prevention tips, and recommended treatments. Some systems also offer
progress tracking, allowing users to monitor changes in their skin condition
over time. These existing solutions help raise awareness and promote early
detection, but they vary in accuracy and often recommend consulting a
dermatologist for confirmation.

4.3 DRAWBACKS

• The system may have limitations in accurately diagnosing rare or


complex skin diseases.
• Reliance on AI predictions rather than direct examination by
dermatologists could lead to misdiagnosis.
• Potential privacy concerns related to uploading sensitive skin images and
personal data.
• The app may not replace professional medical advice and should be
considered only a preliminary tool.
• Users with severe or unclear symptoms still need to seek expert
consultation.
• The initial development and maintenance of the AI system can incur
significant costs.

21
4.4 PROPOSED SYSTEM
The proposed AI-powered Skin Disease Detection System offers a user-
friendly interface where users can easily upload images of affected skin areas.
Using advanced Convolutional Neural Networks (CNN), the system analyzes
the images to detect and classify various skin diseases such as eczema,
psoriasis, and ringworm. Upon analysis, it provides an instant preliminary
diagnosis along with suggestions for possible next steps, such as consulting a
dermatologist. The system continuously improves its accuracy by learning from
new data and user feedback. It ensures user privacy by securely handling
sensitive image data. Additionally, the platform can offer educational
information about detected conditions to raise awareness. Collaboration with
dermatology experts guides the model development and validates the diagnostic
outputs, ensuring reliability and medical relevance. Overall, the system aims to
facilitate early detection, reduce healthcare burdens, and improve accessibility
to skin health care, especially in underserved areas.

4.4.1 ADVANTAGES

• Provides instant analysis and preliminary diagnosis of skin diseases from


uploaded images

• Offers accessible skin health support, especially in areas lacking


dermatologists.
• Continuously improves accuracy by learning from new data and user
feedback.

• Ensures user privacy with secure handling of sensitive image data.

• Educates users about detected skin conditions, promoting awareness


and early treatment.
• Reduces unnecessary hospital visits by filtering minor cases and
prioritizing critical ones.
22
CHAPTER 5
SYSTEM DESIGN

5.1 ARCHITETCURE DIAGRAM

Figure 5.1: ARCHITETCURE DIAGRAM

23
5.2 ARCHITECTURE DIAGRAM

Figure 5.2 USE CASE DIAGRAM

24
CHAPTER 6

REQUIREMENT SPECIFICATION
6.1 SOFTWARE REQUIREMENT

➢ FRONT END : HTML, CSS,


JAVASCRIPT, BOOTSTRAP

➢ BACK END : PYTHON, FLASK, FASTAPI,


DJANGO, TENSORFLOW

➢ NLP LIBRARIES : NATURAL LANGUAGE


TOOL KIT,

➢ ML FRAMWORKS : TENSORFLOW

➢ UI DESIGN TOOLS : FIGMA

➢ VERSION CONTROL : GIT

6.2 SOFTWARE DESCRIPTION

Our AI-powered Skin Disease Detection System is an innovative tool


designed to provide preliminary analysis and guidance for individuals
concerned about skin-related issues. By leveraging advanced machine
learning algorithms, specifically Convolutional Neural Networks (CNNs), the
system accurately analyzes uploaded skin images to identify common
conditions such as eczema, psoriasis, ringworm, and more.

25
The platform features a user-friendly web or mobile interface that allows users
to upload images conveniently and receive real-time feedback on potential
skin diseases. This instant assessment aids in early detection and reduces the
dependency on immediate physical consultations, especially in underserved
areas with limited access to dermatologists.

Through continuous learning and improvement from a growing dataset, the


system enhances its accuracy over time. All user data is handled with strict
confidentiality to ensure privacy and trust. By offering timely insights and
educational resources, our AI-powered solution empowers individuals to take
proactive steps in managing their skin health, supporting both awareness and
early intervention.

26
CHAPTER 7
SYSTEM IMPLEMENTATION

The implementation of the AI-powered Skin Disease Detection System


using Machine Learning involves deploying a Convolutional Neural Network
(CNN) model trained on a large dataset of labeled skin disease images. Users
can upload images of affected skin areas through a user-friendly web or
mobile interface, where the system preprocesses and analyzes the images to
provide instant predictions for conditions such as eczema, psoriasis, or
ringworm. The model is hosted on a secure, cloud-based platform to ensure
scalability and fast response times. Strong data privacy measures, including
encryption and user anonymity, are integrated to protect sensitive health
information. Continuous improvements are made by incorporating user
feedback and updating the model with new data, while ethical considerations
ensure transparency and reinforce that the tool serves as a preliminary
diagnostic aid, not a substitute for professional medical consultation.

27
1. Coding

Choose programming languages and frameworks suitable for image


processing and machine learning such as Python with TensorFlow or PyTorch.
Develop modules for image preprocessing, CNN model training, image
classification, and a user interface for uploading images and displaying results.

2. Testing

Conduct unit tests for preprocessing and model components to ensure


proper functioning. Perform integration testing to validate the complete
pipeline from image upload to disease prediction. Conduct user acceptance
testing (UAT) with representative users to ensure system usability and
accuracy.

3. Installation

Deploy the skin disease detection system on a reliable cloud platform


such as AWS, Google Cloud Platform, or Microsoft Azure. Set up the
necessary infrastructure components including servers to host the CNN
model, storage for the image dataset, and APIs for communication between
the frontend and backend. Use containerization tools like Docker for
consistent deployment and Kubernetes to manage scaling and availability,
ensuring the system can handle multiple user requests simultaneously.

4. Documentation

Prepare clear documentation covering system setup, user instructions for


uploading images and understanding results, plus API details and
troubleshooting tips for common issues.

28
5. Training
Train the convolutional neural network model on a comprehensive
labeled dataset of various skin diseases to ensure high accuracy. Continuously
fine-tune the model using new data collected from user feedback and
additional validated images to improve performance over time. Offer training
sessions or tutorials for healthcare professionals on how to use the system
effectively as a supportive tool in early diagnosis.

6. Support
Establish support channels such as email, chat, or a helpdesk where users
can report technical issues or ask questions about using the system. Implement
a ticketing system to manage and prioritize user requests and ensure timely
resolution. Regularly update the system to fix bugs, improve features, and
integrate advancements in AI and dermatological research to maintain
effectiveness and user satisfaction.

29
CHAPTER 8
SYSTEM TESTING

Verify that the skin disease detection system accurately classifies


images and provides correct predictions for various skin conditions like
eczema, psoriasis, and ringworm. Test all features including image upload,
preprocessing, disease prediction, and result display for functionality and
user-friendliness. Evaluate the user interface for ease of use, ensuring users
can easily upload images and understand the diagnosis results.

Test the system across different devices and browsers to ensure


compatibility and consistent performance. Measure the model’s prediction
response time to guarantee timely feedback. Monitor server performance
under multiple concurrent user requests to prevent delays or crashes.
Ensure that user-uploaded images and data are securely stored and
protected from unauthorized access, implementing encryption and privacy
safeguards.

Conduct vulnerability assessments to identify and mitigate security


risks such as data leaks or unauthorized data access. Evaluate the model’s
accuracy by comparing predictions with dermatologist-labeled data or
standard medical references. Ensure the system clearly communicates that
its results are preliminary and not a substitute for professional medical
advice.
Collect user feedback to assess usability and accuracy, and identify areas for
improvement. Perform integration testing to ensure smooth interaction between
frontend, backend, and model components.
-----

30
This project has undergone the following testing procedures to ensure its
correctness and reliability:

• Unit testing

• User acceptance testing

• Integration Testing

8.1 UNIT TESTING


Unit testing was conducted on individual components of the skin
disease detection system to ensure proper functionality and reliability. The
image upload module was tested with both valid and invalid image files to
confirm appropriate handling and error messages. The image preprocessing
pipeline was verified to ensure correct resizing, normalization, and
preparation of inputs for the CNN model. The model itself was tested to
validate accurate predictions across various skin disease classes using
labeled sample images. Edge cases, such as blurry or low-quality images,
were tested to ensure the system responds gracefully without crashing.
Additionally, all error handling mechanisms were evaluated to confirm that
any failures are caught and clearly communicated to the user, allowing
smooth recovery and system stability.

31
8.2 USER ACCEPTANCE TESTING

User Acceptance Testing (UAT) for the AI-powered skin disease


detection system was conducted to ensure the application meets user
expectations and functional requirements. The testing began by defining key
objectives, expected outcomes, and common use-case scenarios, such as
uploading skin images and receiving accurate disease predictions. Functional
testing was performed to evaluate the system’s ability to process various
image inputs and deliver consistent and reliable diagnostic suggestions for
conditions like eczema, psoriasis, and ringworm. Usability testing focused on
assessing the user interface for simplicity, ease of navigation, and the clarity
of instructions and results. Performance testing was carried out to examine
system responsiveness, loading speed, and stability when handling multiple
user interactions. Security and privacy aspects were also tested to ensure
uploaded images and personal data are encrypted and protected according to
standard data protection practices. Feedback from test users was collected to
identify areas of improvement, ensuring the system is practical, accurate, and
user-friendly before full deployment.

32
CHAPTER 9

CONCLUSION & FUTURE WORK


9.1 CONCLUSION

The AI-powered skin disease detection system presents a significant step


forward in improving early diagnosis and awareness of common
dermatological conditions. By leveraging Convolutional Neural Networks
(CNN), the system provides accurate, fast, and accessible preliminary
diagnostic support for users, especially in remote and underserved areas
where access to dermatologists is limited. The user-friendly interface, secure
cloud-based deployment, and real-time prediction capability make this
solution practical for both personal use and integration into larger healthcare
systems. The system is not a replacement for professional medical advice but
serves as a supportive tool to promote timely treatment and reduce
complications.

Overall, this project demonstrates the potential of combining artificial


intelligence with healthcare to create cost-effective, scalable, and efficient
solutions for global health challenges. It empowers users to take proactive
steps in managing their skin health and increases awareness about common
skin diseases. The system not only supports individuals but also reduces the
burden on healthcare providers by assisting in early screening and prioritizing
urgent cases.

33
9.2 FUTURE ENHANCEMENT

• Create a dedicated mobile app to allow users to upload skin images


instantly, improving accessibility and user convenience.
• Migrate the system to a cloud-based infrastructure to enhance
scalability, performance, and real-time access from any location.
• Train the CNN model on a larger and more diverse dataset to improve
accuracy and support detection of a wider range of skin diseases.
• Add support for multiple languages, voice input, and user-friendly design
to cater to diverse populations, including rural and non-English speaking
users.
• Implement stronger security features such as two-factor authentication,
encrypted image storage, and compliance with healthcare data
protection standards.

34
APPENDIX

CHAPTER 10

10.1 SOURCE CODE

FRONTEND

index.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- bootstrap cdn link -->
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet">
<!-- font awesome cdn link -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/5.15.3/css/all.min.css">
<!-- custom css file link -->
<link rel="stylesheet" href="/Front-end/style.css">
</head>
<body>

<!-- header section starts -->

<header class="fixed-top py-3">


35
<div class="container d-flex align-items-center justify-content-between">
<a href="#" class="logo">Skin Care<span class="fas fa-bacteria"></span></a>
<div id="menu-bar" class="fas fa-bars d-inline-block d-md-none"></div>
<nav class="nav">

<a href="#home">home</a>

<a href="#about">about</a>

<a href="#prevent">skin type and disease</a>

<a href="#check">check my skin type</a>

<a href="#experts">Our Team</a>

<a href="#contact">contact</a>

</nav>

</div>

</header>

<!-- header section end-->


<!-- home section starts -->

<section class="home" id="home">


<div class="container">
<div class="row min-vh-100 align-items-center pt-5">
<div class="col-md-6">
<img src="/Images/istockphoto-1248674930-612x612-removebg-
preview.png" class="w-100" alt="">
</div>
<div class="col-md-6 content text-center text-md-start pl-md-5">
<span>your skin is your best accessory </span>
36
<h3>protect yourself from skin disease</h3>
<a href="#" class="link-btn">learn more</a>
</div>
</div>
</div>
</section>

<!-- home section ends -->


<!-- home section starts -->
<section class="about" id="about">
<div class="container">
<div class="row align-items-center flex-wrap-reverse">
<div class="col-md-6 content">
<h3>What are Skin Diseases?</h3>
<p>Skin diseases are conditions that affect your skin. These diseases may
cause rashes, inflammation, itchiness or other skin changes. Some skin conditions
may be genetic, while lifestyle factors may cause others. Skin disease treatment may
include medications, creams or ointments, or lifestyle changes.</p>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Consectetur
ipsam totam, vero cum eius tenetur! Possimus animi dolorem voluptate.
Accusamus!</p>
<a href="#" class="link-btn">learn more</a>
</div>
<div class="col-md-6">
<img src="/Images/conifer-1127-removebg-preview.png" class="w-100"
alt="">
</div>
</div>
</div>
</section>
37
<!-- about section ends -->
<!-- prevent section starts -->

<section class="prevent" id="prevent">


<h1 class="heading"> <span>Skin Type and Skin Diseases</span> </h1>
<div class="container">
<div class="d-flex flex-wrap justify-content-center">
<div class="box p-4 m-2">
<img src="/Images/dry.png" alt="">
<h3>wear a mask</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloribus,
illo.</p>
</div>
<div class="box p-4 m-2">
<img src="/Images/acne.png" alt="">
<h3>wear a mask</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloribus,
illo.</p>
</div>
<div class="box p-4 m-2">
<img src="/Images/Normal.png" alt="">
<h3>wear a mask</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloribus,
illo.</p>
</div>
<div class="box p-4 m-2">
<img src="/Images/oily.png" alt="">
<h3>wear a mask</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloribus,
illo.</p>
38
</div>
<div class="box p-4 m-2">
<img src="/Images/Normal.png" alt="">
<h3>wear a mask</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloribus,
illo.</p>
</div>
<div class="box p-4 m-2">
<img src="/Images/Sensitive.png" alt="">
<h3>wear a mask</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloribus,
illo.</p>
</div>
<div class="box p-4 m-2">
<img src="/Images/acne.png" alt="">
<h3>wear a mask</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloribus,
illo.</p>
</div>
</div>
</div>
</section>

<!-- prevent section ends -->


<!-- check -->

<section class="check" id="check">


<h1 class="heading"> <span>Check Your Skin Type</span> </h1>
<input type="file" id="real-file" hidden="hidden" />
<center><button type="button" id="custom-button">Choose A
File</button></center>
39
<br><br>
<center><button type="submit" id="submit-button">Submit</button></center>
</section>

<!-- check ends -->


<!-- experts section starts -->

<section class="experts" id="experts">


<h1 class="heading"> meet our <span>Team</span> </h1>
<div class="container">
<div class="d-flex justify-content-center flex-wrap">
<div class="box">
<img src="/Images/42-420024_businessperson-computer-icons-
woman-laborer-free-commercial-clip.png" alt="">
<h3>mahima khatri</h3>
<span>Lorem ipsum dolor sit amet.</span>
<div class="share">
<a href="#" class="fab fa-instagram"></a>
<a href="#" class="fab fa-linkedin"></a>
</div>
</div>
<div class="box">
<img src="/Images/560-5608215_laughing-woung-man-clipart-strong-
person-clipart-png.png" alt="">
<h3>mudit jindal</h3>
<span>Lorem ipsum dolor sit amet.</span>
<div class="share">
<a href="#" class="fab fa-instagram"></a>
<a href="#" class="fab fa-linkedin"></a>
</div>
40
</div>

<div class="box">
<img src="/Images/42-420024_businessperson-computer-icons-
woman-laborer-free-commercial-clip.png" alt="">
<h3>charvy gugalia</h3>
<span>Lorem ipsum dolor sit amet.</span>
<div class="share">
<a href="#" class="fab fa-instagram"></a>
<a href="#" class="fab fa-linkedin"></a>
</div>
</div>
</div>
</div>
</section>

<!-- experts section ends -->


<!-- contact section starts -->

<section class="contact" id="contact">


<h1 class="heading"> <span>contact</span> Us </h1>
<div class="container">
<div class="row flex-wrap-reverse">
<div class="col-md-7 p-2">
<form action="">
<input type="text" placeholder="name" class="box">
<input type="email" placeholder="email" class="box">
<input type="number" placeholder="number" class="box">
<textarea name="" placeholder="message" id="" cols="30"
rows="10"></textarea>
41
<input type="submit" class="link-btn" value="send message"
name="" id="">
</form>
</div>
<div class="col-md-5 p-2">
<iframe class="map"
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d30153.788252
261566!2d72.82321484621745!3d19.141690214227783!2m3!1f0!2f0!3f0!3m2!1i1
024!2i768!4f13.1!3m3!1m2!1s0x3be7b63aceef0c69%3A0x2aa80cf2287dfa3b!2sJo
geshwari%20West%2C%20Mumbai%2C%20Maharashtra%20400047!5e0!3m2!1se
n!2sin!4v1627060527760!5m2!1sen!2sin" allowfullscreen=""
loading="lazy"></iframe>
</div>
</div>
</div>
</section>

<!-- contact section ends -->


<!-- footer section starts -->
<section class="footer">
<div class="container">
<div class="d-flex flex-wrap justify-content-center text-center text-sm-
start">
<div class="box p-3 m-2">
<h3>Skin Care</h3>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.
Accusantium, vitae.</p>
</div>

42
<div class="box p-3 m-2">
<h3>quick links</h3>
<a href="#">home</a>
<a href="#">about</a>
<a href="#">skin type and disease</a>
<a href="#">check my skin type</a>
<a href="#">our team</a>
<a href="#">contact us</a>
</div>
<div class="box p-3 m-2">
<h3>Connect with us</h3>
<a href="#">facebook</a>
<a href="#">instagram</a>
<a href="#">linkedin</a>
<a href="#">twitter</a>
</div>
<div class="box p-3 m-2">
<h3>contact info</h3>
<a href="#">+123-456-9999</a>
<a href="#">+111-222-3333</a>
<a href="#">[email protected]</a>
<a href="#">delhi, india - 110000</a>
</div>
</div>
<div class="credit"> created by <span>Mahima Khatri</span> | all rights
reserved </div>
</div>
</section>

43
<!-- footer section ends -->
<!-- js file link -->
<script src="/Front-end/main.js"></script>
</body>
</html>

44
Style.css

:root{
--main-color:#926ad4;
--black:#244361;
--box-shadow:0 5px 10px rgba(0,0,0,.1);
}
*{
margin:0; padding:0;
box-sizing: border-box;
outline: none; border:none;
text-decoration: none !important;
text-transform: capitalize;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
html{
scroll-padding-top: 60px;
}
section{
padding:20px 0;
}
section:nth-child(odd){
background:white;
}
.heading{
text-align: center;
padding:0 15px;
padding-bottom: 5px;
color:var(--black);
font-size: 30px;
45
}
.heading span{
color:var(--main-color);
}
.link-btn{
display: inline-block;
background:var(--main-color);
color:#fff;
border-radius: 50px;
padding:10px 25px;
font-size: 17px;
cursor: pointer;
box-shadow: var(--box-shadow);
}
.link-btn:hover{
color:#fff;
background:magenta;
}
header{
box-shadow: var(--box-shadow);
background: #fff;
}
header .logo{
font-size: 20px;
color:var(--black);
}
header .logo span{
color:var(--main-color);
}
header .nav a{

46
margin-left: 3px;
border-radius: 50px;
color:var(--black);
padding:5px 15px;
}
header .nav a:hover{
background: var(--main-color);
box-shadow: var(--box-shadow);
color:#fff;
}
#menu-bar{
color:var(--black);
cursor: pointer;
font-size: 25px;
transition: .2s linear;
}
.home{
min-height: 100vh;
background: url(/Images/home-bg.png) no-repeat;
background-position: center;
background-size: cover;
}
.home .content span{
color:var(--main-color);
font-size: 20px;
}
.home .content h3{
color:var(--black);
font-size: 50px;
font-weight: bolder;

47
}
.about .content h3{
color:var(--black);
font-size: 33px;
}
.about .content p{
color:#777;
font-size: 14px;
}
.prevent .box{
flex:1 1 300px;
background:#f8f8fe;
border-radius: 5px;
text-align: center;
}
.prevent .box img{
margin-bottom: 10px;
height: 70px;
}
.prevent .box h3{
color:var(--black);
font-size: 20px;
}
.prevent .box p{
color:var(--black);
font-size: 14px;
}
#custom-button {
padding: 10px;
color: white;

48
background-color: var(--main-color);
border: 1px solid;
border-radius: 5px;
width: 100%;
min-width: 50px;
max-width: 300px;
font-size:0.875em;
display:block;
left:-60px;
margin-top:35px;
cursor: pointer;
}
#custom-button:hover {
background-color: magenta;
}
#custom-text {
margin-left: 10px;
font-family: sans-serif;
color: black;
}
#submit-button {
padding: 10px;
color: white;
background-color: var(--main-color);
border: 1px solid;
border-radius: 5px;
width: 100%;
min-width: 70px;
max-width: 300px;
font-size:1em;

49
display:block;
left:-60px;
margin-top:35px;
cursor: pointer;
}
#submit-button:hover {
background-color: magenta;
}
.experts .box{
width:260px;
background:#fff;
border-radius: 5px;
box-shadow: var(--box-shadow);
margin:5px;
padding:15px;
text-align: center;
position: relative;
overflow: hidden;
}
.experts .box img{
background:#f8f8fe;
border-radius: 5px;
width: 100%;
margin-bottom: 8px;
}
.experts .box h3{
font-size: 22px;
margin:2px 0;
color:var(--black);
}

50
.experts .box span{
font-size: 15px;
color:var(--main-color);
}
.experts .box .share{
position: absolute;
top:5px; right: -50px;
transition: .2s;
}
.experts .box:hover .share{
right:15px;
}
.experts .box .share a{
border-radius: 5px;
background:var(--main-color);
color:#fff;
display: block;
height: 40px;
width: 40px;
line-height: 40px;
margin-top: 5px;
}
.experts .box .share a:hover{
background:var(--black);
}
.contact form{
padding:15px;
border-radius: 5px;
box-shadow: var(--box-shadow);

51
}
.contact form .box,
.contact form textarea{
background:#f8f8fe;
border-radius: 5px;
font-size: 17px;
padding:10px;
margin:7px 0;
width: 100%;
text-transform: none;
color:var(--black);
}
.contact form textarea{
resize: none;
height: 200px;
}
.contact .map{
border-radius: 5px;
height: 100%;
width:100%;
}
.footer .box{
flex:1 1 250px;
}
.footer .box h3{
font-size: 20px;
color:var(--black);
}
.footer .box p{
color:#777;

52
}
.footer .box a{
display: block;
font-size: 14px;
color:#777;
padding:5px 0;
}
.footer .box a:hover{
color:var(--main-color);
}
.footer .credit{
text-align: center;
color:var(--black);
border-top: 1px solid rgba(0,0,0,.1);
margin-top: 10px;
padding-top: 20px;
}
.footer .credit span{
color:var(--main-color);
}
/* media queries */
@media (max-width:991px){
.home .content h3{
font-size: 30px;
}
}
@media (max-width:768px){
header .nav{
position: absolute;
top:100%; left: 0; right: 0;

53
background: #fff;
border-top: 1px solid rgba(0,0,0,.1);
border-bottom: 1px solid rgba(0,0,0,.1);
transition: .2s linear;
clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}
header .nav.active{
clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}
header .nav a{
display: block;
width: 100%;
margin:10px;
}
.fa-times{
transform: rotate(180deg);
}
}

54
Main.js

let menu = document.querySelector('#menu-bar');


let nav = document.querySelector('.nav');

menu.onclick = () =>{
menu.classList.toggle('fa-times');
nav.classList.toggle('active');
}

let section = document.querySelectorAll('section');


let navLinks = document.querySelectorAll('header .nav a');

window.onscroll = () =>{

menu.classList.remove('fa-times');
nav.classList.remove('active');

section.forEach(sec =>{

let top = window.scrollY;


let height = sec.offsetHeight;
let offset = sec.offsetTop - 150;
let id = sec.getAttribute('id');

if(top >= offset && top < offset + height){


navLinks.forEach(links =>{
links.classList.remove('active');
document.querySelector('header .nav
a[href*='+id+']').classList.add('active');
});
55
};
});

const realFileBtn = document.getElementById("real-file");


const customBtn = document.getElementById("custom-button");
const customTxt = document.getElementById("custom-text");

customBtn.addEventListener("click", function() {
realFileBtn.click();
});

realFileBtn.addEventListener("change", function() {
if (realFileBtn.value) {
customTxt.innerHTML = realFileBtn.value.match(
/[\/\\]([\w\d\s\.\-\(\)]+)$/
)[1];
} else {
customTxt.innerHTML = "No file chosen, yet.";
}
});

56
BACKEND

_init_.py

from flask import Flask

app = Flask( name )


app.config['UPLOAD_PATH'] = 'app/static/uploads'
from app import routes

Routs.py

from flask import Flask, request, Response


from flask.templating import render_template
from flask import request
from werkzeug.utils import secure_filename
from app import app
import torch

from PIL import Image

import torchvision.transforms as T
import os
def predict(model, img, tr, classes):
img_tensor = tr(img)
out = model(img_tensor.unsqueeze(0))
pred, idx = torch.max(out, 1)
return classes[idx]
def get_transforms():
transform = []
transform.append(T.Resize((512, 512)))
transform.append(T.ToTensor())

57
return T.Compose(transform)
@app.route('/', methods=['GET', 'POST']) def home_page():
res = None
if request.method == 'POST': classes = ['acanthosis-nigricans',
'acne',
'acne-scars', 'alopecia-areata', 'dry',
'melasma', 'oily', 'vitiligo', 'warts']
f = request.files['file']
filename = secure_filename(f.filename)
path = os.path.join(app.config['UPLOAD_PATH'], filename)
f.save(path)
model = torch.load('./skin-model-pokemon.pt',
map_location=torch.device('cpu'))
device = torch.device('cpu')
model.to(device);
img = Image.open(path).convert("RGB")
tr = get_transforms()
res = predict(model, img, tr, classes)
return render_template("index.html", res=res)

58
Predict.py

import torch
from PIL import Image
import torchvision.transforms as T
import os
import argparse
def predict(model, img, tr, classes):
img_tensor = tr(img)
out = model(img_tensor.unsqueeze(0))
pred, idx = torch.max(out, 1)
return classes[idx]
def get_transforms(): transform = []
transform.append(T.Resize((512, 512))) transform.append(T.ToTensor())
return T.Compose(transform)
if name == " main ": classes = ['acanthosis-nigricans',
'acne',
'acne-scars', 'alopecia-areata', 'dry',
'melasma', 'oily' 'vitiligo', 'warts']

59
tr = get_transforms() # Parse arguments
ap = argparse.ArgumentParser()
ap.add_argument('-m', '--model', required=True, help="Faster RCNN Model Path")
ap.add_argument('-i', '--image', required=True, help='Image Path') args =
vars(ap.parse_args())
model = torch.load(args['model'], map_location=torch.device('cpu'))
# device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') device =
torch.device('cpu')
model.to(device);
img = Image.open(args['image']).convert("RGB") res = predict(model, img, tr, classes)
print("The model has predicted the class: "+str(res))

Run.py

from app import app


if name == ' main ':
app.run(debug=True)

60
10.2 SCREENSHOTS

Screenshots of web application

61
62
63
64
65
REFERENCES

1. Ruyi Wang et al., (2020) – “Skin disease detection using deep learning.”
2. Yash Jain et al., (2020) – “ML-based image classification for
dermatology.”
3. Teles, A. et al., (2019) – “Mobile health framework for skin
condition analysis.”
4. Oh, K.J. et al., (2017) – “AI approach for early skin disease diagnosis.”
5. Silva, C. et al., (2019) – “CNN techniques in skin lesion recognition.”
6. Park, K. et al., (2020) – “Deep learning for medical image diagnostics.”

Web App Reference

Dermascan: https://www.dermascan.ai/
Dermajoy: https://www.dermajoy.com/
Dermabuddy https://dermabuddy.ai/
Dermacare: https://www.dermacare.a/

66
67

You might also like