BATCH 09 Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 56

CHAPTER 1

INTRODUCTION

1.1 OVERVIEW
Skin cancer is an alarming disease among mankind. People in the USA,
Canada, and Australia have been diagnosed at the highest increasing rate over the
past few decades. Skin cancer happens due to the uneven development of
melanocytic skin cells. Among all skin cancers are deadliest. A malignant tumor is
a type of cancerous tumor that spreads and expands in a patient’s body. Many
malignant skin growths have symptoms that can be identified as precursors. A
precursor is a group of aberrant cells that may develop into cancer. Precancerous
is another term for a precursor. Some precancerous skin growths have a minimal
chance of developing into cancer, whereas others have a very high chance. The
importance of detecting and treating cancer in early malignant skin growth cannot
be overstated. For this reason, CNN is proposed in the systems of this study to
detect skin cancer. For the first time, this project achieved an accuracy of 80.3%
using deep CNN on the International Skin Imaging Collaboration (ISIC) dataset.
Although this project worked on the same dataset, this time the project is
based CNN symptomatic feature extraction. After segmenting the dermoscopic
images using the feature extraction approach, the characteristics of the skin cells
are retrieved in this work. Finally, this project got an accuracy of 89.5%. The
project has worked in many ways with CNN architecture to detect skin cancer.
Through this, the project achieved a training accuracy of 93.7% using a publicly
available data set.

1
1.2 OBJECTIVES
The primary objectives of the project "Deep Learning Models for Early
Detection and Classification of Skin Cancer" are:
⚫ Deep learning models offer the potential to enhance the accuracy of skin
cancer diagnosis compared to traditional methods
⚫ The primary aim is to develop a system capable of identifying skin cancer
at its earliest stages.
⚫ Skin cancer comes in various forms, including melanoma, basal cell
carcinoma, and squamous cell carcinoma.
⚫ Another key objective is to develop a solution that is accessible and cost-
effective, making it available to a broader range of healthcare providers
and patients.
⚫ Introducing automated systems for skin cancer detection and classification
can streamline the diagnostic process.
Goals:

The goals of the project "Deep Learning Models for Early Detection and
Classification of Skin Cancer " are:

The project aims to leverage deep learning models for the early detection
and classification of skin cancer, utilizing a combination of Convolutional
Neural Networks (CNNs), Support Vector Machines (SVMs), and Decision
Trees algorithms. The overarching goal is to enhance the accuracy and
efficiency of skin cancer diagnosis by automating the process through advanced
computational techniques. CNNs are particularly well- suited for image
recognition tasks due to their ability to extract intricate features from images,
making them ideal for analyzing dermatoscopic images of skin lesions.

2
1.3 DEEP LEARNING
Deep learning is a branch of artificial intelligence focused on training
algorithms to learn patterns from data in layered structures. It's inspired by the
brain's neural networks and excels at tasks like image and speech recognition,
natural language processing, and medical diagnostics. Deep learning
algorithms, like neural networks, automatically learn features from raw data,
eliminating the need for manual feature engineering. They require large datasets
and significant computational resources but have achieved remarkable success
in various domains, revolutionizing tasks like computer vision and sequential
data processing.
Deep learning has achieved remarkable success in various domains,
including computer vision, where Convolutional Neural Networks (CNNs)
have revolutionized tasks such as object detection and image classification.
Recurrent Neural Networks (RNNs) and their variants, such as Long Short-
Term Memory (LSTM) networks, are widely used for sequential data
processing tasks like speech recognition and language translation. Deep
learning fundamentally transforms how computers perceive, understand, and
interact with the world. Its architecture, inspired by the human brain's neural
networks, consists of layers of interconnected nodes, each processing and
extracting features from data at increasing levels of abstraction. This
hierarchical representation allows deep learning models to learn complex
patterns and relationships directly from raw data, without the need for
handcrafted features or explicit programming. The widespread adoption of deep
learning has led to groundbreaking advancements in numerous fields, including
healthcare, where it aids in disease diagnosis and personalized treatment
recommendations, and in autonomous vehicles, where it enables vehicles to
perceive and navigate complex environments safely.

3
CHAPTER 2
LITERATURE SURVEY

[1] TITLE: Skin cancer detection using deep learning (2023).


Author: Maryam Naqvi, Syed Qasim Gilan.

Melanoma is the deadliest form of skin cancer. Incidence rates of


melanoma have been increasing, especially among non-Hispanic white male and female,
but survival rates are high if detected early. Due to the costs for dermatologists to screen
every patient, there is a need for an automated system to assess a patient's risk of
melanoma using images of their skin lesions captured using a standard digital camera.
One challenge in implementing such a system is locating the skin lesion in the digital
image. A novel texture-based skin lesion segmentation algorithm is proposed. A set of
representative texture distributions are learned from an illumination-corrected
photograph and the texture distinctiveness metric is calculated for each distribution.
Next, regions in the image are classified as normal skin or lesions based on the
occurrence of representative texture distributions. The proposed segmentation
framework is tested by comparing lesion segmentation results and melanoma
classification results to results using other state-of-art algorithms. The proposed
framework has higher segmentation accuracy compared to all other tested algorithms.

Techniques: CNN algorithm is used (Convolutional Neural Network).

Merits: CNN algorithm is applied to a skin cancer project for detection and
classification purpose and deep learning capabilities to analyze medical images.

4
[2] TITLE: Skin cancer detection using combined decision of deep
learners (2022).
Author: Azhar Imran, Arslan Nasir.

Cancer is a deadly disease that arises due to the growth of uncontrollable


body cells. Every year, a large number of people succumb to cancer and it’s been
labeled as the most serious public health snag. Cancer can develop in any part of
the human anatomy, which may consist of trillions of cellules. One of the most
frequent type of cancer is skin cancer which develops in the upper layer of the skin.
Previously, machine learning techniques have been used for skin cancer detection
using protein sequences and different kinds of imaging modalities. The drawback
of the machine learning approaches is that they require human- engineered features,
which is a very laborious and time-taking activity. Deep learning addressed this
issue to some extent by providing the facility of automatic feature extraction. In this
study, convolution-based deep neural networks have been used for skin cancer
detection using ISIC public dataset. The ensemble learning technique exploits the
diversity of learners to yield a better decision. Thus, the prediction accuracy can be
enhanced by combing the decision of individual learners for sensitive issues such
as cancer detection. The results show that the combined decision of deep learners is
superior to the finding of individual learners in terms of sensitivity, accuracy,
specificity, F-score, and precision.

Techniques: VGG, Caps-Net, and ResNet.

Merits: VGG, Caps-Net, and ResNet, applied in skin cancer prediction with
CNNs, employ diverse architectures for extract features from the leison image.

5
[3] TITLE: Skin cancer classification using image processing and
machine learning (2021).

Author: Arslan Javaid, Muhammad Sadi.

One of the most rapidly spreading cancers among various other types of
cancers known to humans is skin cancer. Melanoma is the worst and the most
dangerous type of skin cancer that appears usually on the skin surface and then
extends deeper into the layers of skin. However, if diagnosed at an early stage; the
survival rate of Melanoma patients is 96% with simple and economical treatments.
The conventional method of diagnosing Melanoma involves expert dermatologists,
equipment, and Biopsies. In this paper, a method for skin lesion classification and
segmentation as benign or malignant is proposed using image processing and
machine learning. A novel method of contrast stretching of dermoscopic images
based on the methods of mean values and standard deviation of pixels is proposed.
Then the thresholding algorithm is applied for image segmentation. After the
segmentation, features including Gray Level Co-occurrence Matrix (GLCM)
features for texture identification, the Histogram of Oriented Gradients (HOG)
object, and color identification features are extracted from the segmented images.
Principal Component Analysis (PCA) reduction of HOG features is performed for
dimensionality reduction. Synthetic Minority Oversampling Technique (SMOTE)
sampling is performed to deal with the class imbalance problem. The feature vector
is then standardized and scaled. A novel approach of feature selection based on the
wrapper method is proposed before classification. Classifiers including Quadratic
Discriminant, SVM (Medium Gaussian), and Random Forest are used for
classification. Maximum accuracy is achieved using the Random Forest classifier.

Techniques: Random Forest Algorithm.

Merits: Random Forest in Skin cancer detection often involves analyzing


images with numerous features.

6
[4] TITLE: Skin Cancer Detection using Machine Learning Techniques
(2020).
Author: Vidya M, Dr. Maya V Karki.

Due to their identical look and lack of distinguishable color variation,


detecting skin cancer from dermoscopic images is a difficult process. A better
combination of pre-processing and detection methods can make this task
comparatively easier and more accurate. For automatic and accurate detection of
skin cancer, we have proposed a set of few pre-processing steps like segmentation
of skin lesions from background images followed by the ABCD feature extraction
for better training of machine learning models like Support Vector Machine (SVM),
K-Nearest Neighbor (KNN), and Random Forest (RF). The conventional method of
diagnosing Melanoma involves expert dermatologists, equipment, and Biopsies. In this
paper, a method for skin lesion classification and segmentation as benign or
malignant is proposed using image processing and machine learning. A novel
method of contrast stretching of dermoscopic images based on the methods of mean
values and standard deviation of pixels is proposed. Then the OTSU thresholding
algorithm is applied for image segmentation. For this purpose, we have used ISIC
2020 dataset for verification. From this experiment, it is observed that SVM with
RBF kernel provided a better detection score of 93.51, whereas 91 %, and 90.67%
scores were observed using KNN and RF respectively.
Techniques: Support Vector Machine (SVM), K-Nearest Neighbor
(KNN), and Random Forest (RF)

Merits: KNN might increase with scalability and computational efficiency


when dealing with large datasets or high-dimensional feature.

7
[5] TITLE: Skin Cancer Detection: Applying a deep learning based
model driven architecture in the cloud for classifying dermal cell images
(2020).
Author: Mohammad Ali Kadampur, Sulaiman Al Riyaee.

The study focuses on leveraging deep learning techniques within a


cloud-based model-driven architecture to enhance the classification of
dermal cell images for the detection of skin cancer. By employing advanced
algorithms, the researchers aimed to improve the accuracy of predictions,
thereby facilitating early detection and potentially increasing survival rates.
Through a systematic approach, the models were constructed and tested on
established datasets, yielding impressive results with a metric area under the
curve of 99.77%. This signifies a high level of accuracy in distinguishing
between benign and malignant skin lesions, highlighting the efficacy of the
developed deep learning models. By accurately identifying potential
cancerous lesions, the models facilitate early detection, which is crucial for
improving survival rates in skin cancer cases. Testing the models on standard
datasets ensures reliability and comparability of results, fostering confidence
in the efficacy of the developed approach. Leveraging state-of- the-art deep
learning algorithms enables the models to effectively learn intricate patterns
and features from dermal cell images, leading to enhanced classification
accuracy.
Techniques: CNNs are likely employed as the primary deep learning
architecture due to their proficiency allowing the models to extract relevant
features from dermal cell images.

Merits: The achieved metric area of 99.77% demonstrates the effectiveness


of the developed models in classifying dermal cell image.

8
[6] TITLE: Skin Cancer Classification using Deep Learning and
Transfer Learning (2019).
Author: Khalid M. Hosny, Mohamed A. Kassem.

Skin cancer specially melanoma is one of most deadly diseases. In the color
images of skin there is a high similarity between different skin lesion like
melanoma and nevus, which increase the difficulty of the detection and diagnosis.
A reliable automated system for skin lesion classification is essential for early
detection to save effort, time and human life. In this paper, an automated skin lesion
classification method is proposed. In this method, a pre-trained deep learning
network and transfer learning are utilized. In addition to fine-tuning and data
augmentation, the transfer learning is applied to AlexNet by replacing the last layer
by a softmax to classify three different lesions (melanoma, common nevus and
atypical nevus). The proposed model is trained and tested using the ph2 dataset.
The well-known quantative measures, accuracy, sensitivity, specificity, and
precision are used in evaluating the performance of the proposed method where the
obtained values of these measures are 98.61%, 98.33%, 98.93%, and 97.73%,
respectively. The performance of the proposed method is compared with the
existing methods where the classification rate of the proposed method
outperformed the performance of the existing methods.
Techniques: PH2 dataset is used.
Merits: The data augmentation, the transfer learning is applied to AlexNet by
replacing the lastlayer by a softmax to classify three different lesions.

9
CHAPTER 3
SYSTEM ANALYSIS

3.1 EXISTING SYSTEM:


In the existing system for early detection and classification of skin
conditions, Convolutional Neural Networks (CNNs) are employed for both
classification and detection tasks. However, a significant limitation lies in the
relatively small size of the dataset utilized, leading to reduced accuracy in
results. This constraint restricts the model's ability to effectively generalize
patterns and features across diverse skin types and conditions. Furthermore, the
dataset predominantly comprises images of individuals with white skin,
neglecting the rich diversity of skin tones and textures present in the global
population. Consequently, the model's performance may suffer from biases and
inaccuracies when applied to individuals with skin types not adequately
represented in the training data. Addressing these limitations would require
expanding the dataset to encompass a more diverse range of skin types and
conditions, thereby enhancing the model's robustness and accuracy in real-
world applications. Additionally, exploring techniques such as data
augmentation and transfer learning could further bolster the model's
performance by leveraging knowledge from larger, more diverse datasets. In the
current landscape of early detection and classification of skin conditions,
Convolutional Neural Networks (CNNs) are the go-to tools for both
classification and detection tasks. However, a significant hurdle arises from the
relatively small size of the datasets used, resulting in diminished accuracy. This
expansion would bolster the model's robustness and accuracy in real- world
scenarios. Additionally, integrating techniques like data augmentation and
transfer learning could further enhance the model's performance by tapping into
the wealth of knowledge provided by larger and more diverse datasets.

10
3.1.1 Disadvantages:
⚫ Lower accuracy can result in misdiagnosis or missed detection of critical
conditions, leading to potential health risks for patients.
⚫ If the dataset used for training the deep learning models lacks diversity in
lesion types, sizes, and textures, the models may struggle to generalize well
to real-world scenarios.
⚫ The dataset comprising only images of individuals with white skin tone
poses a significant limitation. Skin conditions can manifest differently based
on skin tone, ethnicity, and genetic predispositions.
⚫ Due to the aforementioned limitations, the existing system may suffer from
generalization issues. Generalization refers to the ability of a deep learning
model to perform accurately on unseen data.

3.2 PROBLEM STATEMENT:

Deep learning models for early detection and classification of skin cancer
address critical healthcare challenges by leveraging advanced AI techniques.
These models aim to accurately classify skin lesions, particularly melanoma,
from dermoscopic images, enhancing early diagnosis and improving patient
outcomes. The multimodal data sources, including clinical metadata and patient
history, these models provide a comprehensive understanding of skin lesions,
aiding in timely intervention and treatment planning. Additionally, deep
learning frameworks enable real-time segmentation and classification of skin
lesions. Federated learning approaches ensure privacy-preserving collaboration
among healthcare institutions, enabling collective knowledge sharing without
compromising patient confidentiality. Overall, deep learning models represent
a promising avenue for revolutionizing skin cancer diagnosis and management,
contributing to improved patient care and outcomes.

11
3.3 PROPOSED SYSTEM:
The proposed system for early detection and classification of skin cancer
is a comprehensive approach integrating cutting-edge deep learning techniques
such as Convolutional Neural Networks (CNNs), Support Vector Machines
(SVMs), and decision trees. This multifaceted approach is designed to maximize
accuracy and reliability in identifying potential cancerous lesions. A pivotal
aspect of the system involves augmenting the dataset size substantially, a
strategy proven to enhance model performance by providing a more
comprehensive and representative sample of skin conditions.
To further refine the dataset and improve accuracy, sophisticated feature
selection methods are employed to eliminate redundant or irrelevant attributes.
By prioritizing relevant features, the system optimizes the learning process,
resulting in more precise and reliable predictions. Through the synergistic
application of advanced algorithms and meticulous dataset optimization
techniques, the proposed system represents a significant advancement in the
early detection and classification of skin cancer, promising to revolutionize
diagnosis and treatment in dermatology. This prioritization of relevant features
optimizes the learning process, resulting in more precise and reliable
predictions. By synergistically applying advanced algorithms and meticulous
dataset optimization techniques, the proposed system represents a significant
advancement in the early detection and classification of skin cancer, promising
to revolutionize diagnosis and treatment in dermatology.

12
3.3.1 Advantages:
⚫ Deep learning algorithms have the ability to learn intricate patterns and
features within skin images, leading to more precise identification of
potential abnormalities.
⚫ The inclusion of a diverse range of lesions in the dataset is crucial for
effective skin cancer detection.
⚫ Skin cancer can affect individuals of all ethnicities and skin tones.
Therefore, it's essential to have a dataset that represents the diversity of skin
tones encountered in the population.
⚫ Deep learning models can achieve higher sensitivity and specificity in
detecting skin lesions compared to traditional methods.
⚫ Deep learning-based systems can automate the process of lesion detection
and classification, reducing the time and effort required for manual
evaluation by dermatologists.
⚫ Once trained, deep learning models can be deployed across various
healthcare facilities, regardless of their geographical location or resource
availability.
⚫ Deep learning models have the capability to continuously learn and improve
over time.

13
CHAPTER 4

SYSTEM DESCRIPTION

4.1 SYSTEM SPECIFICATION


4.1.1 Hardware Requirements

➢ Processor : Intel core 5

➢ RAM : 4GB

➢ Hard disk : 160 GB

➢ Keyboard : Standard keyboard

➢ Monitor : 15inch color monitor

4.1.2 Software Requirements

➢ Operating System : Windows OS

➢ Tools : Pycharm Community Edition

➢ Front End : HTML, CSS, JS

➢ Back End : Python

14
Programming Language: Python
Python is an interpreted high-level programming language for general- purpose
programming. Created by Guido van Rossum and first released in 1991, Python has a
design philosophy that emphasizes code readability, notably using significant
whitespace. It provides constructs that enable clear programming on both small and
large scales. In July 2018, Van Rossum stepped down as the leader in the language
community. Python features a dynamic type system and automatic memory
management. It supports multiple programming paradigms, including object- oriented,
imperative, functional, and procedural, and has a large and comprehensive standard
library. Python interpreters are available for many operating systems. Python, the
reference implementation of Python, is open- source software and has a community-
based development model, as do nearly all of Python's other implementations. Python
is managed by the non- profit Python Software Foundation.

Rather than having all of its functionality builtinto its core, Python was designed to be
highly extensible. This compact modularity has made it particularly popular as a
means of adding programmable interfaces to existing applications. Van Rossum's
vision of a small core language with a large standard library and easily extensible
interpreter stemmed from his frustrations with ABC, which espoused the opposite
approach. The Python interpreter and the extensive standard library are available in
source or binary form without charge forall major platforms and can be freely
distributed. Often, programmers fall in love with Python because of the increased
productivity it provides. Since there is no compilation step, the edit-test-debug cycle
is incredibly fast. Debugging Python programs is easy: a bug or bad input will never
cause a segmentation fault. Instead,when the interpreter discovers an error, it raises an
exception. When the program doesn't catch the exception, the interpreter prints a stack
trace. A source-level debugger allows inspection of local and global variables,
evaluation of arbitrary expressions.

15
CHAPTER 5
SYSTEM DESIGN

5.1 ARCHITECTURE DIAGRAM

Figure: 5.1 Proposed System Architecture


The architecture flow of the described system begins with image dataset,
in this multifaceted project, our goal is to pioneer a sophisticated system
capable of swiftly identifying and categorizing skin lesions as either benign or
malignant. We embark on this endeavor by employing a fusion of cutting-edge
deep learning methodologies alongside classical machine learning algorithms.
Our project spans several crucial phases, commencing with the acquisition of
an extensive image dataset, followed by classification utilizing Convolutional
Neural Networks (CNN), feature extraction leveraging Support Vector
Machines (SVM), and ultimately culminating in diagnostic predictions
facilitated by decision tree algorithms.

16
This project relies heavily on the quality and diversity of the image
dataset. To this end, we procure a vast array of skin lesion images sourced from
the prestigious International Skin Imaging Collaboration (ISIC) dataset. This
rich dataset encompasses a spectrum of skin conditions, ensuring our models
are trained and tested on a comprehensive range of benign and malignant
lesions, thus bolstering the robustness of our system. The cornerstone of our
classification approach lies in the deployment of Convolutional Neural
Networks (CNNs).
Renowned for their prowess in extracting hierarchical features directly
from raw image data, CNNs are perfectly suited for discerning intricate patterns
inherent in skin lesions. Through extensive training on the ISIC dataset, our
CNN model hones its ability to differentiate between various types of skin
lesions with remarkable precision and reliability. Complementing the
classification phase is our utilization of Support Vector Machines (SVMs) for
feature extraction. By focusing on key attributes such as color, structure,
boundary, and area, SVMs facilitate the extraction of salient features crucial for
distinguishing between benign and malignant lesions.
Their efficacy in high-dimensional feature spaces ensures that our system
can capture nuanced characteristics inherent in the skin lesion images. At the
crux of our diagnostic pipeline lies the implementation of decision tree
algorithms. These algorithms excel in offering transparent and interpretable
decision rules, making them particularly well-suited for medical diagnosis tasks.
By analyzing the extracted features, our decision tree model is adept at
predicting whether a given skin lesion is benign or malignant, thus empowering
healthcare professionals with actionable insights for effective patient
management. To enhance accessibility and usability, our system is seamlessly
integrated with web technologies.

17
5.2 DATA FLOW DIAGRAM:
A data flow diagram for deep learning models aimed at early detection
and classification of skin cancer would depict the flow of information
throughout the system. At its core, the diagram would showcase the journey of
data, starting with the input of various skin images, including those with
suspected lesions or abnormalities. These images would then undergo
preprocessing steps such as resizing, normalization, and possibly augmentation
to enhance model performance and generalization. Subsequently, the
preprocessed images would be fed into the deep learning model, which could
consist of convolutional neural networks (CNNs) or other architectures
optimized for image analysis tasks.
The model would then analyze the input images, extracting relevant
features and patterns indicative of different types of skin cancer, such as
melanoma, basal cell carcinoma, or squamous cell carcinoma. The
classification results would then be outputted, often in the form of probabilities
assigned to each class, indicating the likelihood of the presence of specific types
of cancer. These results could further be visualized, interpreted, and used to
guide clinical decision-making processes, such as determining the necessity for
further diagnostic tests or treatments. Additionally, feedback loops may exist
within the system to continuously improve model performance through
mechanisms like retraining on new data or fine-tuning based on user feedback
and ground truth annotations. Overall, the data flow diagram illustrates the
intricate pipeline through which deep learning models leverage input data to
facilitate early detection and classification of skin cancer, potentially
contributing to improved patient outcomes and healthcare delivery.

18
LEVEL 0:
At the highest level, a Level 0 data flow diagram for the process of
collecting, augmenting, and preprocessing image data for deep learning models
focused on skin cancer detection would illustrate the key stages of this data
pipeline.

Figure 5.2 Data flow diagram level 0 - Image Augmentation

It begins with the database collection phase, where various sources of


skin images, including medical databases, public datasets, and possibly user-
contributed images, provide the initial pool of data. Next, the augmentation
stage involves techniques such as flipping, rotating, and shifting images to
increase the diversity of the dataset, which can enhance the model's ability to
generalize to different scenarios and improve robustness. These augmented
images are then prepared for ingestion into the model, forming the input dataset
for training or validation. At this level, the diagram provides a broad overview
of the foundational processes involved in acquiring and preparing the data
necessary for training deep learning models tailored for early detection and
classification of skin cancer.

19
LEVEL 1:
At the level 1 data flow diagram level, the process begins with "Image
Acquisition," where various skin images, including those with suspected lesions,
are gathered.

Figure 5.3 Data flow diagram level 1 - Image Preprocessing

These images serve as the primary input data for the system. Next, in
"Image Preprocessing," the acquired images undergo essential preprocessing
steps such as resizing, normalization, and potentially augmentation to ensure
consistency and enhance the model's ability to extract meaningful features.
Following preprocessing, the images flow into "Image Segmentation," a crucial
step where the images are analyzed to delineate regions of interest, such as
potential lesions or abnormalities, from the surrounding healthy tissue. This
segmentation process helps focus the model's attention on relevant areas,
improving diagnostic accuracy.

20
CHAPTER 6

SYSTEM IMPLEMENTATION

6.1 MODULES

A module is a separate unit of software or hardware. Typical characteristics of


modular components include portability, which allows them to be used in a variety of
systems, and interoperability which allows them to function with the components of
other systems. The modules used in this project are
⚫ Test Module

⚫ Train Module

⚫ Segmentation Module

⚫ Backend Module
In this project, modules serve as distinct units of both software and hardware,
each designed to fulfill specific functions within the system. One key characteristic of
these modular components is portability, meaning they are constructed in a manner that
enables their seamless integration into a variety of systems without requiring extensive
modification. This portability facilitates versatility in deployment, allowing the
modules to be utilized across different platforms and environments. Another essential
attribute of these modules is interoperability, which enables them to effectively interact
and function with components from other systems. The identified modules include the
Test Module, responsible for evaluating the performance and accuracy of the system;
the Train Module, tasked with training the system using available data; the
Segmentation Module, which focuses on segmenting and isolating relevant features
within input data; and the Backend Module, which provides the underlying framework
and support for the system's functionalities, scalability, thereby enhancing the overall
robustness and flexibility of the system.

21
6.2 MODULES DESCRIPTION

6.2.1 Test Module


In Deep learning, model testing is referred to as the process where the
performance of a fully trained model is evaluated on a testing set. Python provides
the unit test module to test the unit of source code. The unit test plays an essential
role when the project needs huge code, and it provides the facility to check whether the
output is correct or not. Normally, print the value and match it with the reference
output or check the output manually.

Figure 6.1 Data agumentation

You test cases with positive inputs,inputs with zero, negative inputs, and
positive and negative inputs. If the output of our function/method being tested would
be equal to the outputs defined in the unit test for all the input cases, your unit
would pass the test otherwise it would fail.

22
Pre-processing:
pre-processing is crucial to ensure the quality and relevance of the
input data. Initially, the dataset would undergo thorough cleaning to remove
any irrelevant or corrupted images. Following this, standardization techniques
such as normalization and resizing would be applied to ensure consistency
across images. Augmentation techniques like rotation, flipping, and adjusting
brightness can help in increasing the diversity of the dataset, which aids in
robust model training. Additionally, data augmentation can help mitigate
issues related to class imbalance, common in medical datasets.

Segmentation:
Segmentation plays a pivotal role in deep learning models. By
accurately delineating the boundaries of lesions or anomalies within skin
images, segmentation enables precise analysis and classification. Leveraging
techniques such as semantic segmentation or instance segmentation, these
models can effectively identify suspicious regions for further examination.

Feature extraction:
Feature extraction plays a pivotal role in capturing relevant
information from medical images. Initially, a dataset comprising various types
of skin lesions, including benign and malignant ones, is collected.
Preprocessing techniques such as normalization and augmentation are applied
to enhance the quality and diversity of the data.

Classification:
Fine-tune a deep learning architecture such as Convolutional Neural
Networks (CNNs), possibly leveraging pre-trained models like VGG, ResNet,
or DenseNet. The model would be trained using a portion of the dataset and
validated on another to optimize hyperparameters and prevent overfitting.

23
6.2.2 Train Module
The module encapsulates the knowledge and capabilities gained from
training various machine learning algorithms, including CNNs, SVMs, and
Decision Trees, to detect and classify skin cancer from dermatoscopic images.
During the training phase, the module learns to recognize patterns and features
indicative of different types of skin lesions, such as melanoma, nevi, and benign
lesions. Through iterative optimization and adjustment of model parameters,
the module becomes increasingly proficient at accurately identifying these
lesions. Once trained, the module acts as an intelligent system capable of
analyzing new dermatoscopic images and providing predictions regarding the
presence and type of skin cancer.
In essence, the trained module represents the culmination of the project's
research and development efforts, serving as a valuable tool for early detection
and classification of skin cancer. Its successful deployment promises to
enhance diagnostic accuracy, facilitate early intervention, and ultimately
improve patient outcomes in the fight against this prevalent and potentially life-
threatening disease.
The ISIC dataset, which contains a large collection of dermatoscopic
images, serves as the primary source of data for training and testing the model.
Deep learning algorithms, specifically Convolutional Neural Networks
(CNNs), play a pivotal role in this project. CNNs are adept at automatically
learning relevant features from images, making them well-suited for tasks like
image classification. By training a CNN on the ISIC dataset, the model can
learn to differentiate between benign and malignant skin lesions based on their
visual characteristics.

24
6.2.3 Segmentation Module
The segmentation module serves as a critical component by precisely
outlining skin lesions in images from the ISIC dataset. This dataset, rich with
annotated dermatoscopic images, provides a robust foundation for training deep
learning models. Among the algorithms utilized, convolutional neural networks
(CNNs) take center stage for their prowess in learning intricate features from
images, enabling accurate segmentation of lesions. Complementing CNNs,
support vector machines (SVMs) and decision trees contribute their strengths
in handling high-dimensional data and defining decision boundaries for
classification tasks. By integrating these algorithms with the segmentation
module, the project endeavors to enhance the precision and efficiency of skin
cancer diagnosis, potentially leading to earlier detection and improved patient
care.

Figure 6.2 Data segmentation

Convolutional neural networks (CNNs) are particularly adept at learning


intricate features from images, making them well-suited for segmentation tasks.
By precisely outlining skin lesions, the segmentation module plays a crucial
role in the diagnostic process. This interdisciplinary approach, drawing from
computer vision, machine learning, and medical imaging, showcases the power
of technology in healthcare innovation.

25
6.2.4 Backend Module
The backend module for the early detection and classification of skin
cancer project using the ISIC dataset, a comprehensive approach is adopted.
Firstly, Convolutional Neural Networks (CNNs) are employed due to their
prowess in learning intricate patterns and features from skin images. These
CNNs will be pivotal in extracting relevant features that distinguish between
benign and malignant lesions, thus aiding in accurate classification.
Additionally, Support Vector Machines (SVMs) are utilized as they offer a
robust classification technique, particularly useful for binary classification
tasks like cancer detection.
Moreover, Decision Trees are incorporated for their interpretability,
enabling the understanding of the decision-making process behind the
classification. The backend module encompasses data preprocessing, model
training, and evaluation processes, ensuring that the system efficiently and
accurately identifies potential skin cancer cases at an early stage, thereby
enhancing the chances of successful treatment and patient outcomes.
Convolutional Neural Networks (CNNs) will be essential for their ability to
learn intricate patterns from skin images, aiding in accurate classification.
Support Vector Machines (SVMs) will complement CNNs, providing a robust
classification method.
Decision Trees can be employed for their interpretability, potentially
aiding in understanding the features contributing to the classification. The
backend will handle data preprocessing, model training, and evaluation,
ensuring the efficient and accurate detection and classification of skin cancer.

26
ALGORITHM
Convolutional Neural Network (CNN):
Convolutional neural networks are also able to drastically reduce
computation time by taking advantage of GPU for computation, which many
networks fail to utilize. Deep learning algorithms run data through several
“layers” of neural network algorithms, each of which passes a simplified
representation of the data to the next layer. Most machine learning algorithms
work well on datasets that have up to a few hundred features, or columns.

Figure 6.3 Working of CNN

In deep learning, a convolutional neural network (CNN or Conv Net) is a class


of deep neural networks, that are typically used to recognize patterns present in
images but they are also used for spatial data analysis, computer vision, natural
language processing, signal processing, and various other purposes. Pooling
layers are used to reduce the dimensions of the feature maps. Thus, it reduces
the number of parameters to learn and the amount of computation performed in
the network. Flattening is used to convert all the resultant 2- Dimensional arrays
from pooled feature maps into a single long continuous linear vector. The
flattened matrix is fedas input to the fully connected layer to classify the image.
Each function consists of a neuron (or a perceptron). In fully connected layers,
the neuron applies a linear transformation to the input
vector through a weights matrix.
27
Support Vector Machine (SVM):

SVM (Support Vector Machine) is a supervised machine learning


algorithm that uses a hyperplane as a decision boundary to classify data into
different classes. SVM requires a set of labelled data to train on and uses this
training data to classify new input data based on what it learned during the
training phase. One of the advantages of SVM is that it can be used for both
classification and regression problems. To classify non-linear data, SVM uses
the kernel trick to transform the data into another dimension with a clear
dividing margin between the different classes. Initially, a random hyperplane is
drawn, and the distance between the hyperplane and the closest data points from
each class is checked to identify the support vectors. SVM then groups similar
features into different classes based on the hyperplane it creates. In our model,
we utilized SVM to classify malignant and benign skin cancer images by
feeding the segmented and feature-extracted images into the SVM algorithm by
grouping all the similar features into different classes based on similarities.

Decision Tree:

Decision trees are a popular machine learning algorithm employed in various


classification tasks, including the early detection and classification of skin
cancer. In the context of this project, decision trees play a significant role
alongside other algorithms like convolutional neural networks (CNNs) and
support vector machines (SVMs). Decision trees operate by recursively
partitioning the input space into smaller regions based on feature values. At each
node of the tree, a decision is made based on the value of a particular feature,
effectively splitting the data into subsets.

28
6.3 IMPLEMENTATION

The project for early detection and classification of skin cancer through
deep learning models incorporates several key implementation details to
achieve its objectives. Leveraging the ISIC dataset, annotated with
dermatoscopic images, the project employs convolutional neural networks
(CNNs) for precise lesion segmentation, enabling accurate delineation of skin
abnormalities. These segmented regions are then fed into classification
algorithms such as support vector machines (SVMs) and decision trees, which
handle high-dimensional data and define decision boundaries for effective
classification. The CNN-based segmentation module is trained using annotated
data, while the classification models are fine-tuned on a subset of the dataset to
optimize performance. Additionally, techniques such as data augmentation and
transfer learning are employed to enhance model generalization and robustness.

In addition to the core components, the implementation of the deep learning


models for early detection and classification of skin cancer entails a comprehensive
preprocessing pipeline to standardize and enhance image quality. This includes
normalization, cropping, and augmentation techniques to augment the dataset and
improve model generalization. Furthermore, hyperparameter optimization is
conducted to fine-tune the performance of both the segmentation and classification
models. Moreover, the project incorporates a user-friendly interface for clinicians,
allowing them to input images and receive real-time predictions, thus streamlining the
diagnostic process. Continuous monitoring and feedback mechanisms are integrated
to iteratively improve model performance and adapt to emerging challenges. Overall,
the implementation details encompass a holistic approach aimed at developing a
sophisticated and effective tool for early detection and classification of skin cancer,
ultimately enhancing patient care and outcomes.

29
CHAPTER 7
SYSTEM TESTING
7.1 TESTING OBJECTIVES:
The primary objective of the deep learning models for early detection
and classification of skin cancer, the testing objectives are multifaceted. The
models need to be rigorously evaluated for their ability to accurately detect
potential indicators of skin cancer at its nascent stages, thereby emphasizing
sensitivity. The specificity of the models is paramount to ensure that benign
lesions are not falsely identified as malignant, minimizing unnecessary patient
anxiety and medical interventions. Moreover, the robustness of the models
across diverse demographics, skin types, and lesion variations should be
thoroughly assessed to ascertain their generalizability and real-world
applicability. By addressing these testing objectives comprehensively, the
efficacy and reliability of deep learning models for early skin cancer detection
can be substantiated, potentially revolutionizing diagnostic practices and
improving patient outcomes.
7.2 TYPES OF TESTING
System Testing
System testing in a deep learning models for early detection and
classification of skin cancer capabilities is crucial for ensuring its functionality,
usability, reliability. This testing process encompasses several key areas. It
contains several testing approaches within this system testing.

Unit Testing:
Image detection capabilities must be rigorously tested to identify
obstacles and relevant items accurately by comparing with dataset. Unit testing
involves scrutinizing individual components of the deep learning model, such
as specific layers or modules, to verify their functionality and correctness.
30
Functional Testing:
Functional testing assesses the system's performance as a whole,
examining its ability to accurately identify and classify different types of skin
lesions across diverse datasets and scenarios. testing methodologies are
essential to ensure the system's accuracy and reliability.

White Box Testing:


White box testing provides insights into the inner workings of the model,
analyzing its algorithms and code structure to identify potential weaknesses or
areas for improvement. The paving the way for more accurate and timely
diagnosis of skin cancer, ultimately leading to better patient outcomes.
Integration Testing:
Integration testing for the deep learning models developed for early
detection and classification of skin cancer involves evaluating the entire
system's functionality, ensuring seamless interaction between various
components such as data preprocessing, model training, and inference. This
testing phase aims to verify that the integrated system behaves as expected,
accurately detecting and classifying skin cancer cases based on input images. It
involves rigorous testing scenarios to assess the model's performance under
different conditions, including variations in input data, environmental factors,
and potential edge cases.

31
7.3 TEST CASE
Early detection and classification of skin cancer using deep learning
models, The test cases that thoroughly evaluate the performance and robustness
of your model.

Test Case 1:

Test Case: Input an image of a benign mole, Feed the image into the deep learning
model.

Expected Outcome: The model should classify the mole as benign with high
confidence.

Test Case 2:

Test Case: Input the image into the deep learning model.

Expected Outcome: The model should classify the melanoma as malignant with
high confidence.

Test Case 3:

Test Case: Input the image into the deep learning model.

Expected Outcome: The model should provide a warning or indicate low confidence
due to the poor quality of the image.

Test Case 4:

Test Case: Feed the image into the deep learning model.

Expected Outcome: The model should correctly classify the skin condition as
non-cancerous with high confidence.

32
CHAPTER 8
RESULT AND DISCUSSION
8.1 PERFORMANCE ANALYSIS
The primary objective of the deep learning models for early detection
and classification of skin cancer, the testing objectives are multifaceted. The
models need to be rigorously evaluated for their ability to accurately detect
potential indicators of skin cancer at its nascent stages, thereby emphasizing
sensitivity. The specificity of the models is paramount to ensure that benign
lesions are not falsely identified as malignant, minimizing unnecessary patient
anxiety and medical interventions. Beyond quantitative metrics, qualitative
assessments including clinical relevance, ease of integration into existing
healthcare workflows, and potential for real-time diagnosis also play a
significant role. A comprehensive performance analysis not only validates the
utility of these models but also guides further refinement and deployment
strategies, ultimately advancing the early detection and management of skin
cancer.
Accuracy
The skin cancer detection, the utilization of deep learning models offers
not only heightened accuracy but also an array of performance metrics crucial
for robust diagnostic systems. Precision, a metric measuring the proportion of
true positive predictions among all positive predictions, ensures that identified
cases are reliably classified as cancerous. The F1 score, a harmonic mean of
precision and recall, provides a balanced assessment of a model's effectiveness
in both minimizing false positives and false negatives. Recall, also known as
sensitivity, gauges the model's ability to detect all positive instances, thus
crucial for capturing all potentially cancerous lesions. Additionally, accuracy
serves as a fundamental metric, representing the
overall correctness of the model's predictions across all classes. By optimizing
33
these metrics, deep learning models not only enhance diagnostic accuracy but
also instill confidence in their ability to identify and classify skin lesions,
ultimately facilitating early intervention and improving patient outcomes.

Figure 8.1 Classification Report Analysis

In the context of skin cancer detection, precision, recall, F1 score, and


accuracy play vital roles in evaluating the performance of deep learning
models. Precision measures the proportion of correctly identified positive cases
(i.e., correctly classified as cancerous) out of all cases labeled as positive by the
model. It emphasizes the model's ability to minimize false positives, ensuring
that the identified cases are indeed indicative of skin cancer, thus reducing
unnecessary medical interventions or anxiety for patients.
Recall, also known as sensitivity, assesses the model's capability to
correctly detect all positive instances, thereby minimizing false negatives.

Here the Equation:


K=Po – Pe / 1-Pe
Where:

34
Po is the observed agreement, which is the proportion of instances where
the raters (or in this case, the model and the ground truth) agree. Pe is the
expected agreement, which is the proportion of instances where agreement is
expected to occur by chance. To calculate Po , The number of instances where
the model and ground truth agree by the total number of instances. To calculate
Pe, compute the probability of random agreement for each class and then sum
them.
8.2 TRAINING ANALYSIS

Figure 8.2 Training Analysis

Figure (a) depicts the training accuracy and validation accuracy plotted
against the number of epochs during the training of a deep learning model for
skin cancer detection. Both training and validation accuracy increase as the
number of epochs rises. This trend suggests that the model is learning from the
training data and improving its ability to correctly classify skin lesions over
time. The epochs value considered determines the number of times the entire
dataset is passed forward and backward through the neural network during
training. With each epoch, the model updates its internal parameters (weights
and biases) based on the errors calculated from the training data, gradually
35
improving its performance.
In Figure (b), the loss graph for both training and validation data is shown
as the number of epochs increases. Loss represents the discrepancy between the
predicted outputs of the model and the actual labels in the training and
validation datasets. As the value of an epoch rises, the loss decreases until it
becomes almost nonexistent. This indicates that the model is effectively
minimizing its errors and becoming increasingly accurate in its predictions. The
decreasing loss signifies that the model is converging towards an optimal
solution, where the difference between predicted and actual values is
minimized.
Overall, both figures demonstrate the progressive improvement of the
deep learning model over epochs, with increasing accuracy and decreasing loss
on both training and validation datasets. This indicates successful learning and
convergence of the model, ultimately leading to better performance in detecting
and classifying skin cancer lesions.

36
CHAPTER 9
APPENDICES
9.1 SOURCE CODE
Main.py
from flask import Flask, render_template, request, jsonify, send_file,
import pandas as pd
from PIL import Image, ImageDraw
import random
import os
import ntpath
import base64
import pickle
from io import BytesIO
from torch import Tensor, load
import numpy as np
from SkinCancer.Model import SkinCancerModel
app = Flask( name )
def serve_pil_image(pil_img):
img_io = BytesIO()
pil_img.save(img_io, format='JPEG', quality=100)
img_io.seek(0)
img_i = base64.b64encode(img_io.getvalue()).decode()
return {'image': img_i}
@app.route('/diagnosis/skin_cancer', methods=['GET', 'POST'])
def skin_cancer():
def get_prediction(pil_img, age, gender):
pil_img = pil_img.resize([128, 128])
age_t = Tensor([age]).reshape(1, 1)
37
gender_t = Tensor([gender]).reshape(1, 1)
img_t = Tensor(np.array(pil_img)).reshape(1, 3, 128, 128)
model = SkinCancerModel()
model.load_state_dict(load('SkinCancer/model_skin_cancer_epoch40.pt'))
model.eval()
pred = np.round(model.forward(img_t, gender_t,
age_t).detach().numpy())
return int(pred)
if request.method == 'GET':
return render_template('skin-cancer.html')
else:
if 'use_random' in request.form.keys():
if int(request.form.get('use_random')) == 1:
random_path =
os.path.join('SkinCancer/RandomData/images',
random.choice(os.listdir('SkinCancer/RandomData/images')))
file_name =
ntpath.basename(ntpath.splitext(random_path)[0])
metadata =
pd.read_csv('SkinCancer/RandomData/meta_data.csv')
row = metadata.loc[(metadata['image_id'] ==
file_name)]
gender = row['sex'].item()
if gender == 'male':
gender = 1
elif gender == 'female':
gender = 0

38
img = Image.open(random_path).convert('RGB') res =
serve_pil_image(img.resize([400, 400])) res['prediction'] =
get_prediction(img, age, gender) return jsonify(res)

print('File: {}'.format(request.files.get('skin-cancer-

age = int(request.form.get('age')) gender =


request.form.get('gender')
img = Image.open(request.files.get('skin-cancer-
diagnosis-image')).convert('RGB')
if gender == 'Female':
gender = 0
elif gender == 'Male':
gender = 1
else:
gender = -1
res = serve_pil_image(img.resize([400, 400]))
res['prediction'] = get_prediction(img, age, gender)
return jsonify(res)
return jsonify({'error': 1})
@app.route('/', methods=['GET'])
def home():
return render_template('home.html')
if name == ' main ':
app.run(debug=True)
Train_model.py
from src.SkinCancer.Dataloader import TestDataset
from src.SkinCancer.Model import SkinCancerModel
39
from torch import load
from torch.utils.data import DataLoader
import numpy as np
from sklearn.metrics import accuracy_score
model = SkinCancerModel()
model.load_state_dict(load('model_skin_cancer_epoch40.pt'))
model.eval()
test_dataset = TestDataset()
test_loader = DataLoader(test_dataset, batch_size=32, shuffle=True)
acc = 0
f1 = 0
n_test_batches = 0
y_pred_sum = 0

for _, data in enumerate(test_loader):


test_x, test_y, sex, age = data
test_x = test_x.float()
test_y = test_y.float()
sex = sex.float()
age = age.float()
y_pred = model.forward(test_x, sex, age)
y_pred = np.round(y_pred.detach().numpy())
acc += accuracy_score(test_y.numpy(), y_pred)
n_test_batches += 1
print('Accuracy={}'.format(acc / n_test_batches))

Train_model.py
from src.SkinCancer.Model import SkinCancerModel
40
from src.SkinCancer.Dataloader import TrainDataset
from torch import save
import torch.nn as nn
import pandas as pd
from torch.optim import Adam
from torch.utils.data import DataLoader
model = SkinCancerModel()
optimizer = Adam(model.parameters())
criterion = nn.BCELoss()
train_dataset = TrainDataset()
ground_truth = pd.read_csv('/home/aftaab/MylanDatasets/Skin
Cancer/ground_truth.csv')
train_loader = DataLoader(train_dataset, batch_size=128, shuffle=True)
def train(epoch):
for step, data in enumerate(train_loader):
train_x, train_y, sm, am = data
sex_t = sm.float()
age_t = am.float()
train_y = train_y.float().view(-1, 1)
optimizer.zero_grad()
y_pred = model.forward(train_x, sex_t, age_t)
loss = criterion(y_pred, train_y)
loss.backward()
optimizer.step()
print('Epoch {}, batch={}, loss={}'.format(epoch, step,
loss.item()))
for i in range(1, 41):
train(i)
41
if i % 5 == 0:
save(model.state_dict(),
'model_skin_cancer_epoch{}.pt'.format(i))
Dataloader.py
from torch.utils.data import Dataset
import pandas as pd
from sklearn.model_selection import train_test_split
import numpy as np
from PIL import Image
import ntpath
from torch import Tensor
from glob import glob
all_files = glob('/home/aftaab/MylanDatasets/Skin Cancer/*.jpg')
ground_truth = pd.read_csv('/home/aftaab/MylanDatasets/Skin
Cancer/ground_truth.csv')
meta_data = pd.read_csv('/home/aftaab/MylanDatasets/Skin
Cancer/ISIC-2017_Training_Data_metadata.csv')
train, test = train_test_split(all_files, test_size=0.15)
melanoma_dict = {}
n_samples = sum(ground_truth['melanoma'])
n_negatives = 0
n_positives = 0
for (index, row), (index1, row1) in zip(ground_truth.iterrows(),
meta_data.iterrows()):
if n_negatives<=n_samples and row['melanoma']==0:
melanoma_dict[row['image_id']] = {'target': row['melanoma'],
'gender': row1['sex'], 'age': row1['age_approximate']}
n_negatives+=1
42
elif n_positives<=n_samples and row['melanoma']==1:
melanoma_dict[row['image_id']] = {'target': row['melanoma'],
'gender': row1['sex'], 'age': row1['age_approximate']}
n_positives+=1
else:
all_files_temp = all_files
for file in all_files:
file_name = ntpath.basename(ntpath.splitext(file)[0])
if file_name == row['image_id']:
all_files_temp.remove(file)
break
all_files = all_files_temp
print('Undersampling to {} positive, {} negative
samples.'.format(n_negatives, n_positives))
train, test = train_test_split(all_files, test_size=0.15)
class TrainDataset(Dataset):
def init (self):
super(). init ()
def getitem (self, index):
file_path = train[index]
img =
np.array(Image.open(file_path).convert('RGB').resize([128, 128]))
img = Tensor(img).view(3, 128, 128)

file_name = ntpath.basename(ntpath.splitext(train[index])[0])
y=0
age = -1
sex = -1
43
if melanoma_dict.get(file_name) is not None:
y = melanoma_dict.get(file_name)['target']
g = melanoma_dict.get(file_name)['gender']
if g == 'female':
g=0
elif g == 'male':
g=1
else:
g = -1
sex = g
age = melanoma_dict.get(file_name)['age']
if type(age) == str:
age = -80
return [img, y, sex, age]
def len (self):
return len(train)
class TestDataset(Dataset):
def init (self):
super(). init ()

def getitem (self, index):


file_path = test[index]
img =
np.array(Image.open(file_path).convert('RGB').resize([128, 128]))
img = Tensor(img).view(3, 128, 128)
file_name = ntpath.basename(ntpath.splitext(test[index])[0])
y=0
age = -1
44
sex = -1
if melanoma_dict.get(file_name) is not None:
y = melanoma_dict.get(file_name)['target']
g = melanoma_dict.get(file_name)['gender']
if g == 'female':
g=0
elif g == 'male':
g=1
else:
g = -1
sex = g
age = melanoma_dict.get(file_name)['age']
if type(age) == str:
age = -80
return [img, y, sex, age]
def len (self):
return len(test)
Skin-cancer.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no">
<title>Cancer Detection and Diagnosis</title>
<script src="{{ url_for('static', filename='js/jquery.min.js')}}"
type="text/javascript"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js')}}"
type="text/javascript"></script>
45
<script src="{{ url_for('static', filename='js/tether.min.js')}}"
type="text/javascript"></script>
<script src="{{ url_for('static', filename='js/dynamic.js')}}"
type="text/javascript"></script>
<script src="{{ url_for('static', filename='js/skin-cancer-
diagnosis.js')}}" type="text/javascript"></script>
<!-- CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.
css"
integrity="sha384-
Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgF
AW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="{{ url_for('static',
filename='css/bootstrap.css')}}">
<link rel="stylesheet" href="{{ url_for('static',
filename='css/style.css')}}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/file-
input.css')}}">
</head>
<body>
{% include "navbar.html" %}
<div class='container mt-5 mb-6'>
<div class="row">
<div class="col-12">
<p>
<h4>Melanoma detection/lesion classification</h4>
Trained on the ISIC 2018 skin cancer(melanoma) dataset,
46
the model uses lesion images and meta-data like gender and
age to classify a lesion
as malignant or benign.
</p>
<p>After undersampling the benign samples, and training the
model, it achieved a F1 score
of 0.83 on the test set.
</p>
</div>
</div>
<div class="row mt-5 mb-5">
<div class="col-12 col-md-6">
<form class="form-group" id="select-image-form"
enctype="multipart/form-data">
<label>Upload Your File</label>
<div class="files">
<input name="skin-cancer-diagnosis-image" id="skin-
cancer-diagnosis-image" type="file"
class="form-control" data-error="Please upload a
image" multiple="" accept="image/">
</div>
</body>
</html>

47
9.2 SCREENSHOTS
Developed Web Page:

Figure 9.1 Developed Web Page

The web page offers a powerful tool in the fight against skin cancer,
utilizing cutting-edge deep learning models for early detection and accurate
classification. With a user-friendly interface, individuals can upload images of
suspicious moles or lesions, allowing our advanced algorithms to swiftly
analyze and provide instant feedback. Our system not only detects potential
signs of skin cancer but also categorizes them for further medical evaluation,
empowering users to take proactive steps towards early intervention and
treatment. Through the fusion of technology and healthcare, we aim to enhance
early detection rates, ultimately saving lives and promoting healthier.

48
Interior Page

Figure 9.2 Interior page

Using this page,the interior webpage dedicated to deep learning models for
the early detection and classification of skin cancer. Here, users can explore
cutting-edge technology aimed at revolutionizing the diagnosis process. Through
advanced algorithms and machine learning techniques, our models analyze
various skin lesions, providing accurate assessments to aid in early detection and
classification. Whether you're a healthcare professional, researcher, or individual
concerned about skin health, this page offers insights into the innovative tools
driving progress in skin cancer diagnosis. Explore our resources to learn more
about how deep learning is shaping the future of dermatology and improving
patient outcomes.

49
Image Upload Page

Figure 9.3 Image upload page

This webpage is designed to assist users in uploading an image for early


detection and classification of skin cancer using deep learning models. Users
can upload an image of a skin lesion, along with selecting the gender and age
of the individual in the image. These inputs help the deep learning models to
accurately analyze the image and provide insights regarding the presence or
absence of skin cancer. The goal is to provide users with a user- friendly
interface to facilitate the early detection and classification of skin cancer,
ultimately aiding in timely medical intervention and treatment.

50
Positive Result Page

Figure 9.4 Positive result page

This webpage dedicated to the early detection and classification of skin


cancer using deep learning models. Through rigorous preprocessing,
segmentation, and feature extraction techniques, we've optimized our system to
swiftly analyze images for potential melanoma. Within a matter of seconds,
users receive a comprehensive diagnosis displayed directly on the webpage.
Whether the result indicates melanoma positive our goal is to provide clarity
and support to individuals concerned about their skin health. By leveraging
advanced technology and machine learning algorithms, we aim to empower
users with timely and accurate information, ultimately contributing to early
detection and improved outcomes in the fight against skin cancer.

51
Negative Result Page

Figure 9.5 Negative result page

This webpage dedicated to the early detection and classification of skin


cancer using deep learning models. Through rigorous preprocessing,
segmentation, and feature extraction techniques, we've optimized our system to
swiftly analyze images for potential melanoma. Within a matter of seconds,
users receive a comprehensive diagnosis displayed directly on the webpage.
Whether the result indicates melanoma negative our goal is to provide clarity
and support to individuals concerned about their skin health. By leveraging
advanced technology and machine learning algorithms, we aim to empower
users with timely and accurate information, ultimately contributing to early
detection and improved outcomes in the fight against skin cancer.

52
CHAPTER 10
CONCLUSION AND SCOPE FOR FUTURE WORK

10.1 CONCLUSION
In conclusion, the utilization of deep learning models such as
Convolutional Neural Networks (CNN), Support Vector Machines (SVM), and
Decision Trees has shown promising results in the early detection and
classification of skin cancer. These models leverage complex patterns and
features within medical images to accurately diagnose different types of skin
lesions. While CNNs excel in feature extraction and hierarchical representation
learning, SVMs and decision trees offer interpretability and efficiency in
classification tasks. However, further research and validation are necessary to
optimize and deploy these models effectively in clinical settings.

10.2 FUTURE ENHANCEMENT


In the future, advancements in deep learning models for early detection
and classification of skin cancer could focus on hardware implementation to
enhance efficiency and speed. Integrating these models into specialized
hardware, such as GPUs or even dedicated ASICs, could accelerate processing
and improve real-time diagnosis capabilities. Additionally, expanding datasets
to include diverse skin types, ages, and environmental factors would enhance
model generalization and performance across populations. Incorporating
ensemble methods, where CNNs, SVMs, and decision trees collaborate, could
leverage the strengths of each algorithm for more robust predictions. These
enhancements could pave the way for more effective and accessible skin cancer
screening tools, ultimately saving lives through early detection and
intervention.

53
REFERENCES

1. Aarushi Shah, Manan Shah, Aum Pandya, Rajat Sushra, Ratnam Sushra,
Manya Mehta, Keyur Patel, Kaushal Patel, (2023). "A comprehensive
study on skin cancer detection using artificial neural network (ANN) and
convolutional neural network (CNN)" Vol.9, pp.2588-9141 2023.
2. Aliasgar Pardawala, Sakshi Jagtap, Tayyaba Pinjari, Ruttik Trymbake,
Mrs. Deepika Falak, (2023). "Skin Cancer Detection Using CNN", Vol.9,
pp.2349-5162.
3. Arslan Javaid, Muhammad Sadiq, Faraz Akram, (2021). "Skin Cancer
Classification Using Image Processing",IEEE Explore access, Vol.10,
pp.9393-1981.
4. Atikur Rahman, Muhammad Sheikh Sadi (2022). "IoT Enabled
Automated Object Recognition for the Visually Impaired", Vol.1,
pp.100-128.
5. GS Gopika Krishnan, M. Lekha, A. Meghana Shravani, G. Milirna,
(2023). "Skin Cancer Detection Using Machine Learning", Vol.7,
pp.2582-5208.
6. Justin Seby, Sysvine Technologies, (2021). " Skin Cancer Detection
Using Convolutional Neural Network", Vol.9, pp.2320-2882.
7. Khalid M. Hosny, Mohamed A. Kassem, and Mohamed M. Foaud,
(2018), "Skin Cancer Classification using Deep Learning and Transfer
Learning", IEEE access, Vol.1, pp.978-1-5386-8154-1.

54
8. Manjunath H R, (2023). "Skin Cancer Detection Using Machine
Learning", Vol.4, pp.4573-3410

9. Maryam Naqvi, Syed Qasim Gilani, Tehreem Syed Oge Marques and
Hee-Cheol Kim. (2023), "Skin Cancer Detection Using Deep Learning",
10. Mohammad Ali Kadampur, Sulaiman Al Riyaee, (2020) "Skin cancer
detection: Applying a deep learning based model driven architecture in
the cloud for classifying dermal cell images", Vol.5, pp.2352-9148
11. Neema M, Arya S Nair, Annette Joy, Amal Pradeep Menon, (2020).
"Skin Lesion/Cancer Detection Using Deep Learning", Vol.15, pp.0973-
4562.
12. Noortaz Rezaoana, Mohammad Shahadat Hossain, Karl Andersson
(2020) "Detection and Classification of Skin Cancer by Using a Parallel
CNN Model", IEEE access, Vol.3, pp. 978-0-7381-3144-3.
13. Pamela Hermosilla, Ricardo Soto, Emanuel Vega, Cristian Suazo and
Jefte Ponce, (2023). "Skin Cancer Detection and Classification Using

Neural Network Algorithms", Vol.7, pp.14040454.


14. Sasikala G M, Joshikha V, Keerthana E, (2023). "Skin Cancer Detection
and Severity Prediction Using Deep Learning", Vol.10, pp.2395-0056.
15. Sahil Bhagwat, Supriya Bodke, Nehal Reddy, Samruddhi Patil, Jyotsna
Borase, (2023). "Skin Cancer Detection System Using Machine Learning
and Deep CNN", Vol.5, pp.2582-5208.
16. Vidya M, Dr. Maya V Karki, (202), "Skin Cancer Detection using
Machine Learning Techniques", IEEE access, Vol.9, pp.978-1-7281-
6828-9.

55
PUBLICATION

DHANALAKSHMI K (621320104010), SHREYA S B (621320104049)


Mrs. NIVETHA L, M.E., “DEEP LEARNING MODELS FOR EARLY
DETECTION AND CLASSIFICATION OF SKIN CANCER”, in the 4th
International Conference on Artificial Intelligence,5G Communications and
Network Technologies (ICA5NT 2024) Organized by “VELAMMAL
INSTITUTE OF TECHNOLOGY, CHENNAI, TAMIL NADU, INDIA”
held no 21 &22, March 2024.

56

You might also like

pFad - Phonifier reborn

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

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


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy