diff --git a/trap/renderer.py b/trap/renderer.py index 453de58..e2c531f 100644 --- a/trap/renderer.py +++ b/trap/renderer.py @@ -4,6 +4,7 @@ from argparse import Namespace import datetime import logging from multiprocessing import Event +from multiprocessing.synchronize import Event as BaseEvent import cv2 import numpy as np @@ -15,7 +16,7 @@ from trap.frame_emitter import DetectionState, Frame logger = logging.getLogger("trap.renderer") class Renderer: - def __init__(self, config: Namespace, is_running: Event): + def __init__(self, config: Namespace, is_running: BaseEvent): self.config = config self.is_running = is_running @@ -237,6 +238,6 @@ def decorate_frame(frame: Frame, prediction_frame: Frame, first_time: float, con return img -def run_renderer(config: Namespace, is_running: Event): +def run_renderer(config: Namespace, is_running: BaseEvent): renderer = Renderer(config, is_running) renderer.run() \ No newline at end of file