Skincancer Final Report
Skincancer Final Report
BELAGAVI – 590018
A Project Report on
“SKIN CANCER DETECTION”
Submitted in partial fulfillment of the requirements of the Award of degree of
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING
Submitted By
MANASA M SHETTY [4JK21CS031]
NIKSHITHA [4JK21CS039]
UNNIKRISHNAN [4JK21CS060]
PRAJEETH [4JK22CS403]
CERTIFICATE
This is to certify that the Project entitled “ SKIN CANCER DETECTION ” is a bonafide
work carried out by MANASA M SHETTY (4JK21CS031), NIKSHITHA (4JK21CS039),
UNNIKRISHNAN (4JK21CS060), PRAJEETH (4JK22CS403) of 8th semester Computer
Science and Engineering in partial fulfillment for the award of the degree of Bachelor of
Engineering in Computer Science & Engineering of the Visvesvaraya Technological
University, Belgavi during the academic year 2024-2025. It is certified that all the suggestions
and corrections indicated for the internal assessment have been incorporated in the report
deposited in the department library. The project report has been approved as it satisfies the
requirements in respect of project work prescribed for the said degree.
1.
2.
ACKNOWLEDGEMENT
If words are considered as the tokens of acknowledgements, then the words play the heralding
role of expressing our gratitude.
With proud gratitude we thank God Almighty for all the blessings showered on us and for
completing our project successfully.
We wish to enunciate our special thanks to our paradigmatic and relevant Project coordinator,
Mrs. Ashwitha Shetty, Assistant Professor, and the internal guide Mr. Stanley Pradeep
D’Souza , Assistant Professor, Department of Computer Science and Engineering, AJIET who
gave us throughout our project period with their valuable suggestions and for devoting their
precious time in making this project a success.
We wish to express our deepest gratitude to Dr. Antony P J, Vice Principal and Head of
Department, Computer Science and Engineering, AJIET, for his profound alacrity in our
project and his valuable suggestions.
We are indebted to The Dean Academics, Mr. Mahabaleshwarappa P, for his guidance
and invaluable suggestions steered us towards a greater insight and understanding.
We owe our gratitude to The Principal, Dr. Shantharama Rai C for his whole hearted support
and for his kind permission to undergo the project.
In the end, we offer our sincere thanks to our family members and friends for their valuable
suggestions, encouragement and unwavering support.
i
ABSTRACT
Skin cancer is one of the most common and potentially fatal malignancies. Early detection is
crucial for effective treatment, but traditional diagnostic methods like visual inspection,
dermoscopic analysis, and biopsies are time-consuming and prone to human error. Recent
advances in deep learning offer promising solutions for automating skin lesion classification.
This research explores the use of EfficientNet B5 and ResNet50 models for distinguishing
between benign and malignant skin lesions in dermoscopic images. The dataset used comes
from the International Skin Imaging Collaboration (ISIC) archive, containing 1800 benign
and 1497 malignant images, resized to 224x224x3 pixels. To improve model performance, we
apply extensive data augmentation, including random rotation, shear, height and width zoom,
hair augmentation, and coarse dropout. The ResNet50 model, with its deep residual
connections, addresses the vanishing gradient problem, while EfficientNet B5 balances
accuracy and computational efficiency through compound scaling. Both models are trained
using binary cross-entropy loss and the Adam optimizer. The models are evaluated using
metrics such as accuracy, precision, recall, F1-score, and ROC-AUC. Our results
demonstrate that both models achieve robust performance in classifying skin lesions, with
EfficientNet B5 offering a good trade-off between accuracy and efficiency.
ii
TABLE OF CONTENTS
List of Figures v
List of Tables vi
Introduction
1.1 Overview
1 1.2 Existing System 1- 7
1.3 Proposed System
1.4 Organization of the Report
Testing
5 5.1 Test Cases 27-29
Snapshots and Results
6 6.1 ResNet50 30-40
6.2 EfficientNetB5
iii
Conclusion vii
References x
iv
LIST OF FIGURES
v
LIST OF TABLES
vi
Skin Cancer Detection
CHAPTER 1
INTRODUCTION
1.1 Overview
Skin cancer is the most prevalent form of human malignancy and can be life-threatening if not
diagnosed early. Early detection significantly improves treatment outcomes, but traditional
diagnostic methods rely heavily on visual inspection, dermoscopic analysis, and biopsies,
which are time-consuming and prone to human error. The variability in the appearance of skin
lesions makes accurate diagnosis challenging, even for trained dermatologists. Consequently,
there is a growing need for automated and reliable methods to assist in skin cancer detection.
Recent advancements in deep learning have shown great promise in medical image analysis,
particularly in the classification of skin lesions. Convolutional Neural Networks (CNNs) are
capable of extracting complex patterns and features from dermoscopic images, enabling
accurate classification of skin lesions as benign or malignant. In this study, we employ two
state-of-the-art deep learning models: EfficientNet B5 and ResNet50.
ResNet50 is a 50-layer deep CNN that uses residual connections to address the vanishing
gradient problem, enabling the training of very deep networks without performance
degradation. It has demonstrated strong performance in various image classification tasks.
EfficientNet B5, on the other hand, optimizes network scaling in terms of depth, width, and
resolution, providing a balance between high accuracy and computational efficiency.
The dataset used for this research comes from the International Skin Imaging Collaboration
(ISIC) archive, which includes thousands of labeled dermoscopic images of benign and
malignant skin lesions. To enhance model performance and reduce overfitting, various data
augmentation techniques such as random rotation, shear, zoom, hair augmentation, and coarse
dropout are applied. The primary goal of this research is to develop an automated system that
can accurately classify dermoscopic images, assisting dermatologists in early diagnosis and
reducing diagnostic errors. By leveraging EfficientNet B5 and ResNet50, we aim to
demonstrate the potential of deep learning in improving the accuracy and efficiency of skin
cancer detection.
Medical imaging plays a crucial role in the early detection and diagnosis of skin cancer. High-
resolution dermoscopic images allow dermatologists to analyze skin lesions for subtle patterns
indicative of malignancy. However, the variability in lesion appearance, caused by factors such
as lighting, patient skin type, and lesion location, makes manual diagnosis challenging. To
address this, deep learning techniques have been applied to automate the classification of these
images, improving accuracy and reducing human error.
For this study, the dataset is sourced from the International Skin Imaging Collaboration (ISIC)
archive, a leading repository for dermoscopic images of skin lesions. The dataset includes:
1800 images of benign moles, 1497 images of malignant moles. The images are resized to a
uniform resolution of 224x224 pixels with three color channels (RGB) .The dataset is balanced,
making it well-suited for binary classification tasks.
Preprocessing is essential to enhance image quality and prepare the data for training. The
following preprocessing techniques are applied: Normalization: Images are normalized by
scaling pixel values to the range [0, 1] by dividing by 255. Data Augmentation: Various
augmentation techniques are used to improve model generalization, including: Random
Rotation, Shear and Zoom Transformations, Hair Augmentation: Adding synthetic hair to
simulate real-world dermoscopic images, Coarse Dropout: Randomly masking parts of the
image to improve robustnessThe dataset is split into training and test sets: Training Set: 1440
benign and 1197 malignant images (2637 total). Test Set: 360 benign and 300 malignant images
(660 total) . This comprehensive dataset and preprocessing approach help ensure the deep
learning models can effectively distinguish between benign and malignant skin lesions.
Machine learning algorithms learn to recognize patterns associated with the data, make
decisions or predictions based on those patterns. In a broad sense machine learning algorithm
categorized based on the nature of learning task and the data processed into several types.
1. Supervised Learning
In supervised learning, the model is trained on a labeled dataset, meaning the input data comes
with corresponding output labels. The goal is to learn a mapping from inputs to outputs.
2. Unsupervised Learning
In unsupervised learning, the model is trained on an unlabeled dataset and aims to find patterns
or structures within the data.
3. Semi-Supervised Learning
Semi-supervised learning uses a combination of a small amount of labeled data and a large
amount of unlabeled data. This approach is useful when labeling data is expensive or time-
consuming predictions based on those patterns. In a broad sense machine learning algorithm
categorized based on the nature of learning task and the data processed.
4. Reinforcement Learning
In reinforcement learning, an agent learns to make decisions by interacting with an
environment. It receives feedback in the form of rewards or penalties.
The growing global burden of skin cancer highlights the need for innovative solutions to
improve diagnostic speed, consistency, and accessibility. A robust, automated detection system
leveraging advanced machine learning techniques could assist healthcare providers in early
diagnosis, reducing dependency on invasive procedures and expert availability.
image quality, and the computational inefficiencies of traditional machine learning models.
Through robust preprocessing techniques, such as normalization and data augmentation, the
model aims to improve its generalizability to real-world data, where image noise, lighting, and
resolution often vary. By providing a scalable and efficient solution, this system can support
dermatologists in clinical decision-making, reduce dependency on invasive procedures like
biopsies, and facilitate early diagnosis in resource-limited settings.
The current approaches for skin cancer detection primarily rely on a combination of manual
diagnostic methods and basic machine learning models, each with its limitations:
• Challenges in Current Systems: Publicly available datasets (e.g., ISIC) often have
more benign cases than malignant ones, skewing predictions toward the majority class
and reducing sensitivity for detecting malignant lesions. Images in dermoscopic
datasets vary significantly in resolution, lighting, and angle of capture. This variability
complicates feature extraction and model training. Complex models often memorize
• EfficientNet B5: Uses a compound scaling approach to balance depth, width, and
resolution, ensuring computational efficiency. Highly accurate in extracting relevant
features from complex dermoscopic images while maintaining a low computational
cost.
• ResNet50: Employs residual connections to combat the vanishing gradient problem,
enabling effective training of deeper networks. Excels at capturing subtle features such
as color variations, texture, and edges crucial for distinguishing between benign and
malignant lesions.
• Dataset: Sourced from the ISIC archive, including 1800 benign and 1497 malignant
labeled images. Balanced dataset ensures equal representation of both categories for
better classification accuracy. high precision and recall, minimizing false negatives.
• Preprocessing Techniques:
o Normalization: Scales pixel values to the [0,1] range to standardize image
inputs.
o Resizing: Images are resized to 224x224x3 (RGB) dimensions to match model
requirements.
o Segmentation: Isolates lesions from the background to focus color variations,
texture, and edges on the region of interest.
3. Workflow:
5. Key Benefits:
• Accuracy: Achieves high precision and recall, minimizing false negatives and false
positives.
• Efficiency: Reduces diagnostic time, enabling quicker decision-making.
• Scalability: Adaptable to larger datasets and real-world clinical settings.
• Automation: Reduces dependency on manual interpretation, allowing widespread use
in areas with limited dermatological expertise.
6. Evaluation Metrics:
• Precision and Recall: Focus on the trade-off between false positives and false
negatives.
• F1-Score: Balances precision and recall for imbalanced datasets.
• ROC-AUC: Assesses the model's capability to distinguish between the two classes.
The chapter 1 gives the brief overview of the project including the main objectives of the
project. Its spectacles about the existing system and demerits of that. The proposed system that
overcomes the demerits of the existing system is stated. The chapter 2 briefs the literature
survey of the project. The chapter 3 specifies software Requirement Specification, which
includes Functional requirements, Nonfunctional requirements, System requirements such as
Hardware and software specification. The chapter 4 specifies Design phase of the project which
includes System Architecture, modules, low level and high-level design consisting and gives
the detail implementation of each module. The chapter 5 gives the snap shots and the results.
CHAPTER 2
LITERATURE SURVEY
Skin cancer is a major health concern impacting people worldwide. “Melanoma, Basal cell
carcinoma (BCC) and squamous cell carcinoma (SCC) are the most common types”. Early
detection is crucial for effective treatment, as it greatly enhances the chances of a positive
outcome. However, correctly identifying skin conditions cancer, particularly in its starting
stages, poses challenges, with traditional biopsy methods often being invasive and time-
consuming. Recent progress in “artificial intelligence (AI) technology” and its more complex
version, deep learning. have led researchers to investigate automated techniques for detecting
skin cancer detection that are quicker, non-invasive, and potentially more precise. This review
focuses on recent discoveries from four research studies that utilize various advanced AI
techniques to identify different types of skin cancer and melanoma at different stages.
The study “Skin Cancer Classification Using EfficientNet”[1] by Harahap et al. (2024)
examines how well the EfficientNet architecture in identifying different skin cancer,
concentrating on the three main types: BCC, SCC, and melanoma. EfficientNet, a series of
models recognized for their compound scaling and lightweight design, enables high accuracy
while ensuring computational efficiency. The authors tested models ranging from EfficientNet-
B0 to EfficientNet-B7 on a vast collection of skin lesions. The study highlights the benefits of
EfficientNet’s architecture in effectively balancing depth, width, and resolution, which are
scaled up to higher versions (B0 through B7) using a compound scaling method. The findings
indicate that EfficientNet-B4 achieves the best accuracy at 79.69%, demonstrating improved
precision and recall than other models.
An important aspect of the study is the application of transfer learning, where EfficientNet
models are initially trained on ImageNet and subsequently fine-tuned for skin cancer
classification. This approach not only accelerates training but also improves the model's ability
to generalize on the skin cancer dataset, showcasing EfficientNet’s strength in identifying
BCC, SCC, and melanoma. Additionally, the study tackles the problem of an imbalanced
dataset by applying methods to expand the data, such as random flipping and rotation, which
further improved the model’s capacity to accurately classify different types of skin cancer.
The research conducted by Patil and Bellary (2022), titled “Machine Learning Approach in the
Melanoma Cancer Stage Detection[2],” centers for identifying and categorizing melanoma by
its stages, utilizing a CNN model that incorporates a new way to measure text similarity
Processing (SMTP) loss function. This SMTP loss function is specifically designed to
differentiate melanoma stages based on tumor thickness, allowing the model to more accurately
identify distinct stages of melanoma.
The study highlights the critical role of early detection in melanoma, a type of cancer known
for spreading quickly progression. Traditional staging methods, such as Clark’s and Breslow’s
indices, require surgical procedures to measure tumor depth and thickness. In contrast, Patil
and Bellary’s model seeks to offer a non-invasive solution that analyzes dermoscopic images
to classify melanoma stages by assessing tumor thickness without requiring surgery. The
SMTP method for calculating loss improves the CNN’s sensitivity, specificity, and accuracy
by focusing on the differences among stages based on tumor thickness, making the model
particularly effective for stage classification.
The study evaluated two classification frameworks: one for a two-stage classification (tumor
thickness < 0.76 mm for Stage 1 and ≥ 0.76 mm for Stage 2) and another for a three-stage
classification that includes Stage 3 for tumor thickness > 1.5 mm. By utilizing this loss
function, the model demonstrates enhanced precision, recall, and F1-score, especially in
distinguishing early-stage melanomas. The non-invasive approach and the accuracy achieved
with the SMTP function represent significant advancements over traditional staging methods,
underscoring the potential of machine learning in facilitating early diagnosis and treatment
planning.
Daghrir et al. (2020) present a hybrid diagnostic system in their study “Melanoma Skin Cancer
Detection Using Deep Learning and Classical Machine Learning Techniques: A Hybrid
Approach[3],” This system merges “deep learning with classical machine learning” methods
to improve the level of accuracy melanoma detection. The authors utilize a “convolutional
neural network (CNN), support vector machines (SVM), and k-nearest neighbors (KNN)” to
classify melanoma, focusing on important lesion characteristics such as color, texture, and
irregular borders. The ensemble method, which employs majority voting, enhances
classification by making use of each model.
The hybrid system starts with image preprocessing to segment and isolate lesions from the
surrounding skin, a crucial step for precise classification. The authors implement techniques
like hair removal and border refinement to minimize noise and artifacts that could disrupt these
model predictions. SVMs are particularly effective in managing non-linear data, while KNN
classifies based on the nearest data points, and CNN excels in feature extraction, all
contributing to better overall performance.
This study’s hybrid approach demonstrates that blending human expertise with technology
leads to smarter and more impactful results. machine learning techniques, especially in
complex classification tasks such as skin lesion analysis. The ensemble model reached an
impressive accuracy of 88.4%, surpassing the results show strong and reliable performance of
single models. The success of this method suggests that integrating classifiers can significantly
boost diagnostic accuracy, presenting promising opportunities for practical applications in
dermatology.
The paper “Melanoma Skin Cancer Detection Using Deep Learning and Classical Machine
Learning Techniques” examines various CNN architectures, such as DenseNet169 and
ResNet50, and their effectiveness in identifying different types of skin cancer. The authors
demonstrate that by utilizing transfer learning, models pre-trained on extensive datasets like
“ImageNet will be a good way to help with skin cancer detection, particularly when fine-tuned
on the HAM10000 dataset”, which features a many different approaches of lesion types.
DenseNet169 and ResNet50 are recognized for their robust feature extraction abilities and their
ability to understand complex patterns that are key to understand difference between melanoma
and different kinds of skin lesions. This augmentation strategy aids in reducing overfitting and
enhances the model's generalization capabilities.
The authors also highlight the advantages of transfer learning, noting that pre-trained models
can now be trained faster than ever and perform effectively even with limited datasets. By
utilizing features learned from large datasets, models like DenseNet169 achieved high accuracy
and completeness in melanoma classification. This research shows the power of CNNs and
transfer learning in achieving better results improve diagnostic accuracy for skin cancer,
positioning them as promising tools for practical clinical applications. “The literature on skin
cancer classification showcases a clear evolution from traditional machine learning methods to
advanced deep learning approaches [4]”. Early studies by applying methods such as “Support
Vector Machines (SVM)” with handcrafted features demonstrated the ability of automated
detection but faced limitations due to small datasets and lower accuracy levels. For example,
SVM models achieved accuracies around 76%, which will be constrained by the simplicity of
the features extracted and the dataset size. While these methods offered a step forward, they
lacked scalability and robustness for broader applications.
The adoption of “deep learning, particularly Convolutional Neural Networks (CNNs)”,[5] has
transformed skin cancer detection. Models like ResNet50, InceptionV3, and Inception-ResNet
have shown exceptional performance, achieving accuracy rates between 83% and 86% with
large amounts of data like ISIC2018. These advancements are largely attributed the capability
of deep learning models to automatically identify complex patterns in medical images.
Techniques like Enhanced Super-Resolution “Generative Adversarial Networks (ESRGAN)”
have made these models even better by improving image quality, minimizing noise, and
providing clearer data for analysis.
Transfer learning has played a key part in this progress. By fine-tuning pretrained networks
with medical datasets, researchers have made these models more adaptable to domain-specific
challenges. Also, hybrid approaches that bring together CNNs with segmentation techniques
and clustering algorithms have pushed classification and segmentation accuracies beyond 90%,
especially when applied to datasets like ISIC2017 and PH2. Main takeaways from these studies
highlight that shallower networks, such as InceptionV3, often perform better for medical
imaging tasks, as they generalize well across diverse data. Meanwhile, deeper networks like
ResNet50 excel in natural image processing but require fine-tuning to deliver comparable
results for medical images.
Overall, deep learning [6] has drastically changed skin cancer diagnosis, offering faster, more
accurate, and scalable solutions that can complement dermatologists in clinical settings. These
technologies promise consistent and efficient diagnostic support, paving the way for early
detection and better treatment outcomes. However, to fully implement these systems into
practice, further work is needed to improve dataset [7] diversity, model generalizability, and
real-world validation.
Throughout these studies, several recurring themes are evident, particularly the efficacy of
CNNs in skin cancer classification and the importance of preprocessing methods like data
augmentation and segmentation. EfficientNet, with its compound scaling, presents an effective
model for skin cancer classification, striking a balance between performance and
computational efficiency. Conversely, the hybrid model that combines CNN, SVM, and KNN
showcases the benefits of ensemble methods, where multiple algorithms work together to
achieve greater accuracy. Non-invasive staging, as illustrated with the SMTP loss function,
addresses.
CHAPTER 3
1. Performance:
• The system should classify images with high accuracy (preferably above 90%)
and low latency.
• Training time for the model should be optimized, leveraging GPU or TPU
acceleration.
2. Scalability:
• The system should handle large datasets (thousands of images) without
significant performance degradation.
• Should support future extensions, such as adding new datasets or incorporating
additional deep learning architectures.
• Support easy retraining and model updates as new data becomes available for
the model should be optimized, leveraging GPU or TPU acceleration, optimize
resource usage during training and inference
3. Reliability:
• Incorporate robust error handling mechanisms for invalid inputs or missing
data.
4. Usability:
• The user interface (if any) should be intuitive, requiring minimal technical
expertise for operation.
• Visualize classification results clearly, including confidence levels and metrics.
5. Security:
• Protect patient data and dermoscopic images, adhering to standards like HIPAA
(if deployed in a clinical setting).
• Ensure secure data storage and communication channels.
6. Maintainability:
• Code should be modular and well-documented to simplify debugging, updates,
and feature additions.
• Support easy retraining and model updates as new data becomes available.
7. Portability:
• The system should be deployable on various platforms (e.g., local machines,
cloud environments, or edge devices).
• Provide containerized solutions (e.g., Docker) for consistent deployment across
environments.
8. Efficiency:
• Optimize resource usage during training and inference to reduce computational
costs.
• Minimize energy consumption, especially for large-scale or cloud-based
deployments.
9. Interoperability:
• Ensure compatibility with standard medical imaging formats and APIs for
integration into existing healthcare workflows.
• Support data import/export to/from popular tools like Excel, CSV, or other
medical record systems.
10. Extensibility:
• Allow for the addition of new models, datasets, or functionalities, such as
ensemble learning or multi-class classification.
• Optimize resource usage during training and inference to reduce computational.
• RAM : 2 GB or higher
CHAPTER 4
This work applies deep learning models to images of skin lesions through a systematic pipeline
for image preparation, processing, and analysis. It involves the acquisition phase of images
collected from publicly accessible datasets that are mainly the ISIC archive in the form of high-
quality dermoscopic images of skin lesions. These are inputs into the models, covering different
types of skin problems: types, sizes, shapes, and stages of lesions, thus being a representative
of wide variability. Such details of the skin would be magnified and enlarged via dermoscopic
images so that AI models are able to evaluate these patterns of pigmentation, vascular
structures, and more importantly, distinguish between benign from malignant lesions. This
quality and diversity of the dataset are an important step towards getting an accurate prediction
and good performance. All the images that are taken afterwards get preprocessed to increase
their quality and prepare it for further analysis. The preprocessing steps consisted of noise
removal, which made the dimensions of images similar; hence, making the datasets uniform.
The images are resized with fixed dimensions as 250x250 for EfficientNet-B5 and 256x256
for ResNet-50 but without lesion features being erased, pixel values normalized from 0 to 1 for
easy and efficient running through the neural networks thus providing a more accelerated time
in training.
• Image Acquisition : This is the first step where dermoscopic images of skin lesions
are collected. The images are typically obtained from datasets like ISIC or other
medical image repositories.
• Image Pre-processing: In this step, the collected images undergo pre-processing to
improve their quality and prepare them for the next stages. This may include resizing
the images, normalizing pixel values, and applying data augmentation techniques
(such as random rotations, zooming, and flipping) to enhance model generalization.
• Image Segmentation: Image segmentation is the process of isolating the region of
interest (e.g., the skin lesion) from the background. This helps the model focus on the
lesion area, improving the accuracy of the subsequent classification.
• Feature Extraction: In this step, relevant features from the segmented image are
extracted. Features could include texture, color, shape, and edge information that can
help differentiate between benign and malignant lesions. Deep learning models like
EfficientNet B5 and ResNet50 perform feature extraction automatically during the
training phase.
• Classification using Machine Learning Algorithm: The extracted features are used to
train the model to classify the lesions as either benign or malignant. This step involves
using EfficientNet B5 or ResNet50 as the classification algorithms, both of which are
deep learning models suited for image classification tasks.
• Training and Testing: During training, the model learns to classify images based on
the labelled data (benign/malignant). The model is then tested on a separate dataset to
evaluate its performance using metrics like accuracy, precision, recall, and F1-score.
4.2 ER diagram:
ER Diagram maps out the backbone of the Skin Cancer Detection system, emphasizing data
flow and relationships between key components. It supports scalability, accuracy, and
accountability, ensuring robust functionality while facilitating : Image segmentation is the
process of isolating the region of interest from the background. lesions as either benign or
malignant. This step involves using EfficientNet B5 or ResNet50 as the classification
algorithms future enhancements like adding new models, datasets, or supports scalability,
accuracy, and accountability, ensuring robust functionality while facilitating prediction
workflows, backbone of the Skin Cancer Detection system, emphasizing data flow .
1. Dataset: Represents the collection of dermoscopic images, which serve as input data
for the entire system. This is a key entity since all subsequent processes rely on the
quality and completeness of datasets.
▪ Dataset_ID (PK): Ensures unique identification of each dataset.
▪ Name: Describes the dataset (e.g., "ISIC Archive Dataset 2024").
▪ Source: Specifies the origin of the dataset (e.g., ISIC or HAM10000
repositories).
▪ Total_Images: Records the total number of images available in the
dataset. A dataset named "ISIC 2023" with 3297 dermoscopic images
serves as the input for training the model.
2. Image: Represents each dermoscopic image within a dataset. Each image contains
essential data such as its label (benign or malignant) and its preprocessing status.
▪ Image_ID (PK): A unique identifier for each image.
▪ Dataset_ID (FK): Links the image to its parent dataset.
▪ File_Path: Stores the location of the image file in the system.
▪ Preprocessing_Status: Indicates whether the image has undergone
preprocessing (e.g., resizing, normalization).
▪ Augmentation_Status: Notes whether the image has been augmented
to enhance training (e.g., rotation or zoom applied).
▪ Label: Indicates if the image shows a benign or malignant lesion. An
image with ID 1045 from Dataset "ISIC 2023" is classified as benign
after preprocessing and augmentation.
4. Training_Session: Tracks the process of training models on datasets. This entity logs
training details, such as epochs, loss functions, and learning rates, for reproducibility.
▪ Session_ID (PK): A unique identifier for each training session.
▪ Model_ID (FK): Links the session to the model being trained.
▪ Dataset_ID (FK): Links the session to the dataset used for training.
▪ Start_Time, End_Time: Track when the session began and ended.
▪ Epochs: The number of iterations over the dataset during training,
training session using EfficientNet B5.
▪ Loss_Function, Optimizer: Details of the methods used to minimize
error and optimize model performance.
▪ Status: Indicates the current state of training (e.g., completed, in
progress). A training session using EfficientNet B5 on the "ISIC 2023"
dataset completed 50 epochs with the Adam optimizer.
5. Prediction: Captures the results of using a trained model to classify new or existing
images. Each prediction includes the label and the model's confidence score.
▪ Prediction_ID (PK): A unique identifier for each prediction.
▪ Model_ID (FK): Links the prediction to the model used.
▪ Image_ID (FK): Links the prediction to the image analyzed.
▪ Prediction_Label: Indicates the predicted class (e.g., benign or
malignant).
▪ Confidence_Score: Shows confident in its prediction (e.g., 95%).
▪ Timestamp: Records the date and time the prediction was made. Model
"ResNet50" predicted that Image 1202 is malignant with 98%
confidence.
6. User: Represents individuals who interact with the system. Users can perform actions
such as uploading datasets, initiating training sessions, or generating predictions.
▪ User_ID (PK): A unique identifier for each user.
▪ Name: The name of the user (e.g., "Dr. Smith").
▪ Role: Defines the user's permissions (e.g., Admin, Clinician).
▪ Email: Contact information.
▪ Password: Encrypted for secure login.
▪ Last_Login: Tracks the user’s most recent activity. Dr. Smith, a
Clinician, logs into the system to classify new dermoscopic images.
7. System_Log: Tracks all actions performed within the system for accountability and
debugging purposes.
▪ Log_ID (PK): A unique identifier for each log entry.
▪ Event_Type: Describes the type of event (e.g., dataset upload, model
training).
▪ Description: Provides additional details about the event.
▪ Timestamp: Records the time of the event.
▪ User_ID (FK): Links the log entry to the user responsible for the event.
An event log shows that User 102 uploaded the "ISIC 2023" dataset on
December 10, 2024.
1. Dataset → Image
o A dataset contains multiple images (One-to-Many). This ensures that each
image belongs to a specific dataset, allowing the system to organize and
preprocess images systematically.
2. Dataset → Training_Session
o A dataset is used in multiple training sessions (One-to-Many). This supports the
reusability of datasets for training different models or for ensures belongs to a
specific dataset, allowing the system that each image belongs to a specific
dataset, allowing the system refining existing ones.
3. Image → Prediction
o Each image may have multiple predictions associated with it (One-to-Many).
For example, a single image could be analyzed multiple times using different
models.
4. Model → Training_Session
o A model is involved in multiple training sessions (One-to-Many). This allows
tracking of model development across different datasets and configurations.
5. Model → Prediction
o A model generates predictions for multiple images (One-to-Many). This shows
the application of a trained model for real-world classification tasks.
6. Training_Session → Dataset & Model
o Each training session links one dataset and one model (Many-to-One). This
relationship ties the data and the model together, ensuring traceability.
7. User → Dataset, Training_Session, Prediction
o Users manage datasets, initiate training sessions, and make predictions (One-to-
Many). This relationship defines user interactions with the system.
8. User → System_Log
o Each system event is logged with the user who performed it (One-to-Many).
This ensures transparency and accountability.
Data collection is the foundational step in building the skin cancer detection system. High-
quality dermoscopic images of skin lesions are sourced from trusted repositories like the
International Skin Imaging Collaboration (ISIC) archive.
This dataset contains thousands of images labeled as benign or malignant, providing a rich
resource for training and testing deep learning models. A balanced dataset is maintained to
ensure the model performs equally well for both classes. To standardize the input data, images
are resized to a resolution of 224x224 pixels and normalized, scaling pixel values to a range of
0 to 1, which helps in uniform training and improves computational efficiency. Preprocessing
techniques are then applied to enhance the dataset further. Data augmentation strategies like
random rotations, zooming, shearing, and coarse dropout are employed to create variations in
the images, simulating real-world conditions and reducing overfitting. A unique step involves
adding synthetic hair to the images, mimicking challenges faced in real dermoscopic analysis.
These efforts ensure the model encounters diverse scenarios during training, making it robust
and adaptable to unseen cases in clinical practice.
2. Feature Extraction
Feature extraction is one of the most crucial steps in the classification process. Unlike
traditional methods where domain experts manually define features like color, texture, and
shape, this system leverages deep learning to automate the process. Advanced architectures
like EfficientNet B5 and ResNet50 are employed to extract these features from dermoscopic
images. EfficientNet B5, known for its compound scaling, optimizes the network depth, width,
and resolution, offering high accuracy while maintaining computational efficiency. Its
architecture is particularly suited for medical images where high-resolution details are crucial.
ResNet50, a 50-layer deep neural network, excels in identifying intricate patterns and subtle
variations in skin lesions by utilizing residual connections. These connections mitigate the
vanishing gradient problem, allowing the model to train effectively even at greater depths. The
combination of these models ensures a comprehensive understanding of image features,
enabling precise classification of benign and malignant lesions. This automated extraction of
intricate details significantly reduces reliance on manual feature engineering, expediting the
development process.
3. Model Training
The training module involves using labeled datasets to teach the model to distinguish between
benign and malignant lesions. Both EfficientNet B5 and ResNet50 are fine-tuned using
supervised learning techniques, where labeled examples guide the model in learning patterns
associated with each class. To enhance training efficiency, techniques like binary cross-entropy
loss and the Adam optimizer are used, ensuring fast convergence and minimizing prediction.
Additionally, advanced methods such as learning rate scheduling dynamically adjust the
learning rate to improve model accuracy, while model checkpointing saves the best-performing
versions during training.
This ensures the system’s robustness and ability to generalize to new, unseen data. The training
process is computationally intensive but is optimized using GPUs or TPUs, significantly
reducing training time, while model checkpointing saves the best-performing versions during
training, while maintaining model quality.
Once the models are trained, their performance is evaluated on a separate test set that mimics
real-world scenarios. This module focuses on validating the model’s ability to generalize and
its effectiveness in differentiating benign from malignant lesions. Multiple performance
metrics are employed, including accuracy, precision, recall, F1-score, and ROC-AUC. These
metrics provide insights into the system’s reliability, particularly in minimizing false negatives
(critical for early detection) and false positives (important for reducing unnecessary biopsies).
This evaluation also includes a comparative analysis of EfficientNet B5 and ResNet50. Each
model’s strengths and weaknesses are assessed, providing guidance for selecting the most
suitable architecture for deployment. The testing phase ensures that only the most robust and
reliable model moves forward for real-world application.
5. Segmentation
Segmentation plays a pivotal role in isolating the lesion area from the background in
dermoscopic images. By using algorithms to segment the region of interest, the model is able
to focus solely on the lesion, eliminating distractions like hair, lighting variations, or other
irrelevant elements. This step not only improves the accuracy of the classification process but
also makes the system more robust in handling diverse datasets with variable quality and
conditions. Advanced segmentation techniques may include methods like hair, lighting
variations, or other that refine lesion boundaries, ensuring only the most relevant regions are
passed to the classification model. This enhanced focus on the lesion allows for better analysis
of key features more robust in handling diverse datasets with variable quality and conditions.
Advanced segmentation like asymmetry, border irregularity, and color distribution—
parameters critical for distinguishing between benign and malignant cases.
6. Classification
The classification module forms the core functionality of the system. This step uses the features
extracted by EfficientNet B5 and ResNet50 to predict whether a skin lesion is benign or
malignant. Each prediction is accompanied by a probability score, offering transparency in the
model's decision-making process. This not only helps in clinical decision-making but also
builds trust in the system by providing interpretable results. By automating the diagnostic
process, this module reduces dependency on invasive procedures like biopsies, especially for
cases that are confidently classified as benign. The combination of high accuracy and for these
confidence scoring ensures the model is a valuable assistant to dermatologists, supporting early
detection and treatment planning.
7. System Deployment
The deployment module focuses on making the system accessible to end-users. The trained
models are integrated into clinical or cloud-based environments, offering real-time predictions
through APIs or a web-based interface. Deployment is designed to be flexible, supporting
various platforms such as local servers, cloud environments, and mobile devices.
Containerization using tools like Docker ensures consistent performance across different
systems and simplifies the installation process.
This module also facilitates scalability, allowing the addition of new features, datasets, or
models over time. The real-time functionality ensures that dermatologists and healthcare
providers can quickly analyze dermoscopic images and make informed decisions, even in
resource-constrained settings.
A user-friendly interface is crucial for the practical adoption of the system. This module focuses
on designing an intuitive interface where users can upload images, view predictions, and access
evaluation metrics. The interface may include visualization tools that highlight the features
contributing to the classification, helping users understand the model’s decision-making
process. Role-based access controls and secure login mechanisms ensure that sensitive patient
data is protected, meeting the stringent the real-time functionality ensures that dermatologists
and healthcare requirements of medical applications. The interface bridges the gap between the
technical backend and the clinical end-user, making advanced AI technology accessible to
dermatologists and researchers without requiring extensive technical.
This module ensures that the system adheres to medical data protection regulations, such as
HIPAA. Measures include encrypted communication channels, secure storage of patient data,
and rigorous access controls. By implementing these measures, the system ensures data privacy
and builds trust among users, the real-time functionality ensures that dermatologists and
healthcare facilitating its adoption in clinical environments. Additionally, compliance with
medical standards ensures the system is suitable for integration into existing healthcare
workflows.
Optimization is key to the system's efficiency and scalability. Techniques such as model
pruning, quantization, and GPU/TPU acceleration are used to reduce computational costs and
enhance performance. The system is designed to handle large datasets, with provisions for easy
retraining and updates as new data becomes available. This ensures the model remains relevant
and effective in adapting to evolving clinical requirements, making it a sustainable solution for
skin cancer detection.
CHAPTER 5
TESTING
Testing is a critical phase in the melanoma skin cancer detection project to ensure the system's
reliability, accuracy, and usability. It involves evaluating the functionality, performance, and
integration of the models (ResNet50 and EfficientNetB5) within the application framework.
Functional testing ensures that key features, such as image uploads, prediction generation, and
error handling, work as expected. Usability testing focuses on the user interface, verifying that
features like drag-and-drop uploads, error messages, and prediction displays are intuitive.
The conclusion for the test cases outlined in Table 5.1.1 Functional Test Cases is as follows:
1. Robustness of Image Upload: The system successfully processes valid lesion images
and handles invalid file formats gracefully by displaying appropriate error messages.
2. Prediction Accuracy and Functionality: The "Predict" feature accurately identifies
the lesion type (Benign/Malignant) and provides confidence scores, demonstrating its
utility and reliability.
3. Model Performance Validation: The ResNet50 and EfficientNetB5 models perform
as expected, achieving acceptable classification accuracy on the test data.
The conclusion for the performance test cases outlined in Table 5.1.2 Performance Test
Cases is as follows:
1. Prediction Response Time: The system meets the expected performance benchmarks,
with predictions being displayed within the acceptable range of 3–5 seconds, ensuring
timely results for users.
2. Bulk Processing Capability: The system successfully handles multiple consecutive
uploads (10 images) without crashes or significant delays, demonstrating its
robustness and scalability.
3. Model Loading Efficiency: The ResNet50 and EfficientNetB5 models load within the
acceptable time range (5–10 seconds), ensuring minimal delays during initialization.
ResNet50
TC_RES_02 ResNet50 false- Test with 50 benign ResNet50 maintains a low false-
positive rate images. positive rate (e.g., <10%).
EfficientNetB5
The conclusion for the model-specific test cases outlined in Table 5.1.3 Model-Specific
Test Cases is as follows:
ResNet50:
1. Accuracy on Malignant Lesions: ResNet50 achieves at least 82% accuracy on
malignant lesion images, demonstrating reliable diagnostic performance.
2. False-Positive Rate: The model maintains a low false-positive rate (<10%) when
tested on benign images, ensuring minimal misclassifications.
EfficientNetB5:
1. Accuracy on Malignant Lesions: EfficientNetB5 achieves a higher accuracy of at
least 88% on malignant lesion images, showcasing superior classification
2. Prediction Consistency: EfficientNetB5 consistently predicts the same
classification for identical images, ensuring stability and reliability.
CHAPTER 6
In this chapter, we present and analyze the performance of our models, specifically ResNet50
and EfficientNetB5, for melanoma skin cancer detection. The results are showcased through
figures and metrics that highlight the effectiveness of the models in identifying malignant and
benign skin lesions.
The results include:
1. Prediction Outputs: Examples of how the models classify skin lesions, including the
prediction labels and confidence levels.
2. Model Accuracy: Graphical representations of training and testing accuracy over epochs,
showcasing how well the models learned and generalized during training.
3. Model Loss: A detailed evaluation of the loss curves for both models during training and
testing, providing insights into how the models optimized their predictions and
converged.
6.1 ResNet50:
The Fig 6.1.1 showcases the diagnosis of melanoma using the ResNet50 model.
1. Interface Breakdown
• Upload Image Section: The user uploaded an image of a skin lesion for analysis.
• Predict Button: Once clicked, the image is passed to the ResNet50 model for inference.
2. Prediction Results
• Malignant Prediction:
o The model classified the lesion as Malignant, suggesting it detected features
typically associated with melanoma.
o Malignant lesions are usually characterized by:
▪ Asymmetry: One half of the lesion differs from the other.
▪ Irregular Borders: Uneven or poorly defined edges.
▪ Color Variation: Shades of black, brown, or even red and white within the
lesion.
▪ Large Diameter: Lesions larger than 6mm are concerning.
▪ Evolution: Changes in the lesion over time.
• Confidence Level: 100%:
o The model assigned 100.0% confidence to this prediction.
o This means the model is highly certain about its decision, which could result
from:
▪ A distinct malignant pattern in the lesion.
▪ High similarity to training images marked as malignant.
▪ Potential overconfidence due to the training process.
by medical professionals.
o A 100% confidence score may indicate overfitting, where the model is overly
reliant on specific patterns seen during training.
The Fig 6.1.2 shows how the ResNet50 model performed during training and testing over 18
epochs.
• Training Accuracy:
o Starts at around 67% and improves rapidly, indicating that the model is
learning key features from the data.
• Testing Accuracy:
o Initially fluctuates significantly. This is typical in the early phase as the
model adjusts to the data.
The above Fig 6.1.3 illustrates how the ResNet50 model’s loss values evolved during training
and testing over 18 epochs. Loss indicates how well the model's predictions align with the true
labels, with lower loss values signifying better performance.
• X-Axis (Epochs):
o Represents the number of training iterations the model completed.
• Y-Axis (Loss):
o Loss measures the model's error, with lower values indicating better
predictive accuracy.
• Two Curves:
o Training Loss (Blue Line): Reflects the error on the training dataset as
the model optimizes its parameters.
o Testing Loss (Orange Line): Indicates the error on unseen data,
measuring how well the model generalizes.
• Strong Performance:
o The model demonstrates effective convergence, with training and
testing loss stabilizing at low values by epoch 10.
o The testing loss remains close to the training loss (a small gap of ~0.1).
• Overfitting:
o The slight gap between training and testing loss in the later epochs
suggests minor overfitting, where the model memorizes patterns
specific to the training data.
• Testing Loss Fluctuations:
o The small oscillations in testing loss may stem from: Variability in the
dataset. Limited training data causing sensitivity to specific examples.
The ResNet50 model confidently classifies the lesion as malignant with a 100% confidence
score. This result aligns with the model's effective training on malignant features, highlighting
its ability to identify critical patterns in skin lesions.
The accuracy graph indicates the model achieves a final training accuracy of 87.5% and a testing
accuracy of 82.5%. While training and testing accuracy rise steadily through the first 10 epochs,
a gap emerges afterward, suggesting mild overfitting as the model begins to focus more on the
training data.
The loss graph shows a rapid decrease in training loss during the initial epochs, stabilizing at
approximately 0.3 by the end of training. Testing loss follows a similar pattern, stabilizing around
0.4, with minor fluctuations throughout. The small gap between training and testing loss reflects
reasonable generalization with only slight overfitting.
6.2 EfficientNetB5:
The Fig 6.2.1 showcases the prediction result when a skin lesion image is input into the
EfficientNetB5 model. The system provides both a classification label and the corresponding
confidence level.
Key Observations
1. Prediction Label:
• The model classifies the lesion as malignant, indicating that the features of the
lesion match those typically associated with cancerous lesions.
• This prediction reflects the model’s training on datasets that differentiate
between malignant and benign skin lesions.
2. Confidence Score:
3. Insights:
The Fig 6.2.2 illustrates the Training AUC and Testing AUC over 30 epochs, representing
the model's ability to distinguish between malignant and benign lesions. The Area Under the
Curve (AUC) metric ranges from 0 to 1, with higher values indicating better performance.
Key Observations
• Starts at ~0.65, indicating the model initially has limited knowledge about
classifying lesions correctly.
• Increases rapidly during the first 10 epochs as the model learns key features,
reaching ~0.90.
• Gradually stabilizes after epoch 20, plateauing around 0.95, indicating that the
model has learned most of the discriminative features from the training dataset.
• Follows a similar trend to the training AUC, starting lower at ~0.65 but rising
steadily.
• Plateauing occurs around 0.91 after epoch 20, with minor fluctuations.
• The close alignment with the training AUC suggests that the model generalizes
well to unseen data, with minimal overfitting.
3. Performance Trends:
• The small gap between training and testing AUC curves highlights the model's
ability to generalize effectively, avoiding significant overfitting.
• Minor fluctuations in the testing AUC may stem from:
The fig 6.2.3 shows the Training Loss and Testing Loss across 30 epochs. Loss indicates the
model’s error during training and evaluation. Lower loss values correspond to better
performance.
Key Observations
• Starts high, around 0.55, indicating a high error rate at the beginning when the
model is untrained.
• Decreases rapidly during the first 5 epochs as the model learns basic patterns
from the training data.
• Continues to decline gradually and stabilizes around 0.22 after epoch 20,
indicating that the model has effectively minimized its error on the training
dataset.
Performance Trends:
• This phase is typical for models optimizing through gradient descent, where
early improvements are more significant.
2. Stabilization Phase:
• After epoch 20, the loss values stabilize, suggesting the model has reached a
point where further training brings diminishing returns.
• Testing loss remaining close to training loss is a positive sign, as it implies
minimal overfitting. The model generalizes well to unseen data but does not
achieve perfect performance.
• Potential variability in the test dataset (e.g., different distributions or harder-to-
classify examples).
We evaluated two deep learning models, ResNet50 and EfficientNetB5, for melanoma skin
cancer detection. Both models demonstrated strong performance in classifying skin lesions as
malignant or benign, highlighting the potential of deep learning approaches in aiding
dermatological diagnosis. Below are the key conclusions based on our results. Achieved a final
training accuracy of 87.5% and a testing accuracy of 82.5%, with a relatively small gap
between the two, indicating good generalization with minimal overfitting. The loss stabilized
at approximately 0.3 (training) and 0.4 (testing), showing effective convergence while
maintaining low error rates. Prediction results, such as the confident 100% classification of
malignant lesions, highlight its capacity to detect critical features. However, this confidence
level may reflect overfitting in certain cases and warrants further evaluation. Demonstrated a
high Training AUC of 0.95 and a Testing AUC of 0.91, indicating excellent ability to
distinguish between malignant and benign lesions. The small gap between training and testing
AUC curves highlights the model's ability to generalize effectively, avoiding significant
overfitting. The loss values stabilized at 0.22 (training) and 0.25 (testing), showcasing robust
learning and minimal overfitting. The model's moderate prediction confidence (e.g., 55.46%
confidence for a malignant lesion) reflects its cautious approach, which could be beneficial
in ambiguous cases but also highlights the need for further improvements. EfficientNetB5
balances accuracy with caution, making both models valuable tools in early skin cancer
diagnosis. ResNet50 and EfficientNetB5 both demonstrated strong potential in melanoma
detection, with complementary strengths that could be leveraged in real-world applications.
While ResNet50 is highly confident in its predictions, EfficientNetB5 balances accuracy with
caution, making both models valuable tools in early skin cancer diagnosis. Further refinement
and integration into clinical workflows will be essential to maximize their impact on improving
patient outcomes.
vii
FUTURE WORKS
Future works in a melanoma skin cancer detection project can aim to improve the system’s
accuracy, usability, scalability, and clinical adoption. Here are some potential areas for future
research and development:
2. Real-World Applications
• Mobile and Wearable Integration: Adapt the model for real-time use in mobile apps
or wearable devices.
• Edge Computing: Optimize the model for deployment on edge devices to enable
offline processing in remote areas.
3. Dataset Expansion
• Diverse Skin Tones: Include datasets representing various skin tones and
demographics to improve generalization.
• Longitudinal Data: Collect follow-up images over time to detect early changes in skin
lesions.
4. Clinical Validation
viii
5. Enhanced Preprocessing and Feature Engineering
• Bias Mitigation: Address biases in datasets to ensure equitable predictions across all
population groups.
• Regulatory Approvals: Work on compliance with FDA/CE standards for medical
device software.
7. Collaborative Frameworks
8. Expanding Scope
• Other Skin Conditions: Extend the model to detect other types of skin cancer or
dermatological conditions.
• Hybrid Models: Explore models combining rule-based systems with AI for increased
reliability.
ix
REFERENCES