Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

PyGaze: An open source tool with fascinating research applications

In this interview, the lead developer for the project, Edwin Dalmaijer, who works at the University of Oxford’s Department of Experimental Psychology doing research and programming, provides a fascinating description of PyGaze — an open source toolbox for eye tracking in Python – and the significance of eye tracking in research.

My work as a researcher in experimental psychology requires me to program experiments, analyses, and sometimes entire software libraries or graphical user interfaces. In research, we often deal with very obscure hardware that does awfully specific things, such as tracking test subjects’ eye movements or pupil response, their brain waves, their grip force, and whatever weird thing you can think of.

This hardware is often sold by small vendors that do not have time for direct support or specific coding documentation. As a researcher who relies on these products, you often hack your way around SDKs and APIs until you find something that works for you.

Once I manage to talk to such a piece of obscure hardware, I incorporate its functionality in a more user-friendly library. PyGaze is a good example of this: it bundles code for a large range of different eye trackers from different manufacturers into a single interface. We also keep adding functionality for other things, including game controllers and joysticks, webcams, and devices that can monitor physiology.

Most of the time, where people look is also where they’re attention is. If I record where you were looking, I can figure out what attracts your attention. This can be important for basic research, for example when we want to know what features attract attention. This can tell us what kind of visual information we use to make sense of the world around us. It can also be useful in applied research—marketing researchers love eye tracking because it can tell them where people look at in their advertisements. Do they see the company logo, or are they too distracted by the model in the skimpy outfit? (Sex doesn’t always sell!)

In addition, the dynamics of your eye movements can tell us all sorts of things about what distracts you, and what motivates you. By closely monitoring the velocity and trajectory of your saccades (very quick eye movements), we can learn a lot about the basic properties of attention and the motor system.

Finally, we can use eye trackers to measure pupil size. Interest in this technique is currently peaking again, and people are finding all sorts of things. For example, your pupils increase in size in anticipation to reward, but also in surprise (e.g., for not getting a reward). It also seems that pupils increase or decrease their size in expectation of where you will be moving your eyes.

Given the open source tool, we also published on these pages some open source biomedical devices you can start with. Got an idea to DIY an eye tracking solution?