I nte rna t io na l J o urna l o f   E lect rica l a nd   Co m pu t er   E ng ineering   ( I J E CE )   Vo l.   15 ,   No .   5 Octo b er   20 25 ,   p p .   4 5 8 1 ~ 4 5 9 2   I SS N:  2088 - 8 7 0 8 ,   DOI : 1 0 . 1 1 5 9 1 /ijece. v 15 i 5 . pp 4 5 8 1 - 4 5 9 2           4581       J o ur na l ho m ep a g e h ttp : //ij ec e. ia esco r e. co m   Dy na mic  hea d po se estima tion i n v a ried conditio ns u sing   D lib  a nd  M edia Pipe       Rus na ni  Ya hy a 1, 2 ,   Ro zit a   J a i la ni 1 ,   Nur  K ha lid a h Z a k a ria 1 ,   F a za h Ak ht a H a na pia h 3   1 F a c u l t y   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 i   T e k n o l o g i   M A R A   ( U i T M ) ,   S e l a n g o r ,   M a l a y s i a   2 C e n t e r   f o r   M e d i c a l   El e c t r o n i c   Te c h n o l o g y ,   P o l i t e k n i k   S u l t a n   S a l a h u d d i n   A b d u l   A z i z   S h a h ,   S h a h   A l a m ,   M a l a y s i a   3 F a c u l t y   o f   M e d i c i n e ,   U n i v e r s i t i   T e k n o l o g i   M A R A ,   S u n g a i   B u l o h ,   M a l a y s i a       Art icle  I nfo     AB S T RAC T   A r ticle  his to r y:   R ec eiv ed   Oct  2 9 ,   2 0 2 4   R ev is ed   Ap r   3 0 ,   2 0 2 5   Acc ep ted   J u l 3 0 ,   2 0 2 5       Th is  p a p e p re se n ts  th e   f o rm u lati o n   a n d   v a li d a ti o n   o a   d y n a m ic  h e a d   p o se   e stim a ti o n   (HPE a lg o r it h m ,   a d d re ss in g   c h a ll e n g e re late d   t o   d i v e rse   c o n d i ti o n s,  c o m p le x   p o se s,  a n d   p a rti a o b str u c ti o n s.  Th e   st u d y   a ims   to   c re a te  a   ro b u st   a lg o r it h m   th a t   m a in tai n h ig h   a c c u ra c y   in   re a l - ti m e   a p p li c a ti o n a c ro ss   v a ry i n g   c o n d it io n s.  Th e   a lg o rit h m   wa im p lem e n ted   a n d   a ss e ss e d   u sin g   Dlib   a n d   M e d iaPi p e   m o d e ls.  Th e   stu d y   in v o l v e d   3 0   p a rti c ip a n ts  in   fa c e   a n d   h e a d   wit h o u o b sta c les ,   fa c e   with   o b sta c les   a n d   h e a d   wi th   o b sta c les   c o n d i ti o n s.  Th e   re su lt d e m o n stra ted   imp re ss iv e   p e rfo rm a n c e   in   b o t h   c o n tro ll e d   a n d   s p o n tan e o u h e a d   m o v e m e n c a teg o ries .   Th e   a lg o rit h m   a c h iev e d   a n   a v e ra g e   a c c u ra c y   o 9 3 %   fo r   h e a d   p o se   e stim a ti o n   a n d   8 8 %   in   d e tec ti n g   v isu a a tt e n t io n   u n d e sp o n ta n e o u h e a d   m o v e m e n c a t e g o ries .   c o rre latio n   c o e fficie n t   o f   0 . 8 6 6   i n d ica tes   a   str o n g   p o siti v e   li n e a a ss o c iatio n   b e twe e n   p e rfo rm a n c e   a n d   a tt e n t io n   a c c u ra c y ,   i n d ica ti n g   t h a p e rfo rm a n c e   imp ro v e m e n ts  a re   in tri c a tely   l in k e d   to   p ro p o r ti o n a in c re a se in   a tt e n ti o n   a c c u ra c y .   Ho we v e r,   th is  d o e n o t   n e c e ss a ril y   imp ly   c a u sa ti o n .   Th e   fin d i n g s   p ro v id e   v a l u a b le i n sig h ts i n to   th e   e ffe c ti v e n e ss   o th e   p ro p o se d   a lg o rit h m s in   a ss e ss in g   v isu a l   a tt e n ti o n   a n d   d e m o n stra te  th e ir  p o ten ti a a p p li c a ti o n i n   h e a lt h c a re   m o n it o ri n g ,   e d u c a ti o n a i n terv e n ti o n ,   a n d   d ri v e m o n it o r in g   sy ste m s.  Th e   sig n ifi c a n c e   o th e se   re su lt li e in   th e   a b il it y   t o   a d v a n c e   h u m a n - c o m p u ter  in tera c ti o n ,   e n h a n c e   h e a lt h c a re   d iag n o stics ,   a n d   o ffe r   in n o v a ti v e   so l u ti o n s a c ro ss   v a ri o u s d o m a in s.   K ey w o r d s :   Dlib   Face   d etec to r   Face   lan d m ar k   p r ed icto r   Hea d   p o s esti m atio n   Me d iaPip e   T h is i 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 :   Nu r   Kh alid ah   Z a k ar ia   Facu lty   o f   E lectr ical  E n g in ee r in g ,   Un iv er s iti T ek n o lo g i M A R A   Sh ah   Alam ,   Selan g o r ,   Ma lay s ia   E m ail: n k h alid ah @ u itm . ed u . m y       1.   I NT RO D UCT I O N   R ea l - tim h ea d   p o s esti m atio n   ( HPE)   is   c r u cial  c o m p o n e n in   co m p u ter   v is io n   s y s tem s   d esig n ed   to   in ter p r et  h u m an   atten tio n ,   in clu d in g   ap p licatio n s   s u ch   a s   d r iv er   m o n it o r in g   [ 1 ] [ 4 ] ,   ad ap tiv e - lear n in g   in ter f ac es   [ 5 ] [ 6 ] ,   an d   h u m a n - r o b o in ter ac tio n   [ 7 ] ,   [ 8 ] .   T h ese  s y s tem s   ca n   in f er   en g ag em en an d   atten tio n   lev els  b y   tr ac k in g   h ea d   o r ien t atio n ,   allo win g   f o r   d y n am ic  a n d   r esp o n s iv in ter ac tio n s .   H o wev er ,   ac h iev i n g   h ig h   ac c u r ac y   in   v ar ie d   c o n d i tio n s ,   s u ch   as  ch an g es  in   lig h tin g ,   o cc l u s io n s   s u ch   as  wea r i n g   g lass es  o r   h ats,   an d   s p o n ta n eo u s   h ea d   m o v em en ts ,   r em ain s   tech n ical  ch all en g e.   R ec en s tu d ies  h av p r o p o s e d   d if f er e n m eth o d s   to   ad d r e s s   th ese  ch allen g es  s u ch   as  u s in g   d ee p   lear n in g   with   d ata  a u g m e n tatio n   to   h an d le  d i v er s ex p r ess io n s ,   o r ie n tatio n s   an d   lig h tin g   en v ir o n m en ts   [ 9 ] ,   [ 1 0 ] ,   a p p ly in g   atten tio n   m ec h an is m s   to   f o cu s   o n   k e y   f ac ial  r eg io n s   d esp ite  o cc lu s io n s   [ 1 1 ] ,   [ 1 2 ] ,   em p lo y in g   th r ee - d im en s io n al   ( 3 D)   m o r p h ab le  m o d els  to   im p r o v ac c u r ac y   u n d er   p ar tial  v is ib ilit y   [ 1 3 ] ,   [ 1 4 ] ,   lev er ag i n g   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 7 0 8   I n t J E lec  &   C o m p   E n g ,   Vo l.   15 ,   No .   5 Octo b e r   20 25 :   4 5 8 1 - 4 5 9 2   4582   r o b u s f ac ial  lan d m ar k   d etec tio n   an d   tr ac k in g   f o r   o cc lu s io n   r esil ien ce   [ 1 5 ] ,   [ 1 6 ] ,   i n co r p o r atin g   tem p o r al   m o d els  f o r   h a n d lin g   s p o n tan e o u s   m o v em e n ts   [ 1 7 ] ,   a n d   co m b in in g   m u lti - m o d al  d ata  s u ch   as  r ed - g r ee n - b lu e   ( R GB )   an d   d ep th   f o r   en h an ce d   r o b u s tn ess   [ 1 8 ] ,   [ 1 9 ] .   So m e   alg o r ith m s   em p lo y   ad v a n ce d   m ac h in lear n in g   tech n iq u es  to   ac c u r ately   d eter m in an   o r ien tatio n   o f   u s er   h e ad   b y   an aly zin g   f ac ial  f e atu r e s   f r o m   v id eo   i n p u t   [ 2 0 ] ,   [ 2 1 ] .   T h ca p ab ilit y   is   v ital  f o r   e n h an ci n g   i n ter ac tiv s y s tem s ,   s u ch   as  ed u ca tio n al  tech n o lo g ies  an d   s o p h is ticated   m o n ito r in g   s y s tem s   [ 2 2 ] ,   wh e r u n d e r s tan d in g   g az d ir ec tio n   an d   h e ad   o r ien tatio n   ca n   s ig n if ican tly   im p r o v s y s tem   r esp o n s iv en ess   an d   p er s o n a lizatio n   [ 2 3 ] .   W h ile  th s tu d ies  d em o n s tr ated   p r o m is in g   r esu lts ,   m an y   r elie d   o n   co n tr o lled   en v ir o n m en ts   o r   r eq u ir ed   s p ec ialized   h ar d war e,   s u ch   as  d ep th   ca m er as  o r   m u ltip le  s en s o r s   [ 2 4 ] .   T h is   lim ited   th eir   p r ac ticality   in   r ea l - wo r ld   s ce n ar io s   an d   en ab led   m o r e   r ef in ed   a n d   ac cu r ate  u s er   in t er ac tio n   ca p ab ilit ies.  Desp ite  s u b s tan tial   ad v an ce m en ts   in   th f ield ,   cr itical   r esear ch   g ap s   r em ain .   No tab l y ,   f ew  s tu d y   h av ex p lo r e d   h ea d   p o s esti m atio n   r ely in g   s o lely   o n   R GB   v id eo   u n d er   d i v er s an d   u n c o n s tr ain ed   r ea l - wo r ld   co n d itio n s   [ 2 5 ] .   Ad d itio n ally ,   th r o b u s tn ess   o f   ex is tin g   m eth o d s   ag ain s p ar tial  o cc lu s io n s   an d   s p o n tan eo u s   h ea d   m o v em en ts   h as  n o b ee n   s u f f icien tly   v alid ated   [ 2 6 ] Mo r eo v er ,   d ir ec in teg r atio n   o f   h ea d   p o s esti m atio n   with   atten tio n   d etec tio n   u s in g   l o co s h ar d war r em ain   lim ited   [ 2 7 ] ,   in d icatin g   a   n ee d   f o r   f u r th er   in v esti g atio n .   T h is   s tu d y   ad d r ess es  th ese  g ap s   b y   p r o p o s in g   d y n am ic  HPE  alg o r ith m   th at  in teg r ate s   Dlib   an d   Me d iaPip m o d els,  ev alu ate d   u n d er   r ea l - tim co n d itio n s   u s in g   s tan d ar d   R GB   web ca m .   T h p r o p o s ed   m eth o d   d em o n s tr ates   ef f ec tiv en ess   ac r o s s   th r ee   co n d itio n s i)   f ac a n d   h ea d   with o u t   o b s tacle s ,   ii)  f ac e   with   o b s tacle s   s u ch   as  th p r esen ce   o f   g lass es ,   an d   iii)  h ea d   p a r tially   o b s tr u cted   b y   wea r in g   h at,   u n d er   b o th   co n tr o lled   a n d   s p o n tan eo u s   h e ad   m o v e m en ts   co n d itio n s .   T h k ey   c o n tr ib u tio n s   o f   th is   s tu d y   ar e   as  f o llo ws:   a   d ev elo p m e n o f   a   r o b u s t,   lo w - co s h ea d   p o s e   esti m atio n   m et h o d   u tili zin g   f ac ial  lan d m ar k s   an d   E u le r   a n g les;   an   ex p er im en tal  d esig n   t h at  i n co r p o r ates  b o t h   c o n tr o lled   a n d   s p o n tan eo u s   h ea d   m o v em en ts   u n d e r   v a r y in g   o b s tacle   co n d itio n s d etailed   an aly s is   o f   v is u al   atten tio n   th r o u g h   h ea d   p o s esti m atio n   ac cu r ac y a n d   a   co r r elatio n   a n aly s is   b etwe en   p er f o r m a n ce   an d   atten tio n   d etec tio n   ac cu r ac y .   T h r est  o f   th p ap er   is   s tr u ctu r ed   as  f o llo ws:   s ec tio n   2   o u tlin es  th m eth o d o lo g y ,   in clu d in g   alg o r ith m   d ev elo p m en t   an d   e x p er im en tal  s etu p .   Sectio n   3   p r esen ts   an d   d is cu s s es  r esu lts   r eg ar d in g   d etec tio n   ac cu r ac y ,   v is u al  atten tio n ,   a n d   co m p a r is o n s   with   r elate d   w o r k s .   Sectio n   4   co n cl u d es  with   im p licatio n s   an d   r ec o m m en d atio n s   f o r   f u tu r r e s ea r ch .       2.   M E T H O D   T h is   s ec tio n   f o llo ws  s tr u ctu r ed   a p p r o ac h   as   illu s tr ated   in   Fig u r 1 ,   to   s y s tem atica lly   d e s cr ib th e   r esear ch   p r o ce s s   in   r ep r o d u c ib le  an d   lo g ical  s eq u en ce .   Fo u r   s tep s   n am ely   alg o r ith m   d e v e lo p m en t,  h ar d war e   s etu p ,   d ata  co llectio n ,   an d   d a ta  an aly s is ,   ar d escr ib ed   in   d etail,   ac co m p an ie d   b y   p r o p e r   ju s tific atio n s   an d   s tan d ar d   p r o ce d u r es.  T h alg o r ith m   d ev elo p m en an d   h a r d war s etu p   s u b s ec tio n s   p r o v id co m p r eh en s iv e   ex p lan atio n   o f   all  to o ls   an d   te ch n o lo g ies  u tili ze d   in   th is   r esear ch .   T h e   ex p er i m en tal  s etu p s   wer d esig n ed   to   r ef lect  r ea l - wo r ld   c o n d itio n s   th u s ,   ad d r ess in g   th e   id en tifie d   g ap s   f o r   m ea n in g f u l f in d in g s .           Fig u r 1 .   d etailed   s tep - by - s tep   d escr ip tio n   o f   th r esear ch   p r o ce d u r e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J E lec  &   C o m p   E n g     I SS N:   2088 - 8 7 0 8         Dyn a mic  h ea d   p o s esti ma tio n   in   va r ied   co n d itio n s   u s in g   D lib   a n d   Med ia P ip e   ( R u s n a n i Y a h ya )   4583   2 . 1 .   Alg o rit hm   dev elo p m ent   Op en C is   f r ee   an d   o p en - s o u r ce   lib r ar y   f o r   co m p u ter   v is io n   a n d   m ac h in e   lear n in g ,   o f f er in g   in ter f ac es  f o r   m u ltip le  p r o g r am m in g   lan g u ag es,  in clu d in g   C /C ++ ,   Py th o n ,   J av a,   an d   MA T L AB .   I is   co m p atib le  with   W in d o ws,  L in u x ,   An d r o id ,   an d   Ma OS  p latf o r m s .   W ith   m o r th a n   2 , 5 0 0   alg o r ith m s   f o r   co m p u ter   v is io n   a n d   m ac h in e   lear n in g ,   th lib r ar y   in clu d es   f u n ctio n alities   f o r   task s   lik f ac d etec tio n   an d   r ec o g n itio n   [ 2 8 ] [ 3 1 ] .   Dlib   i s   co m m u n ity - d r iv en   C ++   lib r ar y   th at  o f f er s   v ar iety   o f   to o ls   f o r   m ac h in e   lear n in g ,   c o m p u ter   v is io n ,   an d   im ag p r o ce s s in g .   I t   in clu d es f u n ctio n alities   f o r   d ev el o p in g   co m p lex   s o f twar e,   s u ch   as  f ac ial  la n d m ar k   d etec tio n ,   o b ject  d etec tio n   an d   d ee p   lear n i n g - b ased   task s .   Dlib   is   wid ely   u tili ze d   ac r o s s   v ar io u s   f ield s ,   in clu d in g   r o b o tics ,   m o b ile  d ev ices,  an d   h ig h - p er f o r m a n ce   co m p u tin g   en v ir o n m en ts   [ 3 2 ] ,   [ 3 3 ] E s s en tial  HPE  s y s tem   d ev el o p m e n lib r a r ies  in cl u d Op e n C f o r   im ag e   p r o ce s s in g ,   Dlib   f o r   f ac ial  lan d m ar k   d etec tio n ,   Nu m Py   f o r   m ath em atica c o m p u tatio n s ,   an d   Me d iaPip f o r   r ea l - tim m ac h in lear n in g   ac r o s s   m u ltip le  m o d alities .   T h tim lib r ar y ,   C SV  m o d u le,   Date T im e,   an d   OS  also   aid   d ata  lo g g in g ,   tim e   h an d lin g ,   an d   s y s tem   in ter ac tio n s .   Fig u r 2   s h o ws  th e   f o u r   k ey   s tag es  o f   th e   HPE,   wh ich   in v o lv u s in g   Dlib   an d   Me d iaPip m o d els.  T h p r o ce s s   s tar ts   with   Dlib ' s   f ac d etec to r   a n d   p r ed ict o r ,   wh ich   ar a p p lied   to   id en tif y   f ac ial   lan d m ar k s .   Nex t,  Me d iaPip is   u til ized   to   ca lcu late  th 3 o r ien tatio n   o f   th h ea d   [ 3 4 ] .   T h th ir d   s ta g in v o lv es  s o lv in g   th p er s p ec tiv e - n - p o in ( Pn P)   p r o b lem   to   o b tain   r o tatio n   a n d   tr a n s latio n   v ec to r s   [ 3 5 ] .   Fi n ally ,   th ese  v ec to r s   ar tr an s f o r m e d   in to   E u ler   an g les,  d eter m in in g   th e   d ir ec tio n   o f   th h ea d   p o s e.           Fig u r 2 .   Fo u r   s tag es o f   th e   h e ad   p o s esti m atio n   ( HPE)       Face   d etec to r   an d   lan d m a r k   p r ed icto r   ar tr ai n ed   m o d els  d is tr ib u ted   b y   Dlib   th at  d ete ct  d is tin ct   f ac ial  lan d m ar k s .   I n   r ea l - tim e ,   th e   f ac m esh   m o d el  will  c o m p lete  th e   f ac e   m ap p in g   with   an   esti m ated   4 7 8     3 - d im en s io n al  la n d m ar k s .   T h e   Pn p r o b lem   is   class ic  p r o b lem   in   th f ield   o f   v is u al  co m p u tin g .   T h ca m e r a   p o s is   d eter m i n ed   u s in g   a   s e o f   3 p o in ts   f r o m   th wo r ld   co o r d in ate  s y s tem   a n d   th eir   co r r esp o n d in g   two - d im en s io n al  ( 2 D)   p r o jectio n s   o n   th im ag p lan e .   I n   HPE ,   th 3 p o in ts   r ep r esen f ac ial  lan d m ar k s   with   p r ed ef in e d   p o s itio n s ,   wh ile  th 2 p o in ts   r ef e r   to   th eir   id en tifie d   p o s itio n s   in   th i m ag e.   T h r o tatio n   v ec to r   is   co m p ac r ep r esen tatio n   o f   th r o tatio n .   I u s es  R o d r ig u es'  r o tatio n   f o r m u la  to   r ep r esen 3 r o tatio n   b y   s in g le  v ec to r   r ath e r   th an   m at r ix .   T h d ir ec tio n   o f   th is   v ec t o r   in d icate s   th r o tatio n   ax is ,   wh ile  its   m ag n itu d s ig n if ies  th r o tatio n   an g le,   m ea s u r ed   in   r ad ia n s .   T h tr an s l atio n   v ec to r   d escr ib es  th o b je ct's  p o s itio n ,   in   th is   ca s e,   th h ea d ,   r elativ to   th ca m er a.   I in d icate s   h o f ar   an d   in   wh ich   d ir ec tio n   th e   o b ject  is   f r o m   th e   ca m er in   3 s p ac e.   T h r o ta tio n   m atr ix   is   3 × 3   m atr ix   th at  co m p r eh en s iv ely   r ep r esen ts   r o tatio n .   I ca n   b e   d er iv ed   f r o m   th r o tatio n   v ec to r   u s in g   R o d r ig u es'   f o r m u la  an d   is   u s ed   to   tr an s f o r m   co o r d in ates  f r o m   o n e   s p ac to   an o t h er .   T h r o tatio n   m atr ix   R   ca n   b e   d ec o m p o s ed   i n to   th r ee   E u ler   a n g les:   p itch   ( r o tatio n   ar o u n d   th e   x - ax is ) ,   y aw  ( r o tatio n   a r o u n d   t h y - ax is ) ,   a n d   r o ll  ( r o tatio n   a r o u n d   th z - a x is ) ,   wh ich   p r o v i d m o r i n tu itiv r ep r esen tatio n   o f   o r ie n tatio n .     2 . 2 .     H a rdwa re   s et up   T h ex p er im en u tili ze d   h ig h - d ef in itio n   1 0 8 0 p   2 - m eg a p ix el  web ca m ,   p r o d u ce d   b y   AUKE with   1 /2 . 9   C MO im ag e   s en s o r   a n d   in teg r ated   s ter eo   m icr o p h o n es.  T h e   f r am e   r ate  was  3 0   f r am es  p er   s ec o n d   ( f p s ) .   T h s y s tem   s p ec if icatio n s   f o r   r u n n in g   t h p r o g r a m   in clu d ed W in d o ws  1 1   ( 6 4 - b it),   1 3 th   Gen   I n tel( R )   C o r e   ( T M)   i7 - 1 3 7 0 0 HX  C PU,  an d   1 6 . 0 0   GB   o f   m em o r y .   Fig u r 3   illu s tr ates  th e x p er i m en tal  s etu p ,   wh er e   h i g h - r e s o lu tio n   web ca m   is   em p l o y ed   to   d etec an d   r ec o r d .   T h e   web ca m   is   in teg r ated   in to   th e   s y s tem   f r am ewo r k   to   en s u r e   en h an ce d   HPE.   T h r o u g h o u t   th e   ex p er im en t,  th co m p u ter   is   co n n ec ted   to   th web ca m   to   m o n ito r   an d   tr ac k   th p r o g r ess .   No tice  th at  th b u ilt - in   co m p u ter   web ca m   is   n o u s ed   d u e   to   its   lo wer   r eso lu tio n .   c h air   is   p o s itio n ed   in   f r o n o f   th e   ca m er a   to   f ac ilit ate  s u b ject  p ar ticip atio n .   Su b jects  ar in s tr u cted   to   s it  co m f o r tab l y   in   th ch air   b e f o r b e g in n in g   th e   s tu d y .   Ma in tain in g   d is tan ce   o f   0 . 5   m eter s   o r   less   b etwe en   th ch air   an d   th ca m er is   cr u cial  to   en s u r p r ec is f ac d etec tio n .   T h is   d is tan ce   p ar am eter   is   ca r ef u lly   s elec ted   to   o p tim ize   s y s tem   p er f o r m an ce .   T h e   r esear ch er   o v er s ee s   th s tu d y s   p r o g r ess   u s in g   th e x ter n al  web ca m .     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 7 0 8   I n t J E lec  &   C o m p   E n g ,   Vo l.   15 ,   No .   5 Octo b e r   20 25 :   4 5 8 1 - 4 5 9 2   4584       Fig u r 3 .   E x p er im e n t setu p   f o r   p er f o r m in g   h ea d   p o s esti m atio n   ( HPE)       2 . 3 .     Da t a   c o llect io n   T h ir ty   s tu d e n ts   f r o m   Po l y tech n ic  Su ltan   Salah u d d in   Ab d u Aziz   Sh ah   ( PS SAAS),   Sh ah   Alam ,   ag ed   1 9   an d   2 7 ,   p ar ticip ated   in   th is   s tu d y .   I n s titu tio n al  a p p r o v al  was  o b tain ed ,   an d   wr itten   co n s en ( R E C 4 /2 0 2 0 /B Pin d .   2 ( 2 0 2 0 ) )   was  tak en   f r o m   all  s u b jects .   T wo   ca teg o r ies  o f   d ata  co llectio n   wer co n d u cte d   f o r   ea ch   s u b ject.   First,  th co n tr o lled   ca teg o r y   wh er th e   s u b ject  p er f o r m e d   co n tr o lled   h ea d   m o v em en ts   ac co r d in g   to   th e   in s tr u ctio n s   b y   th r esear ch er .   I n   th s ec o n d   p h ase,   th s u b ject  ca r r ied   o u t   s p o n tan eo u s   h ea d   m o v em en ts .   B o th   ca teg o r ies  wer e v alu at ed   u n d er   th r ee   d is tin ct  co n d itio n s f ac a n d   h ea d   with o u o b s tacle s ,   f ac with   o b s tacle s ,   an d   h ea d   with   o b s tacle s .   E ac h   co n d itio n   i n v o lv e d   r ea l - tim h ea d   p o s d etec tio n   s ess io n   last in g   ap p r o x im ately   3 0 0   s ec o n d s ,   d u r in g   w h ich   th r ee   t y p es   o f   o u tp u ts   wer s im u ltan eo u s ly   g en er ated v id eo   r ec o r d in g ,   ex tr ac ted   im ag e s ,   an d   co r r esp o n d in g   C SV  f il es  co n tain in g   h ea d   p o s d ata.   I n   th e   co n tr o lled   ca teg o r y ,   th s u b jects  wer ask ed   t o   s it  co m f o r ta b ly   o n   th e   p r o v id e d   ch air .   T h e   r esear ch er   in s tr u cte d   th e   s u b je cts  to   p er f o r m   h ea d   m o v em e n ts   o n ce   t h s y s tem   p r o g r am   was  in itiated Du r in g   th is   ca teg o r y ,   f iv s p ec if ic  h ea d   m o v em e n ts   wer r ec o r d ed ,   e ac h   last in g   b etwe en   2 0   an d   3 0   s ec o n d s ,   r esu ltin g   in   th co llectio n   o f   m o r th a n   6 0   d ata   p o in ts .   Su b jects  wer e   in s tr u cted   to   o r ien th eir   h ea d   f o r war d ,   u p war d ,   d o wn war d ,   a n d   to   t h r ig h t   an d   lef t,  with   h o r izo n tal  r o tatio n s   ex ce ed in g   7 5   d eg r ee s   an d   v er tical  tilt s   ex ce ed in g   4 5   d eg r ee s .   Su b je cts  f o llo wed   s tr u ctu r e d   s eq u en ce b e g in n in g   b y   f ac in g   f o r war d   ( 0 °),   t h en   s lo wly   tilt ed   th eir   h ea d s   u p war d   to   f u ll  tilt   o f   4 5 °.  Af ter war d s ,   th ey   tilt ed   th eir   h ea d s   d o wn war d   to   f u ll  tilt   o f   - 4 5 °.  T h n ex s tep   r eq u ir e d   th em   to   tu r n   t h eir   h ea d s   to   t h r ig h u n til  r ea c h in g   tilt   o f   - 7 5 °,  an d   f in ally ,   th ey   tu r n ed   th eir   h ea d s   to   th lef to   m ax im u m   tilt   o f   7 5 ° .   I n   th s ec o n d   ca teg o r y ,   s u b jects  co u ld   m o v th eir   h ea d s   f r ee ly   in   f r o n t o f   th ca m er f o r   1 2 0   s ec o n d s   with o u an y   s p ec if ied   d ir ec tio n al  co n s tr ain ts .   T h f lo wch ar in   Fig u r 4   ill u s tr ates  d etec tin g   an d   esti m atin g   h ea d   p o s u s in g   an   R GB   ca m er a,   Dlib s   f ac d etec to r   an d   Me d i aPip e’ s   f ac m esh .   T h p r o ce s s   s tar t s   with   th ca m er d etec tin g   f ac e.   On ce   a   f ac is   d etec ted ,   Dlib   is   em p lo y ed   to   lo ca te  th f ac ial  f ea tu r es.  Me d iaPip f ac m esh   d etec ts   lan d m ar k s ,   co n tr ib u tin g   to   d eter m in in g   th o r ien tatio n   o f   th h ea d .   T h alg o r ith m   th en   d eter m in es   wh eth er   th h ea d   p o s is   in   th s p ec if ied   p o s itio n .   I f   th h ea d   p o s is   d etec ted ,   th s y s tem   ev alu ates  th d ir ec tio n   in   wh ich   th h ea d   is   o r ien ted .   Dep en d i n g   o n   th e   d ir ec tio n ,   th e   ap p r o p r iate  tex is   d is p lay ed “L o o k i n g   Up   f o r   h ea d   u p war d ,   “L o o k in g   Do wn ”  f o r   h ea d   d o wn war d ,   “Fo r war d   f o r   h ea d   f o r war d ,   “L o o k in g   R ig h t”  f o r   h ea d - tu r n in g   r ig h t,   an d   “L o o k in g   L ef t”  f o r   h ea d - tu r n in g   lef t.  I f   th f ac is   n o in   an y   tr u p o s itio n ,   th s y s tem   d is p lay s   th tex “Fac n o d etec ted ”.   Af ter   d e ter m in in g   th h ea d   o r ien tatio n ,   th s y s tem   s av es  th o u tp u im ag e,   v id e o   an d   C SV  d ata,   wh ich   ar lik ely   to   co n tain   d etails  o f   th d etec ted   h ea d   p o s es.  T h p r o ce s s   th en   co n clu d es  an d   is   r ea d y   to   s tar t o v er   with   n ew  d etec tio n s .     2 . 4 .     Da t a   a na ly s is   T h ef f ec tiv en ess   o f   th s y s te m   is   ass e s s ed   b ased   s o lely   o n   th ac cu r ac y   p er ce n tag e .   I is   im p o r tan t   to   n o te  th at   th p r ed icted   d ata   o u tp u t   b y   th s y s tem   m ay   n o alwa y s   b en tire ly   ac c u r ate,   p ar ticu lar ly   wh en   th h ea d   tu r n   r em ain s   with i n   n a r r o r an g e   o f   d eg r e es.  No n eth eless ,   th s y s tem   ca teg o r izes   th ese   m o v em en ts   as  u p ,   d o wn ,   f o r war d ,   r ig h t,  o r   lef t   h ea d   d ir ec tio n .   T o   f u r th er   e v alu ate  th e   p er f o r m an ce   o f   t h s y s tem ,   th r esu lts   wer class i f ied   b ased   o n   f o u r   s tan d ar d   m etr ics:   tr u p o s itiv ( T P),   f alse  p o s itiv ( FP ) ,   tr u e   n eg ativ es  ( T N)   an d   f alse  n eg ativ es  ( FN) .   m an u al  v er if icatio n   p r o ce s s   was  co n d u cted   b y   co m p ar in g   th e   p r ed icted   h ea d   d ir ec tio n   b y   th s y s tem   ag ain s th ac tu al  h e ad   d ir ec tio n   r ec o r d ed   in   th v i d eo .   Su b s eq u en tly ,   th p er f o r m an ce   ac cu r ac y   f o r   ea ch   s u b ject  was  ca lcu lated   a s   th p er ce n tag o f   tr u d etec t io n s   r elativ to   th e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J E lec  &   C o m p   E n g     I SS N:   2088 - 8 7 0 8         Dyn a mic  h ea d   p o s esti ma tio n   in   va r ied   co n d itio n s   u s in g   D lib   a n d   Med ia P ip e   ( R u s n a n i Y a h ya )   4585   to tal  n u m b er   o f   d etec tio n s ,   i n clu d in g   b o t h   co r r ec a n d   i n co r r ec p r ed ictio n s ,   ac r o s s   al co n d itio n s .   T h d ef in itio n s   o f   ea c h   m etr ic  ar s u m m ar ized   in   T a b le  1 .   T h ese  m etr ics  p r o v id a   d etailed   v ie o f   th d etec tio n   s y s tem   ca p ab ilit ies an d   h elp   id en tify   s p ec if ic  er r o r s   co n tr i b u t in g   to   o v er all  ac cu r ac y   an d   s y s tem   r o b u s tn ess .           Fig u r 4 .   Flo wch ar o f   h ea d   p o s esti m atio n   d ata  co llectio n       T ab le  1 .   Def in itio n s   o f   T P,  FP ,   T an d   FN f o r   h ea d   p o s est im atio n   ev alu atio n   C a t e g o r y   D e f i n i t i o n   Tr u e   P o s i t i v e   ( TP)   Th e   sy s t e m   c o r r e c t l y   i d e n t i f i e t h e   h e a d   p o se ,   ma t c h i n g   t h e   a c t u a l   d i r e c t i o n .   F a l se   P o s i t i v e   ( F P )   Th e   sy s t e m   i n c o r r e c t l y   p r e d i c t s   a   h e a d   p o s e   t h a t   d i d   n o t   o c c u r .   Tr u e   N e g a t i v e   ( TN )   Th e   sy s t e m   c o r r e c t l y   r e c o g n i z e s   t h a t   n o   c h a n g e   i n   h e a d   p o se  o c c u r r e d   w h e n   t h e r e   w a s   n o   s i g n i f i c a n t   m o v e m e n t .   F a l se   N e g a t i v e   ( F N )   Th e   sy s t e m   f a i l t o   d e t e c t   a n   a c t u a l   h e a d   p o se ,   c l a ss i f y i n g   i t   i n c o r r e c t l y   o r   mi ssi n g   i t   a l t o g e t h e r .       T h p er f o r m an ce   o f   th s y s tem   was  ev alu ated   b ased   o n   th ac cu r ac y   m etr ic.   Acc u r ac y   is   th e   p r o p o r tio n   o f   co r r ec p r e d ictio n s ,   in clu d in g   tr u p o s itiv es  ( T P)  an d   tr u n eg ativ es  ( T N) ,   r elativ to   th to tal  n u m b er   o f   p r ed ictio n s .   I t is ca lcu lated   u s in g   ( 1 )       = (  +  ) / (  +  +  +  )     ( 1 )     T h is   m etr ic  r ef lects  th o v er al co r r ec tn ess   o f   th h ea d   p o s esti m atio n   s y s tem   ac r o s s   all  co n d itio n s   an d   p ar ticip an ts .   On   th o th er   h an d ,   ac cu r ate  d etec tio n s   ar e   wh er th p r ed ictio n   b y   th s y s tem   co r r esp o n d s   with   th e x ac p o s e,   th u s   en h an cin g   t h ac c u r ac y   o f   th e   s y s tem .   T h p er f o r m an ce   ac cu r ac y   r elate d   to   v is u al  atten tio n   will  also   b ca lcu la ted   an d   v is u alize d ,   p r o v id in g   in s ig h ts   in to   th v is u al  atte n tio n   lev els  u n d er   d if f er en co n d itio n s .   Vis u al  atten tio n   was  q u an tifie d   b y   c alcu latin g   th p r o p o r tio n   o f   f o r war d   h ea d   p o s d etec tio n s   ( , )   r elativ to   th to tal   n u m b er   o f   d etec tio n s   ( , )   r ec o r d ed   b y   th s y s tem .   Vis u al   atte n tio n   was  co m p u ted   u s in g   ( 2 ) :   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 7 0 8   I n t J E lec  &   C o m p   E n g ,   Vo l.   15 ,   No .   5 Octo b e r   20 25 :   4 5 8 1 - 4 5 9 2   4586         = ( ,   /   , ) × 100   ( 2 )     T h ese  m etr ics  wer u s ed   to   q u an tify   th in d i v id u al  lev el  o f   v is u al  atten tio n   d u r in g   e x p er im en tal  s ess io n s .   T h is   m eth o d   was  ch o s en   d u e   to   its   lo co m p u tatio n al  co s an d   r ea l - tim ef f icien cy ,   m ak in g   it  id ea f o r   p r ac tical  ap p licatio n s .   Un lik d ee p - lear n i n g - b ased   ap p r o ac h es  th at  r eq u ir lar g d atasets   an d   h ig h   p r o c ess in g   p o wer ,   o u r   alg o r ith m   lev e r a g es  f ac ial  lan d m a r k s   an d   E u ler   an g les  f o r   ac cu r ate   an d   r o b u s h ea d   p o s e   esti m atio n   u s in g   s im p le  web ca m   s etu p .       3.   RE SU L T S AN D I SCU SS I O N   T h is   s tu d y   aim ed   to   d ev elo p   a   r ea l - tim h ea d   p o s esti m atio n   s y s tem   u s in g   Dlib   an d   Me d i aPip th at  r em ain s   ef f ec tiv u n d e r   v ar i o u s   h ea d   m o v em en co n d itio n s   an d   f ac ial  o b s tr u ctio n s .   I n   th is   s tu d y ,   th ir ty   s tu d en ts   p ar ticip ated .   T wo   ca teg o r ies  o f   d ata  co llectio n   w er co n d u cted   f o r   ea c h   s u b je ct:  co n tr o lled   h ea d   m o v em en a n d   s p o n tan eo u s   h ea d   m o v em e n t.  Nex t,  b o th   ca teg o r ies  wer ev alu ated   u n d e r   th r ee   co n d itio n s :   f ac an d   h ea d   with o u o b s tacle s ,   f ac with   o b s tacle s ,   an d   h ea d   with   o b s tacle s .   Fu r th er ,   t h is   s ec tio n   p r o v id es  an   in - d ep t h   an aly s is   o f   th s tu d y   d ata  to   ac h ie v th at  o b jecti v e.   T o   ev al u ate  th v alid ity   o f   th alg o r ith m ,   t h an aly s is   f o cu s es  o n   th ac cu r ac y   r ate,   wh ich   is   ca teg o r ized   in to   co n tr o lled   a n d   s p o n tan e o u s   h ea d   m o v em en ts .   Ad d itio n ally ,   th e f f ec tiv en ess   o f   th alg o r ith m   i n   d etec tin g   v is u al  atten tio n   will a ls o   b an aly ze d     3 . 1 .     Co ntr o lled  hea d m o v e ment   I n   th is   ex p er im en t,   th e   s u b je cts  wer d ir ec ted   to   m o v t h eir   h ea d s   to   ac h iev e   f iv e   s p e cif ic  h ea d   o r ien tatio n s   g r ad u ally .   T h e   r e s u lts   s h o wn   in   Fig u r 5   illu s tr ate  th at  th e   av er a g p er f o r m an ce   was  h i g h est,  r ea ch in g   9 9 %,  in   co n d itio n s   wh er b o th   th f ac an d   h ea d   wer v is ib le  with o u o b s tacle s .   T h ac cu r ac y   d ec r ea s ed   s lig h tly   t o   9 8 in   b o th   f ac e   an d   h ea d   with   o b s tacle   co n d itio n s ,   in d icatin g   th at   o b s tacle s   m ar g in ally   im p ac ted   th e   o v er all  p e r f o r m an ce   b u m ai n tain ed   h ig h   ac cu r ac y   lev els  ac r o s s   all  c o n d itio n s .   T h s lig h d ec r ea s in   ac cu r ac y   h a p p en s   b ec au s o b s tacle s   ca n   b l o ck   lig h t,  ca u s in g   s h a d o ws  o r   u n e v en   lig h tin g   o n   th e   f ac e,   wh ich   m a k es  it  h ar d er   f o r   th s y s tem   to   r ec o g n ize   h e ad   p o s itio n s   co r r ec tly .   E v e n   s o ,   th s y s tem   s till   s h o ws a  p r o m in e n t le v el  o f   ef f icien cy .           Fig u r 5 .   Av e r ag o f   p er f o r m a n ce   ac cu r ac y   in   th c o n tr o lled   h ea d   m o v em en t c ateg o r y       3 . 2 .     Sp o nta neo us   hea d m o v e m ent   T h is   s ec tio n   will  ex am in e   th r esu lts   o f   an   ex p e r im en in   w h ich   s u b jects  m o v th ei r   h ea d   f r ee ly   an d   u n p r e d ictab ly   with o u an y   s p ec if ic  g u id an ce .   T h ex p er i m en was  r ep ea ted   th r ee   ti m es  u n d er   d if f er e n t   co n d itio n s : f ac a n d   h ea d   with o u t o b s tacle s ,   f ac with   o b s tacle s ,   an d   h ea d   with   o b s tacle s .   Fig u r 6   s h o ws  th a v er ag p er f o r m an ce   ac cu r ac y   in   p er ce n tag es  o f   th s y s tem   u n d e r   d if f er e n t   co n d itio n s f ac an d   h ea d   with o u o b s tacle s ,   f ac with   o b s tacle s ,   an d   h ea d   with   o b s tacle s .   T h h ig h est   ac cu r ac y   o f   9 0 % is   o b s er v e d   wh en   th er ar n o   o b s tacle s ,   in d icatin g   o p tim al  p er f o r m an c with   clea r   v is ib ilit y   o f   th e   f ac e   an d   h ea d .   T h ac c u r ac y   d ec r ea s es  s lig h tly   to   8 7 wh en   o b s tacle s   ar p r esen o n   th e   f ac e,   s u ch   as  g lass es,  an d   f u r th er   to   th e   h ea d   with   o b s tacle s ,   s u ch   as  a   ca p .   Desp ite  th ese  r e d u ctio n s ,   th s y s tem   m ain tain s   h ig h   ac cu r ac y ,   d em o n s tr atin g   r o b u s tn ess   in   v ar io u s   r ea l - w o r ld   s ce n ar io s .   T h s lig h d r o p   in   ac cu r ac y   with   f ac o b s tacle s   s u g g ests   th at  t h ese  m ig h h in d e r   lan d m a r k   d etec tio n   m o r t h an   h ea d   o b s tacle s .   Su d d en   h ea d   m o v em en ts   o r   p o o r   lig h tin g   c o n d itio n s   also   af f ec ted   lan d m ar k   d etec tio n .   T h ese  lim itatio n s   h ig h lig h th n ee d   f o r   f u r th e r   r e f in em en t,   s u ch   as  in co r p o r atin g   m u lti - v iew   c am er as  o r   tr ain in g   with   a   m o r d i v er s d ataset.   Ov er all,   8 8 o f   th ac c u r ac y   f o r   s p o n tan eo u s   h ea d   m o v em en ca teg o r ies  i n d icate d   t h at  t h s y s tem   is   h ig h ly   r eliab le.   Sti ll,  f u tu r im p r o v e m en ts   co u ld   f o cu s   o n   in c r ea s in g   ac cu r ac y   in   th p r esen ce   o f   o b s tacle s   to   f u r th er   en h an ce   p er f o r m an ce .     99 98 98 0 20 40 60 80 100 F ac e  &   he ad  w i t ho ut  o bs t ac l e s F ac e  wi t o bs t ac l e s H e ad  w i t o bs t ac l e s P e r f o r m an c e  Ac c ur ac y   ( %) C o nd i t i o n Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J E lec  &   C o m p   E n g     I SS N:   2088 - 8 7 0 8         Dyn a mic  h ea d   p o s esti ma tio n   in   va r ied   co n d itio n s   u s in g   D lib   a n d   Med ia P ip e   ( R u s n a n i Y a h ya )   4587   Fig u r 7   p r esen ts   p er f o r m a n ce   ac cu r ac y   in   p er ce n ta g es  f o r   h ea d   p o s esti m atio n   ac r o s s   th ir ty   s u b jects,  S1   to   S3 0 ,   in   th r ee   co n d itio n s .   T h e   f ac e   an d   h e ad   with o u t   o b s tacle s   ca teg o r y   co n s is ten tly   s h o w   h ig h er   p er f o r m an ce   ac r o s s   m o s s am p les  th an   th o th er   two   co n d itio n s ,   with   m an y   s co r es  n ea r in g   o r   ex ce ed in g   9 0 %.  T h is   d em o n s tr ates  th at  th s y s tem   r eliab ly   d etec ts   b o th   f ac an d   h ea d   with   n o   o b s tr u ctio n s ,   ex h ib itin g   s tab le  an d   co n s is ten r esu lts .   T h s co r es  in   th is   c ateg o r y   ar tig h tly   g r o u p ed ,   in d icatin g   p r ed ictab l e   an d   d e p en d a b le  p er f o r m an ce   in   ex p licit,  o b s tacle - f r ee   s itu atio n s .   T h f ac with   o b s tacle s   ca teg o r y   s h o ws  m o r v ar iatio n   in   s co r es,  r an g in g   f r o m   as  lo as  8 0   in   s o m e   ca s es,  s u ch   as  S4 ,   S5 ,   an d   S1 7 ,   to   h ig h e r   v alu es  in   o th er s   lik S1 ,   S2 0 ,   a n d   S2 3 .   Per f o r m an ce   d r o p s   s ig n if ican tly   f o r   s o m s u b ject s   lik S1 0 ,   S1 7 ,   an d   S2 7 ,   in d icatin g   th at  o b s tacle s   af f ec f ac d etec tio n   m o r th an   h ea d   d etec tio n .   T h is   s u g g ests   th at  f ac d etec tio n   is   s u s ce p tib le  to   v is u al  o b s tr u ctio n s ,   lead in g   to   lo wer   ac cu r ac y   th an   in   o b s tacle - f r ee   s itu atio n s .   Ho wev er ,   7   o f   th 3 0   s u b jects  s u ch   as  S1 ,   S2 ,   S 1 6 ,   S2 0 ,   S2 3 ,   S2 6 ,   an d   S2 8   ac h iev ed   h i g h er   ac c u r ac y   in   th f ac with   o b s tacle s   co n d itio n ,   lik ely   b ec au s o f   d is tin ct  f ac ial  f ea tu r es,  s u ch   as  p r o m in e n c h ee k b o n es  o r   jawlin es,  wh ich   m ad it  ea s ier   f o r   th e   s y s tem   to   r ec o g n ize   t h eir   f ac es d esp ite  th o b s tacle s .   Fo r   th h ea d   with   o b s tacle   co n d itio n s ,   d etec tio n   ac cu r ac y   f lu ctu ates  s im ilar ly   to   f ac d et ec tio n   b u t   ten d s   s lig h tly   lo wer   o v e r all.   H o wev er ,   h ea d   d etec tio n   o u tp e r f o r m s   f ac e   d etec tio n   in   s am p l es  lik S7   an d   S2 6 ,   b ec au s o b s tacle s   s ig n if ican tl y   im p ac f ac v is ib ilit y   m o r th an   h ea d   o r ien tatio n .   T h is   im p lies   th at  h ea d   d etec tio n   is   m o r r esil ien to   o b s tr u ctio n s   th an   f ac d etec tio n ,   m ain tain in g   b etter   ac cu r ac y   in   ch allen g in g   co n d itio n s .   I n   an o t h er   o b s er v atio n ,   u p   to   9 8 o f   th h ig h est  ac cu r a cies  ar o b s er v e d   in   th e   f ac &   h e ad   with o u o b s tacle s ,   p ar ticu lar ly   f o r   s u b jects  lik S1 ,   S3 ,   S4 ,   an d   S8 .   T h is   s u g g ests   th at  th ab s en ce   o f   o b s tacle s   s ig n if ican tly   im p r o v es  h ea d   p o s esti m atio n   ac cu r ac y .   H o wev er ,   s o m s u b jects,  s u ch   a s   S7 ,   S1 3 ,   an d   S2 5 ,   d is p lay   m o r b alan ce d   ac cu r ac y   ac r o s s   all  co n d itio n s ,   in d icatin g   less   im p ac f r o m   o b s tacle s .   C o n v er s ely ,   s u b jects lik S3 ,   S6 ,   an d   S1 1   ex p er ien ce   lo wer   ac cu r ac y   in   th h ea d   with   o b s tacle   co n d itio n s ,   wh er ac cu r ac y   d ip s   to   ar o u n d   8 0 %,  alth o u g h   th ey   s till   p er f o r m   well  in   o th er   co n d itio n s .           Fig u r 6 .   Av e r ag o f   p er f o r m a n ce   ac cu r ac y   f o r   s p o n ta n eo u s   h ea d   m o v e m en t c ateg o r y             Fig u r 7 .   Per f o r m an c ac cu r ac y   f o r   t h ir ty   s u b jects in   th s p o n tan eo u s   h ea d   m o v em en t c ate g o r y         3 . 3 .     Vis ua a t t ent io n   T h ef f ec tiv en ess   o f   t h alg o r ith m   in   d etec tin g   v is u al  atten tio n   is   ev alu ated   u s in g   t h d at aset  f r o m   th s p o n tan e o u s   h ea d   m o v e m en s ettin g   u n d er   t h r ee   d i f f er en co n d itio n s .   I ts   ac cu r a cy   is   m ea s u r ed   b y   an aly zin g   p r ed ictio n   o u tp u ts   wh en   p ar ticip an ts   d ir ec tly   f a ce   th ca m er a,   in d icatin g   v is u al  atten tio n .   T h e   alg o r ith m ' s   r esu lts   ar cr o s s - v alid ated   ag ain s t v id eo   r ec o r d i n g s   to   en s u r ac c u r ac y .   90 87 87 0 20 40 60 80 100 F ac e  &   he ad  w i t ho ut  o bs t ac l e s F ac e  wi t o bs t ac l e s H e ad  w i t o bs t ac l e s P e r f o r m an c e  Ac c ur ac y   ( %) C o nd i t i o n 0 20 40 60 80 1 0 0 S1 S2 S3 S4 S5 S6 S7 S8 S9 S 1 0 S 1 1 S 1 2 S 1 3 S 1 4 S 1 5 S 1 6 S 1 7 S 1 8 S 1 9 S 2 0 S 2 1 S 2 2 S 2 3 S 2 4 S 2 5 S 2 6 S 2 7 S 2 8 S 2 9 S 3 0 P e r f o r m an c e  Ac c ur ac y   ( %) F A CE  &  H E A D    W I T H O U T  O B S T A CL E S F A CE  W I T H  O B S T A CL E S HE A D   W I T O B S T A CL E S Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 7 0 8   I n t J E lec  &   C o m p   E n g ,   Vo l.   15 ,   No .   5 Octo b e r   20 25 :   4 5 8 1 - 4 5 9 2   4588   Fig u r 8   co m p ar es  th atten tio n   lev els  in   p er ce n tag f o r   t h ir ty   s u b jects  u n d er   th r ee   co n d itio n s .   I t   s h o ws  s ig n if ican v ar iatio n s   ac r o s s   s u b jects  an d   co n d itio n s .   Sev er al  s u b jects,  s u ch   as  S7 ,   S8 ,   S9 ,   an d   S2 4 ,   ac h iev p er f ec o r   n ea r - p er f e ct  atten tio n   lev els  1 0 0 ac r o s s   all  co n d itio n s ,   in d icatin g   r o b u s atten tio n   esti m atio n   s y s tem   f o r   th ese  i n d iv id u als.  Ho wev e r ,   atten tio n   lev els  d r o p   n o ticea b ly   f o r   o th er s ,   s u ch   as  S1 4 ,   S2 9 ,   an d   S3 0 ,   esp ec ially   in   th f ac with   o b s tacle s ,   wh e r v alu es  d ip   as  lo as  7 0 %.  T h p r esen ce   o f   o b s tacle s ,   p ar ticu lar ly   af f ec tin g   th h ea d ,   r ed u ce s   th s y s tem ' s   ab il ity   to   esti m ate  atten tio n   ac cu r ately ,   s u ch   as  f o r   S1 5 ,   S2 4 ,   an d   S2 9 ,   w h er th v alu r ed u ce s   b y   ar o u n d   2 6 %.  I n   co m p a r is o n ,   atten tio n   esti m atio n   r em ain s   h ig h   in   m o s s u b jects  with   f ac an d   h ea d   with o u o b s ta cles.  T h o b s tacle s   cr ea te  a   m o r c h allen g in g   en v ir o n m en t,  r esu ltin g   in   lo wer   p er f o r m an ce .   T h is   s u g g ests   th s y s tem   co u ld   b s en s itiv to   v is u al  o b s tr u ctio n s ,   with   ac cu r ac y   d r o p p in g   i n   m o r o cc lu d ed   c o n d itio n s ,   esp ec ially   wh e n   th h ea d   is   p a r tially   b lo ck ed .   I m p r o v in g   p e r f o r m a n ce   u n d er   th ese  ch alle n g in g   co n d itio n s   c o u ld   e n h an ce   t h s y s tem ' s   o v er all   r eliab ilit y .   Fig u r 9   d ep icts   v is u al  atten ti o n   ac cu r ac y   f o r   th r ee   co n d itio n s f ac a n d   h ea d   with o u o b s tacle s   is   9 0 %,  f ac with   o b s tacle s   is   8 8 %,  an d   h ea d   with   o b s tacle s   is   8 6 %.  B ased   o n   s p o n tan e o u s   h ea d   m o v e m en t,  th ese  r esu lts   in d icate   th at  o b s t ac les  s lig h tly   af f ec atten tio n   ac cu r ac y ,   b u th v ar iatio n s   ar m in im al.   Ov er all,   8 8 o f   th ac cu r ac y   o f   v is u al   atten tio n   f o r   s p o n ta n eo u s   h ea d   m o v em e n ca teg o r ies  in d ica ted   th at  th s y s tem   is   h ig h ly   r eliab le.   T h h ig h   ac cu r ac y   p er ce n tag es  ac r o s s   al co n d itio n s   s u g g est  th at  th s y s tem   ef f ec tiv ely   d etec ts   v is u al  atten tio n ,   ev en   wh en   s u b jects f ac o b s tr u ctio n s ,   d em o n s tr atin g   its   r o b u s tn e s s   an d   r eliab ilit y .           Fig u r 8 .   Vis u al  atten tio n   ac c u r ac y   wh ile  th s u b ject' s   f ac an d   h ea d   with o u o b s tacle s ,   f ac with   o b s tacle s   an d   h ea d   with   o b s tacle s           Fig u r 9 .   Vis u al  atten tio n   ac c u r ac y   f o r   th r ee   v ar y in g   c o n d iti o n s       3 . 4 .     Co rr el a t io a na ly s is   Fig u r 1 0   s h o ws  th p er f o r m an ce   an d   atten tio n   ac cu r ac y   p er ce n tag es  u n d er   th r ee   co n d it io n s f ac an d   h ea d   with o u o b s tacle s ,   f ac with   o b s tacle s ,   an d   h ea d   with   o b s tacle s .   B o th   v alu es  r em ain   co n s is ten tly   h ig h   ac r o s s   all  co n d itio n s ,   wit h   p er f o r m a n ce   ac c u r ac y   at  9 0 in   th f ir s co n d itio n   a n d   s lig h tly   lo wer   ( 8 7 %)  f o r   th o th e r   two .   Atten tio n   cl o s ely   f o llo ws  p er f o r m an ce   ac cu r ac y ,   m atch i n g   it  at  9 0 in   th f ir s co n d itio n ,   s lig h tly   s u r p ass in g   it  in   th s ec o n d   ( 8 8 v s .   8 7 %),   an d   lo wer   in   th th ir d   ( 8 6 v s .   8 7 %).   T h co r r elatio n   b etwe en   p er f o r m an ce   a n d   att en tio n   ac cu r ac y ,   ca lcu lated   a 0 . 8 6 6 ,   i n d icate s   s tr o n g   p o s itiv r elatio n s h ip ,   m ea n in g   c h an g es  in   o n v ar ia b le  ar m ir r o r ed   b y   c h an g es  i n   th o th e r .   T h is   co n s is ten cy   s u g g ests   th s y s tem   is   r esil ien to   o b s tacle s ,   m ain tain in g   h ig h   p er f o r m an ce   a n d   atten tio n   lev els  ev en   wh en   t h f ac o r   h ea d   is   0 20 40 60 80 1 0 0 S1 S2 S3 S4 S5 S6 S7 S8 S9 S 1 0 S 1 1 S 1 2 S 1 3 S 1 4 S 1 5 S 1 6 S 1 7 S 1 8 S 1 9 S 2 0 S 2 1 S 2 2 S 2 3 S 2 4 S 2 5 S 2 6 S 2 7 S 2 8 S 2 9 S 3 0 A t t e nt i o ( %) F A C E  & H E A D    W IT H O UT  O B S T A C LES F A C E  W I T H  O B S T A C LES H E A D  W IT H  O B S T A C LE S 90 88 86 0 20 40 60 80 100 F ace  &   head w i t hout  o bst ac l es F ace  w i t h o bst acl e s H e ad  w i t o bs t ac l e s At t e n t i o n   ( %) C o nd i t i o n Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J E lec  &   C o m p   E n g     I SS N:   2088 - 8 7 0 8         Dyn a mic  h ea d   p o s esti ma tio n   in   va r ied   co n d itio n s   u s in g   D lib   a n d   Med ia P ip e   ( R u s n a n i Y a h ya )   4589   p ar tially   o b s cu r e d .   W h ile  h ea d   o b s tacle s   h av a   s lig h tly   m o r s u b s tan tial  ef f ec o n   p e r f o r m an ce   an d   atten tio n   ac cu r ac y   th a n   f ac ial  o b s tacle s ,   th s y s tem   r em ain s   r o b u s t o v er all.     T h p r o p o s ed   al g o r ith m   d em o n s tr ates  im p r o v ed   r ea l - tim h ea d   p o s esti m atio n   ac c u r ac y   u s in g   o n l y   R GB   in p u co m p ar ed   to   p r io r   r esear ch .   Fo r   in s tan ce ,   Owe n   et  a l.   [ 3 2 ]   ac h iev e d   8 6 . 8 5 ac cu r ac y   in   HPE  i n   th s leep in ess   d etec tio n   s y s te m ,   wh ile  o u r   m eth o d   ac h iev ed   o v er   9 3 % a cc u r ac y .   Ham m ad et  a l.   [ 2 4 ]   r ep o r te d   h ig h   p e r f o r m an ce   u s in g   m u lti m o d al  d ata  b u r eq u ir ed   p o s tr ac k in g   eq u ip m en t.   I n   c o n tr a s t,  o u r   m eth o d   u s es  o n ly   s im p le  web ca m   s etu p ,   m ak in g   it  m o r ac ce s s ib le.   Alth o u g h   p r ev i o u s   s tu d ies  d em o n s tr ated   g o o d   ac cu r ac y   u s in g   Op e n C V - b ased   m eth o d s ,   th s y s tem s   ten d ed   to   b ec o m u n s tab le  d u r in g   f ast  o r   u n ex p ec ted   h ea d   m o v em en ts   [ 5 ] .   I n   t h is   r esear ch ,   in teg r atin g   Me d i P ip e   with   its   s tab le  f ac ial  lan d m ar k   tr ac k in g   ca p ab ilit y   h elp ed   m ain tain   ac cu r ac y ,   esp ec ially   in   s p o n tan e o u s   h ea d   m o v em en ca te g o r y .   T h ese  r e s u lts   alig n   with   o u r   in itial  ex p ec tatio n   th at  co m b in in g   Dlib   an d   Me d iaPip wo u ld   im p r o v r ea l - tim h e ad   p o s esti m atio n   ac cu r ac y ,   e v en   u n d er   n atu r al  h ea d   m o v e m en ts   an d   m i n im al  h ar d war co n d itio n s .     Mo r eo v e r ,   o u r   s tr o n g   co r r elatio n   co ef f icien ( 0 . 8 6 6 )   b etwe en   h ea d   p o s an d   atten tio n   esti m atio n   s u p p o r ts   s im ilar   f in d in g s   b y   L iu   et  a l.   [ 3 6 ]   an d   Af r o ze   et  a l.   [ 7 ] ,   wh o   n o te d   th i m p o r tan ce   o f   f ac ial   o r ien tatio n   in   h u m a n - co m p u t er   in ter ac tio n .   T h ese  f in d i n g s   ar v alu ab le   f o r   d ev elo p in g   ac ce s s ib le  an d   co s t - ef f ec tiv atten tio n   t r ac k in g   s y s tem s ,   wh ich   ca n   b en e f it  ed u ca to r s ,   th er ap is ts ,   an d   r esear ch er s   wo r k in g   with   ch ild r en ,   esp ec ially   th o s with   s p ec ial  n ee d s .     C o m b in in g   h ig h   ac cu r ac y ,   lo h ar d war e   r eq u i r em en ts ,   an d   r o b u s tn ess   in   o b s tacle - r ich   co n d itio n s   ca n   h elp   d ev elo p   r ea l - tim att en tio n   tr ac k i n g   s y s tem s   f o r   cl ass r o o m s ,   th er ap y   s ess io n s ,   o r   in ter ac tiv lear n in g   en v ir o n m en ts .   Fu tu r e   r esear c h   s h o u ld   ex p lo r i n teg r atin g   d ee p   lea r n in g   f o r   o cc l u s io n   r o b u s tn ess ,   m u lti - ca m er s etu p s   f o r   en h a n ce d   tr ac k in g ,   a n d   e y e - tr ac k i n g   tech n o lo g y   to   r ef i n atten tio n   an aly s is   f u r th er .   C o m b in in g   h ea d   p o s with   f a cial  ex p r ess io n   an aly s is   ca n   a ls o   b ex ten d e d   to   d etec em o tio n al  r esp o n s o r   en g ag em e n lev els.  Ho wev er ,   th s y s tem   s h o wed   s o m s en s itiv ity   to   r ap id   lig h tin g   ch a n g es  an d   c o m p le x   o cc lu s io n s ,   in d icatin g   t h n ee d   f o r   f u r th e r   r ef i n em en t in   m o r d iv er s en v ir o n m en ts .           Fig u r 1 0 .   C o m p ar is o n   o f   p e r f o r m an ce   a n d   atten tio n   ac cu r ac y   ac r o s s   d if f er e n t c o n d itio n s       4.   CO NCLU SI O N   T h is   s tu d y   s u cc ess f u lly   ac h iev ed   r ea l - tim h ea d   p o s esti m atio n   u s in g   Dlib   an d   Me d iaPip e,   d em o n s tr atin g   r eliab le   f ac ial  l an d m ar k   d etec tio n   ac r o s s   b r o ad   r an g e   o f   h ea d   o r ien tatio n s .   C o m p ar ed   to   th e   s tan d ar d   Op en C alg o r ith m ,   th p r o p o s ed   m eth o d   s h o wed   s u p er io r   p er f o r m a n ce   in   ter m s   o f   r o b u s tn ess   an d   ad ap tab ilit y .   T w o   e x p er im e n s etu p s   wer u s ed   to   ev al u ate  th e   alg o r ith m o n wit h   co n tr o lled   h ea d   m o v em en t   an d   an o th er   with   s p o n tan e o u s   h ea d   m o v em e n ts ,   b o th   test ed   u n d er   th r ee   co n d itio n s   ( f ac e   an d   h ea d   with o u o b s tacle s ,   f ac with   o b s tacle s   an d   h ea d   with   o b s tacle s ) .   T h alg o r ith m   ac h iev e d   o v er   9 3 ac cu r ac y   in   h ea d   p o s esti m atio n   an d   at  least  8 8 in   d etec tin g   v is u al  atten tio n ,   e v en   with   f ac ia o b s tacle s .   T h ese  f in d in g s   s u g g est  th at  th e   p r o p o s ed   HPE  alg o r ith m   is   p r ac tical  an d   ad a p tab le,   with   m i n im al  p er f o r m a n ce   d eg r ad atio n   u n d e r   r ea l - wo r ld   co n d itio n s ,   s u ch   as  o cc lu s io n s   an d   n atu r al  m o v em en ts .   T h is   h as  s ig n if ican im p licatio n s   f o r   th e   r esear c h   f ield ,   p a r ticu lar ly   in   a p p li ca tio n s   r elate d   t o   h u m an - co m p u ter   in ter ac tio n ,   ass is tiv tech n o lo g ies,  a n d   e d u ca tio n al  o r   th er a p eu tic  s ettin g s   in v o lv in g   v is u al  atten tio n   m o n ito r in g .   Fo r   th e   co m m u n ity ,   p ar ticu lar ly   i n   r o b o t - ass is ted   th er ap y   o r   class r o o m   en g ag em e n m o n ito r in g   co n te x ts ,   th is   r esear ch   o p e n s   th d o o r   to   m o r ac ce s s ib le,   n o n in v asiv e   to o ls   f o r   u n d er s tan d in g   atten tio n   an d   in ter ac tio n   p atter n s .   Mo v in g   f o r war d ,   m u lti - v iew  esti m atio n   an d   a d v an ce d   f ea tu r e x tr ac tio n   e n h an ce m e n ts   co u ld   im p r o v p er f o r m an ce ,   m ak in g   th tech n o l o g y   e v en   m o r r esil ien an d   ap p licab le  in   d iv er s s itu atio n s   an d   u n co n tr o lled   en v ir o n m en ts .   U ltima tely ,   th is   s tu d y   co n t r ib u t es  to   g r o win g   b o d y   o f   wo r k   to   b r id g t h g a p   b etwe en   co m p u ter   v is io n   an d   r ea l - wo r ld   h u m a n   b eh av i o r   an aly s is ,   o f f er in g   p r ac tical   s o lu tio n s   with   th p o ten tial f o r   wid e - r ea ch i n g   s o cial  im p ac t.   90 87 87 90 88 86 0 20 40 60 80 100 F ac e  &   he ad  w i t ho ut  o bs t ac l e s F ac e  wi t o bs t ac l e s H e ad  w i t o bs t ac l e s A v e r ag e  ( %) C o nd i t i o n %  P e rfo rman c e %  A tt e n ti o n Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 7 0 8   I n t J E lec  &   C o m p   E n g ,   Vo l.   15 ,   No .   5 Octo b e r   20 25 :   4 5 8 1 - 4 5 9 2   4590   ACK NO WL E DG E M E NT S   T h au th o r s   wo u l d   lik t o   ex p r ess   th eir   s in ce r g r atitu d to   Un iv er s iti  T ek n o lo g MA R ( UiT M)   f o r   p r o v id i n g   r esear ch   s u p p o r an d   g r a n f ac ilit ies;   Kizz u   Kid s   R eh ab ilit atio n   C en tr f o r   g en er o u s ly   s p o n s o r in g   th T em V 3   r o b o t,   wh ich   p la y ed   a   p iv o tal  r o le   in   test in g   an d   s o f twar d ev elo p m en t;  a n d   E UR E KA  R o b o tics   C en tr e,   C ar d if f   Me tr o p o litan   Un iv er s ity ,   UK,   f o r   th eir   v alu ab le  r esear ch   c o llab o r atio n .   T h is   s tu d y   was  u n d er tak e n   d u r in g   th s tu d y   leav o f   th f ir s au th o r   u n d er   th 2 0 2 2   Fed er al  T r ain i n g   ( HL P)  s ch o lar s h ip   s ch em awa r d ed   b y   th MO H E   Ma lay s ia.       F UNDING   I NF O R M A T I O N   T h i s   w o r k   w a s   f u n d e d   b y   t h e   S t r a t e g i c   R e s ea r c h   P a r t n e r s h ip   ( S R P )   g r a n t   ( 1 0 0 - R M C   5 / 3 /S R P   I N T   ( 0 4 7 / 2 0 2 3 )   a n d   1 0 0 - R M C   5 / 3 /S R P   I N T   ( 0 4 8 / 2 0 2 3 ) )   f r o m   t h e   U n i v e r s it i   T e k n o l o g i   MA R A   ( U i T M ) ,   M al a y s i a .       AUTHO CO NT RI B UT I O NS ST A T E M E N T   T o   en s u r tr an s p ar en c y   an d   cl ar ity   in   r esear ch   co n tr ib u tio n s ,   th r o les o f   ea ch   au th o r   in v o lv ed   in   th is   s tu d y   ar s p ec if ied   b ased   o n   th C o n tr ib u to r   R o les T ax o n o m y   ( C R ed iT) .         C     C o n c e p t u a l i z a t i o n   M     M e t h o d o l o g y   So     So f t w a r e   Va     Va l i d a t i o n   Fo     Fo r mal   a n a l y s i s   I     I n v e s t i g a t i o n   R     R e so u r c e s   D   :   D a t a   C u r a t i o n   O   :   W r i t i n g   -   O r i g i n a l   D r a f t   E   :   W r i t i n g   -   R e v i e w   &   E d i t i n g   Vi     Vi su a l i z a t i o n   Su     Su p e r v i s i o n   P     P r o j e c t   a d mi n i st r a t i o n   Fu     Fu n d i n g   a c q u i si t i o n         CO NF L I C T   O F   I N T E R E S T   ST A T E M E NT   Au th o r s   s tate  n o   co n f lict o f   in t er est.       I NF O RM E CO NS E N T   W h av o b tain ed   in f o r m ed   c o n s en t f r o m   all  in d iv id u als in c lu d ed   in   t h is   s tu d y .       E T H I CAL AP P RO V AL   R esear ch   r elate d   to   h u m an   u s h as  b ee n   co n d u cte d   in   ac co r d an ce   with   all  r elev an t   n atio n al  r eg u latio n s   an d   in s titu tio n al  p o licies,  as  o u tlin ed   in   th p r in cip les  o f   th Dec lar atio n   o f   Helsin k i.  I h as  b ee n   ap p r o v ed   b y   th R esear ch   E th ics  C o m m ittee  ( R E C ) ,   Un i v er s iti  T ek n o lo g MA R ( UiT M)   Sh ah   Alam ,   Ma lay s ia,   with   Ap p r o v al  n u m b er   R E C /0 6 /2 0 2 4   ( PG/F B /2 1 ) .       DATA AV AI L AB I L I T Y   T h d ata  s u p p o r tin g   t h is   s tu d y ' s   f in d in g s   ar av ailab le  o n   r eq u est  f r o m   th co r r esp o n d in g   au th o r .   Ho wev er ,   d u to   ce r tain   r estrictio n s ,   th d ata,   wh ich   co n tai n s   in f o r m atio n   th at  co u ld   co m p r o m is th p r iv ac y   o f   r esear ch   p ar ticip an ts ,   is   n o p u b licly   av ailab le.       RE F E R E NC E S   [ 1 ]   Y .   A l b a d a w i ,   A .   A l R e d h a e i ,   a n d   M .   T a k r u r i ,   R e a l - t i me  mac h i n e   l e a r n i n g - b a se d   d r i v e r   d r o w si n e ss   d e t e c t i o n   u si n g   v i su a l   f e a t u r e s,   J o u r n a l   o f   I m a g i n g ,   v o l .   9 ,   n o .   5 ,   2 0 2 3 ,   d o i :   1 0 . 3 3 9 0 / j i m a g i n g 9 0 5 0 0 9 1 .   [ 2 ]   R .   K .   S h u k l a ,   A .   K .   T i w a r i ,   a n d   A .   K .   J h a ,   A n   e f f i c i e n t   a p p r o a c h   o f   f a c e   d e t e c t i o n   a n d   p r e d i c t i o n   o f   d r o w si n e ss  u s i n g   S V M ,   Ma t h e m a t i c a l   Pr o b l e m s i n   En g i n e e ri n g ,   v o l .   2 0 2 3 ,   n o .   1 ,   p p .   1 1 2 ,   2 0 2 3 ,   d o i :   1 0 . 1 1 5 5 / 2 0 2 3 / 2 1 6 8 3 6 1 .   [ 3 ]   W .   R a h m a n i a r ,   Q .   M .   U .   H a q ,   a n d   T. - L.   L i n ,   W i d e   r a n g e   h e a d   p o se  e st i m a t i o n   u si n g   a   si n g l e   R G B   c a m e r a   f o r   i n t e l l i g e n t   su r v e i l l a n c e ,   I EE S e n so rs   J o u rn a l ,   v o l .   2 2 ,   n o .   1 1 ,   p p .   1 1 1 1 2 1 1 1 2 1 ,   J u n .   2 0 2 2 ,   d o i :   1 0 . 1 1 0 9 / JS EN . 2 0 2 2 . 3 1 6 8 8 6 3 .   [ 4 ]   A n i t t a   D   a n d   A .   F a t h i ma   A ,   H u m a n   h e a d   p o se   e s t i m a t i o n   b a se d   o n   H F   met h o d ,   Mi c ro p r o c e sso rs   a n d   M i c r o sys t e m s ,   v o l .   8 2 ,   Na m o f   Aut ho r   C   M   So   Va   Fo   I   R   D   O   E   Vi   Su   P   Fu   R u s n an i Y ah y a                               R o zita  J ailan i                               Nu r   Kh alid ah   Z a k ar ia                               Faza h   Ak h tar   Han ap ia h                               Evaluation Warning : The document was created with Spire.PDF for Python.