aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md17
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md37
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md29
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/background.md16
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/heatmap.md24
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md4
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md12
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md4
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md2
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md8
10 files changed, 75 insertions, 78 deletions
diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md
index 1960763..4970dba 100644
--- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/gaze_position_calibration.md
@@ -13,13 +13,16 @@ Here is an extract from the JSON ArFrame configuration file where a [Linear Regr
```json
{
- "name": "My FullHD screen",
- "size": [1920, 1080],
- ...
- "gaze_position_calibrator": {
- "LinearRegression": {}
- },
- ...
+ "argaze.ArFeatures.ArFrame": {
+ "name": "My FullHD screen",
+ "size": [1920, 1080],
+ ...
+ "gaze_position_calibrator": {
+ "LinearRegression": {}
+ },
+ ...
+ }
+}
```
!!! note
When a [GazePositionCalibrator](../../../argaze.md/#argaze.GazeFeatures.GazePositionCalibrator) is instantiated, each gaze position passed to [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) method will be transformed before gaze movement identification step.
diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
index 8250382..8242a7f 100644
--- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/module_loading.md
@@ -1,34 +1,16 @@
-Load modules from another package
-=================================
+Load objects from external package
+==================================
-It is possible to load [GazeMovementIdentifier](../../../argaze.md/#argaze.GazeFeatures.GazeMovementIdentifier), [ScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.ScanPathAnalyzer), [AOIMatcher](../../../argaze.md/#argaze.GazeFeatures.AOIMatcher) or [AOIScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.AOIScanPathAnalyzer) modules [from another Python package](https://docs.python.org/3/tutorial/modules.html#packages).
+It is possible to load pipeline step objects [from external Python package](https://docs.python.org/3/tutorial/modules.html#packages).
-To do so, simply prepend the package where to find the module into the JSON configuration file:
+To do so, simply prepend the package module where to find a class into the JSON configuration file. The exemple below shows how to load an external [GazeMovementIdentifier](../../../argaze.md/#argaze.GazeFeatures.GazeMovementIdentifier):
```
{
...
"gaze_movement_identifier": {
- "my_package.MyGazeMovementIdentifierAlgorithm": {
- "specific_plugin_parameter": 0
- }
- },
- ...
- "scan_path_analyzers": {
- "my_package.MyScanPathAnalyzerAlgorithm": {
- "specific_plugin_parameter": 0
- }
- }
- ...
- "aoi_matcher": {
- "my_package.MyAOIMatcherAlgorithm": {
- "specific_plugin_parameter": 0
- }
- }
- ...
- "aoi_scan_path_analyzers": {
- "my_package.MyAOIScanPathAnalyzerAlgorithm": {
- "specific_plugin_parameter": 0
+ "my_package.my_module.my_class": {
+ "my_parameter": 0
}
}
}
@@ -45,7 +27,8 @@ import my_package
# Load ArFrame
with argaze.load('./configuration.json') as ar_frame:
- # Print ArFrame attributes
- for module, scan_path_analyzer in ar_frame.scan_path_analyzers.items():
- print('scan path analyzer type:', type(scan_path_analyzer))
+ # Print gaze movement identifier type
+ print(type(ar_frame.gaze_movement_identifier))
```
+
+This logic would be the same for [ScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.ScanPathAnalyzer), [AOIMatcher](../../../argaze.md/#argaze.GazeFeatures.AOIMatcher), [AOIScanPathAnalyzer](../../../argaze.md/#argaze.GazeFeatures.AOIScanPathAnalyzer) or [GazePositionCalibrator](../../../argaze.md/#argaze.GazeFeatures.GazePositionCalibrator). \ No newline at end of file
diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
index 9c4fb60..a230d4c 100644
--- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
@@ -6,10 +6,13 @@ This could be particularly useful for realtime gaze interaction applications.
## Load ArFrame configuration from dictionary
-First of all, [ArFrame](../../../argaze.md/#argaze.ArFeatures.ArFrame) configuration can be loaded from a Python dictionary.
+An [ArFrame](../../../argaze.md/#argaze.ArFeatures.ArFrame) configuration can be loaded from a Python dictionary.
```python
-from argaze import ArFeatures
+from argaze import ArFeatures, DataFeatures
+
+# Set working directory to enable relative file path loading
+DataFeatures.set_working_directory('path/to/folder')
# Edit a dict with ArFrame configuration
configuration = {
@@ -40,7 +43,7 @@ configuration = {
}
# Load ArFrame
-with ArFeatures.ArFrame.from_dict(configuration) as ar_frame:
+with ArFeatures.ArFrame(**configuration) as ar_frame:
# Do something with ArFrame
...
@@ -95,9 +98,11 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho
# Do something with scan path analysis
if ar_frame.is_analysis_available():
- for scan_path_analyzer_name, scan_path_analysis in ar_frame.analysis:
+ for scan_path_analyzer_name, analyses in ar_frame.analysis().items():
- ...
+ for analysis_name, analysis in analyses.items():
+
+ ...
# Do something with layers aoi scan path analysis
for layer_name, ar_layer in ar_frame.layers.items():
@@ -107,9 +112,11 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho
if ar_layer.is_analysis_available():
- for aoi_scan_path_analyzer_name, aoi_scan_path_analysis in ar_layer.analysis:
+ for aoi_scan_path_analyzer_name, analyses in ar_frame.analysis().items():
- ...
+ for analysis_name, analysis in analyses.items():
+
+ ...
# Do something with pipeline exception
except Exception as e:
@@ -136,9 +143,9 @@ Then, the last gaze movement type can be tested thanks to [GazeFeatures.is_fixat
To know when new scan path analysis is available.
-### *ar_frame.analysis()*
+### *ar_frame.analysis().items()*
-This an iterator to access to all scan path analysis.
+This an iterator to access to all scan path analysis. Notice that each scan path analyzer returns a dictionary containing possibly several analyses.
### *ar_layer.last_looked_aoi_name()*
@@ -148,9 +155,9 @@ The name of the last aoi matching done by [AoiMatcher](../../../argaze.md/#argaz
To know when new aoi scan path analysis is available.
-### *ar_layer.analysis()*
+### *ar_layer.analysis().items()*
-This an iterator to access to all aoi scan path analysis.
+This an iterator to access to all aoi scan path analysis. Notice that each aoi scan path analyzer returns a dictionary containing possibly several analyses.
## Setup ArFrame image parameters
diff --git a/docs/user_guide/gaze_analysis_pipeline/background.md b/docs/user_guide/gaze_analysis_pipeline/background.md
index c703a4f..900d151 100644
--- a/docs/user_guide/gaze_analysis_pipeline/background.md
+++ b/docs/user_guide/gaze_analysis_pipeline/background.md
@@ -13,14 +13,16 @@ Here is an extract from the JSON ArFrame configuration file where a background p
```json
{
- "name": "My FullHD screen",
- "size": [1920, 1080],
- ...
- "background": "./bosch.png",
- ...
- "image_parameters": {
+ "argaze.ArFeatures.ArFrame": {
+ "name": "My FullHD screen",
+ "size": [1920, 1080],
...
- "background_weight": 1
+ "background": "./bosch.png",
+ ...
+ "image_parameters": {
+ ...
+ "background_weight": 1
+ }
}
}
```
diff --git a/docs/user_guide/gaze_analysis_pipeline/heatmap.md b/docs/user_guide/gaze_analysis_pipeline/heatmap.md
index 186ce68..2057dbe 100644
--- a/docs/user_guide/gaze_analysis_pipeline/heatmap.md
+++ b/docs/user_guide/gaze_analysis_pipeline/heatmap.md
@@ -13,18 +13,20 @@ Here is an extract from the JSON ArFrame configuration file where heatmap is ena
```json
{
- "name": "My FullHD screen",
- "size": [1920, 1080],
- ...
- "heatmap": {
- "size": [320, 180],
- "sigma": 0.025,
- "buffer": 0
- },
- ...
- "image_parameters": {
+ "argaze.ArFeatures.ArFrame": {
+ "name": "My FullHD screen",
+ "size": [1920, 1080],
...
- "heatmap_weight": 1
+ "heatmap": {
+ "size": [320, 180],
+ "sigma": 0.025,
+ "buffer": 0
+ },
+ ...
+ "image_parameters": {
+ ...
+ "heatmap_weight": 1
+ }
}
}
```
diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md
index c0bc9df..5ba47b4 100644
--- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md
+++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md
@@ -24,7 +24,7 @@ Read more about [AOIMatcher base class in code reference](../../../argaze.md/#ar
### JSON sample
```json
-"DeviationCircleCoverage": {
+"argaze.GazeAnalysis.DeviationCircleCoverage.AOIMatcher": {
"coverage_threshold": 0.5
}
```
@@ -36,5 +36,5 @@ Read more about [AOIMatcher base class in code reference](../../../argaze.md/#ar
### JSON sample
```json
-"FocusPointInside": {}
+"argaze.GazeAnalysis.FocusPointInside.AOIMatcher": {}
```
diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md
index 9ac2f6d..8bb2cf7 100644
--- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md
+++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md
@@ -27,7 +27,7 @@ Read more about [AOIScanPathAnalyzer base class in code reference](../../../arga
### JSON sample
```json
-"Basic": {}
+"argaze.GazeAnalysis.Basic.AOIScanPathAnalyzer": {}
```
## Entropy
@@ -37,7 +37,7 @@ Read more about [AOIScanPathAnalyzer base class in code reference](../../../arga
### JSON sample
```json
-"Entropy": {}
+"argaze.GazeAnalysis.Entropy.AOIScanPathAnalyzer": {}
```
## K-modified coefficient
@@ -47,7 +47,7 @@ Read more about [AOIScanPathAnalyzer base class in code reference](../../../arga
### JSON sample
```json
-"KCoefficient": {}
+"argaze.GazeAnalysis.KCoefficient.AOIScanPathAnalyzer": {}
```
## Lempel-Ziv complexity
@@ -57,7 +57,7 @@ Read more about [AOIScanPathAnalyzer base class in code reference](../../../arga
### JSON sample
```json
-"LempelZivComplexity": {}
+"argaze.GazeAnalysis.LempelZivComplexity.AOIScanPathAnalyzer": {}
```
## N-Gram
@@ -67,7 +67,7 @@ Read more about [AOIScanPathAnalyzer base class in code reference](../../../arga
### JSON sample
```json
-"NGram": {
+"argaze.GazeAnalysis.NGram.AOIScanPathAnalyzer": {
"n_min": 3,
"n_max": 5
}
@@ -80,5 +80,5 @@ Read more about [AOIScanPathAnalyzer base class in code reference](../../../arga
### JSON sample
```json
-"TransitionMatrix": {}
+"argaze.GazeAnalysis.TransitionMatrix.AOIScanPathAnalyzer": {}
```
diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md
index 6530c15..969dd0b 100644
--- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md
+++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_movement_identifiers.md
@@ -20,7 +20,7 @@ Read more about [GazeMovementIdentifier base class in code reference](../../../a
### JSON sample
```json
-"DispersionThresholdIdentification": {
+"argaze.GazeAnalysis.DispersionThresholdIdentification.GazeMovementIdentifier": {
"deviation_max_threshold": 25,
"duration_min_threshold": 150
}
@@ -33,7 +33,7 @@ Read more about [GazeMovementIdentifier base class in code reference](../../../a
### JSON sample
```json
-"VelocityThresholdIdentification": {
+"argaze.GazeAnalysis.VelocityThresholdIdentification.GazeMovementIdentifier": {
"velocity_max_threshold": 10,
"duration_min_threshold": 200
}
diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md
index 67dd779..bbaf4dc 100644
--- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md
+++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/gaze_position_calibrators.md
@@ -25,7 +25,7 @@ Read more about [GazePositionCalibrator base class in code reference](../../../a
### JSON sample
```json
-"LinearRegression": {
+"argaze.GazeAnalysis.LinearRegression.GazePositionCalibrator": {
"coefficients": [
[
0.901167941442693,
diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md
index f1d38e2..39268b7 100644
--- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md
+++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md
@@ -27,7 +27,7 @@ Read more about [ScanPathAnalyzer base class in code reference](../../../argaze.
### JSON sample
```json
-"Basic": {}
+"argaze.GazeAnalysis.Basic.ScanPathAnalyzer": {}
```
## Explore/Exploit ratio
@@ -37,7 +37,7 @@ Read more about [ScanPathAnalyzer base class in code reference](../../../argaze.
### JSON sample
```json
-"ExploreExploitRatio": {
+"argaze.GazeAnalysis.ExploreExploitRatio.ScanPathAnalyzer": {
"short_fixation_duration_threshold": 0
}
```
@@ -49,7 +49,7 @@ Read more about [ScanPathAnalyzer base class in code reference](../../../argaze.
### JSON sample
```json
-"KCoefficient": {}
+"argaze.GazeAnalysis.KCoefficient.ScanPathAnalyzer": {}
```
## Nearest neighbor index
@@ -58,5 +58,5 @@ Read more about [ScanPathAnalyzer base class in code reference](../../../argaze.
### JSON sample
```json
-"NearestNeighborIndex": {}
+"argaze.GazeAnalysis.NearestNeighborIndex.ScanPathAnalyzer": {}
```