def detect(self, frame: np.array) -> (np.array, list):
    try:
        (bbox, labels, conf) = detect_common_objects(frame, confidence=self.detector_confidence, model=self.detector_model)
        frame = draw_bbox(img=frame, bbox=bbox, labels=labels, confidence=conf, write_conf=False, colors=self.bgr_colors)
        return (frame, labels)
    except Exception as e:
        logger.error(f'{self.__class__.__name__} Exception: {e}')
def detect(self, frame: np.array) -> (np.array, list):
    try:
        (bbox, labels, conf) = detect_common_objects(frame, confidence=self.detector_confidence, model=self.detector_model)
        frame = draw_bbox(img=frame, bbox=bbox, labels=labels, confidence=conf, write_conf=False, colors=self.bgr_colors)
        return (frame, labels)
    except Exception as e:
        logger.error(f'{self.__class__.__name__} Exception: {e}')