Skip to content

Commit 632adec

Browse files
author
arch
committed
make tracker more verbose
1 parent 0ba2417 commit 632adec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

funscript_editor/algorithms/videotracker.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
""" Video Tracker """
22

3-
from os import supports_effective_ids
3+
from os import supports_effective_ids, wait
44
import cv2
55
import time
66
import logging
@@ -199,8 +199,15 @@ def run(self) -> None:
199199
)
200200

201201
while not self.stopped:
202+
wait_counter = 0
202203
if self.queue_in.qsize() == 0 or self.queue_out.full():
203204
time.sleep(self.sleep_time)
205+
wait_counter += 1
206+
if wait_counter == 2000:
207+
if self.queue_in.qsize() == 0:
208+
self.__logger.error("Video Tracker still waiting for Input")
209+
else:
210+
self.__logger.error("Video Tracker output queue overrun!!!")
204211
else:
205212
frame = self.queue_in.get()
206213
frame_roi = frame[y0:y1, x0:x1]
@@ -219,4 +226,5 @@ def run(self) -> None:
219226
status = StaticVideoTracker.Status.IMPLAUSIBLE
220227

221228
self.queue_out.put((status, bbox))
229+
self.__logger.info("Video Tracker Stoped")
222230

0 commit comments

Comments
 (0)