未验证 提交 c3360a3d 编写于 作者: J Jason 提交者: GitHub

Merge pull request #45 from FlyingQianMM/develop_qh

fix bugs in visualize.py
......@@ -29,8 +29,8 @@ def visualize_detection(image, result, threshold=0.5, save_dir='./'):
if isinstance(image, np.ndarray):
image_name = str(int(time.time())) + '.jpg'
else:
image = cv2.imread(image)
image_name = os.path.split(image)[-1]
image = cv2.imread(image)
image = draw_bbox_mask(image, result, threshold=threshold)
if save_dir is not None:
......@@ -65,8 +65,8 @@ def visualize_segmentation(image, result, weight=0.6, save_dir='./'):
im = image
image_name = str(int(time.time())) + '.jpg'
else:
image = cv2.imread(image)
image_name = os.path.split(image)[-1]
image = cv2.imread(image)
vis_result = cv2.addWeighted(im, weight, pseudo_img, 1 - weight, 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册