mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
fix: MacOS Leap, algo order bug
This commit is contained in:
parent
cf90914f74
commit
a3d2f4b992
@ -465,6 +465,7 @@ class EyeProcessor:
|
|||||||
self.current_algorithm = EyeInfoOrigin.HSRAC
|
self.current_algorithm = EyeInfoOrigin.HSRAC
|
||||||
|
|
||||||
def HSFM(self):
|
def HSFM(self):
|
||||||
|
print("ee")
|
||||||
if self.eye_id in [EyeId.LEFT] and self.settings.gui_circular_crop_left:
|
if self.eye_id in [EyeId.LEFT] and self.settings.gui_circular_crop_left:
|
||||||
self.current_image_gray, self.cct = circle_crop(
|
self.current_image_gray, self.cct = circle_crop(
|
||||||
self.current_image_gray, self.xc, self.yc, self.cc_radius, self.cct
|
self.current_image_gray, self.xc, self.yc, self.cc_radius, self.cct
|
||||||
@ -593,11 +594,15 @@ class EyeProcessor:
|
|||||||
|
|
||||||
if self.failed == 5 and self.sixthalgo != None:
|
if self.failed == 5 and self.sixthalgo != None:
|
||||||
self.sixthalgo()
|
self.sixthalgo()
|
||||||
|
else:
|
||||||
|
self.failed = self.failed + 1
|
||||||
|
|
||||||
if self.failed == 6 and self.seventhalgo != None:
|
if self.failed == 6 and self.seventhalgo != None:
|
||||||
self.seventhalgo()
|
self.seventhalgo()
|
||||||
|
else:
|
||||||
|
self.failed = self.failed + 1
|
||||||
|
|
||||||
if self.failed == 7 and self.eigth != None:
|
if self.failed == 7 and self.eigthalgo != None:
|
||||||
self.eigthalgo()
|
self.eigthalgo()
|
||||||
else:
|
else:
|
||||||
self.failed = 0 # we have reached last possible algo and it is disabled, move to first algo
|
self.failed = 0 # we have reached last possible algo and it is disabled, move to first algo
|
||||||
@ -625,7 +630,7 @@ class EyeProcessor:
|
|||||||
algolist[self.settings.gui_AHSFRACP] = self.AHSFRACM
|
algolist[self.settings.gui_AHSFRACP] = self.AHSFRACM
|
||||||
|
|
||||||
if self.settings.gui_AHSF:
|
if self.settings.gui_AHSF:
|
||||||
algolist[self.settings.gui_HSFP] = self.AHSFM
|
algolist[self.settings.gui_AHSFP] = self.AHSFM
|
||||||
|
|
||||||
if self.settings.gui_HSF:
|
if self.settings.gui_HSF:
|
||||||
if self.er_hsf is None:
|
if self.er_hsf is None:
|
||||||
|
|||||||
@ -27,6 +27,7 @@ Copyright (c) 2023 EyeTrackVR <3
|
|||||||
"""
|
"""
|
||||||
# LEAP = Lightweight Eyelid And Pupil
|
# LEAP = Lightweight Eyelid And Pupil
|
||||||
import os
|
import os
|
||||||
|
|
||||||
os.environ["OMP_NUM_THREADS"] = "1"
|
os.environ["OMP_NUM_THREADS"] = "1"
|
||||||
import onnxruntime
|
import onnxruntime
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -70,7 +71,7 @@ class LEAP_C(object):
|
|||||||
self.queue_max_size = 1 # Optimize for best CPU usage, Memory, and Latency. A maxsize is needed to not create a potential memory leak.
|
self.queue_max_size = 1 # Optimize for best CPU usage, Memory, and Latency. A maxsize is needed to not create a potential memory leak.
|
||||||
if platform.system() == "Darwin":
|
if platform.system() == "Darwin":
|
||||||
self.model_path = resource_path(
|
self.model_path = resource_path(
|
||||||
"EyeTrackApp/Models/mommy072623.onnx"
|
"Models/mommy072623.onnx"
|
||||||
) # funny MacOS files issues :P
|
) # funny MacOS files issues :P
|
||||||
else:
|
else:
|
||||||
self.model_path = resource_path("Models\mommy072623.onnx")
|
self.model_path = resource_path("Models\mommy072623.onnx")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user