fix: MacOS Leap, algo order bug

This commit is contained in:
Prohurtz 2023-12-24 16:14:03 -06:00
parent cf90914f74
commit a3d2f4b992
2 changed files with 9 additions and 3 deletions

View File

@ -465,6 +465,7 @@ class EyeProcessor:
self.current_algorithm = EyeInfoOrigin.HSRAC
def HSFM(self):
print("ee")
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.xc, self.yc, self.cc_radius, self.cct
@ -593,11 +594,15 @@ class EyeProcessor:
if self.failed == 5 and self.sixthalgo != None:
self.sixthalgo()
else:
self.failed = self.failed + 1
if self.failed == 6 and self.seventhalgo != None:
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()
else:
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
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.er_hsf is None:

View File

@ -27,6 +27,7 @@ Copyright (c) 2023 EyeTrackVR <3
"""
# LEAP = Lightweight Eyelid And Pupil
import os
os.environ["OMP_NUM_THREADS"] = "1"
import onnxruntime
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.
if platform.system() == "Darwin":
self.model_path = resource_path(
"EyeTrackApp/Models/mommy072623.onnx"
"Models/mommy072623.onnx"
) # funny MacOS files issues :P
else:
self.model_path = resource_path("Models\mommy072623.onnx")