Skin Cancer Report
Skin Cancer Report
Skin Cancer Report
Learning Approach
A PROJECT REPORT
Submitted by
degree of
BACHELOR OF ENGINEERING
in
NOVEMBER 2023
EASWARI ENGINEERING COLLEGE, CHENNAI
(AUTONOMOUS INSTITUTION)
BONAFIDE CERTIFICATE
Certified that this project report “DenseNet Powered Skin Cancer Detection: A
SIGNATURE SIGNATURE
Dr. M. DEVARAJU, M.Tech., Ph.D., Dr. S SUDHA, M.E., Ph.D.,
HOD OF THE DEPARTMENT SUPERVISOR
Professor and Head Professor
Department of Electronics and Department of Electronics and
Communication Engineering Communication Engineering
Easwari Engineering College Easwari Engineering College
Ramapuram, Chennai - 600089 Ramapuram, Chennai - 600089
We are indebted to many people who helped us complete our project and
assisted us from the inception of the idea until the day we documented it.
Firstly, we would like to express our gratitude to Dr. T R
PAARIVENDHAR, Founder Chairman, SRM Group of Institutions,
without whose support our project could not have been completed
successfully.
We would also like to thank Dr. R SHIVA KUMAR, Chairman, SRM Group
of Institutions, Ramapuram Campus for providing us with the required
assistance and Dr. R S KUMAR, Principal, Easwari Engineering College for
his continuous encouragement that led us to where we are right now.
We feel glad to express our sincere thanks to Dr. M DEVARAJU, Head of the
Department, Electronics and Communication Engineering and Dr. D
JESSINTHA, Project Coordinator, Electronics and Communication
Engineering for their suggestions, support, and encouragement towards the
completion of the project with perfection.
We would extend our hearty thanks to all our panel members for their
valuable suggestions in completing this project.
SYED KALEEMUDEEN Z
VIGNESH C
ABSTRACT
i
CHAPTER TITLE PAGE
NO. NO
ABSTRACT i
LIST OF FIGURES iv
LIST OF ABBREVIATIONS vi
1 INTRODUCTION 1
2 LITERATURE SURVEY 7
4 PROPOSED SYSTEM 21
ii
4.3 PERFORMANCE METRICS 24
REFERENCES
iii
LIST OF FIGURES
iv
LIST OF ABBREVIATIONS
ABBREVIATIONS EXPLANATION
DF Dermatofibroma
NV Nevus
OS Operating System
TP True Positive
TN True Negative
FP False Positive
FN False Negative
v
CHAPTER 1
INTRODUCTION
The primary risk factor for skin cancer is ultraviolet (UV) radiation exposure,
primarily from sunlight. As lifestyles evolve, outdoor activities increase,
contributing to the rising prevalence of skin cancer. Moreover, factors such as
genetic predisposition, immunosuppression, and exposure to certain chemicals also
play roles in skin cancer development.
Traditional diagnostic methods for skin cancer primarily rely on visual skin
examination by dermatologists. While this approach has been the cornerstone of
diagnosis for decades, it suffers from inherent limitations. Dermatologists'
6
assessments are subjective and may vary based on experience, leading to
inconsistencies in diagnosis. Moreover, the accuracy of visual inspection heavily
depends on the expertise of the practitioner, potentially resulting in missed
diagnoses or false positives.
7
1.4 Introduction to Our Model and Project
In response to the limitations of traditional diagnostic methods and the
potential of AI in dermatology, this project introduces a novel approach for skin
cancer detection. Our methodology revolves around the utilization of DenseNet, a
deep convolutional neural network architecture renowned for its effective feature
extraction and representation learning.
9
CHAPTER 2
LITRETURE SURVEY
11
learning. Hossin et al.'s work builds upon this foundation by incorporating an
advanced regularizer, suggesting a novel approach to improving the model's
robustness and generalization. Existing literature in skin cancer detection
acknowledges the challenges posed by imbalanced datasets, limited interpretability,
and the need for regularization techniques. Hossin et al. contribute to this discourse
by proposing an advanced regularizer tailored for melanoma detection, providing
potential solutions to address these challenges. By aligning their work with the
prevailing issues in the field, the authors demonstrate a keen awareness of the
practical hurdles in deploying machine learning models for real-world medical
applications. The choice of presenting their research at ICACSIS in Depok,
Indonesia, introduces a geographic dimension to the study. Understanding regional
variations in skin types, melanoma prevalence, and healthcare infrastructure is
crucial for assessing the external validity and applicability of Hossin et al.'s model.
A comprehensive literature survey should explore how other studies account for
regional disparities and whether the proposed method considers these factors in
melanoma detection, thereby contributing to the contextual understanding of the
research. Finally, a thorough analysis of the advanced regularizer introduced by
Hossin et al. is essential for evaluating the innovation and effectiveness of their
approach. Comparing their method with established regularization techniques and
assessing its impact on model performance will provide insights into the potential
advancements it brings to the field of skin cancer detection.
Pre-trained CNN Models and Machine Learning in Skin Cancer Diagnosis [5]
13
Furthermore, Gairola et al. (2022) acknowledge the importance of
interpretability in medical decision-making. The paper delves into the
interpretability of the combined model, elucidating how clinicians can gain insights
into the diagnostic process. By fostering a deeper understanding of the decision-
making process, the study not only contributes to the technical advancements in skin
cancer detection but also aligns with the broader trend in AI and healthcare,
emphasizing the importance of transparent and interpretable models for gaining trust
and acceptance within the medical community. This dual focus on technical
robustness and practical applicability positions the research as a valuable
contribution to the field of skin cancer diagnosis using advanced computational
techniques.
It extends beyond the technical aspects to highlight the broader implications for
healthcare. The paper emphasizes the transformative potential of CNNs in
automating skin cancer classification, thereby offering a solution to the increasing
demand for efficient and accurate diagnostic tools. In doing so, the research
addresses a critical need within dermatology, where timely and precise diagnosis
plays a pivotal role in treatment planning. By presenting their findings at the 2015
IEEE/RSJ International Conference on Intelligent Robots and Systems, the authors
contribute to the discourse on the integration of advanced computational methods
into the medical field, positioning CNNs as a promising technology for
revolutionizing dermatological diagnostics. The emphasis on the evolving landscape
of medical image analysis reflects a forward-looking perspective, anticipating the
growing influence of AI in healthcare. This foresight is particularly relevant in the
context of dermatology, where early detection and accurate classification of skin
14
lesions can significantly impact patient outcomes. As the research community
continues to build upon these insights, Haloi and Dutta's foundational work serves
as a catalyst for the ongoing development of intelligent systems in healthcare, with
potential applications reaching far beyond skin cancer classification.
Skin Lesion detection and classification are very critical in diagnosing skin
malignancy. Existing Deep learning-based Computer-aided diagnosis (CAD)
methods still perform poorly on challenging skin lesions with complex features such
as fuzzy boundaries, artifacts presence, low contrast with the background and,
limited training datasets. They also rely heavily on a suitable turning of millions of
parameters which often leads to over-fitting, poor generalization, and heavy
consumption of computing resources. This study proposes a new framework that
performs both segmentation and classification of skin lesions for automated
detection of skin cancer.
The proposed framework consists of two stages: the first stage leverages on
an encoder-decoder Fully Convolutional Network (FCN) to learn the complex and
inhomogeneous skin lesion features with the encoder stage learning the coarse
appearance and the decoder learning the lesion borders details. Our FCN is designed
with the sub-networks connected through a series of skip pathways that incorporate
long skip and short-cut connections unlike, the only long skip connections
commonly used in the traditional FCN, for residual learning strategy and effective
training. The network also integrates the Conditional Random Field (CRF) module
which employs a linear combination of Gaussian kernels for its pairwise edge
potentials for contour refinement and lesion boundaries localization. The second
stage proposes a novel FCN-based DenseNet framework that is composed of dense
15
blocks that are merged and connected via the concatenation strategy and transition
layer. The system also employs hyper-parameters optimization techniques to reduce
network complexity and improve computing efficiency. This approach encourages
feature reuse and thus requires a small number of parameters and effective with
limited data. The proposed model was evaluated on publicly available HAM10000
dataset of over 10000 images consisting of 7 different categories of diseases with
98% accuracy, 98.5% recall, and 99% of AUC score respectively.
16
Skin Cancer Detection Using Machine Learning Algorithms [9]
Skin cancer is the most frequent type of cancer. It must be detected and treated
as soon as possible because it can be fatal. The distinction between cancerous and
benign skin lesions is difficult to discern with the naked eye, making cancer
detection difficult. Because several lesions may have similar appearances, precise
identification of skin cancer is challenging. With the growth of technology and
computer vision, several machine learning and deep learning techniques are getting
popular in skin lesion categorization tasks.
In this paper we proposed a deep learning model using a pretrained DenseNet
architecture. For our work, we used the HAM10000 dataset, which contains 10015
dermoscopic images. To demonstrate the significance of using balanced dataset in
classification tasks, we conducted two experiments. The imbalanced dataset was
employed in the first experiment, while a resampled dataset with balanced classes
was used in the second task. In the classification task, employing balanced classes
resulted in better performance having accuracy 82.1%.
The complex detection background and lesion features make the automatic
detection of dermoscopy image lesions face many challenges. The previous
solutions mainly focus on using larger and more complex models to improve the
accuracy of detection, there is a lack of research on significant intra-class differences
and inter-class similarity of lesion features. At the same time, the larger model size
also brings challenges to further algorithm application; In this paper, we proposed a
lightweight skin cancer recognition model with feature discrimination based on fine-
grained classification principle.
The propose model includes two common feature extraction modules of
17
lesion classification network and a feature discrimination network. Firstly, two sets
of training samples (positive and negative sample pairs) are input into the feature
extraction module (Lightweight CNN) of the recognition model. Then, two sets of
feature vectors output from the feature extraction module are used to train the two
classification networks and feature discrimination networks of the recognition
model at the same time, and the model fusion strategy is applied to further improve
the performance of the model, the proposed recognition method can extract more
discriminative lesion features and improve the recognition performance of the model
in a small amount of model parameters; In addition, based on the feature extraction
module of the proposed recognition model, U-Net architecture, and migration
training strategy, we build a lightweight semantic segmentation model of lesion area
of dermoscopy image, which can achieve high precision lesion area segmentation
end-to-end without complicated image preprocessing operation; The performance
of our approach was appraised through widespread experiments comparative and
feature visualization analysis, the outcome indicates that the proposed method has
better performance than the start-of-the-art deep learning-based approach on the
ISBI 2016 skin lesion analysis towards melanoma detection challenge dataset.
Melanoma is considered the most serious type of skin cancer. All over the world,
the mortality rate is much high for melanoma in contrast with other cancer. There
are various computer-aided solutions proposed to correctly identify melanoma
cancer. However, the difficult visual appearance of the nevus makes it very difficult
to design a reliable Computer-Aided Diagnosis (CAD) system for accurate
melanoma detection. Existing systems either uses traditional machine learning
models and focus on handpicked suitable features or uses deep learning-based
methods that use complete images for feature learning. The automatic and most
discriminative feature extraction for skin cancer remains an important research
18
problem that can further be used to better deep learning training. Furthermore, the
availability of the limited available images also creates a problem for deep learning
models. From this line of research, we propose an intelligent Region of Interest
(ROI) based system to identify and discriminate melanoma with nevus cancer by
using the transfer learning approach. An improved k-mean algorithm is used to
extract ROIs from the images. These ROI based approach helps to identify
discriminative features as the images containing only melanoma cells are used to
train system. We further use a Convolutional Neural Network (CNN) based transfer
learning model with data augmentation for ROI images of DermIS and DermQuest
datasets. The proposed system gives 97.9% and 97.4% accuracy for DermIS and
DermQuest respectively. The proposed ROI based transfer learning approach
outperforms existing methods that use complete images for classification.
The Melanoma Skin Cancer Detection and Classification Using Support Vector
Machine [12]
Skin cancer is the most common type of cancer, which affects the life of
millions of people every year. About three million people are diagnosed with the
disease every year in the United States alone. The rate of survival decreases steeply
as the the disease progresses. However, detection of skin cancer in the early stages
is a difficult and expensive process. In this study, we propose a methodology that
detects and identifies skin lesions as benign or malignant based upon images taken
from general cameras. The images are segmented, features extracted by applying the
ABCD rule and a Neural Network is trained to classify the lesions to a high degree
of accuracy. The trained Neural Network achieved an overall classification accuracy
of 76.9% on a dataset of 463 images, divided into six distinct classes.
20
textural features. The extracted features are directly passed to classifiers to classify
skin lesion between benign and melanoma using different machine learning
techniques such as SVM, KNN and Naïve Bayes classifier. In this project skin lesion
images were downloaded from International Skin Imaging Collaboration (ISIC) in
which 328 images of benign and 672 images of melanoma. The classification result
obtained is 97.8 % of Accuracy and 0.94 Area under Curve using SVM classifiers.
And additionally the Sensitivity obtained was 86.2 % and Specificity obtained was
85 % using KNN.
21
CHAPTER 3 PROBLEM STATEMENTS /
MOTIVATIONS
Skin cancer is an escalating global health concern, with millions of new cases
diagnosed annually. The conventional approach to diagnosis, primarily relying on
visual skin examination, is hindered by subjectivity and variable accuracy. This
human-dependent method can lead to delayed or inaccurate diagnoses, emphasizing
the need for more reliable and efficient diagnostic tools.
22
CHAPTER 4 PROPOSED SYSTEM
Fig 4.1: Sample images of Actinic Keratosis, Dermatofibroma, Basal cell carcinoma, and Benign
keratosis.
23
4.1.2 Data Preprocessing
Before feeding the data into our deep learning model, we perform data
preprocessing to enhance image quality and suitability for training. This
preprocessing includes resizing images to a consistent format, normalization to bring
pixel values within a standardized range, and applying data augmentation techniques
to increase the model's robustness. These steps help mitigate the risk of overfitting
and improve the model's ability to generalize to unseen data.
The basis of our skin cancer detection approach is the DenseNet architecture.
Densely Connected Convolutional Networks are selected for their unique
architecture characterized by dense connectivity between layers.
The main concept of a DenseNet is to forward the connection to every other layer,
creating a dense network. The structure is shaped through numerous dense blocks,
every of which consists of numerous convolutional layers which are tightly coupled
to 1 another. The output of every layer in a dense block is combined with the output
of all preceding layers and provided as an input to the following layer in the block.
24
The densely connected blocks allow for deep networks without suffering from the
vanishing gradient problem, ultimately improving the model's performance, and
enabling the training of even deeper networks with a relatively small number of
parameters. This concept has gained prominence in various computer vision tasks,
including image classification and object detection, by offering state-of-the-art
results with efficient parameter utilization and improved accuracy.
During the training phase, we feed the pre-processed skin images into our
DenseNet-based model. The model iteratively refines its internal parameters to learn
discriminative features and patterns associated with skin cancer. To monitor the
model's progress and prevent overfitting, we employ a validation dataset that is
separate from the training data. Our model is trained for image classification, and
we employ a dataset consisting of a diverse range of images. The training process
spans 50 epochs, and we carefully monitor the model's performance using various
metrics.
25
4.1.6 Deployment and Integration
The last step in our working methodology involves deploying the trained
model for real-world clinical applications. We explore deployment options,
including integration into telemedicine platforms. This ensures that our skin cancer
detection system can be readily accessed by dermatologists, facilitating remote
consultations, and extending its reach to underserved regions. Additionally,
continuous monitoring and updates are planned to ensure the model's ongoing
performance and adaptability to evolving dermatological practices.
26
4.2 LIBRARIES USED IN PROPOSED SYSTEM
os: Provides a way to interact with the operating system and access files and
directories.
cv2: A computer vision library that can be used for image processing tasks.
numpy: A numerical computing library that provides support for multi-
dimensional arrays and matrix operations.
matplotlib: A plotting library that can be used to visualize data.
sklearn: A machine learning library that provides tools for data pre- processing,
model selection, and evaluation.
keras: A deep learning library that provides a high-level API for building and
training neural networks.
backend: Provides a way to interact with the backend engine of Keras (e.g.,
TensorFlow or Theano).
optimizers: Provides a way to specify optimization algorithms for training neural
networks.
Sequential: A Keras model type that allows for a linear stack of layers.
Conv2D: A 2D convolutional layer that can be used for image processing tasks.
MaxPooling2D: A 2D pooling layer that can be used to reduce the spatial
dimensions of the input data.
Activation: A layer type that applies an activation function to the input data.
Dropout: A regularization technique that randomly drops out a fraction of the
input units during training to reduce overfitting.
Flatten: A layer type that flattens the input data into a 1D array.
Dense: A fully connected layer type that applies a linear transformation to the
input data.
ModelCheckpoint: A Keras call back that saves the model weights after each
epoch.
27
ReduceLROnPlateau: A Keras callback that reduces the learning rate when the
validation loss stops improving.
EarlyStopping: A Keras callback that stops training when the validation loss stops
improving.
classification_report: A function that generates a report of classification metrics
(e.g., precision, recall, F1-score).
confusion_matrix: A function that generates a confusion matrix to evaluate the
performance of a classification model.
accuracy_score: A function that calculates the accuracy of a classification model.
model_from_json: A Keras function that loads a saved model architecture from a
JSON file.
plot_model: A Keras function that generates a visualization of a model
architecture.
28
4.4 OUTCOMES
The expected outcome of our project is a skin cancer detection system that is
accurate, reliable, and accessible for clinical use, contributing to early diagnosis and
improved patient care in the field of dermatology.
Average Sensitivity = R0 + R1 + R2 + R3 / 4
32
= 0.96+0.94+0.88+1 / 4
= 0.945 (94.5%)
Specificity:
Specificity measures how well a diagnostic test correctly identifies true
negative cases. In the context of skin cancer, it represents the ability of a model to
correctly identify individuals without skin cancer among those who are free of the
condition.
It is defined as the ratio of correctly predicted negative instances to all actual
negative instances. Specificity for each class has been obtained and the average has
been calculated.
Specificity = TN / (TN + FP)
Average Specificity = S0 + S1 + S2 + S3 / 4
= 0.97+0.96+0.98+1 / 4
= 0.977 (97.7%)
33
Precision:
Precision, also known as positive predictive value, measures the accuracy of
positive predictions made by a model. In the context of skin cancer, it indicates the
proportion of correctly predicted skin cancer cases among all predicted skin cancer
cases. Precision for each class has been obtained and the average has been
calculated.
Average Precision = P0 + P1 + P2 + P3 / 4
= 0.94+0.89+0.96+1 / 4
= 0.947(94.7%)
34
CHAPTER 5 RESULTS AND DISCUSSION
The input is obtained from the user as an image file path from the local
system. When entered, the given input image is predicted from the four classes of
cancers represented as Actinic Keratosis (AKIEC), Basal Cell Carcinoma (BCC),
Benign Keratosis-like Lesions (BKL), Dermatofibroma (DF), and gives the
predicted label below the input image given by the user. The below image is the
output that is obtained by running our program. This works whenever a user gives
the file path of the image that is to be predicted, and finally the input image is
predicted and the labels at the output.
Fig 5.1: User input and Predicted output with the label
35
Fig 5.2: Plot of training and validation accuracy
36
CHAPTER 6
The classification of the pathogen is done with utmost accuracy of 93% and low loss
from the given pathogen database. There are many different approaches to this
problem and better chance to make this prediction model more accurate. Current
method used stained samples of bacteria colonies and they were observed under oil
immersion. In this research, the focus was only on bacteria classification from
sample images of individual bacteria colonies so there was no use case of mixed
bacteria sample in single image. It is possible to extend this classification problem
to advance level to directly identify bacteria colonies on plate rather than one colony
of bacteria. This approach may require different technique in image input as well as
data extraction. In terms of data collection, it is suggested to use laser beam method
to expose colonies and take high resolution pictures. Hence, data gathering technique
may vary and problem can first be to localization of bacteria colonies and on next
level it is possible to classify each colony. This research has much brighter scope in
detecting human life exitance on Mars or other planet where scientists and
researchers believe that life is possible in those environmental conditions. This
research primarily focuses on the sensory system and bacteria classification
problem, which can be extended to colonies detection using deep learning by image
detection and localization modules.
37
REFERENCES
[2] M. Vidya and M. V. Karki, "Skin Cancer Detection using Machine Learning
Techniques," 2020 IEEE International Conference on Electronics, Computing and
Communication Technologies (CONECCT), Bangalore, India, 2020, pp. 1-5, doi:
10.1109/CONECCT50063.2020.9198489.
[6] A. Haloi and P. R. Dutta, "Skin cancer classification using convolutional neural
networks," in 2015 IEEE/RSJ International Conference on Intelligent Robots and
Systems (IROS), Hamburg, Germany, 2015, pp. 3927-3932, doi:
10.1109/IROS.2015.7354069.
38
[8] M. Babar, R. T. Butt, H. Batool, M. A. Asghar, A. R. Majeed and M. J. Khan,
"A Refined Approach for Classification and Detection of Melanoma Skin Cancer
using Deep Neural Network," 2021 International Conference on Digital Futures and
Transformative Technologies (ICoDT2), Islamabad, Pakistan, 2021, pp. 1-6, doi:
10.1109/ICoDT252288.2021.9441520.
[11] Dildar, M.; Akram, S.; Irfan, M.; Khan, H.U.; Ramzan, M.; Mahmood, A.R.;
Alsaiari, S.A.; Saeed, A.H.M.; Alraddadi, M.O.; Mahnashi, M.H. Skin Cancer
Detection: A Review Using Deep Learning Techniques. Int. J. Environ. Res. Public
Health 2021, 18, 5479.
[12] H. Alquran et al., "The melanoma skin cancer detection and classification using
support vector machine," 2017 IEEE Jordan Conference on Applied Electrical
Engineering and Computing Technologies (AEECT), Aqaba, Jordan, 2017, pp. 1-5,
doi: 10.1109/AEECT.2017.8257738.
[13] P. Dubal, S. Bhatt, C. Joglekar, and S. Patil, "Skin cancer detection and
classification," 2017 6th International Conference on Electrical Engineering and
Informatics (ICEEI), Langkawi, Malaysia, 2017, pp. 1-6, doi:
10.1109/ICEEI.2017.8312419.
[17] S. Mane and S. Shinde, "A Method for Melanoma Skin Cancer Detection Using
Dermoscopy Images," 2018 Fourth International Conference on Computing
Communication Control and Automation (ICCUBEA), Pune, India, 2018, pp. 1-6,
doi: 10.1109/ICCUBEA.2018.8697804.
[18] J. Zhao, H. Lui, D. I. McLean and H. Zeng, "Real-time raman spectroscopy for
non-invasive skin cancer detection - preliminary results," 2008 30th Annual
International Conference of the IEEE Engineering in Medicine and Biology Society,
Vancouver, BC, Canada, 2008, pp. 3107-3109, doi: 10.1109/IEMBS.2008.4649861.
[21] Usharani Bhimavarapu and Gopi Battineni Journal: Healthcare, 2022, Volume
10, Number 5, Page 962 DOI: 10.3390/healthcare10050962
40
[24] L. Wei, K. Ding and H. Hu, "Automatic Skin Cancer Detection in Dermoscopy
Images Based on Ensemble Lightweight Deep Learning Network," in IEEE Access,
vol. 8, pp. 99633-99647, 2020, doi: 10.1109/ACCESS.2020.2997710.
[25] N.A and C. S. Nair, "Multiclass Skin Lesion Classification Using Densenet,"
2022 Third International Conference on Intelligent Computing Instrumentation and
Control Technologies (ICICICT), Kannur, India,2022, pp.506510,
doi:10.1109/ICICICT54557.2022.9917913.
[29] Dr. A. Rasmi, Dr. A. Jayanthiladevi Skin Cancer Detection and Classification
System by Applying Image Processing and Machine Learning Techniques. Opt.
Mem. Neural Networks 32, 197–203 (2023),doi: 10.3103/S1060992X23030086
41
PUBLICATION PROOF
42