Fix multiprocessing Event typing in renderer
This commit is contained in:
parent
7710794bad
commit
9a64751855
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ from argparse import Namespace
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
from multiprocessing import Event
|
from multiprocessing import Event
|
||||||
|
from multiprocessing.synchronize import Event as BaseEvent
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ from trap.frame_emitter import DetectionState, Frame
|
||||||
logger = logging.getLogger("trap.renderer")
|
logger = logging.getLogger("trap.renderer")
|
||||||
|
|
||||||
class Renderer:
|
class Renderer:
|
||||||
def __init__(self, config: Namespace, is_running: Event):
|
def __init__(self, config: Namespace, is_running: BaseEvent):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.is_running = is_running
|
self.is_running = is_running
|
||||||
|
|
||||||
|
@ -237,6 +238,6 @@ def decorate_frame(frame: Frame, prediction_frame: Frame, first_time: float, con
|
||||||
return img
|
return img
|
||||||
|
|
||||||
|
|
||||||
def run_renderer(config: Namespace, is_running: Event):
|
def run_renderer(config: Namespace, is_running: BaseEvent):
|
||||||
renderer = Renderer(config, is_running)
|
renderer = Renderer(config, is_running)
|
||||||
renderer.run()
|
renderer.run()
|
Loading…
Reference in a new issue