I nd o ne s ia n J o urna l o f   E lect rica l En g ineering   a nd   Co m pu t er   Science   Vo l.   3 8 ,   No .   3 ,  J u n e   20 2 5 ,   p p .   1 503 ~ 1 5 1 6   I SS N:  2 502 - 4 7 52 ,   DOI : 1 0 . 1 1 5 9 1 /ijee cs .v 3 8 . i 3 . pp 1 5 0 3 - 1 5 1 6           1503     J o ur na l ho m ep a g e :  h ttp : //ij ee cs . ia esco r e. co m   Remo v e gla ss es diff usio n mo del  an i nno v a tive con diti o ned of eye  g la ss es remo v a l wit h ima g e di ff usio n mo del       Yuliza 1 ,   Ra chm a t   M uwa rdi 1 ,   G a la t ia   E rica   Yehez k iel 2 ,   M irna   Yu nita 2 ,   L enni 3   1 D e p a r t me n t   o f   El e c t r i c a l   En g i n e e r i n g ,   U n i v e r si t a s  M e r c u   B u a n a ,   Ja k a r t a ,   I n d o n e s i a   2 S c h o o l   o f   C o m p u t e r   S c i e n c e   a n d   T e c h n o l o g y ,   B e i j i n g   I n st i t u t e   o f   Te c h n o l o g y ,   B e i j i n g ,   C h i n a   3 D e p a r t me n t   o f   El e c t r i c a l   En g i n e e r i n g ,   U n i v e r si t a s  M u h a mm a d i y a h   Ta n g e r a n g ,   Ta n g e r a n g ,   I n d o n e si a       Art icle  I nfo     AB S T RAC T     A r ticle  his to r y:   R ec eiv ed   Ju n   5 ,   2 0 2 4   R ev is ed   No v   18 ,   2 0 2 4   Acc ep ted   No v   24 ,   2 0 2 4       Th e   p re se n c e   o f  e y e g las se s  in   fa c ial  ima g e s  p o se s  c h a ll e n g e s  fo r  ima g e   p ro c e ss in g ,   p a rti c u larly   i n   fa c ial  re c o g n i ti o n .   T h is  p a p e r  in tro d u c e s  th e   re m o v e   g las se s  d iffu sio n   m o d e l  ( RG DM),   a   c o n d it i o n e d   d e n o isin g   d iffu sio n   p ro b a b il isti c   m o d e l   (DD P M )   d e s ig n e d   fo r  p re c ise   g las se s  re m o v a l.   RG DM   e m p lo y s  c o n d i ti o n a l  m o d e li n g   to   f o c u s  o n   t h e   g las se s  re g io n   w h il e   se a m les sly   re sto rin g   fa c ial  fe a tu r e s.  An   e y e s  p o siti o n   a c c u ra c y   m e c h a n ism ,   lev e ra g in g   fa c ial  lan d m a rk s,  e n s u re s  a c c u ra te  e y e   re sto ra ti o n   p o s t - re m o v a l.   Co m p re h e n si v e   e v a lu a ti o n s   o n   t h e   Ce leb A  d a tas e t  d e m o n stra te  RG DM’ s   su p e rio r  p e rfo rm a n c e ,   a c h iev in g   t h e   lo we st  F ré c h e t  i n c e p ti o n   d ista n c e   (F ID)  o f  2 7 . 0 9   a n d   lea rn e d   p e rc e p tu a l   ima g e   p a tch   sim il a rit y   (LP I P S )   o f  0 . 2 9 9 ,   o u t p e rfo rm in g   sta te - of - t h e - a rt  m e th o d s  su c h   a s  3 D  s y n t h e ti c ,   c y c le - c o n siste n t  g e n e ra ti v e   a d v e rsa rial  n e two r k   ( Cy c leG AN ) ,   a n d   e y e g las se s  re m o v a l  g e n e ra ti v e   a d v e rsa rial  n e two rk   ( ERG AN ) .   Th e se   re su lt s   h ig h li g h t   th e   m o d e l’s  e ffe c ti v e n e ss   i n   p ro d u c in g   n a t u ra l  a n d   h i g h - fi d e l it y   fa c ial  re c o n stru c ti o n s.  T h is  wo r k   a d v a n c e s  g las se s  re m o v a l  tec h n o lo g y   a n d   u n d e rsc o re s  th e   sig n ifi c a n c e   o f  c o n d it io n a l  m o d e ls  i n   ima g e   p ro c e ss in g .   T h e   p ro p o se d   a p p ro a c h   h a s  p ra c ti c a l  imp li c a ti o n s  fo r   fa c ial  re c o g n it io n   a n d   ima g e   e n h a n c e m e n t,   p a v i n g   th e   wa y   fo r  m o r e   a c c u ra te  a n d   ro b u st   re a l - wo rld   a p p li c a ti o n s.   K ey w o r d s :   C o n d itio n al  m o d elin g   Dee p   lear n in g   Dif f u s io n   m o d el   Facial  im ag es   Glass e s   r em o v al   T h is i s  a n   o p e n   a c c e ss   a rticle   u n d e r th e   CC B Y - SA   li c e n se .     C o r r e s p o nd ing   A uth o r :   Yu liza   Dep ar tm en t o f   E lectr ical  E n g i n ee r in g ,   U n iv er s itas   Me r cu   B u an a   J ak ar ta,   I n d o n esia    E m ail: y u liza@ m er cu b u an a . a c. id       1.   I NT RO D UCT I O N    Facial  im ag es  ar e  cr itical  v is u al  d ata  s o u r ce s   in   v a r io u s   a p p licatio n s ,   in clu d in g   f ac ial  r ec o g n itio n ,   im ag e  an aly s is ,   an d   d ig ital  co m m u n icatio n .   Ho wev er ,   t h e  p r esen ce   o f   ey e g lass es  in   f ac ial  im ag es  in tr o d u ce s   s ig n if ican t  ch allen g es,  p a r ticu lar ly   in   ac c u r ately   r e p r es en tin g   f ac ial  f ea t u r es,  wh ic h   ar e  cr u cial  f o r   ap p licatio n s   s u ch   as  s ec u r ity   s y s tem s ,   wh er e  p r ec is e  id en tific atio n   is   p ar am o u n t.  R ef lectio n s   o n   th e  g lass   s u r f ac e,   len s   d is to r tio n s ,   an d   d iv er s e  f r am e  s ty les  co n tr ib u t e  to   v is u al  ar tifa cts  th at  o b s tr u ct  ac c u r ate  f ac ial  r ec o g n itio n   [ 1 ] ,   [ 2 ] .   I n   ap p licatio n s   s u ch   as  s ec u r ity   s y s tem s ,   wh er e  p r ec is e  id en tific ati o n   is   p a r am o u n t,  t h e   p r esen ce   o f   g lass es  b ec o m es  a   s ig n if ican t   b o ttlen ec k   [ 3 ] .  Facial  r ec o g n itio n   tec h n o lo g y   [ 3 ] ,   [ 4 ]   also   k n o wn   as   FR T s ,   ar e  o n e  o f   s ev er al   b io m etr ic  to o ls   o r   m o d alities   d e v elo p ed   to   d etec t  an d   id en tif y   p er s o n s   wh e n   th ei r   p h o to s   ar e   tak en   b y   a  ca m er a  len s   [ 5 ] ,   [ 6 ] .   I t   is   a  co r n er s to n e  in   c o n tem p o r ar y   s ec u r it y   an d   id en tific atio n   s y s tem s ,   [ 7 ] - [ 9 ]   wh ich   r elies  h ea v ily   o n   th e  ac c u r ate  r e p r esen tatio n   o f   f ac ial  f ea tu r es.  T h e   p r esen ce   o f   g lass es   co m p licates th is   p r o ce s s ,   lead in g   to   p o ten tial m is id en tific atio n s   an d   r e d u ce d   s y s tem   ef f ica cy   [ 1 0 ] .    Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   In d o n esian   J   E lec   E n g   &   C o m p   Sci ,  Vo l.  3 8 ,   No .   3 ,  J u n e   20 2 5 :   1 5 0 3 - 1 5 1 6   1504   I m ag e  in p ai n tin g   h as  s lo wly   g r o wn   in   im p o r tan ce   as  a  s tu d y   ar ea   in   d i g ital  im ag e  p r o ce s s in g   d u e  to   th e  ad v an ce m en t  o f   s cien ce   a n d   tech n o lo g y ,   th e  r a p id   u p g r ad in g   o f   h ar d war e,   an d   th e  d e s ir e  f o r   h ig h - q u ality   im ag es   [ 1 1 ] .   I t  ca n   r esto r e  t h e  tex tu r e  o f   an   im ag e ,   ex tr ac t  its   h ig h - lev el  ab s tr ac t  p r o p er ties ,   as  well  as   s em an tic  im ag er y   lik e   h u m a n   f ac es   [ 1 2 ] ,   wh ich   is   wh y   im ag e  in p ai n tin g   is   o f ten   u s ed   i n   r esear ch es   wh er e  im ag e  g en e r atio n   is   n ec ess ar y ,   s u ch   as  th e  r em o v al  o f   g la s s es.  C o cc ia   [ 1 3 ]   em p h asized   in   2 0 1 7 ,   p r o b lem - d r iv en   in n o v atio n s   o f ten   lead   to   s o lu tio n s   th at  p r o v id e  a  c o m p etitiv e  ed g e.   T h e  ev o lu tio n   o f   tech n o lo g y ,   as  d is cu s s ed   b y   C o cc ia   in   2 0 1 9   [ 1 4 ] ,   [ 1 5 ] ,   in v o l v es  th e  co n t in u o u s   s u b s titu tio n   o f   o ld er   m eth o d s   with   m o r e   ef f i cien t  o n es.  I n   th is   co n tex t,  o u r   r esear ch   r ep r esen ts   an   in cr em en tal  in n o v atio n ,   b u il d in g   u p o n   ex is tin g   g en er ativ e  a d v er s ar ial  n etwo r k   ( GAN ) - b ased   a p p r o ac h es  a n d   ev o lv in g   t o war d s   a  m o r e  ef f ec tiv e  d if f u s io n   m o d el  f r am ewo r k .   W h ile  p r e v io u s   s tu d ies,  s u ch   as  th e   o n e  co n d u cted   in   2 0 2 3   b y   Sad i k - E - T awh ee d   et  a l.   [ 1 6 ] ,   h a v e  f o cu s ed   o n   r em o v in g   s p ec if ic  a r tifa cts  lik e  g la r e  an d   r ef lectio n s ,   o u r   ap p r o a ch   tack les  th e   r o o t  ca u s e  b y   r em o v in g   th e  g lass es  th em s elv es.  T h is   co m p r eh en s iv e  s o lu tio n   n o t  o n ly   en h an ce s   th e  clar ity   o f   f ac ial  im ag es b u t a ls o   im p r o v e s   f ac ial  r ec o g n itio n   a cc u r ac y ,   as h ig h lig h ted   b y   Ma o   et  a l .   [ 1 7 ]   in   2 0 2 1 .     T h is   p ap er   in tr o d u ce s   th e  r e m o v e  g lass es  d if f u s io n   m o d el   ( R GDM ) ,   a  n o v el  ap p r o ac h   t h at  d ep ar ts   f r o m   tr ad itio n al  GAN - b ased   f r am ewo r k s   b y   lev er a g in g   a  d en o is in g   d if f u s io n   p r o b a b ilis ti c  m o d el  ( DDPM) ,   wh ich   r ep r esen ts   a  s ig n if ican t  ad v an ce m en t  in   th is   ar ea .   T h e  R GDM   in teg r ates  a  co n d itio n in g   m o d u le  th at  f o cu s es  s p ec if ically   o n   th e  g lass es  ar ea ,   en ab lin g   p r ec is e  in p ain tin g   an d   p r eser v in g   th e   in teg r ity   o f   o th e r   f ac ial  f ea tu r es.  A d d itio n ally ,   an   in n o v ativ e  e y es  p o s itio n   ac cu r ac y   m ec h a n is m   is   in co r p o r ate d ,   u tili zin g   lan d m ar k   in f o r m atio n   to   en s u r e  th e  g en er ate d   e y es  alig n   p er f ec tly   with   th eir   o r ig in al  p o s itio n s .   T h is   a p p r o ac h   n o t  o n ly   ad d r ess es  th e  lim itati o n s   o f   p r ev i o u s   m eth o d s   b u t   a ls o   o f f er s   a  m o r e  s ca lab le  an d   ad ap tab le  s o lu tio n   f o r   g lass es r em o v al  in   d iv er s e  r ea l - wo r ld   s ce n ar io s   [ 1 8 ] .   I n   th is   s tu d y ,   we  u tili ze   th e  aid   o f   s eg m en t  an y th in g   m o d el   ( SAM)   [ 1 9 ]   th at  is   s o lely   tr ain ed   o n   r ec o g n izin g   g lass es  in   s eg m en tin g   an d   m ask in g   t h e  g lass es.  W e  th en   co m b in e   th e  u s e  o f   d if f u s io n   m o d el  an d   a  co n d itio n in g   m o d u le   in   o r d er   to   o n l y   c o n d u ct  th e   in p ai n tin g   in   th e   m ask ed   g lass es  ar ea   to   r em o v e  th e   g lass es  f r o m   th e  o r ig in al  im ag es.  At  t h is   s tag e,   af ter   th e  in p ain tin g   ar ea   h as  b ee n   co n f ir m e d   b y   th e   co n d itio n in g   m o d u le,   th e  g la s s es  ar e  r em o v ed   th r o u g h   im ag e  in p ain tin g   u s in g   th e  d i f f u s io n   m o d el.   T h e   ab ilit y   to   ac c u r ately   an d   g r ac e f u lly   r e m o v e   g lass es  f r o m   f ac ial  im ag es  ad d r ess es  a  co m m o n   v i s u al  c h allen g e.   T h is   tech n o lo g y   h as  wid esp r e ad   ap p licatio n s   in   p h o to g r ap h y ,   p er s o n al  im a g e  en h an ce m e n t,  an d   e v en   f ac ial   r ec o g n itio n ,   wh er e   clea r ,   g l ass es - f r ee   im ag es  ar e  o f ten   p r ef er r ed .   T h er ef o r e,   in   o r d er   to   p r eser v e  th e   in d iv id u al  s ty le  a n d   f ac ial  f e atu r es,  we  also   co r r o b o r ated   an   ad d itio n al  m o d if icatio n   t o war d s   th e  p r o p o s ed   m eth o d ,   wh ich   is   t h e  ey es  p o s itio n   ac cu r ac y   [ 2 0 ] .   T h r o u g h   t h e  g i v en   d ataset  attr ib u tes,  th e  attr ib u tes   r esp o n s ib le  f o r   th e   ey es’   p o s it io n s   is   also   in s er ted   i n to   th e   m o d el,   w h ich   p r o v i d es  th e  n e ce s s ar y   in f o r m atio n   f o r   th e  m o d el  to   g en er ate  t h e  s u p p o s ed   e y es in   th e  c o r r ec t p o s itio n .   T h e  p r o p o s ed   m o d el,   r em o v e  g lass es  d if f u s io n   m o d el ,   s tan d s   at  th e  f o r e f r o n t  o f   ey eg lass es  r em o v al   tech n iq u es.  Ou r   p r im ar y   g o al  is   to   s ig n if ican tly   en h an c e  f ac e  r ec o g n itio n   ac cu r ac y   b y   s y s tem atica lly   r em o v in g   ey eg lass es f r o m   f ac ial  im ag es.  T h e  m ain   c o n tr ib u tio n s   o f   o u r   m o d el  in clu d e:   -   Ou r   p r o p o s ed   m o d el  lev er ag e s   th e  DDPM  a s   its   f o u n d atio n al  f r am ewo r k ,   en s u r in g   ef f e ctiv e  d en o i s in g   th r o u g h   a  d i f f u s io n   p r o ce s s   tailo r ed   f o r   in tr icate   d ata  d is tr ib u tio n s .   -   T h e  in co r p o r atio n   o f   a  co n d itio n al  n e two r k   em p lo y in g   b in ar y   m ask s   to   allo w  f o r   a  m eticu lo u s   an d   ac cu r ate  id en tific atio n   o f   e y eg lass es - o cc lu d ed   r eg io n s   d u r in g   th e  d if f u s io n   p r o ce s s .   -   T h e  m o d el  f ea tu r es  a   r o b u s t  ey e   p r ec is io n   ac cu r ac y ,   le v er ag ed   f r o m   th e   C eleb A  d at aset ' s   in tr in s ic   lan d m ar k   attr ib u tes,   in   o r d er   t o   en s u r e   th e  p r ec is e  p o s itio n i n g   o f   th e   g en e r ated   e y es,  m ai n tain in g   th e m   in   th e  ex ac t sam e  p o s itio n   as in   t h e  o r ig in al  im a g e.   T h e  s u b s eq u en t  s ec tio n s   o f   t h is   p ap er   will  elab o r ate  o n   t h e  R GDM   ap p r o ac h ,   b e g in n i n g   with   a   d is cu s s io n   o f   r elate d   w o r k   a n d   th e   th e o r etica l  f o u n d atio n   o f   d if f u s io n   m o d els  in   s ec t io n   2   an d   3 .   T h e  m eth o d o l o g y   in   s ec tio n   4   will  d etail  th e   R GDM   f r am ewo r k ,   in clu d in g   th e   co n d itio n in g   m o d u le,   t h e  ey e s   p o s itio n   ac cu r ac y   m ec h a n is m ,   d ataset  d etails,   im p lem en tatio n   s p ec if ics,  an d   ev alu atio n   m etr ics.  Sectio n   5   will  p r esen t  th e   ex p er im en tal  r esu lts   o f   o u r   m o d el.   T h e  d is cu s s io n   in   s ec tio n   6   will  co m p ar e  R GDM   ag ain s t   s tate - of - th e - ar t  m eth o d s ,   d e m o n s tr atin g   its   s u p er io r   p er f o r m an ce   in   g lass es  r em o v al.   Fin ally ,   th e  p a p er   will  co n clu d e  o n   th e   im p licatio n s   o f   th ese  f in d in g s   f o r   f u tu r e  r esear ch   an d   p r ac tical  ap p licatio n s   in   s ec tio n   7 .       2.   RE L AT E D  WO RK   2 . 1 .     Dif f us io n  m o del   Sin ce   t h e  p u b licatio n   o f   d if f u s io n   m o d el,   th e  u tili za tio n   o f   s aid   m eth o d   in   im ag e  p r o ce s s in g ,   p ar ticu lar ly   im ag e   g en e r atio n   o r   im ag e  i n p ain tin g ,   h as  b ee n   s tead ily   r is in g .   No t  f ew  p u b licatio n s   h av e  also   b ee n   p u b lis h ed   with   th e   f o c u s   o f   co m p ar in g   im ag e   g e n er atio n   b ased   o n   d if f u s io n   m o d el  t o   im ag e   g e n er atio n   b ased   o n   p r e v io u s   k n o wn   m o d els,  s u ch   as  GAN.   Fo cu s in g   o n   p u b licatio n s   r elea s ed   in   r ec en t  y ea r s ,   Dh ar iwal  an d   Nich o l  [ 2 1 ]   co m p ar ed   d if f u s io n   m o d el   to   c u r r e n t  s tate - of - th e - a r t  GAN  m o d els  in   im ag e  s y n th esis .   T h ey   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52         R emo ve   g la s s es d iffu s io n   mo d el  a n   in n o va tive  co n d itio n ed   o f e ye   g la s s es remo va l wi th   …  ( Yu liz a )   1505   co n d u cte d   th e   ex p e r im en tatio n s   o n   b o th   u n c o n d itio n al  an d   co n d itio n al  im a g e  s y n t h esis ,   wh er e  d if f u s io n   m o d el  p r o v es  th at  t h e  im a g e  s y n th esis   it  g en er ates  ac h iev e   s u p er io r   im a g e  s am p le   q u alit y   co m p ar ed   to   th e   GANs  m o d el.   I n   2 0 2 2 ,   L u g m a y r   et  a l .  [ 2 2 ]   p r o p o s ed   R ePain t  as  an   in p ain tin g   ap p r o ac h   b a s ed   o n   DDPM  th at  ca n   b e  u s ed   with   m ask s .   T h e  au th o r s   o n ly   alter   t h e  iter atio n s   o f   th e   r ev er s e  d if f u s io n   an d   d o es  n o t  co n d u ct   an y   m o d if icatio n s   o r   co n d itio n in g s   o n   th e   o r ig in al  DDPM  m o d el,   w h ich   p r o v es  to   g en er ate  d iv er s e  a n d   h ig h - q u ality   im ag es  as  a   r esu lt  a n d   o u tp er f o r m s   s tate - of - th e - ar t  GAN  an d   au to r e g r ess iv e  m o d els.  I n   2 0 2 3 ,     Xie  et  a l.   [ 2 3 ]   p r o p o s ed   Sm ar t B r u s h   f o r   o b ject  i n p ain tin g   g u id ed   b y   tex t   an d   s h ap e  b ased   o n   d if f u s io n   m o d el.   T h e  au th o r s   also   p r o p o s ed   a  n o v el  o b ject - m ask   p r ed ictio n   with   th e  g o al  o f   b etter   p r es er v in g   th e  im a g e’ s   b ac k g r o u n d .     2 . 2 .     I ma g e  i np a inting   I m ag e  in p ain tin g   is   th e  p r o ce s s   o f   f in is h in g   o r   r esto r in g   a  m is s in g   p o r tio n   o f   a n   im ag e,   o r   elim in atin g   ce r tain   elem en ts   o f   a n   im ag e   th at   wer e  i n itially   in s er ted   in to   it   [ 2 4 ] .   T h e   tr a d itio n al  m eth o d s   o f   im ag e  in p ain ti n g   a r e  ca teg o r i ze d   in to   th r ee   g r o u p s :  d if f u s io n - b ased   tech n iq u es,  p atch - b a s ed   tech n iq u es,  an d   co n v o l u tio n   f ilter - b ased   tech n iq u es,  wh ile  th e  m o d er n   a p p r o ac h   r elies  m o r e  u p o n   d ee p   lear n in g - b ased   m eth o d s   [ 2 5 ] .   T h a n k s   to   th e   ad v an ce m e n t  o f   im ag e  p r o c ess in g   to o ls   an d   th e  f lex ib ili ty   o f   d ig ital  im ag e   ed itin g ,   au t o m atic  im ag e   in p a in tin g   h as  f o u n d   s ig n if ican t   a p p licatio n s   in   c o m p u ter   v is io n   an d   h as  g r o wn   t o   b e  a  s ig n if ican t a n d   d if f icu lt a r ea   o f   r esear c h   in   im ag e   p r o ce s s in g   [ 2 6 ] ,   [ 2 7 ] .   Fo cu s in g   o n   th e  u s ag e  o f   im a g e  in p ain tin g   f o r   g lass es  r em o v al,   th e  f ir s t  m eth o d   was  p r o p o s ed   b y   Par k   et  a l.   [ 2 8 ]   in   2 0 0 5   u s in g   r ec u r s iv e  er r o r   co m p en s atio n .   T h is   m eth o d   b e g in s   b y   id e n tif y in g   t h e  ar ea s   th at  th e  g lass es  h av e  o b s c u r ed   b e f o r e  cr ea tin g   a  f ac e  im ag e  d e v o id   o f   g lass es  with   th e  h elp   o f   r ec u r s iv e  er r o r   co m p en s atio n   u s in g   p r in cip al  co m p o n en t a n aly s is   ( PC A )  r ec o n s tr u ctio n .   T h e  r esu ltan t im a g e  is   d ev o id   o f   an y   tr ac es  o f   th e  g lass es '   f r am e,   r ef lectio n ,   o r   s h ad in g ,   s u g g es tin g   th at  th e  m eth o d   s u cc ess f u lly   ad d r ess es  th e  is s u e  o f   g lass es  o cc lu s io n   alth o u g h   th e r e  ar e  s till   s o m e  lim it atio n s   o f   r em o v in g   g lass es  wi th   d ar k   f r am es  an d   g r ad ated   len s   co lo r s .   Fiv e  y ea r s   later ,   W an g   et  a l.   [ 2 9 ]   p r o p o s ed   a  m eth o d   to   r e m o v e   g lass es  f r o m   f ac e   im ag es  b ased   o n   th e  ac tiv e  ap p ea r an ce   m o d el  ( AAM )   [ 3 0 ] .   T h e  m o d el  is   b u ilt  b y   m er g in g   s h ap e  a n d   ap p ea r an ce   v ar ian ts   in   a  s h ap e - n o r m alize d   f ash io n .   T h e  r esu lts   o f   th e  ex p er im e n ts   r ev ea l  th at  th e  s u g g ested   m eth o d   is   an   ef f ec tiv e   s o lu tio n   f o r   r ec o g n izin g   f ac es  o b s cu r ed   b y   th ick - r im m ed   ey e g l ass es,  wh ich   was  a   n o tab le  p r o b lem   with   [ 2 8 ]   m eth o d .   An o t h er   f iv e  y ea r s   af ter ,   L ian g   et  a l.   [ 3 1 ]   p r o p o s ed   a   g lass es  d etec t io n   m o d el  th at  was  b ased   o n   Z h u   an d   R am an an   [ 3 2 ]   co n ce p t  o f   tr ee - p icto r ial  s tr u ctu r e.   A  d o u b le - lay e r ed   f ilter   m ad e  o f   in p ain tin g   a n d   d ee p   lear n in g   is   u s ed   to   r e m o v e  th e  g lass es.  Af ter   co n d u ctin g   a  co m p r e h en s iv e   i n v esti g atio n ,   th e  a u th o r s   d is co v er ed   a  d r awb ac k   o f   th eir   ap p r o ac h .   Giv e n   th at  th e   e d g e  in f o r m atio n   o n   g lass es  with o u t  r im s   is   to o   "we ak "  to   id en tif y   th em   as  g lass es,  th is   af f ec ts   th e  d etec tio n   r ate  f o r   s u ch   in d iv id u als.   I n   r ec en t  y ea r s ,   a  n o v el  im ag e - to - im ag e  GAN  [ 3 3 ]   f r a m ewo r k   f o r   ey eg lass es  r em o v al,   ca lled   B y eGla s s e s GAN,   is   p r o p o s ed   b y   L ee   an d   L ai  in   2 0 2 0   [ 3 4 ] .   T h e  co m p o n e n ts   o f   B y eGla s s e s GAN   ar e  an   en co d er ,   a  s eg m en tatio n   d ec o d er ,   an d   a  f ac e  d ec o d er .   T h e  ex p er im en ts   d em o n s tr ate  th at  ev en   f o r   s em i - tr an s p ar en t  co lo r   ey e g lass es  o r   s p ec tacle s   with   g lar e,   B y e Glass e s GAN  m ay   p r o d u ce   ae s th etica lly   p leasin g   r esu lts   in   th e  f ac ial   im ag es  wi th   th e  g lass e s   r em o v ed .   T h en ,   Hu   et  a l .  [ 3 5 ]   p r o p o s ed   th e  e y eg lass es  r em o v al   g en er ativ e  ad v e r s ar ial  n etwo r k   ( E R GAN) ,   a  u n if ied   ey eg lass   r em o v al  m o d el,   in   2 0 2 1 .   T h i s   m eth o d   s u g g ested   a  GAN - b ased   ar ch itectu r e  to   r em o v e  v ar i o u s   k in d s   o f   g lass e s   in   th e  wild .   T h e  p r o p o s ed   m o d el  lear n s   to   s wap   th e  ey e  r eg io n   in   two   f ac es  w h en   g i v en   two   im ag es  o f   f ac e s   wea r in g   an d   n o t  wea r in g   ey eg lass es.  T h at  s am e  y ea r ,   C h en g   an d   C ao   [ 3 6 ]   p r o p o s ed   an o th er   m eth o d   u s in g   t h e  s am e  ac r o n y m ,   ca lled   E R GAN  ( h ig h   p er f o r m   GAN  f o r   ey e g lass es  r em o v al ) .   T h is   m eth o d   is   b ased   o n   th e   s u cc ess f u l  im p lem en tatio n   o f   th e  f ac e   attr ib u te   ed itin g   task   in   t h e  GAN .   I t  i n tr o d u ce s   th e   m o r e  s o p h is tica ted   GAN  in v er s io n   m o d el  I DI n v er t  [ 3 7 ]   an d   th e   I n ter f ac eGA N  [ 3 8 ]   m et h o d .   T h e  f in d in g s   o f   th e  ex p er im e n t  in d icate   th at  th is   m eth o d   h elp s   to   in cr ea s e  th e  r em o v al  ac cu r ac y   o f   g lass es.  Ho wev er ,   it  is   a ls o   clea r   f r o m   th e  ex p er im en tal  f in d i n g s   th at  th is   m eth o d   r eq u ir es i m p r o v em e n t in   ter m s   o f   h o w  r ea l - w o r ld   im a g es a r e  p r o ce s s ed ,   as it f alls   s h o r t in   s ev er al  asp ec ts .   A n o t h e r   a p p r o a c h   p r o p o s e d   t h a t   s a m e   y e a r   i s   t h e   m u l t i m o d a l  a s y m m e t r i c   d u al   l e a r n i n g   f r am e w o r k   by  L i n   e t   a l .   [ 3 9 ] ,   w h i c h   u t i li z es   u n s u p e r v i s e d   le a r n i n g   f o r   e y e g la s s e s   r e m o v a l .   W h i l e   i n n o v a t iv e ,   t h i s   m e t h o d   f a l ls   s h o r t   i n   t e r m s   o f   p r e c is i o n   a n d   q u a l i t y   c o m p a r e d   t o   s u p e r v is e d   l ea r n i n g   a p p r o a c h e s .   I n   2 0 2 2 ,   L y u   e t   a l .   [ 4 0 ]   p r o p o s e d   a   m e t h o d   u s i n g   3 D   s y n t h e t i c   d a t a   t o   r e m o v e   e y e g l as s es   a n d   s h a d o ws ,   w h i c h   p r o v id e d   a   f o u n d a t i o n   f o r   f u r t h e r   r e s e a r c h .   H o w e v e r ,   t h is   a p p r o a c h   is   li m i t e d   b y   it s   r e l ian c e   o n   s y n t h et i c  d a t a ,   w h i c h   m a y   n o t   f u l l y   c a p t u r e   t h e   v a r i a b i l i t y   o f   r e a l - w o r l d   im a g e s .   C o c ci a   [ 4 1 ]   d i s c u s s e d   i n   2 0 1 8   t h e   c l a s s i f i c at i o n   o f   i n n o v a t i o n s   b a s e d   o n   t h e i r   i n t e r a ct i o n   w it h   e x is t i n g   t e c h n o l o g i e s .   O u r   R G D M   m o d e l   e x e m p l i f i es   a n   i n c r e m e n t a l   i n n o v a t i o n   t h at  e n h a n c e s   t h e   i n t e r a c ti o n   b e t we e n   e s t a b l is h e d   m e t h o d s ,   s u c h   a s   G A N s   a n d   d i f f u s i o n   m o d e l s ,   o f f e r i n g   a   m o r e   p r e c i s e   a n d   a d a p t a b l e   s o l u t i o n   f o r   g l a s s es   r e m o v a l   i n   f ac i a l   i m a g e s .   Fro m   th e  ab o v e  p ass ag e,   we  ca n   co n clu d e  th at  cu r r en t  ex i s tin g   g lass es   r em o v al  m eth o d s ,   m ain ly   th o s e  th at  ar e  p r o p o s ed   in   r ec en t  y ea r s ,   r ely   o n   co n v en tio n a l  GAN - b ased   f r am ewo r k s .   Ou r   p r o p o s ed   m o d el,   R GDM ,   d ep ar ts   f r o m   th e  co n v en tio n al  u s e  o f   a  GAN  [ 3 3 ]   b y   u tili zin g   a  DDPM   [ 4 2 ] ,   [ 4 3 ]   in s tead .   As  Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   In d o n esian   J   E lec   E n g   &   C o m p   Sci ,  Vo l.  3 8 ,   No .   3 ,  J u n e   20 2 5 :   1 5 0 3 - 1 5 1 6   1506   d if f u s io n   m o d els  h a v e  r ec e n tly   s h o wn   s tate - of - th e - ar t   r esu l ts   [ 4 3 ] - [ 4 5 ]   wh ile  also   o u t p er f o r m in g   GANs  in   ter m s   o f   ac c u r ac y   an d   v a r iety   [ 2 1 ] ,   [ 4 6 ] ,   o u r   m eth o d   ca n   a u t o m atica lly   r em o v e  g lass es  f r o m   f ac ial  im ag es  in   a  m o r e  p r ec is e  m an n er .       3.   B ACK G RO UND:   D E NO I S I NG   DIFF USI O N  P RO B AB I L I S T I C  M O D E L   I n   th is   p ap er ,   we  u s e  d en o is i n g   d if f u s io n   p r o b ab ilis tic  m o d el  as  th e  b ase  m o d el  f o r   o u r   p r o p o s ed   m eth o d .   DDPM   [ 4 2 ] ,   [ 4 3 ] ,   w h ich   is   s h o wn   i n   Fig u r e   1 ,   is   s h o r tly   k n o wn   as  d if f u s io n   m o d el.   I t   is   a  m o d el   in s p ir ed   b y   n o n e q u ilib r iu m   th er m o d y n am ics   [ 4 7 ] ,   wh ich   is   a  class   o f   laten t v ar iab le  m o d e ls   with   th e  f o r m :     ( 0 ) ∶ = ∫ ( 0 : ) 1 : )   ( 1 )     I ts   b asis   is   a  p ar am eter ized   Ma r k o v   ch ain   tr ain ed   with   v a r iatio n al  in f er e n ce   to   g e n er ate   s am p les  th at  m atch   th e  d ata  in   a  f i n ite  am o u n t o f   t im e.           Fig u r e  1 .   Ov e r v iew  o f   th e  d e n o is in g   d if f u s io n   p r o b ab ilis tic  m o d el       I t star ts   b y   s am p lin g   f r o m   a  d i s tr ib u tio n   with   n o is e  ,   g r ad u all y   p r o d u cin g   less - n o is y   s am p le s   − 1 ,  − 2 , … ,   u n til a  f in al  s am p le  0   is   r ea ch ed .   T h e  r ev er s e  p r o ce s s   is   ca lle d   th e  jo in t d is tr ib u tio n   ( 0 : ) ,   wh ich   is   a  Ma r k o v   ch ain   with   lear n ed   g a u s s ian   tr an s itio n s .   T h e   f o r war d   p r o ce s s ,   also   k n o w n   as  th e  d if f u s io n   p r o ce s s ,   is   th e  ap p r o x im ate  p o s ter io r   ( 1 : | 0 )   th at  a  Ma r k o v   c h ain   is   f ix ed   to ,   a d d in g   g au s s ian   n o i s e  to   th e   d ata  g r ad u ally   b ased   o n   a  v a r ian ce   s ch ed u le  1 , … , .   B y   o p tim izin g   th e  s tan d ar d   v a r iatio n al  b o u n d   o n   n eg ativ e  lo g   lik elih o o d ,   tr ain i n g   ca n   t h en   b e   ca r r ied   o u t.   Fo r   a  n o is y   s am p le   ,   its   n o is e  co m p o n en t  c an   b e  p r ed icted   u s in g   a  f u n cti o n   ( , ) .   Giv en   a  d ata   s am p le  0 ,   we  ca n   ad d   n o is e    to   th e   im ag e  b y   u tili zin g   th e  f o r war d   d if f u s io n   Ma r k o v   p r o ce s s   o v er   a   s ch ed u led   v ar ian ce   o f     an d   ti m estep   .   T h e y   ar e   r an d o m ly   d r awn   to g eth er   to   cr ea te   a  n o is ed   s am p le  ,  wh ich   g en er ates e v e r y   s am p le  in   a  m in ib atch   t o   tr ain   th is   f u n ctio n .   T h e  f o r war d   p r o ce s s   m ay   b e  ap p lied   as:     ( 1 : | 0 ) ∶ = ∏ ( | − 1 ) = 1 )   ( 2 )     ( | − 1 ) ∶ = ( √ 1 − , ) )   ( 3 )     wh er e    is   th e  to tal  n u m b er   o f   s tep s .   T h e  f o r war d   p r o ce s s   h as a   n o tab le  p r o p er ty   o f   ad m itti n g ,   in   clo s ed   f o r m ,   o f   s am p lin g     at  tim estep   .   Hen ce ,     m ay   b e  ex p r ess ed   in   a  clo s ed   f o r m   as:     = √ ̅ 0 + √ 1 − ̅ )   ( 4 )     wh er e  ∶ = 1 − ,  ̅ ∶ =   ∏ = 1 ,   an d   ϵ   ~   ( 0 , Ι   ) .     I n   o r d er   to   cr ea te  im ag es  f r o m   r an d o m   n o is e,   th e  d if f u s io n   p r o ce s s   ab o v e  n ee d s   to   b e   in v er ted .   W h en     is   s m all  en o u g h ,   th is   c an   b e   d o n e  b y   lear n i n g   t h e  g a u s s ian   ( − 1 | ) .   Nev er th eless ,   d u e   to   th e  tr u e   d is tr ib u tio n   o f   0   b ein g   u n ab le  t o   ac ce s s   th e  g au s s ian ,   ( − 1 | )   is   n o t  k n o wn .   T h e r ef o r e,   a  n eu r al  n e two r k     is   th en   tr ain ed   to   esti m ate  th e  co n d itio n al  d is tr ib u tio n :     ( − 1 | ) ∶ = ( ( , ) , Σ ( , ) ) )   ( 5 )     wh er e,   tak en   f r o m   ( 4 ) ,  − 1 =   1 √ ( − 1 − √ 1 − ̅ )   is   o b tain ed   th r o u g h   tr ain in g     to   p r ed ict  it.   T h e  o b jectiv e  o f   tr ain i n g ,   co n s id er in g   a   s im p le  m ea n - s q u a r e d   er r o r   lo s s   b etwe en   th e   ac tu al   n o is e  a n d   th e  an ticip ated   n o is e  as  an   ex am p le,   will  b e  ‖ ( , ) − ‖ 2 .   B y   u s in g   s to ch asti c  g r ad ien t  d escen t  to   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52         R emo ve   g la s s es d iffu s io n   mo d el  a n   in n o va tive  co n d itio n ed   o f e ye   g la s s es remo va l wi th   …  ( Yu liz a )   1507   opt im ize  r an d o m   ter m s   o f   ,   tr ain in g   is   p o s s ib le  to   b e  co m p leted   in   an   ef f icie n t  m an n e r .   I n   ( − 1 | ) ,  g iv en   a  g au s s ian   tr an s itio n   ( − 1 ; ( , ) , ∑ ( , ) ) ,   th e  d en o is in g   d is tr ib u tio n   ca n   b e  m o d elled   with   th e  m ea n   ( , )   co m p u ted   as a   p ar t o f   ( , ) .   T h is   lead s   to   th e  f o llo win g   p ar am etr izatio n :     ( , ) ∶ = 1 √ ( − √ 1 − ̅ ( , ) )   ( 6 )     A  s im p lifie d   tr ain in g   o b jectiv e  is   d is co v er ed   b y   Ho   et  a l.   [ 4 2 ]   to   b e   m o r e   b en ef icial:     ℒ = , 0 , [ ‖ − ( , ) ‖ 2 ] )   ( 7 )     T h is   tr ain in g   o b jectiv e  is   o b t ain ed   b y   p r ed ictin g   th e  cu m u lativ e  n o is e    th at  is   ad d ed   to   th e  in ter m ed iate  im ag e  .   I n   s h o r t,  it  r em o v es  th e  n ee d   f o r   th e  weig h tin g   in   th e  L an g ev i n   d y n am ics,  tr an s f o r m in g   it  in to   a   weig h ted   v ar iatio n al  b o u n d   wh ich   lead s   to   d o wn - weig h t in g   th e  lo s s   ter m s   o f   th e  s i m p lifie d   o b jectiv e   co r r esp o n d in g   t o   s m all  .       4.   M E T H O D   R GDM   co m b in es  th e  p r in ci p les  o f   DDPM   with   in n o v at iv e  m o d if icatio n s   to   ac h iev e   au to m atic   g lass es  r em o v al.   W e  f ir s t  p r es en t  o u r   ap p r o ac h   f o r   co n d itio n in g   th e   DDPM  o n   g lass es  r em o v al.   T h is   will  b e  f o llo wed   b y   an   in tr o d u ctio n   o n   an   ap p r o ac h   to   im p r o v e   th e   ac cu r ac y   o f   th e   in - p ai n ted   e y e s ’   p o s itio n   a f ter   t h e  r em o v al  o f   g lass es.   T h e  m o d el  o p er ates  th r o u g h   a  s er ies  o f   ca r ef u lly   o r ch es tr ated   s tep s   th at  in teg r ate   co n d itio n in g   m o d u les,  d if f u s io n   p r o ce s s es,  an d   lan d m ar k - b ased   p o s itio n in g   to   ac h iev e  h ig h - q u ality ,   r ea lis tic  r esu lt s .   T h e  p r o ce s s   b eg in s   with   an   in p u t  f ac ial  im ag e  th at  co n tain s   g lass es.  T h is   im ag e  s er v es  as  th e  s t ar tin g   p o in t  f o r   th e   g lass es  r em o v al  p r o ce d u r e.   A  m o d if icatio n   o f   th e  s eg m en tatio n   m o d el,   th e  SAM   [ 1 9 ] ,   is   a p p lied   to   th e  in p u t   im ag e.   T h is   s eg m en tatio n   m o d el  is   s p ec if ically   tr ain ed   t o   d etec t  an d   is o late  th e  g lass es  f r o m   th e   r est  o f   t h e   f ac ial  f ea tu r es,  r esu ltin g   in   a  b in ar y   m ask   th at  h ig h lig h ts   th e  g lass es r eg io n .   Fig u r e  2   illu s tr ates  th e  f lo w  o f   m o d el  ex p lain ed .   T h e  b in ar y   m ask   g en er ated   in   th e  p r ev i o u s   s tep   is   cr u cial  f o r   t h e  co n d itio n i n g   p r o ce s s .   I t  id en tifie s   t h e  e x ac t  r e g io n s   o f   th e   im ag e   wh er e   th e   g lass es  ar e  lo ca ted ,   en s u r in g   th at  t h ese  ar ea s   r ec e iv e  f o cu s ed   atten tio n   d u r in g   t h e  s u b s eq u en t  d en o is in g   p r o c ess .   I n   p ar allel,   th e   m o d el  ex tr ac ts   an d   in c o r p o r at es  lan d m ar k   d ata  f r o m   th e  in p u t  im ag e.   T h is   d ata  in clu d es  p r ec is e  co o r d in ates  f o r   t h e  ey es   an d   o th e r   k ey   f a cial  f ea tu r es,  wh ic h   ar e   ess en tial  f o r   m ain tain in g   th e   co r r ec t  p o s itio n in g   o f   th e  ey es d u r in g   th e  in p ain tin g   p r o ce s s .           Fig u r e  2 .   T h e  f lo w   of   th e  R G DM   m o d el       T o   in itiate  th e   d if f u s io n   p r o ce s s ,   g au s s ian   n o is e  is   s tr ateg ically   in jecte d   in t o   th e   g lass es   r eg io n   o f   t h e   im ag e,   g u id ed   b y   th e  b in ar y   m ask .   T h e  n o is e  lev els  ar e  co n tr o lled   b y   a  v ar ian ce   s ch ed u le,   en s u r in g   th at  th e   n o is e  is   g r ad u ally   ad d e d   to   th e  id en tifie d   r eg io n   wh ile  p r es er v in g   th e  s tr u ctu r e  o f   th e  s u r r o u n d in g   u n m ask ed   ar ea s .   T h e   m o d el  th en   p e r f o r m s   th e  f o r war d   d if f u s io n   p r o c ess ,   wh er e  th e   n o is y   im ag e   u n d er g o es  a  s er ies  o f   tr an s f o r m atio n s .   E ac h   s tep   o f   th e  Ma r k o v   c h ain   i n   th e   d if f u s io n   p r o ce s s   in cr em e n tally   ad d s   m o r e  n o is e  to   th e   id en tifie d   r eg i o n ,   lead i n g   to   a   p r o g r ess iv ely   n o is ier   v er s io n   o f   th e  o r ig in al  im ag e .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   In d o n esian   J   E lec   E n g   &   C o m p   Sci ,  Vo l.  3 8 ,   No .   3 ,  J u n e   20 2 5 :   1 5 0 3 - 1 5 1 6   1508   On ce   th e  f o r war d   d if f u s io n   p r o ce s s   r ea ch es its   p ea k   n o is e  lev el,   th e  r ev er s e  d i f f u s io n   p r o c ess   b eg in s .   T h e  m o d el,   co n d itio n ed   b y   b o th   th e  b in ar y   m ask   an d   th e  lan d m ar k   d ata,   s y s tem atica lly   r em o v es  th e  n o is e  f r o m   th e  im a g e,   ef f ec tiv ely   r e co n s tr u ctin g   th e  p ix els  in   th e  g lass es  r eg io n .   Du r in g   t h is   r ev er s e  p r o ce s s ,   th e   m o d el  f o cu s es  o n   in p ain tin g   th e  g lass es  r eg io n .   T h e   b in ar y   m ask   e n s u r es  th at  th e  d if f u s io n   p r o ce s s   is   co n ce n tr ated   o n   th e   ar ea s   t h at  o r ig i n ally   c o n tain ed   th e   g lass es,  wh ile  th e   lan d m ar k   d ata   g u id es  th e   ac cu r at e   p lace m en t o f   t h e  ey es a n d   o th er   f ac ial  f ea tu r es.   T h e  o u t p u t  f r o m   ea ch   s tep   o f   th e  r ev er s e  d if f u s io n   is   g r ad u a lly   r ef in ed ,   with   th e   m o d el   f illi n g   in   t h e   g lass es  r eg io n   with   p lau s ib le  f ac ial  d etails.  T h e  r ev er s e  d if f u s io n   p r o ce s s   co n tin u es  u n til  th e  m o d el  g en e r ates  a  f in al,   n o is e - f r ee   im ag e .   T h i s   o u tp u t  im ag e   h as  th e  g lass es  co m p letely   r em o v ed ,   with   th e  ey es  an d   o th e r   f ac ial  f ea tu r es a cc u r ately   r ec o n s tr u cted   an d   alig n ed   with   t h e ir   o r ig in al  p o s itio n s .     4 . 1 .     Co nd it io nin g   m o du le   T h e  co n d itio n i n g   m o d u le  in   R GDM   is   a   cr u cial  n o v el  ad d itio n ,   f o r   in c o r p o r atin g   in f o r m at io n   ab o u t   g lass es  co n d itio n s   in to   t h e  d e n o is in g   p r o ce s s .   I t  aim s   t o   in t eg r ate  in f o r m atio n   ab o u t  th e  p r esen ce   o r   ab s en ce   o f   g lass es    in to   th e  d en o is in g   p r o ce s s ,   allo win g   th e   m o d el  to   ad a p t  its   d en o is in g   s tr ateg y   b ased   o n   th is   co n d itio n .   T h e   m o d el’ s   g lass es  r em o v al   m eth o d   r elies  o n   p r ed ictin g   th e   m is s in g   p ix el   v alu es  o f   th e   f ac ial  im ag e.   T h is   is   d o n e   b y   th e  h e lp   o f   th e  c o n d itio n in g   m o d u le   b y   m ask in g   th e  g lass es  r eg io n .   Fig u r e   3   s h o ws  th e  o v er v iew  o f   th e   R GDM   ap p r o ac h .           Fig u r e  3 .   R GDM :  g lass es r em o v al  p r o ce s s   o v er v iew       I n   th e  co n tex t o f   th e  p r o p o s ed   m o d el,   co n s id er in g   a n   in p u t im ag e  d en o ted   as ' ' ,   a  g las s es  m ask   as ' '  r ep r esen tin g   th e  ar ea s   o f   ' '   to   b e  in - p ain ted ,   an d   ey es'   lan d m ar k   attr ib u te  r ep r esen ted   b y   ' ' ,   th e  p r im ar y   o b jectiv e  is   to   ef f ec tiv el y   in - p ain t  th e  g lass es  m ask   an d   g en er ate  a n   o u tp u t  im a g e  d en o ted   as  ' ̂   ' .   T h e  g en er ated   r eg io n s   ar e  r ep r ese n ted   as  ' ⨀ ̂ ' ,   wh ile  th e  k n o wn   f a cial  r eg io n s   a r e  ex p r ess ed   as  ' ( 1 − ) ⨀   ' .   Giv en   th at  n o is e  is   ex cl u s iv ely   in tr o d u ce d   to   th e  m ask ed   g l ass es  r eg io n ,   wh er e   ' = 0 ' ,   th e  f o r war d   p r o ce s s   at  tim estep   ' '   ca n   b e  m ath em atica lly   ex p r ess ed   as   ( 8 ) .     ̂ = √ 1 − ̅ + √ ̅ 0 )   = ( 1 − ) ⨀ 0 + ⨀ ̂   ( 8 )     T h e  in p u t  v a r iab les,  ,  ,   an d   ,   ar e  f ed   in to   th e  c o n d itio n in g   m o d u le,   wh er e   th e  m o d u le   d i s ce r n s   th e  p r o ce s s   to   r esto r e  th e  m ask ed   g lass es  r eg io n ,   0 ⨀ ,   wh ile  u tili zin g   th e  clea r   an d   u n m ask ed   f ac ial   in f o r m atio n .   T h is   en s u r es  th at   th e  in - p ain ted   e y es  with in   th e   m ask ed   g lass es,  ,   h ar m o n iz e  with   th e  o v er all  f ac ial  im ag e.   In   ( 9 )   en ca p s u lat es th e  tr ain in g   o b jectiv e  d er i v ed   f r o m   th is   p r o ce s s .     ℒ  − = ~ ( 0 , ) [ ‖ − ( , , , ) ‖ 2 ] )   ( 9 )     R an d o m   g au s s ian   n o is e  is   g en er ated   ac r o s s   th e  m ask ed   ar ea   = ( 1 − ) ⨀ 0 +   ⨀ 0 .   T h er ef o r e,   to   o b tain   th e  g en er ated   o u tp u t  0 ,   th e  d if f u s io n   p r o ce s s   is   r ev er s ed   d u r in g   th e  i n f er en c e   s tag e.   W ith   th e  r ev er s e  d if f u s io n   p r o ce s s   s u cc ess f u lly   co n d itio n ed   to   f o cu s   o n   th e  g lass es  ar ea ,   we  s u cc ess f u lly   in - p ain t  th e   g lass es  ar ea   with   th e  n ec ess ar y   f ac ial  f ea tu r es  an d   ey es,  wh ich   in   r etu r n   r em o v es  th e  g lass es  f r o m   th e  f ac ial   im ag es.  T h is   ca n   b e  s ee n   in   F ig u r e  3 ,   wh er e  ,   wh ich   is   th e  s o u r ce   im ag e  0   co m b in ed   with   b in ar y   m ask   ,  Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52         R emo ve   g la s s es d iffu s io n   mo d el  a n   in n o va tive  co n d itio n ed   o f e ye   g la s s es remo va l wi th   …  ( Yu liz a )   1509   u n d er g o es  th e  d if f u s io n   m o d el  to   p r o d u ce   − 1   an d   s o   o n ,   wh ich   will  b e  iter ated   u n til  o u tp u t  im ag e  ̂   is   f in ally   p r o d u ce d   wh er e  th e   ey eg lass   is   s u cc es s f u lly   r em o v ed .     4 . 2 .     E y es  prec is io n a cc ura cy   T o   e n s u r e   t h e   g e n e r a t i o n   o f   a c c u r a t e   a n d   f a i r   g l a s s es   m a s k s ,   o u r   m e t h o d o l o g y   i n c o r p o r a t e s   a   m e t i c u l o u s l y   c r a f t e d   a p p r o a c h   l e v e r a g i n g   a   m o d i f i e d   S A M   [ 1 9 ] .   T h i s   a d a p t a t i o n   o f   S A M   is   p u r p o s e f u l l y   t r a i n e d   t o   a d e p t l y   d e t e c t  a n d   s e g m e n t  e y e g l as s es   w i t h i n   f a c i al   i m a g e s ,   t h u s   e n h a n ci n g   t h e   p r ec i s io n   o f   t h e   g e n e r a te d   g l a s s e s '   m as k s .   T h e   p r o c e s s   i n i t i a t es   w it h   i n p u t t i n g   t h e   s o u r c e   i m a g e s   i n t o   t h e   m o d i f i e d   S A M ,   s t r a t e g ic a l ly   t a i l o r e d   t o   f o c u s   s o l e l y   o n   t h e  s e g m e n t at i o n   o f   e y e g l as s es .   T h e   o u t c o m e   o f   t h i s   s e g m e n tat i o n   s te p   y i e l d s   t h e  g l a s s e s '   m as k s   d e n o t e d   as   ‘ ’   a s   v i s u a l l y   r e p r e s e n t e d   i n   F i g u r e  3 .   T h e s e   m a s k s   b e c o m e   a   p i v o t a l   c o m p o n e n t   i n   t h e   s u b s e q u e n t   s t a g es   o f   o u r   m e t h o d o l o g y ,   s e a m l es s l y   i n t e g r a t i n g   i n t o   t h e   p r o c es s es   o u t lin e d   i n   S e c t i o n   A   f o r   f u r t h e r   a n a l y s is   a n d   g l a s s e s   r em o v a l .   T h i s   n u a n c e d   a p p r o a c h   e n s u r e s   t h e   r e li a b i l it y   a n d   a c c u r a c y   o f   t h e   m a s k s ,   l a y i n g   a   r o b u s t   f o u n d a t i o n   f o r   s u b s e q u e n t   p h a s es   o f   t h e   r e m o v e   g l a s s e s   d i f f u s i o n   m o d e l .   Desp ite  its   p r o f icien cy   in   g e n er atin g   an   ac c u r ate  m ask   f o r   d if f er en t  ty p es  o f   g lass es,  we  f o u n d   th at  th e  s eg m en tatio n   m o d el  te n d s   to   m ask   th e   en tire   g lass es,  in clu d in g   th eir   len s es,  ir r esp ec ti v e  o f   wh et h er   t h ey   r esem b le  s u n g lass es  with   co l o r ed   len s es  o r   co n v en tio n al  e y eg lass es  with   clea r   len s e s .   T h is   is   ev id en t  in   th e  b in ar y   m ask   ' '   an d   th e  m ask ed   im ag e  ' '  p o r tr ay ed   in   Fig u r e   3 .   T h is   co m p r e h en s iv e  m ask in g   lead s   to   th e  p o s s ib ilit y   o f   th e   g e n er ated   ey es  b ein g   p o s itio n ed   d if f er en tly   th an   in   t h e  o r ig in al  i m ag e,   in   p ar ticu la r   co n ce r n in g   t h e  ty p es  o f   g lass es  th at  ar e   d esig n ed   f o r   v is io n   co r r ec ti o n   ( th o s e   with   clea r   len s es).   T o   ad d r ess   th is   p o ten tial  m is alig n m en t  an d   en s u r e  th e  ac c u r ate  p o s iti o n in g   o f   th e  g e n er ated   ey es,   th e  m o d el  is   also   eq u ip p e d   with   in f o r m atio n   c o n ce r n in g   th e  ey es'   lan d m ar k s   d en o ted   as  ' ' ,   wh ich   is   le v er ag ed   f r o m   th e   d ataset' s   in tr in s ic  lan d m ar k   att r ib u tes:     = (   ,   | ℎ  , ℎ  ) )   ( 1 0 )     T h r o u g h   th e  in co r p o r atio n   o f   ey es'   lan d m ar k s   d en o ted   as  ' ' ,   th e  m o d el  en s u r es  th e  p r ec is e   p o s itio n in g   o f   th e  g en e r ated   e y es,  m ain tain in g   th em   i n   th e  e x ac t  s am e  p o s itio n   as  in   th e  o r ig in al  im ag e.   T h is   s tr ateg ic  u s e  o f   lan d m ar k   in f o r m atio n   ac ts   as   a  s af eg u ar d   ag ain s t  p o ten tial  d is to r tio n s   th at   co u ld   ar is e  d u r in g   t h e  g lass es  r em o v al  p r o ce s s .   Fig u r e  4   p r o v id es  a  v is u al  r ep r esen tatio n   o f   th e   im p ac t   o f   in cl u d in g   ey es'   lan d m ar k s ,   s h o wca s in g   s am p les  o f   g en er ated   ey es  b o t h   with   an d   with o u t  th e  u tili za tio n   o f   lan d m a r k   in f o r m atio n .   T h is   n o t  o n ly   e x em p lifie s   th e  ef f ec tiv e n es s   o f   th e  p r o p o s ed   a p p r o ac h   in   p r es er v in g   t h e  o r ig in al  ey e  p o s itio n   b u t  also   s er v es  as  a  tes tam en t  to   th e  m o d el' s   a b ilit y   to   p r o d u ce   r ea lis tic  an d   ac cu r ate  r esu lts   in   th e  ab s en ce   o f   g lass es.  T h e  p s eu d o co d e  f o r   th e  g lass es r em o v al  p r o ce s s   ca n   b e   s ee n   in   Alg o r ith m   1 .     Alg o r ith m   1.   Glass es r em o v al   1:     ~   ( ,   )   2:   for  = , … , 1   do   3:         for  = 1 , … ,   do   4:                 ~   ( ,   )   if  > 1 , else  = 0   5:               ̂ = √ 1 − ̅ + √ ̅ 0   6:                 ~   ( ,   )   if  > 1 , else  = 0   7:               = (   ,   |  ℎ ,  ℎ )   8:               = ( 1 − ) ⨀ 0 + ⨀ ̂   9:         end for   10:  end for   11:  return  0     4 . 3 .     E x perim ent a l  s et up   4 . 3 . 1 .   Da t a s et   W e  co n d u cted   o u r   ex p e r im e n ts   u s in g   th e  C eleb A  d ataset   [ 4 8 ] ,   wh ich   is   a  f ac e  attr ib u te  d ataset  d er iv ed   f r o m   lab ellin g   im a g e s   s elec ted   f r o m   th e  ch allen g i n g   f ac e  d atasets ,   C eleb Face s .   I t  f ea tu r es  1 0 , 1 7 7   id en titi es,  ea ch   with   a r o u n d   2 0   im ag es,   f o r   a  t o tal  o f   2 0 2 , 5 9 9   ce leb r ity   im a g es.  I t  h as  ea ch   im ag e   an n o tated   with   f o r ty   f ac ial  f ea tu r es  an d   f iv e  k ey   ch ar ac ter is tics ,   in clu d in g   th e  p r esen ce   o r   ab s en c e  o f   g lass es  an d   th e  lan d m ar k s   o f   b o th   th e  lef t  an d   r ig h t  ey es.  Fro m   th e  an n o ta tio n s ,   we  s ep ar ated   th e  C eleb A  d ataset  in to   two   s u b s ets,  o n e  wh er e   th e   im ag e s   co n s is t  o f   g lass es  an d   th e  o th er   wh er e   th e   im ag es  h a v e  n o   g lass es.  I n   to tal,   th er e  ar e  1 8 9 , 4 0 6   n o n - g lass es  im ag es  an d   1 3 , 1 9 3   im ag es   wea r in g   g lass es.  All  o f   th e   f ac ial  im ag es  ar e  cr o p p e d   to   1 7 8 × 1 7 8 ,   b ef o r e  b ein g   r esized   to   2 5 6 × 2 5 6   ea c h .     4 . 3 . 2 .   I m plem ent a t i o n  det a ils   T h e   a r c h i t e ct u r e   o f   t h e   r e m o v e   g l a s s e s   d i f f u s i o n   m o d e l  is   r o o t e d   i n   t h e   D D PM   f r a m ew o r k .   I t   is   c o m p o s e d   o f   a   g e n e r at o r   r e s p o n s i b l e   f o r   t h e   d e n o is i n g   p r o c ess   a n d   a  c o n d i t i o n i n g   m o d u l e  t h a t   e m p l o y s   a   b i n a r y   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   In d o n esian   J   E lec   E n g   &   C o m p   Sci ,  Vo l.  3 8 ,   No .   3 ,  J u n e   20 2 5 :   1 5 0 3 - 1 5 1 6   1510   m a s k   t o   i d e n t i f y   t h e   g l a s s es   in   t h e   i n p u t   i m a g e s .   W e   h a v e   i m p l e m e n t e d   t h e   R GD M   m e th o d   u s i n g   P y T o r c h   2 . 0 . 0 ,   P y t h o n   3 . 8   ( U b u n t u 2 0 . 0 4 ) ,   a n d   C u d a   1 1 . 8 ,   r u n n i n g   o n   a n   R T X   3 0 9 0   ( 2 4   G B )   G P U .   T h e   m o d e l   u n d e r g o e s   t r a i n i n g   o n   t h e   d a t as e t   f o r   3 0 0 , 0 0 0   i t e r a t i o n s ,   w i t h   T   s e t   t o   2 5 0 .   R GDM   is   b ased   o n   th e  DDPM,   wh ich   is   a  ty p e   o f   p r o b a b ilis tic  g en er ativ e  m o d el   th at   r ev er s es  a   d if f u s io n   p r o ce s s   to   g en er at e  h ig h - q u ality   im ag es.  T h e  n etwo r k   is   co n d itio n ed   o n   a   b in ar y   m ask   an d   lan d m ar k   d ata,   wh ic h   g u i d e  th e  d if f u s io n   p r o ce s s   to   id en tify   th e  g lass es  r eg io n   in   th e  in p u t  im ag es.  W e  h av e   im p lem en ted   th e  R GDM   m eth o d   u s in g   Py T o r c h   2 . 0 . 0 ,   Py th o n   3 . 8   ( U b u n tu 2 0 . 0 4 ) ,   an d   C u d a  1 1 . 8 ,   r u n n in g   o n   an   R T X  3 0 9 0   ( 2 4   GB )   GPU.   T h e   C e l e b A   d a ta s et   w as   u t i l ize d   f o r   t r a i n i n g   a n d   t e s t i n g   t h e   R G DM   m o d e l .   T h i s   d a t as e t   c o n t a i n s   o v e r   2 0 0 , 0 0 0   c e l e b r i t y   i m a g e s   w i t h   a   v a r i e t y   o f   a t t r i b u t e s ,   i n c l u d i n g   w h e t h e r   t h e   p e r s o n   is   w ea r i n g   g l a s s e s .   S i n c e   t h e  C e l e b A   d a t as e t  d o e s   n o t   c o m e   w it h   d e t ai l e d   s e g m e n t at i o n   m a s k s ,   a   m o d i f i e d   v e r s i o n   o f   t h e   S A M   [ 1 9 ]   w as  e m p l o y e d   t o   g e n e r a t e   b i n a r y   m a s k s .   T h es e   m as k s   i s o l at e   t h e   g l a s s e s   r e g i o n ,   h e l p i n g   t h e   m o d e l   f o c u s   o n   t h e   c o r r e c t   a r e a   d u r i n g   t h e   d i f f u s io n   p r o c e s s .   7 0 %   o f   t h e   d a t as e t  ( a r o u n d   1 4 0 , 0 0 0   i m a g e s )   i s   a ll o c a t e d   f o r   t r a i n i n g   t h e   R G D M  m o d e l .   T h e  t r a i n in g   s e t   i n c l u d e s   i m a g es   w i t h   an d   w i t h o u t   g l ass e s ,   e n s u r i n g   th e   m o d e l   l e a r n s   t o   a c c u r a t e l y   r e m o v e   g l as s es   w h il e   p r e s e r v i n g   t h e   u n d e r l y i n g   f a c i a l   f e at u r e s .   T h e   r e m ai n i n g   3 0 %   o f   t h e   d a t a s et  ( a r o u n d   6 0 , 0 0 0   i m a g e s )   i s   r e s er v e d   f o r   t e s t i n g .   T h is   s e t   i s   u s ed   t o   e v a l u a te   t h e  m o d e l ’ s   p e r f o r m a n c e ,   p a r t i c u la r l y   i t s   a b i l it y   t o   r e c o n s t r u ct   t h e   f a ce   w i t h o u t   g l as s e s   w h i l e   m ai n t a in i n g   n a t u r a l i s m   a n d   r e al is m .   T h e  lear n i n g   r ate  was  s et  t o   0 . 0 0 0 1 ,   wh ich   is   ty p ical  f o r   tr ai n in g   d if f u s io n   m o d els.  T h is   r a te  en s u r es  th at  th e  m o d el  lear n s   at  a  p a ce   th at  b alan ce s   co n v er g en ce   s p ee d   an d   s tab ilit y .   T h e  m o d el  was  tr ain ed   f o r   3 0 0 , 0 0 0   iter atio n s ,   wh ich   is   a   co m m o n ly   u s ed   m ea s u r e  i n   d if f u s io n   m o d els  d u e  to   th e  h ig h   n u m b er   o f   tim estep s   in v o lv ed ,   with   T   s et  to   2 5 0 .   T h is   ex ten s iv e  tr ain in g   allo wed   th e  m o d el  to   lear n   th e  co m p lex   task   o f   g lass es  r em o v al  an d   e n s u r ed   th at  it   g en e r alize d   well  t o   n ew  im ag es.  T h e  Ad a m   o p ti m izer   was  u s ed   f o r   tr ain in g ,   with   b eta 1   s et  to   0 . 9   an d   b eta2   s et  t o   0 . 9 9 9 .   A d am   was  ch o s en   f o r   its   r o b u s t n ess   an d   a b ilit y   to   h an d le  th e  s p a r s e  g r ad ien ts   th a t a r e  o f ten   e n co u n ter ed   in   d ee p   g en er ativ e   m o d els.   T h e  in p u t  t o   th e  R GDM   m o d el  is   a  f ac ial  im ag e   with   g lass es,  alo n g   with   a  co r r esp o n d i n g   b in a r y   m ask   th at  is o lates  th e  g lass es  r eg io n .   T h e   im ag e   is   p r e p r o ce s s ed   to   m atch   th e   in p u t   r eq u ir em en ts   o f   th e   m o d el,   ty p ically   r esized   to   2 5 6 × 2 5 6   p ix els  an d   n o r m alize d .   T h e  f in al  im ag e,   with   th e  g lass es  r em o v ed ,   i s  g en er ated   t h r o u g h   th e  r e v er s e   d if f u s io n   p r o ce s s .   Star tin g   f r o m   th e  n o is y   im a g e  cr ea ted   d u r in g   th e  f o r war d   p r o ce s s ,   th e  m o d el  g r a d u ally   r ed u ce s   th e  n o is e,   g u id e d   b y   th e  co n d itio n in g   m o d u le,   u n til  a  h ig h - q u ality ,   g lass es - r em o v ed   im a g e  is   p r o d u ce d .   T h e   o u t p u t  is   a   2 5 6 × 2 5 6   p ix el   im ag e   with   th e   g la s s es  r em o v ed .   T h e   m o d el’ s   g o al  is   to   g en er ate  a  r ea lis tic  im ag e  wh er e  th e  g lass es h av e  b ee n   in   p ain ted   with   t h e  u n d er l y in g   f ac ial  f ea tu r es,  p ar tic u lar ly   f o cu s in g   o n   m ain tain in g   th e   co r r e ct  p l ac em en t  o f   th e   ey es  an d   e n s u r in g   th at   th e  o u tp u t   is   f r ee   o f   ar tifa cts.     4 . 3 . 3 .     E v a lua t io n  m et rics   W e  co n d u cte d   t h e   ev al u atio n   o f   im a g e  q u ality   t h r o u g h   th e  u tili za tio n   o f   th e   Fré ch et   in ce p tio n   d is tan ce   ( FID )   [ 4 9 ] ,   [ 5 0 ] .  FI D  s er v es  as  a  m etr ic  f o r   q u an tify in g   th e   d is s im ilar ity   b etw ee n   r ea l  im ag es  a n d   g en er ated   im ag es.  T h is   ca lcu l atio n   is   p er f o r m ed   u s in g   th e  in ce p tio n   n etwo r k   to   e x tr ac t f ea tu r es a n d   ass ess   th e  d is tan ce   b etwe en   th e  d is tr ib u tio n s   o f   r ea l  an d   g en er ate d   im ag es.  FID   h as  estab lis h ed   its elf   as  a  wid ely   ad o p ted   e v alu atio n   m e tr ic  in   v ar io u s   im ag e  g e n er atio n   task s   [ 2 2 ] ,   [ 3 1 ] ,   [ 5 1 ] .   An   ad d itio n al  m etr ic   em p lo y ed   f o r   ass ess in g   th e  m o d el   is   th e  lear n e d   p e r ce p tu al   im ag e  p atch   s im ilar ity   ( L PIPS)   [ 5 2 ] .  L PI PS   m ea s u r es  th e  lear n ed   d is tan ce   with in   Alex Net   [ 5 3 ]   d e ep   f ea tu r e  s p ac e  to   ev alu ate  th e  d is tan ce   b etwe en   im ag e  p atch es.  A  h ig h e r   L PIPS  v alu e  in d icate s   g r ea ter   d is s im ilar ity ,   s u g g esti n g   a   m o r e   s u b s tan tial   d if f e r en ce   b etwe en   i m a g e  p a tch es.  C o n v er s ely ,   a  lo we r   L P I PS   v alu e  s ig n if ies  in cr ea s ed   s im ilar ity ,   in d icatin g   a  clo s er   m atch   b etwe en   im ag e  p atch es.  T h is   m etr ic  o p er ates  o n   th e  p r em is e  th at  a  lar g er   L PIPS  d is tan ce   im p lies   m o r e  p r o n o u n ce d   d is tin ctio n s ,   wh ile   a  s m alle r   d is tan ce   s ig n if ies  h eig h ten ed   v is u al  r esem b lan ce   b etwe en   im ag e  p atch es.       5.   E XP E R I M E N T S AN D  RE S UL T S   W e  in tr o d u ce d   th e   ex ten s iv e  ex p er im en ts   c o n d u cted   o n   o u r   p r o p o s ed   R GDM   m o d el  in   th is   ch ap ter .   T h e  d ataset  u n d er g o es  a  p r eli m in ar y   p h ase  wh er e  it  is   s u b jecte d   to   a  m o d if ied   s eg m e n tatio n   m o d el,   SAM   [ 1 9 ] ,   r esu ltin g   in   th e  g en er at io n   o f   p r ec is e  g lass es  b in ar y   m ask s   f o r   ea c h   im ag e .   Su b s eq u en tly ,   b o th   th e   b in ar y   m ask s   an d   th e  o r ig in al   im ag es  ar e  f ed   i n to   th e  c o n d itio n in g   m o d u le,   as  ex p o u n d e d   i n   th e  p r ec ed in g   s ec tio n .   T h is   m o d u le  o r ch estr ates  th e  co m b in atio n   an d   p r ep ar atio n   o f   im ag es  in to   m ask ed   v er s io n s ,   with   th e  ju d icio u s   ad d itio n   o f   g au s s ian   n o is e  tar g eted   at  th e  m ask ed   ar ea s .   T h is   p r ep ar ato r y   s tep   s ets  th e  s tag e  f o r   th e  s u b s eq u en t  d en o is in g   p r o ce d u r e.   T h e  co m b in ed   d ata,   n o w   en r ich ed   with   g au s s ian   n o is e,   is   th en   p r o ce s s ed   th r o u g h   th e   d if f u s io n   m o d el,   k ick s tar tin g   th e  i n - p ain tin g   p r o ce s s   to   g en e r ate  v er s io n s   o f   th e  f ac ial   im ag es   with   r em o v ed   g lass es.  C r u ci ally ,   th e  p r o p o s ed   m eth o d   s h o wca s es  its   v er s atili ty   b y   n o t  o n ly   ef f ec tiv ely   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esian   J   E lec  E n g   &   C o m p   Sci     I SS N:   2 5 0 2 - 4 7 52         R emo ve   g la s s es d iffu s io n   mo d el  a n   in n o va tive  co n d itio n ed   o f e ye   g la s s es remo va l wi th   …  ( Yu liz a )   1511   r em o v in g   clea r - len s ed   g lass es  b u t  also   d em o n s tr atin g   p r o f ic ien cy   in   h an d lin g   d ar k - len s ed   v ar ieties,  in clu d in g   s u n g lass es.  T h is   ad ap tab ilit y   u n d er s co r es  th e  r o b u s tn ess   o f   th e  R GDM   m eth o d   ac r o s s   a  s p ec tr u m   o f   ey eg lass   ty p es,  en h an ci n g   its   ap p licab il ity   in   r ea l - wo r ld   s ce n ar io s .   Fig u r e  4   s h o ws  th e   o v er v iew   p r o ce s s   o f   h o w   th e   ex p er im en t  is   co n d u cted   in   o r d er   to   o b tain   t h e   n ec ess ar y   r esu lts .   As  ca n   b e   s ee n   in   t h e  f i g u r e,   th e  s eg m en tatio n   p r o ce s s   p r o v id es  t h e  n ec ess ar y   g lass es   b in ar y   m ask ,   wh ich   is   th en   p a s s ed   th r o u g h   th e  co n d itio n in g   m o d u le  alo n g   with   th e   o r ig i n a l  im ag e,   in   o r d er   t o   p r o d u ce   th e  n ec ess ar y   co n d iti o n   f o r   th e  DDPM  to   r em o v e  t h e  g lass es.  T h e  o u tp u t  o f   th e  c o n d itio n in g   m o d u le  is   a  co m b in atio n   o f   th e  o r i g in al  im ag e  an d   th e  b in ar y   m ask   wh ich   h as  b ee n   ad d ed   with   g a u s s ian   n o is e  in   th e  co n d itio n in g   ar ea .   E y es  p o s itio n   ac cu r ac y ,   in   th is   ca s e  = ( 68 , 112 | 109 , 112 ) ,   alo n g   with   th e   o u tp u t  f r o m   th e  co n d itio n in g   m o d u le   is   th en   p ass ed   th r o u g h   th e  d en o is in g   p r o ce s s   wh ich   f in ally   g en er ates  th e  tar g ete d   o u tp u t  im a g e.   T h e  r esu lt  s h o ws  th at  th e  p r o p o s ed   R GDM   m eth o d   s u cc ess f u lly   r em o v ed   th e  g lass es  f r o m   t h e   o r ig in al  im ag e.             Fig u r e  4 .   R GDM :  g lass es r em o v al  p ip elin e       I n   th is   d etailed   an aly s is ,   we  m eticu lo u s ly   ass ess   th e  p er f o r m an ce   im p ac t  o f   th e  in tr o d u ce d   ey es   p o s itio n   ac cu r ac y   in   th e  p r o p o s ed   e y eg lass   r em o v al  f r am ewo r k .   As  elu cid ated   in   Fig u r e  5 ,   th e   im p lem en tatio n   o f   ey e s   p o s itio n   ac cu r ac y   p lay s   a  p iv o tal  r o le  in   en s u r in g   th e  g en er ated   e y es  alig n   s ea m less ly   with   th eir   in ten d ed   p o s itio n s .   Par ticu lar ly ,   f o r   clea r - len s ed   g lass es,  th e  ac cu r ac y   m ec h an is m   g u ar an tees  th at  th e  g en er ate d   ey es  p r ec is ely   o cc u p y   th eir   o r ig in al  lo ca ti o n s .   T h is   m eticu lo u s   alig n m e n t  b ec o m es  eq u all y   cr u cial  f o r   d a r k - len s ed   g lass es  o r   s u n g lass es,  wh er e  th e   g en er ate d   ey es  m ain tain   n o r m al  d is tan ce s   an d   p r o p o r tio n s   c o n s is ten t  with   t h e  av er a g e  f ac e.   I n   s tar k   co n tr ast,  wh en   th e   m o d el  o p er at es  with o u t  th e   ey es  p o s itio n   ac cu r ac y   f ea tu r e,   t h e  g en er ated   e y es  ex h ib it  ir r eg u l ar   p lace m en ts ,   ap p ea r in g   h i g h er   th an   th e  o r ig in al  p o s itio n   an d   u n co m f o r tab l y   clo s e  to   th e   p er s o n ' s   ey eb r o ws.  T h is   d iv er g en ce   r esu lts   in   u n n at u r al  a n d   o cc asio n ally   u n s ettlin g   im ag e s .   C o n v er s ely ,   wh en   th e  m o d el  in co r p o r ates  th e  ey es  p o s itio n   ac cu r ac y ,   t h e  g en er ated   e y es  r etain   th eir   a u th en ticity   in   th e  o r ig in al  p o s itio n ,   cu lm in atin g   in   f ac ial  i m ag es  th at  ex u d e  a   h eig h ten ed   s en s e  o f   n at u r alis m   an d   r ea lis m .   T h is   n u a n ce d   ev alu atio n   u n d er s co r es   th e  i n d is p en s ab le  r o le  o f   ey es  p o s itio n   ac cu r ac y   in   e n h an cin g   th e  v is u al  f id elity   an d   b eliev ab ilit y   o f   t h e  g en e r ated   im ag es,  m ar k in g   it  as a   cr itical  co m p o n e n t in   th e  o v er all  s u cc ess   o f   th e  p r o p o s ed   ey eg lass   r em o v al  m o d el.     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4 7 52   In d o n esian   J   E lec   E n g   &   C o m p   Sci ,  Vo l.  3 8 ,   No .   3 ,  J u n e   20 2 5 :   1 5 0 3 - 1 5 1 6   1512       Fig u r e  5 .   Ab latio n   s tu d y .   C o m p ar is o n   o n   g lass es r em o v al  r es u lts   with   an d   with o u t e y es  p o s itio n   ac cu r ac y ,   o n   th e  C eleb A  d ataset       6.   DIS CU SS I O N   W e  also   co m p ar e d   o u r   m o d el  to   o th er   cu r r en t   s tate - of - th e - a r t  m o d els.  T h e  p r o p o s ed   R GDM   m eth o d   u n d er g o es  a   r ig o r o u s   co m p a r a tiv e  an aly s is   ag ain s t  c o n tem p o r a r y   s tate - of - th e - ar t  g lass es  r em o v al  tec h n iq u es,   in clu d in g   C y cleG AN   [ 5 4 ] ,   E R GAN   [ 3 5 ] ,   an d   3 D  Sy n t h etic   [ 4 0 ] .  T o   en s u r e  a   f air   a n d   o b jectiv e  co m p a r is o n ,   ea ch   m eth o d   is   m eticu l o u s ly   tr ain ed   u n d er   id en tical  e x p er i m en tal  co n d itio n s ,   m ir r o r in g   th e  cir cu m s tan ce s   em p lo y ed   in   tr ain in g   th e   R GDM   m o d el.   T h is   m eticu lo u s   a p p r o ac h   to   ex p er im en tatio n   s e r v es  to   elu cid ate   th e   r el ativ e  s tr en g th s   an d   wea k n e s s es  o f   ea ch   m eth o d ,   allo win g   f o r   a  c o m p r e h en s iv e  ass ess m en t  o f   th e  R GDM   m o d el' s   p er f o r m an ce   in   co m p ar is o n   to   its   co u n ter p ar ts .     6 . 1 .     Q ua lit a t iv e  e v a lua t io ns   I n   a   m e t i c u l o u s   q u a l i t at i v e   a s s e s s m e n t ,   w e   c o n d u c t e d   a   c o m p a r a t i v e   a s s es s m e n t   o f   o u r   m o d e l   a g a i n s t  p r o m i n e n t   g e n e r a t i v e  m e t h o d s   m e n t i o n e d   a b o v e .   F i g u r e   6   i l lu s t r a t es   t h e   e v a l u at i o n   o f   t h e   q u a l i t y   o f   g e n e r at e d   g l a s s e s - r e m o v e d   i m a g e s   o n   t h e   C el e b A   d at a s et .   T h r o u g h   l e v e r a g i n g   t h e   o p e n - s o u r c e   c o d es ,   t h e   s t a t e - of - t h e - a r t   m e t h o d s — C y c l eG A N   [ 5 4 ] ,   E R G AN   [ 3 5 ] ,   a n d   3 D   S y n t h e t i c   [ 4 0 ] — a r e   r e i m p l e m e n t e d   f o r   b e n c h m a r k i n g .   A s   d e p i c t e d   i n   Fi g u r e   6 ,   c o m p a r e d   t o   o u r   a p p r o a c h ,   C y c l e G AN ,   E R G A N ,   a n d   3 D   S y n t h e tic   a l l   h a v e   t h ei r   o w n   l i m i t at i o n s   i n   r e m o v i n g   t h e   g l a s s e s   f r o m   t h e   f a c ia l   i m a g e s .   B o t h   C y c l eG AN   a n d   3 D   S y n t h e t i c   e x h i b it  l i m i t at i o n s ,   f ai l i n g   t o   c o m p l et el y   e l i m i n at e   g l as s es   f r a m es   a n d   l e a v i n g   d i s c e r n i b l e   e v i d e n c e   o f   t h e i r   p r e s e n c e   i n   t h e   i m a g e s .   C o n v e r s el y ,   E R GA N   f a l ls   s h o r t   i n   d e l i v e r i n g   r ea l i s t i c   a n d   c le a r   i m a g es   w h il e   a t t e m p t i n g   r e m o v a l ,   o c c a s i o n a ll y   l ea v i n g   s u b t l e   t r ac e s   o f   g l as s es   e x i s t e n c e ,   a l b e i t  l es s   p r o m i n e n t   t h a n   t h e  f o r m e r   t w o   m e t h o d s .   I n   s t a r k   c o n t r as t ,   o u r   a p p r o a c h   y i e l d s   r e s u l ts   t h a t   a r e   m a r k e d l y   t r u e   t o   l i f e   a n d   a u t h e n t i c .   T h e  g l a s s e s   f r a m es   a r e  i m p e c c a b l y   r e m o v e d   w i t h o u t   l e a v i n g   a n y   t r a c e s   o r   a n o m a l o u s   i n p a i n t i n g   a r t i f a c ts .   F u r t h e r m o r e ,   t h e   g e n e r a t e d   e y e s   f a i t h f u ll y   r e p l i c a te   t h e   o r ig i n a l   e y e s   f o r   g l a s s es   w it h   c l e ar   l e n s e s .   F o r   g l a s s es   w it h   c o l o u r e d   o r   d a r k   l e n s e s ,   t h e   g e n e r a t e d   e y e s   h a r m o n i ze   s e a m l es s l y   w it h   t h e  o v e r a ll   f a c i al   c o n t e x t ,   e n s u r i n g   a   n a t u r a l   a n d   r e al is t i c  a p p e a r a n c e   i n   t h e   g e n e r a t e d   i m a g e s .   T h i s   p r o n o u n c e d   s u p e r i o r i t y   i n   r e a l is m   a n d   p r e c i s io n   u n d e r s c o r e s   t h e  e f f i c a c y   o f   t h e   p r o p o s e d   R G DM   m o d e l   i n   a c h i e v i n g   h i g h - f i d e l i t y   g l as s e s   r e m o v a l .           Fig u r e  6 .   Qu alitativ e  r esu lts .   C o m p ar is o n   ag ain s t o th e r   s tate - of - th e - ar t   m eth o d s   f o r   g lass es r em o v al  o n   th e  C eleb A  d ataset   Evaluation Warning : The document was created with Spire.PDF for Python.