add private module to create model object for movement api

This commit is contained in:
jordi.hasianta
2022-09-15 19:46:33 +07:00
parent ded93afb86
commit 760c9617be
6 changed files with 125 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import tempfile
from opendbm.api_lib.model import VideoModel
from opendbm.dbm_lib.dbm_features.raw_features.movement.eye_gaze import run_eye_gaze
class EyeGaze(VideoModel):
def __init__(self):
super().__init__()
self._params = [
"mov_lefteyex",
"mov_lefteyey",
"mov_lefteyez",
"mov_righteyex",
"mov_righteyey",
"mov_righteyez",
"mov_leyedisp",
"mov_reyedisp",
]
def _fit_transform(self, path):
return run_eye_gaze(
path, f"{tempfile.gettempdir()}/", self.r_config, save=False
)