def show_result(self, img, dets, class_names, score_thres=0.3, show=True, save_path=None): result = overlay_bbox_cv(img, dets, class_names, score_thresh=score_thres) if show: cv2.imshow('det', result)
def show_result(self, img, res_dict, class_names, score_thres=0.3, show=True, save_path=None): """ :param img: :param res_dict: :param class_names: :param score_thres: :param show: :param save_path: :return: """ img_draw = overlay_bbox_cv(img, res_dict, class_names, score_thresh=score_thres) if show: cv2.imshow('det', img_draw) if not save_path is None: cv2.imwrite(save_path, img_draw) print('{:s} saved.'.format(save_path))