psychopy.org | Reference | Downloads | Github

Webcam based eyetracking with psychopy!

URL of experiment:

Description of the problem:
Hi, I am trying to set up an online attention experiment that requires a basic fixation break feature. So I want to use the webcam to set up eyetracking and monitor fixation during the trial. I am not sure if the resolution of webcam eyetracking would be worse for these purposes but it would be worth while to know how to set up a webcam based eyetracking with psychopy and to know if it will be compatible with pavlovia.
Any pointers would be of great help!
Thanks
Maha

1 Like

That’s unfortunately not currently something PsychoPy or Pavlovia can do, I’m afraid. Gorilla (https://link.springer.com/article/10.3758/s13428-019-01237-x) was supposed to have this functionality, but the documentation seems to be missing so I’m dubious. At this point if you wanted to do webcam based eye-tracking you would probably just have to program most of it from scratch.

Thanks Jonathan, for getting back promptly. Is there any other simpler way to monitor fixation for online experiments? Do you think recording the video of the participant during a ‘sensitive epoch’ and post hoc analyzing the video would work? Also, how can one download psychopy.iohub library?
Thanks again.

iohub wouldn’t work over Pavlovia, I’m afraid. While PsychoPy presents itself as one program, in reality the code that runs on your own local computer in Python is almost completely different from the JavaScript that runs over pavlovia.

Thanks Jonathan.

Do you plan to support eyetracking in psychojs? @jon

Hi all,

PsychoJS supports eye tracking via the webgazer library. See this thread for more information, including a link to a experiment you can clone and adapt to your needs: Eye-tracking development for Pavlovia

Best, Thomas

2 Likes