Edit and execute context

The utils.contexts module provides ready-made contexts like:

Edit JSON configuration

Here is a JSON configuration that loads a Random.GazePositionGenerator context:

{
    "argaze.utils.contexts.Random.GazePositionGenerator": {
        "name": "Random gaze position generator",
        "range": [1280, 720],
        "pipeline": {
            "argaze.ArFeatures.ArFrame": {
                "size": [1280, 720]
            }
        }
    }
}

Let's understand the meaning of each JSON entry.

argaze.utils.contexts.Random.GazePositionGenerator

The class name of the object being loaded from the utils.contexts module.

name

The name of the ArContext. Basically useful for visualization purposes.

range

The range of the gaze position being generated. This property is specific to the Random.GazePositionGenerator class.

pipeline

A minimal gaze processing pipeline that only draws last gaze position.

Context execution

A context can be loaded from a JSON configuration file using the load command.

python -m argaze load CONFIGURATION

This command should open a GUI window with a random yellow dot inside.

ArGaze load GUI

At this point, it is possible to load any ready-made context from utils.contexts module.

However, the incoming gaze positions are not processed and gaze mapping would not be available for head-mounted eye tracker context.

Read the gaze analysis pipeline section to learn how to process gaze positions then, the ArUco markers pipeline section to learn how to enable gaze mapping with an ArUco markers setup.