This software allows for fast and flexible manual classification of any
mobile eye-tracking data. Currently Pupil Labs, Pupil Labs Invisible, Pupil Labs Neon, SMI, Positive Science and Tobii Pro Glasses 2 & 3 data
are supported. The software loads an exported visualisation (video file)
and the data of a mobile eye-tracking measurement, runs a fixation
detection algorithm (adaptation of Hooge and Camps, 2013, Frontiers in Psychology, 4,
996) and offers a simple to use interface to browse through and
categorise the detected fixations. This version is integrated with
GlassesViewer to
enable directly opening Tobii Pro Glasses 2 and 3 recordings as stored on the recording
unit's SD card (no visualisation export needed). As such, GlassesViewer needs to be available to GazeCode.
The recommended way to make this work is to use the git
tool to download GazeCode.
Alternatively you can download GazeCode's components separately and place them in the
right locations. Here are instructions for these two routes:
Before you download anything, GazeCode and GlassesViewer run in Matlab. Make sure Matlab is installed.
We know our software works with:
Matlab 2022b on Windows 11
(other combinations will probably work as well, but have not been tested).
git clone --recurse-submodules -j8 https://github.com/jsbenjamins/gazecode.git
git clone https://github.com/jsbenjamins/gazecode.git
cd gazecode
git submodule update --init --recursive
If you have already cloned GazeCode but do not have the GlassesViewer submodule populated yet,
issuing the git submodule update --init --recursive
command will take care of that.
<GazeCode_RootDir>/GlassesViewer
).How to use: 1) Place the GazeCode files in a directory to which you can easily navigate in Matlab
2) Prepare the data you want to analyze:
When using Pupil-labs, SMI or Positive Science data:
Tobii Pro Glasses 2 recordings as stored on its SD card can be directly loaded with GazeCode by making use of functionality provided by GlassesViewer. (demo data for Tobii Glasses are included in this repository)
3) Find a set of nine 100 x 100 non-transparant PNGs (images) reflecting the different categories you want to use (thenounproject.com is good place to start). Use white empty PNGs if you have less than 9 categories. Put these files in the categories folder of GazeCode.
4) In Matlab set the working directory to the code folder of GazeCode and type gazecode in the Matlab command window to start GazeCode.
5) When prompted, point GazeCode to the category set, files and folders it requests.
6) Browse through the detected fixations using the arrow buttons (or Z and X keys on the keyboard) in the left panel of GazeCode.
7) Assign a category to a fixation by using the category buttons in the right panel of GazeCode or use (numpad) keyboard keys 1-9. Category buttons are numbered left-to-right, bottom-to-top (analogue to the keyboard numpad). Numpad 0 resets a category.
8) Category codes of fixations can be exported to a file using the Save option in the menu of GazeCode.
This open-source toolbox has been developed by J.S. Benjamins, R.S. Hessels and I.T.C. Hooge. When you use it, please cite:
For importing data from Tobii Glasses 2 & 3, GazeCode uses GlassesViewer. When using this toolbox with Tobii Glasses data, please also cite Niehorster, D.C., Hessels, R.S., and Benjamins, J.S. (2020). GlassesViewer: Open-source software for viewing and analyzing data from the Tobii Pro Glasses 2 eye tracker. Behavior Research Methods. doi: 10.3758/s13428-019-01314-1
For more information, questions, or to check whether we have updated to a better version, e-mail: j.s.benjamins@uu.nl GazeCode is available from www.github.com/jsbenjamins/gazecode and GlassesViewer from https://github.com/dcnieho/glassesviewer
Most parts of GazeCode are licensed under the Creative Commons Attribution 4.0 (CC BY 4.0) license. Some functions are under MIT license, and some may be under other licenses.