aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/utils/demonstrations_scripts.md
blob: c7560eb1f68e10bd0ed0e4d42c4f3dc90bcfd4cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
Demonstrations scripts
======================

Collection of command-line scripts for demonstration purpose.

!!! note
      *Consider that all inline commands below have to be executed at the root of ArGaze package folder.*

!!! note
      *Use -h option to get command arguments documentation.*

!!! note
    Each demonstration outputs metrics into *_export/records* folder.

## Random context

Load **random_context.json** file to generate random gaze positions:

```shell
python -m argaze load ./src/argaze/utils/demo/random_context.json
```

## CSV file context

Load **csv_file_context_xy_joined.json** file to analyze gaze positions from a CSV file where gaze position coordinates are joined as a list in one single column:

```shell
python -m argaze load ./src/argaze/utils/demo/csv_file_context_xy_joined.json
```

Load **csv_file_context_xy_splitted.json** file to analyze gaze positions from a CSV file where gaze position coordinates are splitted in two seperated column:

```shell
python -m argaze load ./src/argaze/utils/demo/csv_file_context_xy_splitted.json
```

Load **csv_file_context_left_right_eyes.json** file to analyze gaze positions from a CSV file where gaze position coordinates and validity are given for each eye in six separated columns.:

```shell
python -m argaze load ./src/argaze/utils/demo/csv_file_context_left_right_eyes.json
```

!!! note
    The left/right eyes context allows to parse Tobii Spectrum data for example.

## OpenCV

### Cursor context

Load **opencv_cursor_context.json** file to capture cursor pointer positions over OpenCV window:

```shell
python -m argaze load ./src/argaze/utils/demo/opencv_cursor_context.json
```

### Movie context

Load **opencv_movie_context.json** file to playback a movie and also capture cursor pointer positions over OpenCV window:

```shell
python -m argaze load ./src/argaze/utils/demo/opencv_movie_context.json
```

### Camera context

Edit **aruco_markers_pipeline.json** file as to adapt the *size* to the camera resolution and to set a consistent *sides_mask* value.

Edit **opencv_camera_context.json** file as to select camera device identifier (default is 0).

Then, load **opencv_camera_context.json** file to capture camera pictures and also capture cursor pointer positions over OpenCV window:

```shell
python -m argaze load ./src/argaze/utils/demo/opencv_camera_context.json
```

## Tobii Pro Glasses 2

### Live stream context

!!! note
    This demonstration requires to print **A3_demo.pdf** file located in *./src/argaze/utils/demo/* folder on A3 paper sheet.

Edit **aruco_markers_pipeline.json** file as to adapt the *size* to the camera resolution ([1920, 1080]) and to set *sides_mask* value to 420.

Edit **tobii_g2_live_stream_context.json** file as to select exisiting IP *address*, *project* or *participant* names and setup Tobii *configuration* parameters:

```json
{
    "argaze.utils.contexts.TobiiProGlasses2.LiveStream" : {
        "name": "Tobii Pro Glasses 2 live stream",
        "address": "10.34.0.17",
        "project": "MyProject",
        "participant": "NewParticipant",
        "configuration": {
            "sys_ec_preset": "Indoor",
            "sys_sc_width": 1920,
            "sys_sc_height": 1080,
            "sys_sc_fps": 25,
            "sys_sc_preset": "Auto",
            "sys_et_freq": 50,
            "sys_mems_freq": 100
        },
        "pipeline": "aruco_markers_pipeline.json"
    }
}
```

Then, load **tobii_g2_live_stream_context.json** file to find ArUco marker into camera image and, project gaze positions into AOI:

```shell
python -m argaze load ./src/argaze/utils/demo/tobii_g2_live_stream_context.json
```

### Segment playback context

Edit **aruco_markers_pipeline.json** file as to adapt the *size* to the camera resolution ([1920, 1080]) and to set *sides_mask* value to 420.

Edit **tobii_g2_segment_playback_context.json** file to select an existing Tobii *segment* folder:

```json
{
    "argaze.utils.contexts.TobiiProGlasses2.SegmentPlayback" : {
        "name": "Tobii Pro Glasses 2 segment playback",
        "segment": "record/segments/1",
        "pipeline": "aruco_markers_pipeline.json"
    }
}
```

Then, load **tobii_g2_segment_playback_context.json** file to find ArUco marker into camera image and, project gaze positions into AOI:

```shell
python -m argaze load ./src/argaze/utils/demo/tobii_g2_segment_playback_context.json
```

## Tobii Pro Glasses 3

### Live stream context

!!! note
    This demonstration requires to print **A3_demo.pdf** file located in *./src/argaze/utils/demo/* folder on A3 paper sheet.

Edit **aruco_markers_pipeline.json** file as to adapt the *size* to the camera resolution ([1920, 1080]) and to set *sides_mask* value to 420.

Load **tobii_g3_live_stream_context.json** file to find ArUco marker into camera image and, project gaze positions into AOI:

```shell
python -m argaze load ./src/argaze/utils/demo/tobii_g3_live_stream_context.json
```


## Pupil Invisible

### Live stream context

!!! note
    This demonstration requires to print **A3_demo.pdf** file located in *./src/argaze/utils/demo/* folder on A3 paper sheet.

Edit **aruco_markers_pipeline.json** file as to adapt the *size* to the camera resolution ([1088, 1080]) and to set *sides_mask* value to 4.

Load **pupillabs_invisible_live_stream_context.json** file to find ArUco marker into camera image and, project gaze positions into AOI:

```shell
python -m argaze load ./src/argaze/utils/demo/pupillabs_invisible_live_stream_context.json
```

## Pupil Neon

### Live stream context

!!! note
    This demonstration requires to print **A3_demo.pdf** file located in *./src/argaze/utils/demo/* folder on A3 paper sheet.

Edit **aruco_markers_pipeline.json** file as to adapt the *size* to the camera resolution ([1600, 1200]) and to set *sides_mask* value to 200.

Load **pupillabs_neon_live_stream_context.json** file to find ArUco marker into camera image and, project gaze positions into AOI:

```shell
python -m argaze load ./src/argaze/utils/demo/pupillabs_neon_live_stream_context.json
```