This repository is a compilation of Python scripts to record gaze data from a Tobii Pro Nano and process them.
Clone this repository and use the package manager pip to install all the requirements.
pip install -r requirements.txtYou need to create folders in root before launching the scripts : data, examples, processed_data, videos.
Click on the image below to watch an example :
The file main.py record all the gaze data and process them with the scripts in the components folder :
-
detectors.py which is based on a script from the package PyGazeAnalyzer and which permits to detect fixations in gaze datas.
-
plot_fixations.py which permits to plot the fixations and the gaze's path on a picture
Calibration is done with Eye Tracker Manager here.
Natively (with tobii_research package) :
Definitions according to the Tobii documentation
- device_time_stamp : timestamp of the Tobii device (in microseconds). More informations...
- system_time_stamp : timestamp of the system (in microseconds). More informations...
- left_gaze_point_on_display_area : Coordinates of the point watched by the user on the screen. The origin is the upper left corner of the display area. The point (0, 0) denotes the upper left corner and (1, 1) the lower right corner of it.
- left_gaze_point_in_user_coordinate_system : 3D space coordinates are given in the so-called User Coordinate System (UCS). The coordinate axes are oriented as follows: the x-axis points horizontally towards the user’s right, the y-axis points vertically towards the user’s up and the z-axis points towards the user, perpendicular to the front surface of the eye tracker. UCS is defined as follow :
-
left_gaze_point_validity : Denotes if the data is trustworthy or not
-
left_pupil_diameter : Internal physical size of the left pupil (not the size it appears to be when looking at the eye from the outside)
-
left_pupil_validity : Denotes if the data is trustworthy or not
-
left_gaze_origin_in_user_coordinate_system : Coordinates of the origin of UCS
-
left_gaze_origin_in_trackbox_coordinate_system : The track box is the volume in which the eye tracker is theoretically able to track the eyes. More informations...
-
left_gaze_origin_validity : Denotes if the data is trustworthy or not
-
right_gaze_point_on_display_area : Same as the left eye
-
right_gaze_point_in_user_coordinate_system : Same as the left eye
-
right_gaze_point_validity : Same as the left eye
-
right_pupil_diameter : Same as the left eye
-
right_pupil_validity : Same as the left eye
-
right_gaze_origin_in_user_coordinate_system : Same as the left eye
-
right_gaze_origin_in_trackbox_coordinate_system : Same as the left eye
-
right_gaze_origin_validity : Same as the left eye
- x : Mean of the left x and right x gaze data to get the position x watched on the screen
- y : Mean of the left y and right y gaze data to get the position y watched on the screen
The two coordinates are converted in pixels by a multiplication with the screen's resolution
- mouse_position : (x, y) position of the mouse on the screen
Made with <3 by Alphonse Terrier & Antoine Pasqualini (ISEP - Promotion 2020).


