Convolutional Neural Networks Based Study and Application For Multicategory Skin Cancer Detection
Convolutional Neural Networks Based Study and Application For Multicategory Skin Cancer Detection
&RQYROXWLRQDO1HXUDO1HWZRUNV%DVHG6WXG\DQG
Convolutional Neural Networks Based Study and
$SSOLFDWLRQIRU0XOWLFDWHJRU\6NLQ&DQFHU'HWHFWLRQ
Application for Multicategory Skin Cancer Detection
2022 3rd International Conference on Electronic Communication and Artificial Intelligence (IWECAI) | 978-1-6654-7997-4/22/$31.00 ©2022 IEEE | DOI: 10.1109/IWECAI55315.2022.00114
3DXO=KX
Paul Zhu *
&ROOHJHRI$UWVDQG6FLHQFH
College of Arts and Science
1HZ<RUN8QLYHUVLW\
New York University
1HZ<RUN8QLWHG6WDWHVRI$PHULFD
New York, United States of America
*&RUUHVSRQGLQJDXWKRUS]#Q\XHGX
Corresponding author: [email protected]
Abstract²6NLQFDQFHULVD
Abstract-Skin cancer is a YHU\ very FRPPRQ
common IRUP
form RIFDQFHU
of cancer WKDW
that )RUWXQDWHO\DVWKHSRZHURI$UWLILFLDO,QWHOOLJHQFH
Fortunately, as the power of Artificial Intelligence (AI) $, KDV
has
MHRSDUGL]HVSHRSOH¶VKHDOWK/LNHRWKHUFDQFHUVHDUO\GHWHFWLRQLV
jeopardizes people's health. Like other cancers, early detection is EHHQDSSOLHGWRDYDULHW\RIILHOGVLQUHFHQW\HDUVUHVHDUFKHUV
been applied to a variety of fields in recent years, researchers
FUXFLDO
crucial WRto LWV
its WUHDWPHQW
treatment. +RZHYHU
However, WUDGLWLRQDO
traditional PHWKRGV
methods IRU for KDYH
have PDGH
made PDQ\
many DWWHPSWV
attempts WR
to XVH
use GLIIHUHQW
different 0DFKLQH
Machine /HDUQLQJ
Learning
GLDJQRVLQJVNLQFDQFHUFDQEHORZLQDFFXUDF\DQGRIWHQOHDGVWR
diagnosing skin cancer can be low in accuracy and often leads to DOJRULWKPV
algorithms DQG
and, LQ
in SDUWLFXODU
particular, &RQYROXWLRQDO
Convolutional 1HXUDO
Neural 1HWZRUN
Network
XQQHFHVVDU\
unnecessary H[DPLQDWLRQ
examination. ,Q In DGGLWLRQ
addition, VRPH
some H[LVWLQJ
existing 0DFKLQH
Machine &11 PRGHOV
(CNN) models WRto ILQG
find EHWWHU
better VROXWLRQV
solutions IRUfor WDVNV
tasks LQ
in PHGLFDO
medical
/HDUQLQJPRGHOVIRUVNLQFDQFHUGHWHFWLRQFDQEHOLPLWHGDVZHOO
Learning models for skin cancer detection can be limited as well LPDJH
image DQDO\VLV
analysis, HJ
e.g., UHKDELOLWDWLRQ
rehabilitation WUDLQLQJ
training DQDO\VLV
analysis, EUHDVW
breast
IRUWKHVPDOOQXPEHURIVNLQFDQFHUFDWHJRULHVWKH\VXSSRUW,QWKLV
for the small number of skin cancer categories they support. In this FDQFHU
cancer FODVVLILFDWLRQ
classification DQG
and VNLQ
skin FDQFHU
cancer GHWHFWLRQ
detection >@>@
[6] [7] . 0RUH
More
ZRUNWKUHHW\SHVRI&RQYROXWLRQDO1HXUDO1HWZRUN
work, three types of Convolutional Neural Network (CNN) &11 PRGHOV
models
VSHFLILFDOO\LQWKHZRUNE\$OKHHMDZLHWDO>@GHHSOHDUQLQJ
specifically, in the work by Alheejawi et al [8] . , deep learning
DUHFRPSDUHGRQ
are compared on D a QLQHFODVV
nine-class VNLQ
skin FDQFHU
cancer FODVVLILFDWLRQ
classification WDVN
task DQG
and
WHFKQLTXHVDUHDSSOLHGWRGLYLGHWKHPHODQRPDUHJLRQVLQ+
techniques are applied to divide the melanoma regions in H&E (
WKH
the PRGHO
model ZLWK
with WKH
the KLJKHVW
highest DFFXUDF\
accuracy LV is LQWHJUDWHG
integrated LQWR
into Da ZHE
web
DSSOLFDWLRQ
VWDLQHGKLVWRSDWKRORJLFDOLPDJHVIRUEHWWHUGHWHFWLRQDFFXUDF\
stained histopathological images for better detection accuracy;
application. 7KH
The WKUHH
three &11
CNN PRGHOV
models WKDW
that DUH
are FRPSDUHG
compared LQFOXGH
include
9**
VGG-16, 9**
VGG-19, DQG and D
a VHOIGHVLJQHG
self-designed QHWZRUN
network. 6LQFH
Since WKH
the WKUHH
three
LQ
in WKH
the ZRUN
work E\
by 1HUVLVVRQ
Nersisson HWet DO
al >@
[9] . , <RX
You 2QO\
Only /RRN
Look 2QFH
Once
PRGHOV
models GLIIHU
differ LQ
in WKHLU
their GHSWK
depth, WKH
the UHODWLRQVKLS
relationship EHWZHHQ
between WKH
the GHSWK
depth
<2/2 &RQYROXWLRQDO
(YOLO) Convolutional 1HXUDO
Neural 1HWZRUN
Network LV is XVHG
used WR
to H[WUDFW
extract
DQGSHUIRUPDQFHRIDPRGHOZLWKLQWKHVFRSHRIWKHGDWDVHWXVHG
and performance of a model within the scope of the dataset used IHDWXUHV
features WKDW
that DVVLVW
assist WKH
the GHWHFWLRQ
detection RI
of VNLQ
skin OHVLRQV
lesions. %RWK
Both RI of WKH
the
ZDV
was DOVR
also H[SORUHG
explored. 7HVW
Test UHVXOWV
results VKRZHG
showed WKDW
that WKH
the PRVW
most DFFXUDWH
accurate PRGHOVPHQWLRQHGDERYHDFKLHYHGDQDFFXUDF\RIDURXQG
models mentioned above achieved an accuracy of around 90%.
PRGHOLV9**ZKLFKDFKLHYHGLQDFFXUDF\DQG
model is VGG-19, which achieved 0.9290 in accuracy and 1.2842 :KLOH
While PDQ\
many RI
of WKH
the UHFHQW
recent 0DFKLQH
Machine /HDUQLQJ
Learning PRGHOV
models DUH
are
LQORVVPDNLQJLWDUHOLDEOHPHWKRGWRDVVLVWVNLQFDQFHUGHWHFWLRQ
in loss, making it a reliable method to assist skin cancer detection.
VFLHQWLILFEUHDNWKURXJKVOLPLWDWLRQVVWLOOH[LVW)RULQVWDQFHLQ
scientific breakthroughs, limitations still exist. For instance, in
Keywords-component;
WKHPRGHOSURSRVHGE\3KDPHWDO>@RQO\WZRFODVVLILFDWLRQV
the model proposed by Pham et al. [ 1 0], only two classifications,
Keywords-component; Convolutional
Convolutional Neural
Neural Network,
Network, VGG,
VGG,
skin
skin cancer
cancer detection,
detection, web
web application
application
QDPHO\
namely PHODQRPD
melanoma DQG
and QRQPHODQRPD
non-melanoma, DUHare SUHVHQWHG
presented. $QG
And
ZKLOH
while WKH
the PRGHO
model FUHDWHG
created E\
by -XQD\HG
Junayed HW
et DO
al >@
[ 1 1] . DFKLHYHV
achieves KLJK
high
DFFXUDF\QRDSSOLFDWLRQLVSURYLGHGIRUDEHWWHUXVHUH[SHULHQFH
accuracy, no application is provided for a better user experience.
,
I. ,INTRODUCTION
1752'8&7,21
7RVROYHWKHFXUUHQWOLPLWDWLRQVPHQWLRQHGDERYHWKLVZRUN
To solve the current limitations mentioned above, this work
6NLQ
Skin FDQFHU
cancer UHIHUV
refers WR
to WKH
the DEQRUPDO
abnormal JURZWK
growth RIof VNLQ
skin FHOOV
cells.
FRPSDUHG
compared WKH
the SHUIRUPDQFHV
performances RI
of WKUHH
three &11
CNN PRGHOV
models, QDPHO\
namely
$FFRUGLQJ
According WR to WKH
the &HQWHUV
Centers IRU
for 'LVHDVH
Disease &RQWURO
Control DQG
and 3UHYHQWLRQ
Prevention
9**
VGG16, 9**
VGG 19, DQGand D
a VHOIGHVLJQHG
self-designed PRGHO
model, LQ
in WKH
the
&'& VNLQFDQFHULVWKHPRVWFRPPRQFDQFHULQWKH8QLWHG
(CDC), skin cancer is the most common cancer in the United
FODVVLILFDWLRQWDVNRIQLQHFDWHJRULHVRIVNLQFDQFHUV%DVHGRQ
classification task of nine categories of skin cancers. Based on
6WDWHV>@0RUHVSHFLILFDOO\LWLVHVWLPDWHGWKDWDSSUR[LPDWHO\
States [ 1 ] . More specifically, it is estimated that approximately
WKHLU
their SHUIRUPDQFHV
performances, WKH
the PRGHO
model ZLWK
with WKH
the KLJKHVW
highest DFFXUDF\
accuracy LV
1s
SHRSOHLQWKH86DUHGLDJQRVHGZLWKVNLQFDQFHUHYHU\
9,500 people in the U. S . are diagnosed with skin cancer every
LQWHJUDWHGLQWRDZHEDSSOLFDWLRQ
integrated into a web application.
GD\
day >@
[2] . 'LYLGHG
Divided LQWR
into PDQ\
many VXEFDWHJRULHV
subcategories, VNLQ
skin FDQFHU
cancer SRVWV
posts
WKUHDWVRIGLIIHUHQWOHYHOVWRKXPDQERGLHV)RUH[DPSOH%DVDO
threats of different levels to human bodies. For example, Basal
&HOO&DUFLQRPD
Cell Carcinoma (BCC) %&& KDVDQH[FHOOHQWSURJQRVLVZLWKD
has an excellent prognosis, with a 1 00% ,,
II. 0 (7+2'
METHOD
VXUYLYDOUDWHIRUFDVHVWKDWKDYHQRWVSUHDGWRRWKHUVLWHV>@LQ
survival rate for cases that have not spread to other sites [3]; in
FRPSDULVRQ
comparison, 0HODQRPD
Melanoma FDXVHV
causes PRVW
most RI
of WKH
the GHDWKV
deaths IURP
from VNLQ
skin A.
A. Date
Date Source
Source and
and Preprocessing
Preprocessing
FDQFHULQWKH86JLYHQLWRQO\DFFRXQWVIRUDERXWRIDOO
cancer in the U. S., given it only accounts for about 1 % of all 7KHGDWDXVHGFRPHIURPWKHRQOLQHSODWIRUP.DJJOH>@
The data used come from the online platform Kaggle [ 1 2] .
VNLQ
skin FDQFHUV
cancers GLDJQRVHG
diagnosed >@
[4] . 5HJDUGOHVV
Regardless RI
of WKH
the W\SH
type RI
of VNLQ
skin 7KHUHDUHDWRWDORILPDJHVRIQLQHNLQGVRIVNLQFDQFHU
There are a total of 6,857 images of nine kinds of skin cancer,
FDQFHU
cancer, HDUO\
early GHWHFWLRQ
detection LVis D
a FUXFLDO
crucial SDUW
part RI
of LWV
its WUHDWPHQW
treatment. QDPHO\
namely %DVDO
Basal &HOO
Cell &DUFLQRPD
Carcinoma, $FWLQLF
Actinic .HUDWRVLV
Keratosis,
7KHUHIRUH
Therefore, LW it ZRXOG
would EH
be EHQHILFLDO
beneficial WR
to GHYHORS
develop DQan HIIHFWLYH
effective 'HUPDWRILEURPD
Dermatofibroma, 0HODQRPD
Melanoma, 1HYXV
Nevus, 6HERUUKHLF
Seborrheic .HUDWRVLV
Keratosis,
DSSOLFDWLRQWKDWDVVLVWVWKHHDUO\GHWHFWLRQRIVNLQFDQFHUV
application that assists the early detection of skin cancers. 6TXDPRXV&HOO&DUFLQRPDDQG9DVFXODU/HVLRQ(DFKLPDJHLV
Squamous Cell Carcinoma, and Vascular Lesion. Each image is
RIVL]HîS[6RPHVDPSOHLPDJHVRIWKHQLQHNLQGVRI
of size 600 x450px. Some sample images of the nine kinds of
,QDGGLWLRQWRVWDWLVWLFDOHYLGHQFHVRPHSUREOHPVZLWKWKH
In addition to statistical evidence, some problems with the
VNLQFDQFHUVDUHDWWDFKHGLQ)LJ
skin cancers are attached in Fig. 1 .
H[LVWLQJ
existing SDWWHUQ
pattern RI
of VNLQ
skin FDQFHU
cancer WUHDWPHQW
treatment DOVR
also LQGLFDWH
indicate WKH
the
LPSRUWDQFHRIWKHDSSOLFDWLRQPHQWLRQHGDERYH&RQYHQWLRQDOO\
importance of the application mentioned above. Conventionally, 7RILWWKHLPDJHVEHWWHUIRUWKHPRGHOVRULJLQDOGDWDVHWVDUH
T o fit the images better for the models, original data sets are
WKHILUVWVWHSRIVNLQFDQFHUGLDJQRVLVLVWKHYLVXDOH[DPLQDWLRQ
the first step of skin cancer diagnosis is the visual examination DXJPHQWHG
augmented LQ in YDULRXV
various ZD\V
ways. )LUVW
First, WKH
the VL]H
size RI
of WKH
the LPDJHV
images LV
is
RI
of D
a GHUPDWRORJLVW
dermatologist, ZKLFK
which FRXOG
could UHVXOW
result LQ
in ORZ
low DFFXUDF\
accuracy. )RU
For FKDQJHG
changed WR
to îS[
128x 128px VR
so WKDW
that WKH\
they FDQ
can EH
be SURFHVVHG
processed E\
by WKH
the
H[DPSOH
example, UHVHDUFK
research >@
[5] VKRZHG
showed WKDW
that DPRQJ
among VWXGLHV
studies RI
of
1 33 9 PRGHOVZLWKDORZQXPEHURIWUDLQDEOHSDUDPHWHUV
models with a low number of trainable parameters. 7KHQWKH Then, the
VXVSLFLRXV
suspicious VNLQ
skin OHVLRQV
lesions,
268 ZLOO
will KDYH
have Da YLVXDO
visual LQVSHFWLRQ
inspection SL[HOYDOXHVRIWKHLPDJHVDUHGLYLGHGE\IRUQRUPDOL]DWLRQ
pixel values of the images are divided by 255 for normalization
LQGLFDWLQJ
indicating PHODQRPD
melanoma LV is SUHVHQW
present. 2I
Of WKHVH
these,
1 85 ZLOO
will QRW
not EH
be DQG
and WKH
the LPDJHV
images DUH
are VSOLW
split LQWR
into Da WUDLQLQJ
training DQG
and WHVWLQJ
testing VXEVHW
subset
PHODQRPDDQGZLOOUHVXOWLQDQXQQHFHVVDU\ELRSV\7KHUHIRUH
melanoma and will result in an unnecessary biopsy. Therefore, UHVSHFWLYHO\
respectively.
WKH
the WZRIROG
twofold GHPDQG
demand IRUfor D
a EHWWHU
better VNLQ
skin FDQFHU
cancer GHWHFWLRQ
detection
PHFKDQLVPLVPDGHFOHDU
mechanism is made clear.
*LYHQ
Given WKH
the WDVN
task RI
of LPDJH
image FODVVLILFDWLRQ
classification, &11
CNN PRGHOV
models DUH
are
FKRVHQ
chosen EHFDXVH
because RI
of WKHLU
their RXWVWDQGLQJ
outstanding SHUIRUPDQFH
performance RQon LPDJH
image
,QIRUPDWLRQIRUVWUXFWXUH
Information for structure
UHFRJQLWLRQ
recognition WDVNV
tasks. &11
CNN LVis D
a SRSXODU
popular W\SH
type RI
of DUWLILFLDO
artificial QHXUDO
neural /D\HU W\SH
Layer (type)
Output
OutputShape
Shape Param
Param ##
QHWZRUN
network. ,W
It XVXDOO\
usually FRQVLVWV
consists RI
of FRQYROXWLRQDO
convolutional OD\HUV
layers, SRROLQJ
pooling
OD\HUV
layers, DQG
and IXOO\
fully FRQQHFWHG
connected OD\HUV
layers. 7KH
The ³&RQYROXWLRQ´SDUW
"Convolution" part LQ in UHVFDOLQJB 5HVFDOLQJ
rescaling_l l (Rescaling) 1RQH
(None. 128. 128. 3)
0
WKHQDPH&11FRPHVIURPWKHFRQYROXWLRQRSHUDWLRQLQOLQHDU
the name CNN comes from the convolution operation in linear FRQYGB &RQY'
conv2d_21 (Conv2D) 1RQH
(None. 128. 128. 16)
448
DOJHEUD
algebra. DYHUDJHBSRROLQJGB
average_pooling2d_1 5
1RQH
(None. 64. 64. 16)
0
$YHUDJH3RROLQJ'
(AveragePooling2D)
FRQYGB &RQY'
conv2d_22 (Conv2D) 1RQH
(None. 64. 64. 32)
4640
DYHUDJHBSRROLQJGB
average_pooling2d_16
1RQH
(None. 32. 32. 32)
0
$YHUDJH3RROLQJ'
(AveragePooling2D)
FRQYGB &RQY'
conv2d_23 (Conv2D) 1RQH
(None. 32. 32. 64)
1 8496
DYHUDJHBSRROLQJGB
average_pooling2d_1 7
1RQH
(None. 16. 16. 64)
0
$YHUDJH3RROLQJ'
(AveragePooling2D)
FRQYGB &RQY'
conv2d_24 (Conv2D) 1RQH
(None. 16. 16. 128)
73856
Basal cell carcinoma Dermatofibroma Pigmented benign keratosis
DYHUDJHBSRROLQJGB
average_pooling2d_18
1RQH
(None. 8. 8. 128)
0
($YHUDJH3RROLQJ'
AveragePooling2D)
GURSRXWB 'URSRXW
dropout_3 (Dropout) 1RQH
(None. 8. 8. 128)
0
IODWWHQB )ODWWHQ
flatten_1 1 (Flatten) 1RQH
(None. 8 1 92)
0
GHQVHB 'HQVH
dense_22 (Dense) 1RQH
(None. 256)
2097408
GHQVHB 'HQVH
dense_23 (Dense) 1RQH9)
(None.
2313
WRH[WUDFWIHDWXUHVDQGUHGXFHWKHSDUDPHWHUV7KHQXPEHUVRI
to extract features and reduce the parameters. The numbers of
RXWSXWILOWHUVDUHFKRVHQWREHDQGUHVSHFWLYHO\
output filters are chosen to be 16, 32, 64, and 128 respectively
Actinic keratosis Seborrheic Keratosis Nevus
LQWKHIRXU&RQY'OD\HUVDQGWKHKHLJKWDQGZLGWKRIWKHIRXU
in the four Conv2D layers and the height and width of the four
2D convolution windows are 3 x 3 . For the activation function,
'FRQYROXWLRQZLQGRZVDUHî)RUWKHDFWLYDWLRQIXQFWLRQ
5H/8LVXVHGWRDYRLGWKHYDQLVKLQJJUDGLHQWSUREOHPDQGWR
ReLU is used to avoid the vanishing gradient problem and to
VSHHG
speed XS
up WKH
the WUDLQLQJ
training SURFHVV
process. $PRQJ
Among WKH
the SRROLQJ
pooling PHWKRGV
methods,
DYHUDJHSRROLQJLVFKRVHQVLQFHLWFDQUHWDLQIHDWXUHVRILQSXW
average pooling is chosen since it can retain features of input
LPDJHV
images EHWWHU
better WKDQ
than WKH
the PD[
max SRROLQJ
pooling. $IWHU
After WKH
the IRXU
four SDLUV
pairs RI
of
&RQY'DQG$YHUDJH3RROLQJOD\HUVDGURSRXWOD\HULVDGGHG
Conv2D and AveragePooling layers, a dropout layer is added
ZLWK
with Da GURSRXW
dropout SUREDELOLW\
probability RI
of
0.3 WR
to UHGXFH
reduce WKH
the QXPEHU
number RIof
SDUDPHWHUVDQGSUHYHQWRYHUILWWLQJ/DVWO\D
parameters and prevent overfitting. Lastly, a IODWWHQOD\HUDQG
flatten layer and
WZRGHQVHOD\HUVDUHDSSOLHG7KHODVWGHQVHOD\HUKDVQHXURQV
two dense layers are applied. The last dense layer has 9 neurons,
PDWFKLQJWKHQXPEHURIVNLQFDQFHUW\SHV
matching the number of skin cancer types.
Squamous cell carcinoma Melanoma Vascular lesion
C.
C. Implementation
Implementation Details
Details
)LJXUH6DPSOHLPDJHVIRUWKHFROOHFWHGGDWDVHW
Figure 1 . Sample images for the collected dataset. 6LQFHWKHWDVNLQYROYHVERWKFRPSDULQJWKHWKUHHPRGHOVDQG
Since the task involves both comparing the three models and
LQWHJUDWLQJ
integrating WKH
the PRGHO
model ZLWK
with WKH
the KLJKHVW
highest DFFXUDF\
accuracy LQWR
into D
a ZHE
web
7RGHWHUPLQHDQLGHDO
To determine an ideal &11QHWZRUNIRUWKHFODVVLILFDWLRQ
CNN network for the classification DSSOLFDWLRQWZRVHWVRISDUDPHWHUVDUHXVHG2QWKHRQHKDQG
application, two sets of parameters are used. On the one hand,
WDVNSHUIRUPDQFHVRIWKH9**PRGHOV
task, performances of the VGG models (both ERWKDQG
1 6 and 1 9)EXLOW
built VPDOOHUEDWFKVL]HDQGHSRFKFDQVSHHGXSWKHWUDLQLQJSURFHVV
smaller batch size and epoch can speed up the training process
E\WKH9LVXDO*HRPHWU\*URXSDWWKH8QLYHUVLW\RI2[IRUG>@
by the Visual Geometry Group at the University of Oxford [ 1 3] ZLWKRXWDIIHFWLQJWKHUDQNRIWKHDFFXUDF\RIWKHWKUHHPRGHOV
without affecting the rank of the accuracy of the three models.
DQGDVHOIGHVLJQHGPRGHODUHFRPSDUHG9**LVFKRVHQGXHWR
and a self-designed model are compared. VGG is chosen due to 7KHUHIRUH
Therefore, EDWFK
batch VL]H
size=l 6 DQG
and HSRFK
epoch=5 DV
as WKH
the ILUVW
first VHW
set RI
of
LWV
its UHPDUNDEOH
remarkable DFFXUDF\
accuracy DFKLHYHG
achieved LQ
in WKH
the ,PDJH1HW
ImageNet &KDOOHQJH
Challenge parameters is used. On the other hand, after an ideal model is
SDUDPHWHUVLVXVHG2QWKHRWKHUKDQGDIWHUDQLGHDOPRGHOLV
DQGLWLVDOVRDIDPRXVEDFNERQHWKDWPDQ\VWXGLHVXVHGWR
2014 and it is also a famous backbone that many studies used to GHWHUPLQHGODUJHUEDWFKVL]HVDQGHSRFKVLVLPSRUWDQWIRUPRUH
determined, larger batch sizes and epochs is important for more
H[WUDFWIHDWXUHV>@
extract features [ 14]. DFFXUDWHSUHGLFWLRQ7KHUHIRUHEDWFKVL]H
accurate prediction. Therefore, batch size=40DQGHSRFK
and epoch=30LV
is
XVHGDVWKHVHFRQGVHWRISDUDPHWHUV,QERWKVFHQDULRV$GDP
used as the second set of parameters. In both scenarios, Adam
$V
As IRU
for WKH
the VHOIGHVLJQHG
self-designed PRGHO
model, LW
it FRQVLVWV
consists RI
of
1 3 OD\HUV
layers
DVWKHRSWLPL]HUDQGVSDUVHFDWHJRULFDOFURVVHQWURS\DVWKHORVV
as the optimizer and sparse categorical cross-entropy as the loss
LQFOXGLQJ
including UHVFDOLQJ
rescaling, FRQYROXWLRQDO
convolutional, SRROLQJ
pooling, DQG
and GHQVH
dense OD\HUV
layers.
IXQFWLRQDUHFKRVHQ7KHGHIDXOWOHDUQLQJUDWHLVDQGWKH
function are chosen. The default learning rate is 0 .000 1 and the
7KHDUFKLWHFWXUHRIWKHSURSRVHGPRGHOLVVKRZQLQ7DEOH,7R
The architecture of the proposed model is shown in Table I. To
HYDOXDWLRQLQGLFDWRULVDFFXUDF\
evaluation indicator is accuracy.
EXLOGWKHPRGHOOD\HUE\OD\HUWKH6HTXHQWLDOIXQFWLRQSURYLGHG
build the model layer by layer, the Sequential function provided
E\
by 7HQVRU)ORZ
TensorFlow LVis XVHG
used. )LUVWO\
Firstly, DV
as LWV
its QDPH
name VXJJHVWV
suggests, WKH
the
UHVFDOLQJ
rescaling OD\HU
layer UHVFDOHV
rescales WKH
the 5*%
RGB FKDQQHO
channel YDOXHV
values RI
of WKH
the LQSXW
input D.
D. Application
Application
LPDJHVIURPWKHUDQJH>@WRWKHUDQJH>@7KHQIRXU
images from the range [0, 255] to the range [0, 1 ] . Then, four )RUWKHDSSOLFDWLRQSDUWWKHSURSRVHGPRGHOLVGHSOR\HGDV
For the application part, the proposed model is deployed as
SDLUVRI&RQY'DQG$YHUDJH3RROLQJOD\HUVDUHXVHG
pairs of Conv2D and AveragePooling layers are used D
a ZHE
web DSSOLFDWLRQ
application. 7KH
The KRPHSDJH
homepage RIof WKH
the ZHE
web DSSOLFDWLRQ
application LV
is
VKRZQLQ)LJ
shown in Fig.2.
559
559
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:35:59 UTC from IEEE Xplore. Restrictions apply.
7KHPDLQWRROXVHGLV)ODVNDOLJKWZHLJKWZHEIUDPHZRUN
The main tool used is Flask, a lightweight web framework 7$%/(,,
TABLE !!. 7TRAINING ACCURACY
5$,1,1*$ AND /LOSS
&&85$&<$1' OF THE7
2662)7+( THREE CNN
+5((&11
ZULWWHQLQ3\WKRQ7KH+70/FRPSRQHQWRIP\DSSOLFDWLRQLV 0 2'(/6
MODELS
written in Python. The HTML component of my application is
UDWKHUVLPSOHMXVWDPHVVDJHSURPSWLQJWKHXVHUWRXSORDGWKH
rather simple, just a message prompting the user to upload the
FDQFHULPDJHWREHFODVVLILHGDQGDQLQSXWIRUPIRUXSORDGLQJ
cancer image to be clas sified and an input form for uploading 0RGHOV
Models
WKHLPDJH2QHSRLQWZRUWKQRWLFLQJLVWKDWWKH
the image. One point worth noticing is that the
Self-
Self-
designed
designed
VGG-16 VGG-19 VGG-19
VGG-16 VGG-19 VGG-19
3HUIRUPDQFH CNN
CNN
Perfm·mance (epoclt=5)
(epoch=5) (epoclt=5)
(epoch=5) (epoclt=22)
(epoch=22)
model
model
(epoclt=5
(epoch=5))
7UDLQLQJ
Training
0.53 5 1
0.8377
0.8539
0.9290
DFFXUDF\
accuracy
7UDLQLQJORVV
Training loss
1 . 2 1 24
1 . 5206
1 .4909 1 . 2842
EDVHGRQWKHSURSRVHGPRGHOWKDWDFKLHYHVWKHEHVWDFFXUDF\
based on the proposed model that achieves the best accuracy .
2QHH[DPSOHUHVXOWLVVKRZQLQ)LJ
One example result is shown in Fig.4.
7RJHQHUDWHDSUHGLFWLRQWKHWUDLQHGPRGHOLVILUVWO\ORDGHG
To generate a prediction, the trained model is firstly loaded
)LJXUH+RPHSDJHLPDJH
Figure 2. Homepage image LQWRWKH3\WKRQSURJUDPXVLQJDIXQFWLRQFDOOHGORDGBPRGHOLQ
into the Python program using a function called load_model in
.HUDV
Keras. 7KHQ
Then, DIWHU
after WKH
the PRGHO
model SURGXFHV
produces SUREDELOLWLHV
probabilities IRU
for HDFK
each
LPDJHXSORDGHGE\WKHXVHUQHHGVWREHSURFHVVHGEHIRUHLWLV
image uploaded by the user needs to be processed before it is VNLQ
skin FDQFHU
cancer FDWHJRU\
category, WKH
the FDQFHU
cancer W\SH
type WKDW
that KDV
has WKH
the KLJKHVW
highest
VHQW
sent WR
to WKH
the PRGHO
model IRU
for SUHGLFWLRQ
prediction. 6SHFLILFDOO\
Specifically, LW
it QHHGV
needs WR
to EH
be SUREDELOLW\YDOXHLVFKRVHQWREHWKHSUHGLFWHGUHVXOWDQGLWZLOO
probability value is chosen to be the predicted result and it will
H[SDQGHG
expanded LQ in GLPHQVLRQ
dimension E\
by DGGLQJ
adding EDWFK
batch VL]H
size DV
as RQH
one RI
of LWV
its EHSUHVHQWHGWRWKHXVHU
be presented to the user.
GLPHQVLRQVVRWKDWLWFDQEHDFFHSWHGE\WKHPRGHO
dimensions so that it can be accepted by the model.
,QVXPPDU\WKHZRUNIORZRIWKHSURSRVHGPRGHOLVVKRZQ
In summary, the workflow of the proposed model is shown
LQ)LJ
in Fig. 5 .
,,,
III. 5 T AND '
(68/7$1'
R.ESUL ,6&8566,21
DISCURSSION
e. p•gmcrtcd benign kcra : o.. . �
A.
A. Comparison
Comparison of ofthe
the Three
Three Models
!vfodels
8QGHUHSRFK
Under epoch=5 DQGEDWFKVL]H
and batch size =WKHWUDLQLQJDFFXUDF\DQG
l 6 , the training accuracy and
ORVVRIWKHWKUHHPRGHOVDUHVKRZQLQ7DEOH,WFDQEHREVHUYHG
loss of the three models are shown in Table 2 . It can be observed [C] [g) [Cl [II] [ill
WKDWWKHUHLVDVLJQLILFDQWJDSLQWKHSHUIRUPDQFHEHWZHHQWKH
that there is a significant gap in the performance between the ISIC_0024312.iPQ '> c OC.!t. �.'.: .r·: : ' '�) :.. OC,'.:·l _l.' :':: '"::; .:l C< I' I
VHOIGHVLJQHG&11PRGHODQGWKRVHRIWKH9**IDPLO\:KLOH
self-designed CNN model and those of the VGG family. While
WKH
the DFFXUDF\
accuracy RI of WKH
the WZR
two 9**
VGG PRGHOV
models LV is RQ
on WKH
the VDPH
same OHYHO
El a m:l c D1
level,
9**RXWSHUIRUPV9**E\DQDUURZPDUJLQ7KHUHIRUH
VGG- 1 9 outperforms VGG - 1 6 by a narrow margin. Therefore,
DIWHUUHWUDLQLQJWKH9**PRGHOXQGHUHSRFK
after retraining the VGG- 1 9 model under epoch=22 DQGEDWFK
and batch " ):
)-.
. : <->- r' ' . • J'
l ' (i / : ;.;, pc; ' "' ' 1 ' 1
VL]H
size=LWLVFKRVHQWREHLQWHJUDWHGLQWRWKHZHEDSSOLFDWLRQ
l 6, it is chosen to be integrated into the web application.
� � =
)URP7DEOHLWFDQEHREVHUYHGWKDWWKHWUDLQLQJDFFXUDF\
From Table 2, it can be observed that the training accuracy Can:;el Open
LQFUHDVHV
increases DV
as WKH
the GHSWK
depth RI
of WKH
the PRGHO
model LQFUHDVHV
increases. 7KLV This UHVXOW
result LV
is
VRPHZKDW
somewhat LQWXLWLYH
intuitive . 7KH
The ILUVW
first IHZ
few OD\HUV
layers RI
of D a &11
CNN PRGHO
model Figure 3. Image uploading
)LJXUH,PDJHXSORDGLQJ
XVXDOO\WDUJHWORZOHYHOIHDWXUHVRIDQLPDJHVXFKDVFXUYHVDQG
usually target low-level features of an image, such as curves and
HGJHV
edges. $V
As WKH
the QXPEHU
number RI
of FRQYROXWLRQDO
convolutiona l OD\HUV
layers LQFUHDVHV
increases, WKH
the
PRGHOEHFRPHVPRUHFDSDEOHRIH[WUDFWLQJKLJKHUOHYHOPRUH
model becomes more capable of extracting higher-level, more
DEVWUDFWIHDWXUHVWKDWDUHFRPSRVHGRIORZOHYHOIHDWXUHV*LYHQ
abstract features that are composed of low-level features. Given
WKH
the FRPSOLFDWHG
complicated, QLQHFDWHJRU\
nine-category FODVVLILFDWLRQ
classification WDVN task, ZKHUH
where WKH
the
FDQFHULPDJHVDUHULFKLQIHDWXUHVOLNHVKDSHDQGFRORUDQG\HW
cancer images are rich in features like shape and color and yet
PLJKWQRWEHWKDWGLVWLQFWIURPRQHDQRWKHU
might not be that distinct from one another (e HJ6DPSOHLPDJHV
. g . , Sample images
RI
of 1HYXV
Nevus DQG
and 0HODQRPD
Melanoma LQin )LJ WKH
Fig. I ), the DELOLW\
ability WR to H[WUDFW
extract DQG
and
GLVWLQJXLVK
distinguish KLJKOHYHO
high-level IHDWXUHV
features LV
is HVVHQWLDO
essential IRUfor KLJKhigh DFFXUDF\
accuracy .
7KHUHIRUH
Therefore , D
a VKDOORZ
shallow PRGHO
model OLNH
like WKH
the VHOIGHVLJQHG
self-designed QHWZRUN
network
\LHOGVSRRUSHUIRUPDQFHZKHUHDV9**VKRZVKLJKDFFXUDF\
yields poor performance whereas VGG- 1 9 shows high accuracy.
B.
B. Web
Web Application
Application )LJXUH([DPSOHUHVXOWLPDJH
Figure 4. Example result image
XSRQ
upon RSHQLQJ
opening WKH
the DSSOLFDWLRQ
application, WKH
the XVHU
user ZLOO
will VHH
see WKH
the
KRPHSDJHVKRZQLQ)LJ7RXSORDGDQLPDJHIRUGLDJQRVLV
homepage shown in Fig. 2. To upload an image for diagno sis,
WKHXVHUFOLFNVWKHFKRRVHILOHEXWWRQDQGXSORDGVWKHLULPDJH
the user clicks the choose file button and uploads their image.
7KH
The XSORDG
upload ZLQGRZ
window LV
is VKRZQ
shown LQ
in )LJ
Fig.
3. $IWHU
After D
a VXFFHVVIXO
successful
XSORDGWKHDSSOLFDWLRQMXPSVWRDQRWKHUZHESDJHDQGSURGXFHV
upload, the application jumps to another webpage and produce s
DUHVXOW
a result
560
560
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:35:59 UTC from IEEE Xplore. Restrictions apply.
>@
[4] 0HODQRPD
Melanoma: 6WDWLVWLFV
Statistics. &DQFHU1HW
Cancer.Net. KWWSVZZZFDQFHUQHWFDQFHU
https: i./>v,,w.cancer.net/cancer
W\SHVPHODQRPDVWDWLVWLFV
typesimelanomalstalistics, 202 1 .
>@
[5] +RZDFFXUDWHLVYLVXDOLQVSHFWLRQRIVNLQOHVLRQVZLWKWKHQDNHGH\HIRU
How accurate is visual inspection of skin lesions with the naked eye for
GLDJQRVLV
diagnosis RI
of PHODQRPD
melanoma LQ
in DGXOWV"
adults?. &RFKUDQH
Cochrane.
https ://www.cochrane.org/CDO 1 3 1 94/SKIN_how-accurate-visual
KWWSVZZZFRFKUDQHRUJ&'6.,1BKRZDFFXUDWHYLVXDO
inspection-skin-lesions-naked-eye-diagnosis-melanoma-adults, 2018.
LQVSHFWLRQVNLQOHVLRQVQDNHGH\HGLDJQRVLVPHODQRPDDGXOWV
>@
[6] <4LXHWDO3RVHJXLGHGPDWFKLQJEDVHGRQGHHSOHDUQLQJIRUDVVHVVLQJ
Y. Qiu, et al. "Pose-guided matching based on deep 1eaming for assessing
TXDOLW\RIDFWLRQRQUHKDELOLWDWLRQWUDLQLQJ%LRPHGLFDO6LJQDO3URFHVVLQJ
quality of action on rehabilitation training." Biomedical Signal Processing
DQG&RQWUROYRO
and Control, vol. 72, 1 03 323, 2022.
>@
[7] =:DQJHWDO%UHDVWFDQFHUGHWHFWLRQXVLQJH[WUHPHOHDUQLQJPDFKLQH
Z. Wang. et al. "Breast cancer detection using extreme learning machine
EDVHG
based RQon IHDWXUH
feature IXVLRQ
fusion ZLWK
with &11
CNN GHHS
deep IHDWXUHV,(((
features." IEEE $FFHVV
Access 7,
)LJXUH:RUNIORZRIWKHSURSRVHGPRGHO
Figure 5. Workflow of the proposed model
105 146- 1 05 1 58, 2019.
>@
[8] 6 S. $OKHHMDZL
Alheej awi, HW
et DO
" An HIILFLHQW
al. ³$Q efficient &11
CNN EDVHG
based DOJRULWKP
algoritlun IRU
for GHWHFWLQJ
detecting
UG
PHODQRPD
melanoma FDQFHU
cancer UHJLRQV
regions LQ
in + (VWDWLQHG LPDJHV´
H&E-statined images"
2021 43'·d $QQXDO
Annual
IV. &
,9 21&/86,21
CONCLUSION ,QWHUQDWLRQDO&RQIHUHQFHRIWKH,((((QJLQHHULQJLQ0HGLFLQH
Intemational Conference of the IEEE Engineering in Medicine &%LRORJ\ Biology
7RVXPPDUL]HSHUIRUPDQFHVRIWKUHH&11PRGHOVQDPHO\ 6RFLHW\ (0%&
Society (E.tv!BC), 2021.
To performances of three CNN models, namely
9**9**DQGDVHOIGHVLJQHGPRGHODUHFRPSDUHGRQ >@ R Nersisson, et al. "A Dermoscopic Skin Lesion Classification Teclmique
[9] 51HUVLVVRQHWDO³$'HUPRVFRSLF6NLQ/HVLRQ&ODVVLILFDWLRQ7HFKQLTXH
VGG-16, and a self-designed model, are compared on 8VLQJ<2/2&11DQG7UDGLWLRQDO)HDWXUH0RGHO´$UDE-6FL(QJ
Using YOLO-C'N'N and Traditional Feature Model" Arab J Sci Eng 46,
DPXOWLFODVVVNLQFDQFHUFODVVLILFDWLRQWDVN(PSLULFDOHYLGHQFH
a multiclass skin cancer classification task. Empirical evidence
9797-9808, 2021.
VXJJHVWVWKDW9**KDVWKHEHVWSHUIRUPDQFHZLWKDWUDLQLQJ
suggests that VGG- 1 9 has the best performance with a training >@
[I 0] 7
T. 3KDP
Pham, HW
et DO
a!. 'HHS
"Deep &11
CNN DQG
and GDWD
data DXJPHQWDWLRQ
augmentation IRUfor VNLQ
skin OHVLRQ
lesion
DFFXUDF\RIDQGDWUDLQLQJORVVRI7KH9**
accuracy of 0. 9290 and a training loss of 1 .2842. The VGG-19 FODVVLILFDWLRQ$VLDQ&RQIHUHQFHRQ,QWHOOLJHQW,QIRUPDWLRQDQG'DWDEDVH
classification." Asian Conference on Intelligent intbrmation and Database
PRGHOLVLQWHJUDWHGLQWRDZHEDSSOLFDWLRQWRDVVLVWWKHGLDJQRVLV
model is integrated into a web application to assist the diagnosis 6\VWHPV6SULQJHU&KDP
Systems. Springer, Cham, 2018.
RIVNLQFDQFHU,QWKHIXWXUHDGGLQJPRUHIXQFWLRQDOLWLHVWRWKH
of skin cancer. In the future, adding more ftmctionalities to the >@ :'vf. -XQD\HG
[1 1 ] 0 Junayed, HW
et DO
a!. $
"A GHHS
deep &11
CNN PRGHO
model IRU
for VNLQ
skin FDQFHU
cancer GHWHFWLRQ
detection DQG
and
ZHEDSSOLFDWLRQLVSODQQHGIRUDEHWWHUXVHUH[SHULHQFH
web application is planned for a better user ex]pertence. FODVVLILFDWLRQ,QWHUQDWLRQDO&RQIHUHQFHLQ&HQWUDO(XURSHRQ&RPSXWHU
classification.", Intemational Conference in Central on Computer
*UDSKLFV9LVXDOL]DWLRQDQG&RPSXWHU9LVLRQSS
Graphics. Visualization and Computer Vision, pp. 71-80,
>@
[12] $XJPHQWHG.DJJOHKWWSVZZZNDJJOHFRPPLGKXQNXPDUDXJPHQWHG
Augmented. .Kaggle. https ://www.kaggle.com/midhunkumar/augmented,
5()(5(1&(6
REFERENCES
2021 .
>@
[ l ] %DVLF,QIRUPDWLRQ$ERXW6NLQ&DQFHU&HQWHUVIRU'LVHDVH&RQWURODQG
Basic Information About Skin Cancer. Centers for Disease Control and >@ K. 6LPRQ\DQ
[13] . Simonyan, DQG
and =
Z. $QGUHZ
Andrew. 9HU\
"Very GHHS
deep FRQYROXWLRQDO
convolutional QHWZRUNV
networks IRU
for
Prevention. https:l/wvvw.cdc.gov/cancerlskinlbasic_infoiindex.htm 202 1 .
3UHYHQWLRQKWWSVZZZFGFJRYFDQFHUVNLQEDVLFBLQIRLQGH[KWP ODUJHVFDOHLPDJHUHFRJQLWLRQDU;LYSUHSULQWDU;LY
large-scale linage recognition." arXiv preprint arXiv: l 40 9. 1 5 56, 2014.
>@
[2] 6.,1
SKIN &$1&(5
C&'-JCER. $PHULFDQ
American $FDGHP\
Academy RI of 'HUPDWRORJ\
Dermatology $VVRFLDWLRQ
Association. >@
[14] $6HQJXSWDHWDO*RLQJGHHSHULQVSLNLQJQHXUDOQHWZRUNV9**DQG
A. Sengupta, et a!. "Going deeper in spiking neural networks: VGG and
https:liwww.aad.orglmediaistats-skin-cancer, 202 1 .
KWWSVZZZDDGRUJPHGLDVWDWVVNLQFDQFHU residual architectures." Frontiers in neuroscience 13, vol. 95, 201 9.
UHVLGXDODUFKLWHFWXUHV)URQWLHUVLQQHXURVFLHQFHYRO
>@
[ 3 ] :KDW
What LV is WKH
the SURJQRVLV
prognosi s RI
o f EDVDO
basal FHOO
cell FDUFLQRPD %&& " 0HGVFDSH
carcinoma (BCC)?. Medscape.
KWWSVZZZPHGVFDSHFRPDQVZHUVZKDWLVWKH
https: 1/\vvvw.medscape. com/answers.l276624-1 00 1 30/what-is-th e
SURJQRVLVRIEDVDOFHOOFDUFLQRPDEFF
prognosis-of-basal-cell-carcinoma-bcc, 2021 .
561
561
Authorized licensed use limited to: MULTIMEDIA UNIVERSITY. Downloaded on January 17,2025 at 06:35:59 UTC from IEEE Xplore. Restrictions apply.