From 2c7562e6d64dcd34529f105bfd4d007f2d1addf9 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 23 Aug 2023 11:31:28 +0200 Subject: Externalizing aoi matching algorithm as a new configurable pipeline step. --- src/argaze/GazeFeatures.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/argaze/GazeFeatures.py') diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index bb5f991..33fd562 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -15,6 +15,7 @@ import json from inspect import getmembers from argaze import DataStructures +from argaze.AreaOfInterest import AOIFeatures import numpy import pandas @@ -700,6 +701,20 @@ class ScanPathAnalyzer(): raise NotImplementedError('analyze() method not implemented') +class AOIMatcher(): + """Abstract class to define what should provide an AOI matcher algorithm.""" + + def match(self, aoi_scene: AOIFeatures.AOIScene, gaze_movement: GazeMovement, exclude=[]) -> str: + """Which AOI is looked in the scene?""" + + raise NotImplementedError('match() method not implemented') + + @property + def looked_aoi(self) -> str: + """Get most likely looked aoi name.""" + + raise NotImplementedError('looked_aoi getter not implemented') + AOIScanStepType = TypeVar('AOIScanStep', bound="AOIScanStep") # Type definition for type annotation convenience -- cgit v1.1