PennController for IBEX › Forums › Requests › How to use the latest WebGazer 2.1.0?
Tagged: eye-tracking
- This topic has 9 replies, 2 voices, and was last updated 3 years, 2 months ago by Carlos.
-
AuthorPosts
-
September 20, 2021 at 3:57 am #7287CarlosParticipant
I would like to use the latest WebGazer (Ver. 2.1.0) released on July 14th, which is supposed to have a higher spacial resolution than the previous versions, in my project. Getting the idea from the instruction posted here, I modified
setAttribute("src","https://cdn.jsdelivr.net/gh/penncontroller/penncontroller/releases/latest/webgazer.min.js")
in PennController.js tosetAttribute("src","https://webgazer.cs.brown.edu/webgazer.js")
. However, WebGazer seems to stop working during the first calibration and always returns a calibration score of zero. Moreover, in the video in the top-left corner of the screen with warning messages (with texts It looks like we were not able to precisely calibrate the tracker: You calibration score is 0 and you need at least 50. Here are a few tips to help you better self-calibrate…), (1) the face counter indicator (green dots) stay still, i.e. it does not follow the face movement, and (2) the rectangular frame, which turns green when the participant’s face is in the middle of the screen and turns red if not, remains black.Although it is pointed out that the expire of the SSL certificate of WebGazer’s server prevented browsers from accessing WebGazer.js in a previous post, this may not be the case this time, since the SSL certificate of WebGazer seems to be still valid for now (see https://www.sslshopper.com/ssl-checker.html#hostname=https://webgazer.cs.brown.edu/webgazer.js). Does anybody have any idea to solve the issues?
From Version 2.1.0, WebGazer uses tensorflow/tfjs and this might be the problem (See also https://github.com/brownhci/WebGazer/issues/207 and https://github.com/brownhci/WebGazer/issues/233):
Note this version release includes tensorflow in webgazer. Since tensorflow is not compatible with other versions of itself, it’ll break things if used by the application elsewhere. So probably better to just make it a dependency that needs to be explicitly included, aka not vendoring it in. Previously discussed in #207
Then, how should I call tfjs when I run an experiment using PCIbex…?
Any comments and suggestions are welcome!
September 20, 2021 at 12:27 pm #7291JeremyKeymasterHi,
The experiment runs just fine when I replace webgazer’s js file URL, including the calibration phase: https://farm.pcibex.net/r/TEscrL/
(note that the eye tracker works best on Chrome; it’s been quite laggy on Firefox in my experience, when I was able to make it run)
Feel free to work on a copy of this project
Jeremy
September 20, 2021 at 8:45 pm #7294CarlosParticipantHi Jeremey,
Thank you for sharing me the URL! I tried your experiments two times, and now I am able to run your experiment and my own without problem. I found that my browser disabled the third party cookies when I visit pcibex.net domain. Once enabled, the experiments successfully run!
The cookie permission button on the browser is small and hard to find sometimes. If PCIbex could present a popup to allow the use of third party cookies, it would be very useful. I would be grateful if you consider the implementation of this kind of functionality.
September 21, 2021 at 12:31 pm #7298JeremyKeymasterHi,
The PCIbex Farm does not use third-party cookies, and as far as I can tell WebGazer does not use cookies at all. The PCIbex Farm uses only one session cookie that strictly stores minimally necessary information for navigating the website
I don’t know why the issue was solved in your case by allowing third-party cookies
Jeremy
September 21, 2021 at 10:53 pm #7305CarlosParticipantHi Jeremy,
It’s weird… PCIbex does have a cookie called
_pcibexfarm_session
as you told when I inspected by this way. However, the cookie indicator on Google Chrome (an icon of eye on the right side of the search box) tells that the browser blocks unknown seven third party cookies when the blocking function turns on…September 21, 2021 at 11:31 pm #7306CarlosParticipantWhen I block the third party cookies, both your example (EyeTracker_webgazer210) and my own project fail to run with the same errors reported earlier. When I toggle Chrome Developer Tools (F12 on Windows/Cmd + Opt + I on Mac) on the calibration screen, I found the following error message. What’s going on here…?
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0') at ridgeWeightedReg_reg.RidgeWeightedReg.predict (webgazer.js:138258) at getPrediction (webgazer.js:138724) at async loop (webgazer.js:138780)
September 22, 2021 at 3:36 pm #7308JeremyKeymasterHi,
Does the problem arise for webpages that use webgazer? And does it also happen for other experiments on the PCIbex Farm that do not use the EyeTracker element?
It could have to do with the EyeTracker element executing a
.js
file fetched from a distant site, and for some reason maybe the third-party cookie setting also targets thatJeremy
September 23, 2021 at 3:31 am #7309CarlosParticipantHi Jeremy,
1. Unknown Cookies
When I tried a self-paced reading experiment, I found, by Google Chrome Developer Tool, cookies called
_pcibexfarm_session
andTEST
, both of which were fromfarm.pcibex.net
. Moreover, by the cookie indicator on Google Chrome (an icon of eye on the right side of the search box),
I found that unknown six third party cookies were blocked when I turned on the blocking function.2. Webgazer’s TypeError
When I tried a self-paced reading experiment, no error related to WebGazer occurred. Specifically, I could not find the following error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0') at ridgeWeightedReg_reg.RidgeWeightedReg.predict (webgazer.js:138258) at getPrediction (webgazer.js:138724) at async loop (webgazer.js:138780)
Carlos
September 23, 2021 at 4:14 pm #7310JeremyKeymasterHi Carlos,
I’m just realizing now that, because I always open Chromium in incognito mode, my browser always blocks third-party cookies. When I try the experiment I linked to above, I see that the browser is blocking two third-party cookies. Regardless, the experiment runs smoothly
My questions were meant to be about potential problems with running experiments/opening a webgazer page (eg. this one), not about cookies or the TypeError message specifically. That being said, we’ve established that blocking third-party cookies does not prevent you from taking other experiments, if you were able to take the self-paced reading experiment while 6 third-party cookies were blocked
Jeremy
September 25, 2021 at 2:51 am #7311CarlosParticipantHi Jeremy,
There persists difficulties to operate WebGazer 2.1.0 on PCIbex, but thank you. I’ll keep working around the issue.
Carlos
-
AuthorPosts
- You must be logged in to reply to this topic.