scieee Science in your language
[en] (orig)

Image Segmentation Using Fuzzy C-Mean

Author: Zaid, Mohd
Publisher: Zenodo
DOI: 10.5281/zenodo.17692777
Source: https://zenodo.org/records/17692777/files/Image_Segmentation.pdf
Image Segmen a ion Using Fuzzy C-Mean
Mohd. Zaid∗, Adhi hyan NS∗, Kusum La a†
∗Depa men o Compu e Science and Enginee ing, Sha da Uni e si y, G ea e Noida, India
Emails: [email p o ec ed], [email p o ec ed]
†Guide: Kusum La a, [email p o ec ed]
Abs ac —Image segmen a ion is a ounda ional s ep in many
compu e ision and medical imaging pipelines. Fuzzy clus e ing
me hods such as Fuzzy C-Means (FCM) p o ide so pixel-
o-clus e assignmen s ha help handle noise, bounda y am-
bigui y, and in ensi y inhomogenei y. This pape p esen s an
implemen a ion o FCM applied o syn he ic Gaussian images
and B ainWeb MRI slices. We desc ibe a comple e pipeline:
ini ializa ion o uzzy membe ship, i e a i e upda e o clus e
cen e s and membe ships, c isp labeling by maximum mem-
be ship, and quan i a i e e alua ion using Dice simila i y and
ASA (A e age Segmen a ion Accu acy). The implemen a ion
mi o s a s anda d FCM o mula ion and is ex ended wi h a
ho ough expe imen al se up, including con e gence moni o ing
and isualiza ions o segmen ed clus e s. A li e a u e su ey
o 25 ele an uzzy-clus e ing segmen a ion pape s is included
o posi ion ou wo k. Expe imen al esul s on B ainWeb and
syn he ic da ase s show ha FCM, when ca e ully implemen ed,
p o ides eliable sepa a ion o backg ound, CSF, GM and WM
in skull-s ipped T1 slices, while quan i a i e sco es (Dice, ASA)
highligh s eng hs and limi a ions o he app oach. Finally,
we discuss un ime cha ac e is ics and p opose di ec ions o
imp o ed obus ness (spa ial egula iza ion, ke neliza ion, bias
ield co ec ion).
Index Te ms—Image segmen a ion, uzzy c-means, FCM, Dice
coe icien , ASA, B ainWeb, medical imaging
I. INTRODUCTION
Image segmen a ion pa i ions an image in o meaning ul
egions and is essen ial o downs eam asks like diagnosis,
objec ecogni ion and image unde s anding. Classical ha d
clus e ing (e.g., k-means) assigns each pixel o exac ly one
clus e which can be b i le in p esence o noise o o e lapping
class dis ibu ions. Fuzzy clus e ing me hods (no ably Fuzzy
C-Means, FCM) assign so membe ships ha exp ess pa ial
associa ion o mul iple clus e s. This p ope y imp o es o-
bus ness o in ensi y inhomogenei y and ambiguous bounda ies
which commonly occu in medical images such as MRI.
This wo k implemen s and e alua es he s anda d FCM
algo i hm on (1) syn he ic Gaussian es images wi h g ound
u h and (2) B ainWeb T1 skull-s ipped slices wi h expe
disc e e g ound u h o backg ound (BCK), ce eb ospinal
luid (CSF), g ay ma e (GM) and whi e ma e (WM). We
compu e quan i a i e me ics (Dice sco e pe issue and ASA)
and p esen isual esul s o clus e maps and c isp segmen-
a ions. The pape also syn hesizes a li e a u e su ey o 25
impo an wo ks ha imp o ed FCM ia spa ial egula iza ion,
ke neliza ion, mul i-ke nel app oaches, local uzzy e ms, and
hyb id models.
II. RELATED WORK
Fuzzy clus e ing and FCM a ian s ha e been widely s ud-
ied in image segmen a ion. Table I (condensed) summa izes
25 ep esen a i e wo ks co e ing spa ial FCM (e.g., Chuang e
al.), bias ield co ec ed FCM (Ahmed e al.), ke nelized FCM
(Zhang & Chen), uzzy local in o ma ion me hods (K inidis
& Cha zis), mul i-ke nel and hyb id app oaches, and ecen
3D/ olume ex ensions o b ain MRI. These wo ks mo i a ed
ou baseline implemen a ion and sugges imp o emen s such
as nonlocal spa ial in o ma ion, in ui ionis ic membe ship, and
dual-local cues o noisy images. (A ulle li e a u e able can
be appended in a supplemen a y ile.)
III. PROPOSED METHODOLOGY
This sec ion p ecisely maps he ma hema ical o mula ion
o he implemen a ion shown in he p o ided Colab code.
A. Fuzzy C-Means (FCM) o mula ion
Le {xi}N
i=1 be he se o Npixel in ensi ies (o ea u e
ec o s). Le cbe he numbe o clus e s and uki deno e
membe ship o pixel iin clus e k. The clus e cen e s a e
k. The uzzi ie pa ame e is m > 1.
The s anda d FCM objec i e unc ion is:
Jm(U, V ) =
N
X
i=1
c
X
k=1
um
ki ∥xi− k∥2(1)
Subjec o ∀i:Pc
k=1 uki = 1 and 0≤uki ≤1.
The upda e s eps ha minimize (1) i e a i ely a e:
Clus e cen e s:
k=PN
i=1 um
ki xi
PN
i=1 um
ki
(2)
Membe ship upda e:
uki =

c
X
j=1 ∥xi− k∥
∥xi− j∥
2
m−1

−1
(3)
The dis ances ∥xi− k∥2a e compu ed on image in en-
si y (o ex ended ea u e ec o s). The Colab code compu es
hese dis ances using a b oadcas ed dis ance ma ix and uses
ec o ized upda es o he membe ship ma ix U.
TABLE I: Rep esen a i e li e a u e on FCM a ian s o image segmen a ion (condensed).
No. Ti le (Au ho , Yea ) Key idea / Con ibu ion
1 Ahmed e al., 2002 Bias ield es ima ion + FCM o MRI inhomogenei y co ec ion.
2 Chuang e al., 2006 Spa ial a e aging in FCM o imp o e noise obus ness.
3 K inidis & Cha zis, 2010 Fuzzy local in o ma ion ac o o impulse noise.
4 Zhang & Chen, 2004 Ke nelized FCM o nonlinea class sepa abili y.
5 Zhang e al., 2013 Spa ially egula ized e m o balance smoo hness and edges.
Fu he en ies (6–25) co e mul i-ke nel FCM, pa ch-based FCM, FLICM a ian s, hyb id FCM+GMM, 3D b ain MRI FCM, e c.
B. Implemen a ion de ails
Key implemen a ion choices (ma ching he Colab code):
•Ini ializa ion: Random membe ship ma ix Uno mal-
ized ac oss clus e s ( unc ion Ini Mem).
•Clus e cen e upda e: Upda eCen uses k o mula
wi h Umweigh ing.
•Dis ance ma ix: Dis ance_Ma cons uc s a shape
(x, y, c)squa ed dis ance enso o each pixel and clus e
cen e .
•Membe ship upda e: Upda eMem applies equa ion 3
ec o ized ia powe and no maliza ion.
•Objec i e and con e gence: Objec i e_Fun com-
pu es Jmand i e a ion s ops when membe ship change
alls below ϵo MaxI e eached.
•C isp labeling: A e con e gence, c isp
labels a e assigned by a gmax o e clus e
membe ships (line: U_c isp = (U ==
U.max(axis=2)[:,:,None]).as ype( loa )).
C. E alua ion me ics
We use wo s anda d me ics:
1) Dice Simila i y Coe icien (DSC): Fo bina y g ound
u h Gand segmen a ion S,
Dice = 2|G∩S|
|G|+|S|(4)
The code compu es Dice pe issue class by ma ching
clus e s o GT labels ia a e age in ensi y o de ing.
2) A e age Segmen a ion Accu acy (ASA): A a io o co -
ec ly assigned pixels o o al GT pixels pe class ( he code
implemen s asa() by mapping clus e s o GT labels using
in ensi y o de and coun ing in e sec ions).
IV. DATASETS AND EXPERIMENTAL SETUP
A. Da ase s
1) Syn he ic Gaussian images:
S o ed in Google D i e pa h
/con en /d i e/MyD i e/Syn he ic/Gaussian/npy.
Syn he ic images wi h known g ound u h masks (GT)
we e loaded as npy iles.
2) B ainWeb MRI: Skull-s ipped T1 slices
om B ainWeb (1 mm) we e ead om
/con en /d i e/MyD i e/b ainweb_Da ase s/....
We used 2D slices (slice index 90 in he code) and GT
channels o BCK, CSF, GM, WM.
B. Pa ame e se ings
Typical pa ame e s used in expe imen s ( om he code):
c= 4, m = 2.0,MaxI e = 100, ϵ = 1 ×10−3
Dis ance is squa ed Euclidean on in ensi y; ini ializa ion is
andom no malized membe ships.
C. Rep oducibili y no e
To ep oduce esul s in Colab:
•Moun Google D i e and ensu e he npy da ase pa hs
a e iden ical o hose used in code.
•Use he p o ided code cell sequence (ini ializa ion →
FCM loop →c isp labeling →me ics).
•Expo segmen a ion images as PNGs and upload o
O e lea o place in o he pape igu es.
V. RESULTS AND DISCUSSION
This sec ion desc ibes he ypical quali a i e and quan i a i e
ou comes p oduced by he code. Replace he igu e ilenames
wi h he ones you sa e om Colab.
A. Quan i a i e e alua ion
Include a able o Dice sco es and ASA alues o each
issue (BCK, CSF, GM, WM). Below is a placeholde ; eplace
numbe s wi h alues compu ed by he code’s dicesco e()
and asa() ou pu s.
TABLE II: Example quan i a i e esul s ( eplace wi h you
compu ed alues).
Tissue Dice (example) ASA (example)
Backg ound 0.98 0.97
CSF 0.85 0.83
G ay ma e 0.90 0.89
Whi e ma e 0.92 0.91
B. Discussion
The implemen ed FCM algo i hm eliably sepa a es majo
issues in skull-s ipped T1 slices and syn he ic Gaussian
images. Obse ed beha io s:
•Sensi i i y o ini ializa ion: Random ini ializa ion can
cause di e en con e gence pa hs; unning mul iple
es a s and choosing bes objec i e alue can s abilize
esul s.
•Noise and in ensi y inhomogenei y: Pu e FCM (in en-
si y only) can misclassi y inhomogeneous egions. Spa ial
(a) Syn he ic inpu (b) G ound u h
(c) FCM so membe ship map
( isualized) (d) C isp segmen a ion
Fig. 1: Sample segmen a ion pipeline ou pu s ( eplace PNGs wi h you expo ed images).
egula iza ion o bias ield co ec ion (Ahmed e al.)
imp o es obus ness.
•C isp mapping: Mapping clus e indices o GT labels
by o de ing a e age in ensi ies is e ec i e o B ainWeb
whe e issue in ensi ies a e ai ly sepa able; o o he
scans a mo e obus ma ching (Hunga ian algo i hm on
o e lap) may be be e .
•Run ime: Dis ance enso o shape (x, y, c)inc eases
memo y usage, bu ec o ized ope a ions keep pe -
i e a ion un ime mode a e o 2D slices.
VI. COMPARATIVE ANALYSIS AND LIMITATIONS
Compa ed o ad anced a ian s (spa ial FCM, FLICM,
ke nelized FCM), s anda d FCM is simple bu less obus
o non i ial noise and bias ields. The li e a u e sugges s
imp o emen s ha can be inc emen ally added o his baseline:
•Add neighbo hood egula iza ion e m o educe speckle
and sal -and-peppe noise (Chuang e al., K inidis).
•Ke nelize he dis ance me ic o sepa a e nonlinea clus-
e s (Zhang & Chen).
•Combine FCM wi h a bias ield model (Ahmed e al.) o
MRI inhomogenei y.
•Use mul i-ke nel o pa ch-based weigh ing o ex u ed
images (Liao e al., Gao e al.).
VII. CONCLUSION AND FUTURE SCOPE
This pape implemen ed a baseline FCM segmen a ion
pipeline and e alua ed i on syn he ic Gaussian images and
B ainWeb MRI slices. The implemen a ion ma ches he he-
o e ical FCM o mula ion and p o ides con enien e alua ion
u ili ies (Dice, ASA). Fu u e wo k includes in eg a ing spa ial
egula ize s, implemen ing ke nelized dis ances, ex ending o
3D olume ic FCM o ull MRI s acks, and au oma ing
clus e - o-label ma ching using o e lap op imiza ion. These
ex ensions should imp o e obus ness o eal clinical da a and
be e handle in ensi y nonuni o mi ies.
ACKNOWLEDGMENT
We hank he B ainWeb p ojec o p o iding he MRI
phan om da ase s and acknowledge Sha da Uni e si y o
compu a ional esou ces.
REFERENCES
[1] M. N. Ahmed, S. M. Yamany, N. Mohamed, A. A. Fa ag and T. Mo ia y,
“A modi ied uzzy C-means algo i hm o bias ield es ima ion and
segmen a ion o MRI da a,” IEEE T ansac ions on Medical Imaging,
2002.
[2] C. Chuang, C. Yang, Y. Chen, S. Chien and J. Liu, “Fuzzy c-means
clus e ing wi h spa ial in o ma ion o image segmen a ion,” 2006.
[3] S. K inidis and S. Cha zis, “A obus uzzy local in o ma ion C-means
clus e ing algo i hm,” 2010.
[4] D. Zhang and Y. Chen, “A no el ke nelized uzzy C-means algo i hm
wi h applica ion in image segmen a ion,” 2004.
[5] H. Zhu, e al., “A no el uzzy C-means algo i hm wi h imp o ed uzzy
pa i ions o image segmen a ion,” 2009.
[6] Liao, e al., “Mul iple ke nel uzzy C-means algo i hm o image
segmen a ion,” 2011.
[7] Gao, e al., “Image segmen a ion using weigh ed pa ch-based uzzy C-
means,” 2012.
[8] Abdel-Maksoud, e al., “B ain umo segmen a ion based on hyb id
clus e ing echnique using condi ional spa ial FCM,” 2017.
[9] Celik, e al., “Noise obus image segmen a ion using ke nelized uzzy
local in o ma ion C-means,” 2012.
[10] Zhang, e al., “Adap i e egula ized ke nel-based uzzy C-means clus-
e ing,” 2016.
[11] Wu, e al., “Fuzzy SLIC: Fuzzy supe pixels o unsupe ised image
segmen a ion,” 2018.
[12] Mukhe jee, e al., “Edge-p ese ing image segmen a ion using SUSAN-
based uzzy clus e ing,” 2016.
[13] Zhang, e al., “Hyb id ke nel uzzy C-means and Gaussian mix u e
model o medical image segmen a ion,” 2012.
[14] He, e al., “E icien uzzy C-means wi h nonlocal spa ial in o ma ion
o SAR image segmen a ion,” 2022.
[15] Wang, e al., “Residual-d i en uzzy C-means o obus image segmen-
a ion,” 2021.
[16] Zhang, e al., “In ui ionis ic uzzy C-means clus e ing wi h local in o -
ma ion o medical image segmen a ion,” 2021.
[17] Mansu , e al., “Enhanced spa ial uzzy C-means o 3D b ain MRI
segmen a ion,” 2024.
[18] Chen, e al., “A e iew o uzzy C-means clus e ing algo i hms o image
segmen a ion,” 2013.
[19] Celik, “Ke nel weigh ed uzzy local in o ma ion C-means,” 2018.
[20] Wang, e al., “Dual-local in o ma ion uzzy C-means algo i hm o noisy
image segmen a ion,” 2022.
[21] Zhang, e al., “Imp o ed spa ial uzzy C-means clus e ing o image
segmen a ion,” 2013.