Resul s in Physics 31 (2021) 105045
A ailable online 22 No embe 2021
2211-3797/© 2021 The Au ho (s). Published by Else ie B.V. This is an open access a icle unde he CC BY license (h p://c ea i ecommons.o g/licenses/by/4.0/).
COVID-19 anomaly de ec ion and classi ica ion me hod based on supe ised machine lea ning o
ches X- ay images
ARTICLE INFO
Keywo ds
COVID-19 diagnosis
X- ay image
Local bina y pa e n
Ha alick
Machine lea ning
K-nea es neighbo
Suppo ec o machine
ABSTRACT
The e m COVID-19 is an abb e ia ion o Co ona i us 2019, which is conside ed a global pandemic ha
h ea ens he li es o millions o people. Ea ly de ec ion o he disease o e s ample oppo uni y o eco e y and
p e en ion o sp eading. This pape p oposes a me hod o classi ica ion and ea ly de ec ion o COVID-19
h ough image p ocessing using X- ay images. A se o p ocedu es a e applied, including p ep ocessing (image
noise emo al, image h esholding, and mo phological ope a ion), Region o In e es (ROI) de ec ion and seg-
men a ion, ea u e ex ac ion, (Local bina y pa e n (LBP), His og am o G adien (HOG), and Ha alick ex u e
ea u es) and classi ica ion (K-Nea es Neighbo (KNN) and Suppo Vec o Machine (SVM)). The combina ions
o he ea u e ex ac ion ope a o s and classi ie s esul s in six models, namely LBP-KNN, HOG-KNN, Ha alick-
KNN, LBP-SVM, HOG-SVM, and Ha alick-SVM. The six models a e es ed based on es samples o 5,000 im-
ages wi h he pe cen age o aining o 5- olds c oss- alida ion. The e alua ion esul s show high diagnosis ac-
cu acy om 89.2% up o 98.66%. The LBP-KNN model ou pe o ms he o he models in which i achie es an
a e age accu acy o 98.66%, a sensi i i y o 97.76%, speci ici y o 100%, and p ecision o 100%. The p oposed
me hod o ea ly de ec ion and classi ica ion o COVID-19 h ough image p ocessing using X- ay images is
p o en o be usable in which i p o ides an end- o-end s uc u e wi hou he need o manual ea u e ex ac ion
and manual selec ion me hods.
In oduc ion
The new Co ona i us 2019 (COVID-19) pandemic i s appea ed in
Wuhan, China, in 2019, and s a ed o sp ead apidly, posing a c i ical
public heal h p oblem o he en i e wo ld [1]. COVID-19 esul s in mild
symp oms in abou 82% o he cases, and o he condi ions a e se e e o
c i ical [2,3]. The o al numbe o COVID-19 con i med cases
h oughou he wo ld is 229,373,963, including 4,705,111 dea hs e-
po ed by he Wo ld Heal h O ganiza ion (WHO) on 23 Sep embe 2021
[4]. Fig. 1 shows he dis ibu ion o COVID-19 diagnosed cases
wo ldwide.
The COVID-19 pandemic i us is se e e espi a o y synd ome co o-
na i us 2, also called SARS-CoV-2. A high numbe o in ec ed pa ien s
has su i ed he i us, while a smalle pe cen age has se ious o c i ical
condi ions [5,6]. The inc ease in he numbe o people wi h he COVID-
19 i us leads o an inc eased need o in ensi e ca e. This ex ension
c ea es a wo kload on he heal hca e sys em leading o he collapse o
he heal h sys ems e en in he bes -de eloped coun ies. When in ensi e
ca e uni s (ICUs) a e ull o pa ien s, he heal h s a us o COVID-19 pa-
ien s de e io a es, and he a e o dea h inc eases. Some esea che s
u ilize medical images like X- ays o Compu ed Tomog aphy (CT-scans)
o he sea ch o p ope ies symp oms o he no el co ona i us [2,7].
The COVID-19 pandemic has lead o huge inancial losses wo ld-
wide, posing a massi e impac on wo ld GDP g ow h [1]. Global
ecession has been e y se e e since he end o Wo ld Wa II esul ing in
he con ac ion o he global eonomy by 3.5% in 2020 based on he Ap il
2021 Wo ld Economic Ou look Repo published by he IMF, which
s a es a 7% loss ela i e o he 3.4% g ow h o ecas o Oc obe 2019.
While i ually e e y coun y epo ed by he IMF pos ed nega i e
g ow h in 2020, he down u n was mo e p onounced in he poo es pa s
o he wo ld [8].
Resea che s o some ecen s udies employ ches adiog aphy in
epidemiological egions o es ing COVID-19 [1,3]. They ound ha he
examina ion o adiog aphic images could be an al e na i e o he PCR
scheme as i shows a highe sensi i i y in some cases [9]. Xu e al. [10]
in oduced a new me hod based on a deep lea ning sys em o sc een
co ona i us COVID-19 pneumonia. The p oposed me hod aims o build
up an ea ly examina ion model o ecognize COVID-19 pneumonia om
In luenza-A i al pneumonia and heal h condi ions wi h lung sec ion
images based on deep lea ning me hods [8]. The p oposed algo i hm is
designed based on candida e in ec ion a eas di ided using a h ee-
dimensional deep lea ning echnique om a se o pulmona y CT im-
ages [6]. The esul s o he expe imen s benchma k da ase shows ha
he inclusi e accu acy is 86.7 % om he pe spec i e o CT o he whole
cases.
In he wo k o Se hy and Behe a [9], hey p oposed an algo i hm o
he de ec ion o COVID-19 based on deep ea u es. Deep ea u es a e
ex ac ed om a p e- ained CNN model and ed o an SVM classi ie in
indi idual o m. The p oposed classi ica ion scheme o he de ec ion o
COVID-19 ob ained an accu acy o 95.38%.
In he p io wo k o Oz u k e al. [11], hey p esen ed a new model
based on deep lea ning echniques o de ec and classi y COVID-19
condi ions om X- ay images. The p oposed model is comple ely au o-
ma ed based on an end- o-end s uc u e. In addi ion, he p oposed
me hod is able o pe o m bina y and mul i-class classi ica ions wi h
accu acy alues o 98.08% and 87.02%, espec i ely. Subsequen ly,
Con en s lis s a ailable a ScienceDi ec
Resul s in Physics
jou nal homepage: www.else ie .com/loca e/ inp
h ps://doi.o g/10.1016/j. inp.2021.105045
Recei ed 28 Decembe 2020; Recei ed in e ised o m 19 No embe 2021; Accep ed 19 No embe 2021
Resul s in Physics 31 (2021) 105045
2
Na in e al. [12] p oposed u ilizing h ee ypes o CNN-based models:
Incep ion ResNe V2, Incep ionV3, and ResNe 50 o COVID-19 de ec-
ion om ches X- ay images. Pe o mance esul s o he p oposed
models illus a e ha he p e- ained pa e ns o he ResNe 50 ob ained
he highes accu acy o 98%. The majo limi a ion is applying he p o-
posed me hods/models on a ew numbe s o COVID-19 X- ay images,
which do no sa is y obus esul s.
This pape p oposes a me hod o classi ica ion and ea ly de ec ion o
COVID-19 h ough image p ocessing using X- ay images. A se o p o-
cedu es a e applied in cons uc ing he COVID-19 de ec ion model,
including p ep ocessing (image noise emo al, image h esholding, and
mo phological ope a ion), Region o In e es (ROI) de ec ion, ea u e
ex ac ion using mul iple me hods such as Local bina y pa e n (LBP),
His og am o G adien (HOG), and Ha alick ex u e ea u es. In he
classi ica ion s age, he K-Nea es Neighbo (KNN) and Suppo Vec o
Machine (SVM) a e used wi h he pe cen age o aining o 5- olds c oss-
alida ion o he egion o in e es . The con ibu ions o ou s udy a e
summa ized as ollows:
•We combine he ea u e ex ac ion ope a o s’ and classi ie s’
ou come in six models, namely LBP-KNN, HOG-KNN, Ha alick-KNN,
LBP-SVM, HOG-SVM, and Ha alick-SVM on 5,000 X- ay images. The
combined six models a e shown o ou pu e y high ou comes in a
la ge da ase o 5,000 X- ay images. The esul s u he show ha
ches X- ay images a e one o he bes means o he de ec ion o
COVID-19.
•We show ha he LBP-KNN model is an e ec i e model among o he
models. The LBP-KNN model ou pe o ms he o he models. I ach-
ie es an a e age accu acy o 98.66%, a sensi i i y o 97.76%, a
speci ici y o 100%, a p ecision o 100%, an e o a e o 1.34%, and
ze o alse posi i e.
The pape is o ganized as ollows: Sec ion 2 includes Me hods and
Ma e ials o COVID-19 da ase , ea u es ex ac ion ope a o s’ and clas-
si ie s’ ou come. Implemen a ion and Resul s o COVID-19 de ec ion
and Classi ica ion a e p o ided in Sec ion 3. Finally, in Sec ion 4, he
conclusion and he u u e wo ks a e summa ized.
Me hods and Ma e ials
The COVID-19 X-Ray da ase
This wo k u ilizes a ches x- ay o 5,000 no mal and pneumonia
COVID-19 images ha a e ob ained om he open-sou ce Gi Hub
wa ehouse sha ed by Cohen e al. [13], namely “Ches X-Ray Images
(Pneumonia)”. This wa ehouse p o ides ches X- ay/CT images o p i-
ma y pa ien s wi h COVID-19 along wi h o he diseases. Samples o he
selec ed ches X- ay images o no mal and pneumonia COVID-19 se s a e
shown in Fig. 2 [5,13].
OTSU’S h esholding
O su’s h eshold me hod aims o con e a g ayscale image o a bi-
na y image. This me hod employs a ious echniques o image p o-
cessing o implemen his og am-based image h esholding o o
ans o m an image om g ayscale o bina y [11]. The O su h esh-
olding me hod supposes ha he image consis s o he bi-modal his o-
g am ( o eg ound and backg ound and he ela ed op imal h eshold).
Mo phology ope a ions
Ma hema ical mo phology (MM) aims o ex ac componen s om
he image ha a e use ul in he depic ion o egion, shape and
desc ip ion like skele ons, and con ex hull, bounda ies. In addi ion, he
mo phological echniques a e conside ed o p e-o pos -p ocessing, o
example, mo phological il e ing by econs uc ion, hinning, and
p uning ans o m [9]. Gene ali y mo phological ope a ions concen-
a e on bina y images. Mo phological ope a ions a e logical ans-
o ma ions dependen on a compa ison be ween pixel neighbo hoods
wi h a p ede ined pa e n.
Mo phological Dila ion: The dila ion ope a ion employed a s uc-
u ing elemen also called “ke nel“ o check and ex end he shapes [12].
When applied he s uc u ing elemen S on image A, he esul is a new
image I,
I=A⊕S=⋃
s∈S
As(1)
Opening: The image opening ope a ion combines e osion and dila-
ion ope a ion using in e sec ion and complemen a ion [9]. The condi-
ioned dila ion (opening) begins by p oducing ma ix X
0
o 0 s which i s
size equals A.
Xi=(Xi−1⊕S) ∩ AC(2)
whe ein he inal s ep:
Xi=Xi+1(3)
whe e X(i) con ains all he illed holes.
Mo phological Closing: The mo phological closing comes a e
dila ion ope a ion using he same s uc u ing elemen [9]. The closing
ope a ion is,
A.S= (A⊕S)ΘS(4)
Mo phological E osion: Mo phological e osion ope a ion aims o
sh ink he image. The ou pu o e osion ope a ion is an image I,
Fig. 1. Dis ibu ion o COVID-19 cases wo ldwide un il Sep. 2021 [4].
J.N. Hasoon e al.
Resul s in Physics 31 (2021) 105045
3
I=AΘS= ∩s∈S A −S(5)
Midpoin ellipse d awing algo i hm
The ellipse s uc u e allows d awing using a ci cle scaling wi h a
sho e adius in he di ec ion o a longe adius. Se e al me hods can be
used o ha e midpoin ellipse as a d awing algo i hm. The ellipse al-
go i hm s a s d awing a he o igin and hen mo es s aigh owa ds he
cen e poin [14,15]. Fig. 3(a) illus a es he ellipse o a 4-way sym-
me y. I is simila o he scheme used o show a as e ci cle. The ellipse
quad an is spli in o wo egions. Fig. 3(b) shows he sec ion o he i s
quad an ha depends on he slope o an ellipse wi h Rx <Ry. As he
ellipse is d awn om 90 o 0 deg ees, x mo es in he posi i e di ec ion,
and y mo es in he nega i e di ec ion, and he ellipse passes h ough wo
egions.
While he ellipse d awing algo i hm p ep ocesses he i s quad an ,
hen he algo i hm mo es owa ds x-di ec ion ( he magni ude o he
cu e slope <1 o he i s egion) and owa ds he y-di ec ion ( he
magni ude o he cu e slope >1 o he second egion). Simila o he
ci cle unc ion, he ellipse unc ion,
ellipse(x,y) = ( 2yx2+ 2xy2− 2x 2y)(6)
Fea u e ex ac ion
Local bina y pa e n
Local Bina y Pa e n (LBP) is one o he well-known image ea u e
ex ac ion ope a o s adop ed in many eal-wo ld applica ions [16]. The
LBP is a simple, ye e ec i e ex u e ex ac ion ope a o . The LBP has a
low compu a ional complexi y ha enables i o wo k in complica ed
and eal- ime image p ocessing applica ions. I is a uni ied app oach o
adi ional s uc u al and s a is ical models. I speci ies he icini y o
each pixel o an image hen labels hese pixels wi h bina y numbe s. The
LBP can be a icula ed in he decimal o m gi en a pixel a (x
c
, y
c
) by Eq.
(7):
LBPP,R(Xc,Yc) = ∑
P−1
p=0
s(ip−ic)2p(7)
whe e i
c
and i
p
a e espec i ely g ay-le el alues o he cen al pixel
and P su ounding pixels in he ci cle neighbo hood wi h a adius R. The
unc ion s(x) is de ined in Eq. (7) as ollow:
s(x) = {1i x ≥0
0i x <0(8)
HOG algo i hm
Wi h he aim o ex ac ea u es, he HOG algo i hm includes wo
main s ages [15]. The i s s age is his og am ex ac ion o he o ien ed
g adien . The g adien o he di ec ion and magni ude a e ex ac ed
om each pixel in he inpu image. These a e employed o p oduce an
angula his og am o g adien s applied as an image ex u e ea u e
ec o . The e ical and ho izon al componen s o he image I (i, j) a e
de i a i es a pixel (i, j). They a e espec i ely compu ed as below:
Gi(i,j) = I(i+1,j) − I(i−1,j)(9)
whe e
Gj(i,j) = I(i,j+1) − I(i,j−1)(10)
and,
Fig. 2. Sample o he Ches X-Ray Images (No mal and Pneumonia) [5,13].
Fig. 3. Midpoin Ellipse Me hod [14].
J.N. Hasoon e al.
Resul s in Physics 31 (2021) 105045
4
G(i,j) =
Gi(i,j)2+Gj(i,j)2
√(11)
and,
α
0(i,j) = an −1[Gj(i,j)
Gi(i,j)],
α
0∈[−
π
2,
π
2](12)
whe e G
i
(i, j), G
j
(i, j) a e he de i a i e along a ho izon al and
e ical di ec ion a pixel (i, j), espec i ely.
The second s age ep esen s he cons uc ion o he HOG desc ip o
which is cons uc ed based on he g adien o he image. Fi s ly, he
whole image is spli in o blocks wi h size 8*8. The g adien di ec ion
ange [-
π
/2,
π
/2] is calcula ed uni o mly in o nine in e als o di ec ion
(bins). To c ea e a s ong ec o o b igh ness changes, he HOG ea u e
esul s a e no malized by segmen ing each bin wi h he o al o he
his og am [15].
Ha alick ex u e ea u es (Second O de )
G ay Le el Co-occu ence Ma ix (GLCM) is a ep esen a ion o
in e dependence le els and spa ial dis ibu ion wi hin a local a ea [17].
The Ha alick ope a o calcula es Ha lic ea u es acco ding o he s a-
is ical dis ibu ion o he GLCM in which he pee o pixels is conside ed
as second-o de . I buil ela ions be ween posi ions o pixels o an image
[15,18]. The quan iza ion p ocess is applied o he image be o e calcu-
la ing he co-occu ence ma ix. Con as is used o show he a ia ion o
he g ay le el o he neighbo pixels o he e e ence pixel as in Eq. (13):
con as =∑
i∑
j
(i−j)2pd(i,j)(13)
The homogenei y shows he ela ionships be ween he dis ibu ion o
he elemen s and diagonal in he GLCM.
Homogenei y =∑
i∑
j
1
1+ (i−j)2pd(i,j)(14)
The en opy shows he andomness o he image diso de which is
o mula ed as in (15):
en opy = − ∑
i∑
j
pd(i,j)1npd(i,j)(15)
Classi ica ion me hods
Di e en classi ica ion algo i hms include nai e Bayes, KNN, neu al
ne wo k, decision ee, SVM, e c. They a e used o p edic class labels o
anonymous da a. The KNN and SVM a e selec ed in his wo k o
cons uc he classi ica ion model.
K-Nea es Neighbo (KNN): The KNN algo i hm u ilizes he
Euclidean dis ance s anda d o calcula e he alue o he a iance be-
ween he aining ins ance and he es ins ance [19]. The “K” indica es
he numbe o closes neighbo s ha help p edic he es pa e n class
[20]. The s anda d Euclidean dis ance d (x, y) is de e mined o ollow as:
d(xi,yj)=
(a (xi) − a (xj))2
√(16)
Addi ionally, KNN compu es he mos popula ca ego y om he
nea es neighbo K o es ima e he es ins ance class o he es se . I is
de e mined in Eq. (17):
c(x) = a gmaxc∈C∑
i=1 ok
δ(c,c(yi) ) (17)
The pa ame e s y
1
, y
2
, y
3
, …, y
k
ep esen s he k nea es neighbo s o
a speci ic ins ance o he es da a se , k is he numbe o he neighbo s, C
ep esen s he ini e se o class labels, and δ (c, c(y
i
)) =1 i c =c(y
i
) and
δ(c, c(y
i
)) =0 o he wise [21].
Suppo Vec o Machine (SVM): I is a ype o supe ised machine
lea ning me hod ha depends on he p oblem o maximum classi ica ion
hype plane in e al linea sepa able. The Ke nel unc ion enables linea
poin s o be less dis an , elying on he egion o he high dimensional
ea u e. The selec ion o he model and he ke nel unc ion pa ame e s
di ec ly a ec he SVM lea ning esul s [22,23]. The pa ame e
σ
2 de-
e mines he ke nel unc ion gene aliza ion and in luences he ke nel
unc ion gene aliza ion [9]. Gaussian Ke nel (GK) is a sign unc ion o
he ke nel in Ke nel schemes. The ea u e space has an in ini e dimen-
sion in which da a ha canno be classi ied in a low linea ly dimension
can be classi ied in a highe dimension which he GK speci ies as in (18):
k(x,y) = exp(− ‖x−y‖2/2
σ
2)(18)
Implemen a ion and esul s
The p oposed me hod elies on image p ocessing by pe o ming a se
o p ocedu es ha would gi e a p elimina y diagnosis o COVID-19
pa ien s h ough X- ay images [11,12,24,25]. The ea u es ope a o s
o LBP, HOG, and Ha alick and classi ie s o SVM and K-NN made a
combina ion o six models LBP-KNN, HOG-KNN, Ha alick-KNN, LBP-
SVM, HOG-SVM, and Ha alick-SVM. Fig. 4 shows he o e all p oposed
anomaly de ec ion and classi ica ion model o COVID-19 based on ches
X- ay images. The implemen a ion o he p oposed me hod is ep e-
sen ed by applying se e al s eps o he o al image o speci y ROI and
hen ex ac ing ea u es (mul iple ea u es based on ches X- ay images).
Subsequen ly, building wo classi ica ion models o de ec ing he
abno mal case o COVID-19. The classi ica ion models consis o aining
and es ing s ages, and he model could be used o handling new cases.
The key s eps o he p oposed COVID-19 diagnosis me hod a e shown in
Fig. 4.
The p ep ocessing o he images depends mainly on se e al s eps o
inding he egion o in e es (ROI). The i s s ep is con e ing a colo
image in o a g ay image and applying he median il e on all da ase
images, which emo es he noise p esen in he image. Then, he g ay
images a e con e ed in o bina y images based on he e icien common
me hod called O su’s h esholding which depends on he sepa a ion o
he o eg ound om he backg ound by educing he in ensi y o he
a iance conce ning he in a-class and inc easing he in ensi y o he
a iance wi h he in e -class. The las p ep ocessing s ep is a mo pho-
logical ope a ion called opening ope a ion, ep esen ed by wo s eps
e osion ollowed by dila ion. I pe o ms he p e ious s ep by imp o ing
he bina y image and emo ing a small egion, which is conside ed
unimpo an a eas o noise on he esul ing image, and keeping he
use ul a eas o p ocessing in he nex s eps.
The me hod d aws an ellipse o c op he ROI ha ep esen s he
Midpoin Ellipse. The p ocess is done by acing he wo poin s o he
line in he lowe a ea o he image and ep esen ing he igh poin X1,
Y1, and he le poin X2, Y2. Th ough hese poin s, he middle poin ha
ep esen s X, Y is he cen e o he ellipse and is dependen on inding he
dis ance be ween he wo poin s X1, Y1 and X, Y o X2, Y2 and X, Y
which a e ound as x, he i s adius. Then, y is calcula ed om 0 o
he heigh o he image and y is chosen h ough he whi es pe cen age
o blackness, which is calcula ed by aking he pixel alue o poin s as
Eq. (16, 17). This p ocess ensu es ha he shape con ains he lungs o
es ing, as shown in Fig. 5. The c opped egion ep esen s he lung a ea,
and i is used la e o ea u e ex ac ion.
In he nex s ep, he back-o -wo d p ocess is used o s anda dize he
leng h o he ec o s gene a ed o he classi ica ion p ocess. F om he
p e ious s ep, all he 5,000 images a e p ocessed by mo phological
ope a ion (closing) o p oducing enhanced bina y images. These a e
inpu ed o he mid-poin ellipse c opping algo i hm in which all mid-
poin s a e ex ac ed depending on he le and igh coo dina es. Then
he di ec ion changes owa ds he op, as shown in he ed a ea o Fig. 5.
Then a black and whi e mask (bina y image) is applied o he o iginal
image o ex ac he ROI.
In he p oposed me hod, h ee ypes o ea u e ex ac ion ope a o s
ex ac he disc imina o y p ope ies o he ROI in which he size o he
cell is 128 ×128. The LBP p oduces 59 ea u es, HOG p oduces 104
J.N. Hasoon e al.
Resul s in Physics 31 (2021) 105045
5
ea u es, and he Ha alick p oduces a se o unspeci ied impo an poin s
o each image, as shown in Fig. 6(a-c). The ex ac ed ea u es in he
p e ious s ep a e used in he classi ica ion p ocess and o build he
classi ica ion model o COVID-19 disease. All he ea u es a e used o
aining and es ing he KNN and SVM classi ie s [26,27,28].
Ul ima ely, he combina ions o he classi ie s and ea u es ex ac-
ion ope a o s p oduce six models, namely LBP-KNN, HOG-KNN,
Ha alick-KNN, LBP-SVM, HOG-SVM, and Ha alick-SVM. To p oduce
obus esul s, he es s consis o mul iple aining condi ions o 5- olds
c oss- alida ion (50%, 60%, 70%, 80%, and 90%). The e alua ion
conside s comp ehensi e c i e ia o he con usion ma ix, including
accu acy, sensi i i y, speci ici y, p ecision, p e alence, e o a e, and
alse-posi i e a e, as shown in Table 1 and Table 2. Table 1 shows he 5-
old c oss- alida ion e alua ion esul s o he h ee KNN-based classi i-
ca ion models, while Table 2 shows he e alua ion esul s o he h ee
SVM-based classi ica ion models.
Table 1 and Fig. 7(a) show he classi ica ion esul s o he KNN o
he LBP, HOG, and Ha alick ea u es. As i can be obse ed om he
esul s ha he LBP-KNN model ou pe o ms he o he wo models in
which he a e age accu acy sco e o 5- olds is 98.66%. Mo eo e , i has
he highes sensi i i y o 97.76%, pe ec speci ici y o 100%, pe ec
p ecision o 100%, he lowes e o a e o 1.34%, and ze o alse posi-
i es. HOG-KNN and Ha alick-KNN pe o mance a e ela i ely equal in
which he a e age accu acy sco es o 5- olds a e 94.26% and 95.51%,
espec i ely.
On he o he hand, Table 2 and Fig. 7(b) show he 5- olds c oss-
alida ion e alua ion esul s o he h ee SVM-based classi ica ion
models. Gene ally, he LBP-SVM, HOG-SVM, and Ha alick-SVM models
show lowe pe o mance han he KNN-based classi ica ion models. I is
mainly because each o hese classi ica ion me hods is pe o med based
on di e en app oaches. The hype plane o he SVM sepa a es he da a
poin s based on a kind o es ic i e assump ion, while he k-NN uses a
non-pa ame ic echnique o app oxima e da a dis ibu ion which is
mo e sui able o he opology o he ex ac ed ea u es ha has low
Fig. 4. The model o he p oposed COVID-19 diagnosis me hod.
Fig. 5. ROI C opping o an image.
Fig. 6. Fea u e ex ac ion samples o he h ee me hods.
J.N. Hasoon e al.
Resul s in Physics 31 (2021) 105045
6
dimensional space.
Subsequen ly, in he classi ica ion esul s o he SVM o he LBP,
HOG, and Ha alick ea u es, he Ha alick-SVM model ou pe o ms he
o he wo models in which he a e age accu acy sco e o 5- olds is
94.88%, as shown in Fig. 7(b). Mo eo e , i has he highes sensi i i y o
99.96%, highes speci ici y o 89.23%, highes p ecision o 91.2%, he
lowes e o a e o 5.13%, and lowes alse posi i e o 10.77%. The
HOG-SVM comes second and sligh ly lowe han he Ha alick-SVM wi h
an a e age accu acy sco e o 5- olds o 94.26% and HOG-KNN pe o -
mance ela i ely lowe han bo h o hem in which he a e age accu acy
sco e o 5- olds is 89.2%. The a e age p e alence o Ha alick-SVM is
sligh ly be e han he o he i e models.
The esul s alida e he abili y o he p oposed me hod o ea ly
de ec ion and classi ica ion o COVID-19 h ough image p ocessing
using X- ay images [2,3,8]. The combina ions o he ea u e ex ac ion
ope a o s and classi ie s ou come six models, namely LBP-KNN, HOG-
KNN, Ha alick-KNN, LBP-SVM, HOG-SVM, and Ha alick -SVM on 5,000
X- ay images. The esul s u he show ha he ches X- ay images a e
conside ed one o he bes means o he de ec ion o COVID-19
[7,11,12,13]. Howe e , he limi a ion o his wo k includes he a ail-
abili y o limi ed samples o es ed X- ay image cases, so he models ha e
no been es ed in big da a o u he e i ica ion o he esea ch ind-
ings [29,30,31].
Table 1
The e alua ion esul s o he KNN-based classi ica ion models.
Me hod T aining a e Accu acy Sensi i i y Speci ici y P ecision P e alence E o Ra e False Pos.
LBP 50% 0.9830 0.9720 1.0000 1.0000 0.596 0.017 0.0000
60% 0.9850 0.9750 1.0000 1.0000 0.594 0.015 0.0000
70% 0.9880 0.9800 1.0000 1.0000 0.595 0.012 0.0000
80% 0.9870 0.9780 1.0000 1.0000 0.597 0.013 0.0000
90% 0.9900 0.9830 1.0000 1.0000 0.585 0.01 0.0000
HOG 50% 0.9350 0.9993 0.8677 0.8879 0.5129 0.065 0.1323
60% 0.9380 0.9996 0.8724 0.8932 0.5163 0.062 0.1276
70% 0.9447 0.9992 0.8850 0.9053 0.5239 0.0553 0.1150
80% 0.9454 0.9995 0.8844 0.9066 0.5293 0.0547 0.1156
90% 0.9498 0.9998 0.8956 0.9122 0.5200 0.0502 0.1044
Ha alick 50% 0.9522 0.9378 0.9748 0.9825 0.6053 0.0478 0.0252
60% 0.9539 0.9392 0.9769 0.9841 0.6067 0.0462 0.0231
70% 0.9530 0.9364 0.9792 0.9858 0.6100 0.047 0.0208
80% 0.9577 0.9417 0.9828 0.9880 0.6060 0.0423 0.0172
90% 0.9588 0.9443 0.9806 0.9871 0.6011 0.0412 0.0194
Table 2
The e alua ion esul s o he SVM-based classi ica ion models
Me hod T aining a e Accu acy Sensi i i y Speci ici y P ecision P e alence E o Ra e False Pos.
LBP 50% 0.9350 0.9993 0.8677 0.8879 0.5129 0.0650 0.1323
60% 0.9380 0.9996 0.8724 0.8932 0.5163 0.0620 0.1276
70% 0.9447 0.9992 0.8850 0.9053 0.5239 0.0553 0.1150
80% 0.9454 0.9995 0.8844 0.9066 0.5293 0.0547 0.1156
90% 0.9498 0.9998 0.8956 0.9122 0.5200 0.0502 0.1044
HOG 50% 0.8513 0.9536 0.8086 0.8189 0.5176 0.1487 0.1914
60% 0.8857 0.9803 0.8204 0.8330 0.4979 0.1143 0.1796
70% 0.9011 0.9968 0.8163 0.8342 0.4863 0.0989 0.1837
80% 0.9074 0.9999 0.8200 0.8402 0.4881 0.0926 0.1800
90% 0.9147 0.9996 0.8324 0.8529 0.4935 0.0853 0.1676
Ha alick 50% 0.9364 0.9995 0.8684 0.8914 0.5205 0.0636 0.1316
60% 0.9436 0.9995 0.8819 0.9033 0.5250 0.0565 0.1181
70% 0.9515 0.9994 0.8978 0.9167 0.5309 0.0485 0.1022
80% 0.9538 0.9998 0.9024 0.9199 0.5291 0.0463 0.0976
90% 0.9586 0.9997 0.9112 0.9288 0.5382 0.0414 0.0888
Fig. 7. The a e age esul s o he classi ica ion models.
J.N. Hasoon e al.
Resul s in Physics 31 (2021) 105045
7
Conclusion
By applying he p oposed me hod, which is he classi ica ion o X- ay
images o co ona pa ien s, he es esul s ha e shown ha i is possible
h ough X- ay images o de ec he disease by aining he machine
lea ning algo i hms on an image da ase . A se o images a e aken om
he Kaggle websi e, which includes X- ay images o no mal and
abno mal cases o es ed people (abou 5,000 images) ha a e es ed
wi h esul s h ough a di e en g oup o andom samples aken om
o al images o a numbe o i e a ions wi h di e en aining size as
explained be o e.
The de elopmen me hodology o his wo k includes p ep ocessing,
segmen a ion, ea u e ex ac ion, and classi ica ion. The p ep ocessing
includes image noise emo al, image h esholding, and mo phological
ope a ion. The segmen a ion is pe o med by Region o In e es (ROI)
de ec ion. The ea u e ex ac ion includes mul iple ope a o s o Local
bina y pa e n (LBP), His og am o G adien (HOG), and Ha alick ea-
u es. Finally, classi ica ion is pe o med by K-Nea es Neighbo (KNN)
and Suppo Vec o Machine (SVM). Subsequen ly, a combina ion o six
models LBP-KNN, HOG-KNN, Ha alick-KNN, LBP-SVM, HOG-SVM, and
Ha alick-SVM a e p oposed. The six models a e es ed, and he accu acy,
e o a e, sensi i i y, alse-posi i e a e, speci ici y, p ecision, and
p e alence o he models a e calcula ed. The ob ained esul s a e ela-
i ely high in which he diagnosis accu acies o all es ed cases a e be-
ween 89.2% and 98.66% on a e age. The LBP-KNN model ou pe o ms
he o he models in which i achie es an a e age accu acy o 98.66%,
he sensi i i y o 97.76%, he speci ici y o 100%, p ecision o 100%, he
e o a e o 1.34%, and ze o alse posi i e. Using mo e han one me hod
o ea u e ex ac ion and classi ica ion, he esul s a e con i med and
alida ed. The u u e wo k includes using o he combina ions o ea u e
ex ac ion and classi ica ion ope a o s such as he Gabo il e and
andom o es , and designing and es ing he p oposed sys em on eal
de ices such as he adiog aphic ho ax.
Decla a ions
Funding: This a icle is unded by he p ojec s SP2021/45 and
SP2021/32, assigned o VSB-Technical Uni e si y o Os a a, he Min-
is y o Educa ion, You h and Spo s in he Czech Republic.
CRediT au ho ship con ibu ion s a emen
Jamal N. Hasoon: Concep ualiza ion, Funding acquisi ion, In es i-
ga ion, Resou ces, Supe ision, W i ing – o iginal d a , W i ing – e-
iew & edi ing. Ali Hussein Fadel: Concep ualiza ion, In es iga ion,
So wa e, Visualiza ion. Rasha Subhi Hameed: Concep ualiza ion,
Da a cu a ion, So wa e, Valida ion, Visualiza ion, W i ing – e iew &
edi ing. Salama A. Mos a a: Concep ualiza ion, Da a cu a ion, Funding
acquisi ion, Me hodology, P ojec adminis a ion, So wa e, Supe i-
sion, W i ing – o iginal d a , W i ing – e iew & edi ing. Basha
Ahmed Khala : Fo mal analysis, Funding acquisi ion, Resou ces, Vali-
da ion. Mazin Abed Mohammed: . Jan Nedoma: .
Decla a ion o Compe ing In e es
The au ho s decla e ha hey ha e no known compe ing inancial
in e es s o pe sonal ela ionships ha could ha e appea ed o in luence
he wo k epo ed in his pape .
Acknowledgmen
This wo k is suppo ed by he Depa men o Compu e Science,
Mus ansi iyah Uni e si y, and Facul y o Compu e Science and In o -
ma ion Technology, Uni e si i Tun Hussein Onn Malaysia. Also, i is
suppo ed by he Depa men o Compu e Science, Uni e si y o Diyala,
Diyala, I aq.
Da a a ailabili y
The used da ase in his wo k is public and a ailable online in a da a
eposi o y.
Human and animal igh s
This a icle does no con ain any s udies wi h human pa icipan s o
animals pe o med by any o he au ho s.
Re e ences
[1] A angana A, A az S˙
I. Ma hema ical model o COVID-19 sp ead in Tu key and Sou h
A ica: heo y, me hods, and applica ions. Ad ances in Di e ence Equa ions 2020;
2020(1):1–89.
[2] A. S. Al-Waisy M. Abed Mohammed S. Al-Fahdawi M. S. Maashi B. Ga cia-Zapi ain
K. Hameed Abdulka eem e al. COVID-DeepNe : hyb id mul imodal deep lea ning
sys em o imp o ing COVID-19 pneumonia de ec ion in ches X- ay images 67 2
2021 2409 2429.
[3] Hemdan, E. E. D., Shouman, M. A., & Ka a , M. E. (2020). Co idx-ne : A amewo k
o deep lea ning classi ie s o diagnose co id-19 in x- ay images. a Xi p ep in
a Xi :2003.11055.
[4] WHO Co ona i us Disease (COVID-19) Dashboa d, a ailable online, h ps://
co id19.who.in /?gclid=EAIaIQobChMI - aK0_ 36QIVkn4 Ch2 Ew0nEAAYA-
SAAEgKqn D_BwE, Accessed on 10/6/2020.
[5] Yan L, Zhang HT, Xiao Y, Wang M, Sun C, Liang J, e al. P edic ion o c i icali y in
pa ien s wi h se e e Co id-19 in ec ion using h ee clinical ea u es: a machine
lea ning-based p ognos ic model wi h clinical da a in Wuhan. MedRxi . 2020.
[6] Zhou T, Lu H, Yang Z, Qiu S, Huo B, Dong Y. The ensemble deep lea ning model o
no el COVID-19 on CT images. Appl So Compu 2021;98:106885. h ps://doi.
o g/10.1016/j.asoc.2020.106885.
[7] Al-Waisy AS, Al-Fahdawi S, Mohammed MA, Abdulka eem KH, Mos a a SA,
Maashi MS, e al. COVID-CheXNe : hyb id deep lea ning amewo k o iden i ying
COVID-19 i us in ches X- ays images. So Compu 2020:1–16.
[8] Din RU, Shah K, Ahmad I, Abdeljawad T. S udy o ansmission dynamics o no el
COVID-19 by using ma hema ical model. Ad ances in Di e ence Equa ions 2020;
2020(1):1–13.
[9] Se hy PK, Behe a SK. De ec ion o co ona i us disease (co id-19) based on deep
ea u es. P ep in s 2020;2020030300:2020.
[10] Xu X, Jiang X, Ma C, Du P, Li X, L S, e al. A deep lea ning sys em o sc een no el
co ona i us disease 2019 pneumonia. Enginee ing 2020;6(10):1122–9.
[11] Oz u k T, Talo M, Yildi im EA, Baloglu UB, Yildi im O, Rajend a Acha ya U.
Au oma ed de ec ion o COVID-19 cases using deep neu al ne wo ks wi h X- ay
images. Compu Biol Med 2020;121:103792. h ps://doi.o g/10.1016/j.
compbiomed.2020.103792.
[12] Na in, A., Kaya, C., & Pamuk, Z. (2020). Au oma ic de ec ion o co ona i us dis-
ease (co id-19) using x- ay images and deep con olu ional neu al ne wo ks. a Xi
p ep in a Xi :2003.10849.
[13] Cohen, J. P., Dao, L., Mo ison, P., Ro h, K., Bengio, Y., Shen, B., & Duong, T. Q.
(2020). P edic ing co id-19 pneumonia se e i y on ches x- ay wi h deep lea ning.
a Xi p ep in a Xi :2005.11856.
[14] Mohammed, Naman Goyal. Ci cle and Ellipse d awing Algo i hms. (2017) Roll No.:
UE143059UIET, PU, Chandiga h. h ps://www. Sc ibd.com/documen /
356462640/Ci cle-and-Ellipse-D awing-Algo i hm.
[15] Liu Y, Ge Y, Wang F, Liu Q, Lei Y, Zhang D, e al. A Ro a ion In a ian HOG
Desc ip o o Ti e Pa e n Image Classi ica ion. ICASSP 2019–2019 IEEE In e -
na ional Con e ence on Acous ics, Speech and Signal P ocessing (ICASSP). 2019.
[16] Khalee ah, S. H., Mos a a, S. A., Mus apha, A., & Nas udin, M. F. (2019). The ideal
e ec o Gabo il e s and Uni o m Local Bina y Pa e n combina ions on de o med
scanned pape images. Jou nal o King Saud Uni e si y-Compu e and In o ma ion
Sciences.
[17] N. Zayed H.A. Elnem 2015 2015 2015 1 7.
[18] Se iawan AS, Elysia, Wesley J, Pu nama Y. Mammog am classi ica ion using law’s
ex u e ene gy measu e and neu al ne wo ks. P ocedia Compu Sci 2015;59:92–7.
[19] Thanh Noi P, Kappas M. Compa ison o andom o es , k-nea es neighbo , and
suppo ec o machine classi ie s o land co e classi ica ion using Sen inel-2
image y. Senso s 2018;18(1):18.
[20] Mos a a SA, Mus apha A, Mohammed MA, Hamed RI, A unkuma N, Abd
Ghani MK, e al. Examining mul iple ea u e e alua ion and classi ica ion me hods
o imp o ing he diagnosis o Pa kinson’s disease. Cogni Sys Res 2019;54:90–9.
[21] Taneja S, Gup a C, Agga wal S, Jindal V. In: Ma ch). MFZ-KNN—A modi ied uzzy
based K nea es neighbo algo i hm. IEEE; 2015. p. 1–5.
[22] Han Y, Li J, Li JZ, Xing HW, Yang AM, Pan YH. In: Sep embe ). Demons a ion o
SVM Classi ica ion Based on Imp o ed Gauss Ke nel Func ion. Cham: Sp inge ;
2016. p. 189–95.
[23] Obaid OI, Mohammed MA, Ghani MKA, Mos a a A, Taha F. E alua ing he pe -
o mance o machine lea ning echniques in he classi ica ion o Wisconsin B eas
Cance . In e na ional Jou nal o . Eng Technol 2018;7(4.36):160–6.
[24] Shi, F., Wang, J., Shi, J., Wu, Z., Wang, Q., Tang, Z., He, K., Shi, Y., and Shen, D.
(2020). Re iew o a i icial in elligence echniques in imaging da a acquisi ion,
segmen a ion and diagnosis o co id-19. IEEE e iews in biomedical enginee ing.
J.N. Hasoon e al.
Resul s in Physics 31 (2021) 105045
8
[25] Ng MY, Lee EY, Yang J, Yang F, Li X, Wang H, e al. Imaging p o ile o he COVID-
19 in ec ion: adiologic indings and li e a u e e iew. Radiology: Ca dio ho acic.
Imaging 2020;2(1):e200034.
[26] A angana A, a az S˙
I˘
G e . A no el Co id-19 model wi h ac ional di e en ial op-
e a o s wi h singula and non-singula ke nels: Analysis and nume ical scheme
based on New on polynomial. Alexand ia Enginee ing Jou nal 2021;60(4):
3781–806.
[27] Zhang Z. A no el co id-19 ma hema ical model wi h ac ional de i a i es: Sin-
gula and nonsingula ke nels. Chaos, Soli ons F ac als 2020;139:110060. h ps://
doi.o g/10.1016/j.chaos.2020.110060.
[28] Uma M, Sabi Z, Raja MAZ, Amin F, Saeed T, Gue e o-Sanchez Y. In eg a ed
neu o-swa m heu is ic wi h in e io -poin o nonlinea SITR model o dynamics
o no el COVID-19. Alexand ia Enginee ing Jou nal 2021;60(3):2811–24.
[29] Mohammed MA, Abdulka eem KH, Al-Waisy AS, Mos a a SA, de la To e I, Díez.
Benchma king Me hodology o Selec ion o Op imal COVID-19 Diagnos ic Model
Based on En opy and TOPSIS Me hods. IEEE Access 2020;8:99115–31.
[30] Shoaib M, Raja MAZ, Sabi MT, Bukha i AH, Al abaiah H, Shah Z, e al.
A s ochas ic nume ical analysis based on hyb id NAR-RBFs ne wo ks nonlinea
SITR model o no el COVID-19 dynamics. Compu Me hods P og ams Biomed
2021;202:105973. h ps://doi.o g/10.1016/j.cmpb.2021.105973.
[31] Ioannis D. Apos olopoulos Tzani A. Mpesiana Co id-19: au oma ic de ec ion om
x- ay images u ilizing ans e lea ning wi h con olu ional neu al ne wo ks 43 2
2020 635 640.
Jamal N. Hasoon
a
, Ali Hussein Fadel
b
, Rasha Subhi Hameed
b
, Salama
A. Mos a a
c
,
*
, Basha Ahmed Khala
d
, Mazin Abed Mohammed
e
,
Jan Nedoma
a
Depa men o Compu e Science, Mus ansi iyah Uni e si y, 10001
Baghdad, I aq
b
Depa men o Compu e Science, Uni e si y o Diyala, 32001 Diyala, I aq
c
Facul y o Compu e Science and In o ma ion Technology, Uni e si i Tun
Hussein Onn Malaysia, 86400 Joho , Malaysia
d
Depa men o Medical Ins umen s Enginee ing Techniques, Bilad
Al a idain Uni e si y College, 32001 Diyala, I aq
e
College o Compu e Science and In o ma ion Technology, Uni e si y o
Anba , Anba 31001, I aq
Depa men o Telecommunica ions, Facul y o Elec ical Enginee ing and
Compu e Science, VSB-Technical Uni e si y o Os a a, 70800 Os a a,
Czech Republic
*
Co esponding au ho .
E-mail add esses: [email p o ec ed] (J.N. Hasoon),
[email p o ec ed] (S.A. Mos a a), [email p o ec ed] (B.A.
Khala ), [email p o ec ed] (M.A. Mohammed), jan.
[email p o ec ed] (J. Nedoma).
J.N. Hasoon e al.