From eacaa1fbba7af018d1bc82eb390279d81a9d067c Mon Sep 17 00:00:00 2001 From: Prohurtz <48768484+RedHawk989@users.noreply.github.com> Date: Sat, 24 Jun 2023 18:58:54 -0500 Subject: [PATCH] fix mommy file dir --- EyeTrackApp/camera.py | 7 ++++++- EyeTrackApp/mommy.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/EyeTrackApp/camera.py b/EyeTrackApp/camera.py index 1693c5f..627e3a8 100644 --- a/EyeTrackApp/camera.py +++ b/EyeTrackApp/camera.py @@ -94,9 +94,10 @@ class Camera: self.cv2_camera.release() def run(self): while True: - if self.cancellation_event.is_set(): + if self.cancellation_event.is_set(): #TODO: fix stall when app closes and cam not found print(f"{Fore.CYAN}[INFO] Exiting Capture thread{Fore.RESET}") self.done_callback("stop") + # print('close') return should_push = True # If things aren't open, retry until they are. Don't let read requests come in any earlier @@ -151,6 +152,10 @@ class Camera: if not should_push: # if we get all the way down here, consider ourselves connected self.camera_status = CameraState.CONNECTED + if self.cancellation_event.is_set(): #TODO: fix stall when app closes and cam not found + print(f"{Fore.CYAN}[INFO] Exiting Capture thread{Fore.RESET}") + self.done_callback("stop") + # print('close') def get_cv2_camera_picture(self, should_push): try: ret, image = self.cv2_camera.read() diff --git a/EyeTrackApp/mommy.py b/EyeTrackApp/mommy.py index 9a4bb54..4ca012a 100644 --- a/EyeTrackApp/mommy.py +++ b/EyeTrackApp/mommy.py @@ -80,7 +80,7 @@ class MOMMY_C(object): # Config variables self.num_threads = 2 # Number of python threads to use (using ~1 more than needed to acheive wanted fps yeilds lower cpu usage) self.queue_max_size = self.num_threads + 4 # Optimize for best CPU usage, Memory, and Latency. A maxsize is needed to not create a potential memory leak. - self.model_path = 'C:/Users/beaul/PycharmProjects/EyeTrackVR/EyeTrackApp/Models/mommy062023.onnx' + self.model_path = 'Models/mommy062023.onnx' self.interval = 1 # FPS print update rate self.low_priority = True # set process priority to low self.print_fps = True