SkinDiseasePredictionReport
SkinDiseasePredictionReport
Algorithm
A PROJECT REPORT
Submitted by
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
(ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING)
BONAFIDE CERTIFICATE
Certified that this project report titled “Skin Disease Prediction Model
using vision transformer Algorithm” is the Bonafide work of
“PRAKRITI VIKAS SRIVASTAVA(23BAI10529),SUNAINA
MOHAPATRA (23BAI11159), TANUSI BANSAL (23BAI11033), PRACHI
SHARMA (23BAI10616), VANSHIKA RATHORE
(23BAI11399),JANVIE VERMA(23BAI10307)” who carried out the
project work under my supervision. Certified further that to the best of my
knowledge the work reported at this time does not form part of any other
project/research work based on which a degree or award was conferred on an
earlier occasion on this or any other candidate.
First and foremost, we would like to thank the Lord Almighty for His presence and immense
blessings throughout the course of the project work.
We would like to place on record our heartfelt gratitude to Dr. Subhash Chandra Bose, our
project work guide and Programme Chair of Computer Science and Engineering (AI/ML) at
SCAI for his consistent support and encouragement during all the course of this exercise, as
well as with his precious suggestions that ultimately helped to finish the task.
We thank the entire technical and teaching staff of School of Computer Science and
Engineering for direct as well as indirect help in achieving our goals.
Finally, we would like to express our profound gratitude to our parents, who have provided
unparalleled support during the countless hours we dedicated to ensuring the success of this
project.
LIST OF ABBREVIATIONS
Figu
re Figure Title Page No.
No.
1 Sample Skin Disease Images 2
4 21
Skin, being the largest and most exposed organ of the human body, is highly
susceptible to a variety of diseases—many of which often go undiagnosed due to
inadequate medical infrastructure and delayed detection. This research addresses
the challenge of early and accurate skin disease identification by proposing an
intelligent system that integrates Convolutional Neural Networks (CNN) with
a Support Vector Machine (SVM) classifier. The resulting system is
implemented within an easy-to-use Android mobile application designed to
assist both patients and healthcare providers.
The system was trained and evaluated using a curated dataset of approximately
3000 skin disease images sourced from Beni-Suef University Hospital, Cairo
University Hospital, and reputable online platforms. A comparative analysis of
various feature extraction techniques and machine learning classifiers was
conducted, demonstrating the superior performance of the proposed CNN-SVM
model. Experimental results confirm the model’s high accuracy in detecting
multiple skin conditions and its capability to provide users with relevant disease
information and treatment suggestions.
TABLE OF CONTENTS
Abstract 6
1 CHAPTER-1: 9-10
PROJECT DESCRIPTION AND OUTLINE
1.1 Introduction
2 CHAPTER-2: 11-12
RELATED WORK INVESTIGATION
1. Literature Review
3 CHAPTER-3: 13-17
Methodology
3.1. Flow of Research Work
3.2. Problem Statement and
Research Questions
3.3. Dataset Description
3.4. Classification Steps
4 CHAPTER-4: 18-20
Android Application and Processing Steps
4.1. Image Acquisition
4.2. Preprocessing
4.4. Classification
5 CHAPTER-5: Results 21-24
7 References 29-31
CHAPTER 1
1.1 Introduction
Skin, being the largest organ of the human body, acts as the primary defense against
environmental hazards. With increasing pollution, lifestyle changes, and food habits, skin-
related issues have significantly risen. Early detection of skin diseases can prevent severe
health complications and ensure timely treatment. In this era of technological advancement,
machine learning (ML) and image processing offer promising solutions for automated,
efficient, and early skin disease detection.
Skin diseases can severely affect an individual's health, confidence, and quality of life. In
many cases, people ignore early symptoms or misdiagnose the condition, leading to severe
outcomes. Manual diagnosis can be subjective and time-consuming. The motivation behind
this project is to develop a machine learning-based system that can automatically classify and
predict skin diseases from image data, ensuring timely diagnosis and supporting healthcare
professionals.
The project focuses on implementing and comparing various machine learning algorithms to
detect and classify skin diseases using image data. The algorithms studied include Logistic
Regression, Random Forest, Naive Bayes, Kernel SVM, and Convolutional Neural Network
(CNN). By evaluating their performance based on accuracy, precision, recall, and F1-score,
the project aims to identify the most suitable algorithm for practical application in skin
disease prediction
Skin disease diagnosis in clinical settings often relies on expert analysis, which may be
limited by human error, variability, and availability. There is a need for an automated,
accurate, and scalable solution that can assist in diagnosing skin conditions based on image
inputs. The challenge lies in building a model that can generalize well across different types
of diseases and provide reliable predictions.
● To identify the most effective algorithm for accurate skin disease detection.
● Chapter 1: Project Description and Outline – Provides an overview of the project, its
motivation, problem statement, and objectives.
● Chapter 5: Conclusion and Future Scope – Summarizes the findings and outlines
future improvements.
1.7 Summary
This chapter presented an overview of the project, including its motivation, objectives, and
organizational structure. The growing impact of skin diseases and the potential of machine
learning in the medical domain are the driving forces behind this work. The project aims to
deliver an intelligent, automated solution for early and accurate skin disease detection.
CHAPTER 2
2.1 Introduction
The field of skin disease detection has witnessed tremendous growth with the advancement of
machine learning and image processing techniques. Automated systems for disease diagnosis
aim to provide fast, reliable, and cost-effective solutions. This chapter explores the core
domain of the project, reviews previous approaches, analyzes their strengths and weaknesses,
and identifies gaps that motivate the current work.
● Classification using ML/DL algorithms (like CNN, SVM, Naive Bayes, etc.)
This research is focused on enhancing the automated detection of skin diseases such as
acne, lichen planus, and SJS-TEN through comparative analysis of different algorithms.
Ercal et al. used adaptive color metrics in RGB planes for tumor identification. Image
segmentation was done using coordinate transformation, and tumor borders were extracted for
analysis.
Demyanov et al. and others employed deep convolutional neural networks to classify skin
lesions and detect dermoscopic patterns. Data augmentation and transfer learning techniques
were also applied.
Celebi et al. used ensembles of thresholding methods for accurate lesion border detection.
Others like Sumithra et al. combined SVM and k-NN for auto-segmentation and
classification.
Deep CNN models High accuracy, end-to-end Needs large dataset, high
learning, robust feature computational cost
extraction
● Traditional methods struggle with the complex patterns and color variations in skin
images.
● Datasets are often limited in size and diversity, leading to overfitting or bias.
● There's a need for integrated models that can handle classification, explainability,
and user-friendly interaction.
2.6 Summary
This chapter reviewed the core field of skin disease detection using machine learning.
Several methods, including traditional ML, deep CNNs, and ensemble techniques, were
discussed. While CNNs have shown superior accuracy, they also come with challenges
like data dependency and high computation. These observations form the foundation for
selecting and comparing algorithms in the current project, aiming for a balanced solution
that is both accurate and practical.
CHAPTER 3
REQUIREMENT ARTIFACTS
Hardware:
Compon Specification
ent
Software:
Software Purpose
● Classes: At least three disease categories (e.g., acne, lichen planus, SJS/TEN)
● Format: JPG/PNG
● HAM10000 Dataset
● ISIC Archive
● Log History (optional): Stores user predictions and results for analysis.
Security Requirements
● Consist of:
○ Upload button
3.6 Summary
This chapter outlined the essential requirements for the successful execution of the skin
disease detection project. From hardware capabilities and dataset needs to functional modules
and security considerations, each artifact is critical to ensure robust model training, testing,
and real-time performance. These artifacts guide the system design and implementation,
ensuring it is efficient, accurate, and user-friendly.
Performance and security requirements ensure the system delivers fast and reliable
predictions while maintaining the highest standards of data protection and privacy, including
secure communication, authentication, and compliance with legal regulations.
CHAPTER 4
The proposed methodology for legal judgment prediction combines advanced machine
learning models like RNN, CNN, LLM, LSTM, and BERT to effectively analyse and predict
judicial outcomes. Designed to be modular, scalable, and adaptable, this approach can handle
a wide range of legal datasets and be applied to diverse legal cases.
● Data Collection and Preprocessing: First, legal case documents, court judgments,
and statutes are gathered. The data then undergoes a thorough cleaning process,
including text normalization, tokenization, and the removal of irrelevant words (stop
words) to prepare it for analysis.
● Feature Extraction: BERT is used to capture the meaning of words in context, CNN
extracts spatial features, and RNN and LSTM models help understand the sequence
and flow of legal arguments. By combining these features, the system creates a
comprehensive input representation that improves prediction accuracy.
● Model Training: The different models (RNN, CNN, LLM, LSTM, and BERT) are
integrated into a unified framework and trained together. Cross-validation techniques
are used to fine-tune the model and ensure it provides reliable results.
● Prediction and Refinement: After generating predictions about legal cases, the
system is continually refined through feedback from legal professionals. This
iterative process helps improve the system's accuracy and effectiveness over time.
● Evaluation: The system’s performance is measured using metrics such as
accuracy, precision, recall, and F1-score. It’s deployed on scalable cloud-based
platforms, ensuring it can grow and adapt as more data becomes available or legal
standards change.
● Legal Text Analysis Module: Uses advanced natural language processing (NLP)
techniques to extract key entities, arguments, and relationships from legal texts,
helping the system understand complex legal documents.
● Judgment Prediction Module: Combines the features from various models to predict
legal outcomes, providing confidence scores and detailed textual explanations to
support each prediction.
● User Feedback Module: Allows legal professionals to annotate and correct any
inaccurate predictions, contributing to the system's continuous improvement through
iterative learning.
● Visualization Module: Presents insights from the case, including argument flow and
the reasoning behind predictions, in an interactive and user-friendly format that
enhances understanding.
● Presentation Layer: This layer focuses on the user interface, allowing users to
interact with the system easily. It handles input for case documents and displays
predictions and other outputs in a clear, visual format.
● Application Layer: Responsible for managing the core logic, this layer coordinates
how different modules interact and ensures smooth workflow between them, allowing
the system to function seamlessly.
● Data Access Layer: This layer ensures secure and efficient access to legal databases
and external APIs, making sure that the system can retrieve relevant legal data
whenever needed.
● Model Integration Layer: It enables smooth communication between the various
models—RNN, CNN, LLM, LSTM, and BERT—ensuring that they work together
efficiently to generate accurate hybrid predictions.
4.6 Novelty
● Hybrid Modelling Approach: This system combines the strengths of RNN, CNN,
LLM, LSTM, and BERT to capture the various nuances in legal language, including
meaning, sequence, and structure, ensuring a well-rounded understanding of legal
texts.
● Multi-Feature Fusion: It integrates different features such as semantic meanings,
sequence dependencies, and spatial patterns to create rich, comprehensive
representations of legal data, helping the system understand complex legal contexts
more effectively.
● Domain-Specific Fine-Tuning: Pre-trained models are adapted specifically for
the legal field through targeted training, allowing the system to better understand
legal terminology and concepts while ensuring more accurate predictions.
● Feedback-Driven Iteration: Expert feedback plays a key role in the development
process, enabling continuous refinement of the system. This iterative approach
ensures the model improves with each cycle, incorporating real-world insights into its
predictions.
● Modular and Scalable Design: The system is built to be easily maintained and
scaled, ensuring it can handle increasing amounts of data and adapt to changing
legal standards over time, making it flexible and future-proof.
4.7 Summary
It utilizes cutting-edge machine learning, tailored specifically for the legal industry, resulting
in a strong judgment prediction model in the context of legal systems. Employing this hybrid
strategy combined with the modularity can make scaling of the system highly feasible with an
ability to adapt better with every step into new and unforeseen challenges. The integration of
feedback allows it to evolve continuously, ensuring it meets the unique demands of the legal
domain in a practical and efficient way. Such flexible design helps the system stay relevant,
reliable, and capable of addressing the complexities of legal decision-making.
CHAPTER 5
1.1 Outline
In this chapter, we explore the technical implementation of the judgment prediction model,
focusing on the integration of advanced machine learning algorithms (CNN, RNN (LSTM),
LSTM, BERT, and LLM) to analyse and predict legal outcomes based on textual data.
Here, we will discuss the Technical Coding and Code Solutions for each algorithm and
examine the end-to-end workflow of the model, including data preprocessing, training,
evaluation, and prediction. Finally, we will summarize the project outcomes and propose
potential future enhancements to improve the system’s performance and applicability.
1.3 Summary
6.1 Outline
The project goes into the domain of legal judgment prediction by implementing five
advanced machine learning and natural language processing models: CNN, RNN, LSTM,
BERT, and LLM. Each model is chosen for its distinct capabilities in handling various
aspects of legal texts, ensuring a comprehensive approach to addressing the challenges of
judgment prediction.
Building on the limitations of RNN, LSTM (Long Short-Term Memory) networks provide
the capability to handle long-term dependencies. With its memory cells, LSTM excels at
analysing lengthy case documents, maintaining context across multiple sections and ensuring
consistent understanding of interrelated legal facts.
BERT, or Bidirectional Encoder Representations from Transformers, is a paradigm shift in
text analysis, utilizing bidirectional context comprehension and self-attention mechanisms.
This allows BERT to comprehend complex legal language and draw attention to important
parts of the text, such as penalties, accusations, and precedents. Its capacity to align
predictions with logical reasoning enhances interpretability, thus making it a robust tool for
nuanced legal judgments.
LLMs, on the other hand, offer unique versatility in tasks. With extensive pre-training on
large datasets, they can be fine-tuned with very little effort, enabling the model to make
judgment predictions across different legal domains and multilingual scenarios. However,
their performance may be left wanting in specific domains.
By integrating these models, the project seeks to address the critical challenges of accuracy,
transparency, and scalability in legal judgment prediction. CNN aids in efficient feature
extraction, while RNN and LSTM ensure sequential and contextual understanding. BERT
adds depth with its interpretability and contextual precision, and LLMs contribute flexibility
and broad applicability. Together, they create a robust, hybrid solution that enhances the
fairness, efficiency, and accessibility of legal decision-making processes.
6.2 Key implementations outline of the System
● Enhanced Accessibility: The system makes complex legal data more accessible,
aiding individuals with limited legal expertise. It simplifies legal concepts for
easier comprehension and improves access to legal knowledge, especially in
under-resourced environments.
6.5 Inference
Legal Judgment Prediction (LJP) with models like CNN, RNN, LSTM, LLM, and BERT is
revolutionizing the way the legal system addresses complex tasks. These models can process
large amounts of legal data to predict judgments, find relevant precedents, and provide
insights both to professionals and individuals alike.
LJP systems help save time and resources by automating time-consuming tasks such as legal
research and risk analysis. This can also reduce judicial delays by processing straightforward
cases, thereby assisting corporations in effectively managing legal risks. More importantly,
these systems make legal guidance more accessible to underserved areas, which means better
access to justice.
On the other hand, to overcome LJP, challenges would include data bias, non-interpretable
models and privacy issues. Biases in data can lead to unfair outcomes, and clarity in the
reasoning behind any model prediction is essential toward trust in legal contexts; privacy is
also a paramount concern because legal information could be sensitive.
When implemented thoughtfully and in an ethical manner, models such as these can
substantially improve efficiency, accessibility, and fairness in the application of justice.
CHAPTER 7
7.1 Outline
Legal Judgment Prediction systems, backed by models like CNN, RNN, LSTM, LLM, and
BERT, can provide transformative capabilities for the legal industry. Such tools would be
capable of automating tasks, such as legal research, prediction of case outcome, and assisting
in corporate risk management. Streamlining these processes may help in reducing judicial
backlogs, providing legal advisory support to communities that cannot afford quality lawyers,
and ensuring better decision-making efficiency.
However, their usage is not without challenges. Data bias is a big issue, which can perpetuate
historical inequities reflected in legal decisions. There is also the lack of interpretability in AI
models, which will make the adoption of these models very difficult because legal
practitioners need to know the reasons behind a prediction. Moreover, the sensitivity of legal
data requires robust privacy and security measures to avoid misuse or breaches.
To overcome these challenges several steps are necessary. First, this demands the use of
diverse datasets with no bias to ensure fair prediction and models that are designed so as to
offer transparent as well as explainable outcomes consistent with legal reasoning and have
strict data protection so that privacy concerns are addressed and a collaboration between legal
professionals and technological experts is required where these LJP systems are integrated as
an addition rather than a substitution to human judgment. Moreover, regulatory frameworks
that will guide the ethical and responsible use of these technologies must be put in place.
LJP systems could revolutionize legal practices and practices with continued research,
refinement, and ethical oversight. When deployed responsibly, they can improve efficiency
and enhance access to justice within the legal system and promote greater fairness for society.
3. Privacy and Security Concerns: Since legal data is sensitive, processing the
information through AI systems brings up the issue of unauthorized access or misuse.
Strong privacy measures are a must to protect the data and adhere to the privacy
standards of the law.
4. Regulatory and Ethical Challenges: The use of AI in legal decision-making requires
clear regulations to make it responsible and ethical. Since the legal frameworks
regarding AI in the judiciary are in their developing stages, there is a need for
cautious oversight to avoid misuse.
5. Technical Limitations: Advanced models like CNN, RNN, LSTM, LLM, and BERT
are highly potent but may not be very effective in dealing with legal language
complexity, reasoning, and context. Moreover, these models are prone to rare or
unusual cases, where data is not enough to make an accurate prediction.
7.4 Inference
LJP systems driven by models like CNN, RNN, LSTM, LLM, and BERT can potentially
revolutionize the legal world. LJP systems will automate things like case outcome prediction
as well as aid in legal research, thus saving time, reducing workloads, and making the legal
process even more efficient for a legal professional. They also promise to improve access to
justice, especially for those in underserved or remote areas, by offering insights that guide
individuals and organizations through complex legal matters.
However, there are significant challenges to be addressed. These include issues of data bias,
lack of transparency in decision-making, and privacy concerns. All these have to be
addressed to make these systems fair, trustworthy, and secure. Research, collaboration
between legal and AI experts, and clear ethical guidelines will be required to overcome these
challenges to ensure the responsible use of these tools.
Looking ahead, Legal Judgment Prediction systems will be able to play a major role in
improving the legal system as AI technology continues to evolve. With the right safeguards
in place, they can support human judgment, making legal processes more accurate, efficient,
and accessible for everyone.
REFERENCES
1. L. Eliot, “Legal judgment prediction (LJP) amid the advent of autonomou ai legal
reasoning,” arXiv preprint arXiv:2009.14620, 2020.
2. M. Masala, R. C. A. Iacob, A. S. Uban, M. Cidota, H. Velicu, T. Rebedea, and
M.Popescu, “jurbert: A romanian bert model for legal judgement prediction,”
inProceedings of the Natural Legal Language Processing Workshop 2021, 2021, pp.
86–94.
3. F. de Arriba-Pérez, S. García-Méndez, F. J. González-Castaño, and J. González-
González, “Explainable machine learning multi-label classi- fication of spanish legal
judgements,” Journal of King Saud University- Computer and Information Sciences,
vol. 34, no. 10, pp. 10 180–10 192, 2022.
4. D. Alghazzawi, O. Bamasag, A. Albeshri, I. Sana, H. Ullah, and M. Z. Asghar,
“Efficient prediction of court judgments using an lstm+ cnn neural network model
with an optimal feature set,” Mathematics, vol. 10, no. 5, p. 683, 2022.
5. M. A. Kumar, V. Kavitha, A. D. Saswanth, A. Ghanshala et al., “Court judgement
prediction using long-short term memory and convolutional neural network,” in 2023
International Conference on Electrical, Elec- tronics, Communication and Computers
(ELEXCOM). IEEE, 2023, pp. 1–6.
6. N. Sivaranjani, V. Senthil Ragavan, and G. Jawaherlalnehru, “A neural network
model for Indian supreme court legal judgment prediction,” Journal of Intelligent &
Fuzzy Systems, no. Preprint, pp. 1–12.
7. D. Trautmann, A. Petrova, and F. Schilder, “Legal prompt engi- neering for
multilingual legal judgement prediction,” arXiv preprint arXiv:2212.02199, 2022.
8. N. Aletras, D. Tsarapatsanis, D. Preo¸tiuc-Pietro, and V. Lampos, “Pre- dicting
judicial decisions of the european court of human rights: A natural language
processing perspective,” PeerJ computer science, vol. 2, p. e93, 2016.
9. K. Shirsat, A. Keni, P. Chavan, and M. Gosavi, “Legal judgement prediction
system,”International Research Journal of Engineering and Technology (IRJET), vol.
8, 2021.
10. Z. Xu, X. Li, Y. Li, Z. Wang, Y. Fanxu, and X. Lai, “Multi-task legal judgement
prediction combining a subtask of the seriousness of charges,” in Chinese
Computational Linguistics: 19th China National Conference, CCL 2020,
Hainan,
China, October 30–November 1, 2020, Proceedings 19. Springer, 2020, pp. 415–429.