未验证 提交 19523861 编写于 作者: Z Zeyu Chen 提交者: GitHub

Fix typo in visualize.py

fix  error word in   visualize.py
...@@ -73,7 +73,7 @@ def cls_compose(im, label=None, transforms=None, vdl_writer=None, step=0): ...@@ -73,7 +73,7 @@ def cls_compose(im, label=None, transforms=None, vdl_writer=None, step=0):
raise TypeError('Can\'t read The image file {}!'.format(im)) raise TypeError('Can\'t read The image file {}!'.format(im))
im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB) im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
if vdl_writer is not None: if vdl_writer is not None:
vdl_writer.add_image(tag='0. OriginalImange/' + str(step), vdl_writer.add_image(tag='0. OriginalImage/' + str(step),
img=im, img=im,
step=0) step=0)
op_id = 1 op_id = 1
...@@ -148,7 +148,7 @@ def det_compose(im, im_info=None, label_info=None, transforms=None, vdl_writer=N ...@@ -148,7 +148,7 @@ def det_compose(im, im_info=None, label_info=None, transforms=None, vdl_writer=N
if len(outputs) == 3: if len(outputs) == 3:
label_info = outputs[2] label_info = outputs[2]
if vdl_writer is not None: if vdl_writer is not None:
vdl_writer.add_image(tag='0. OriginalImange/' + str(step), vdl_writer.add_image(tag='0. OriginalImage/' + str(step),
img=im, img=im,
step=0) step=0)
op_id = 1 op_id = 1
...@@ -209,7 +209,7 @@ def det_compose(im, im_info=None, label_info=None, transforms=None, vdl_writer=N ...@@ -209,7 +209,7 @@ def det_compose(im, im_info=None, label_info=None, transforms=None, vdl_writer=N
if vdl_writer is not None: if vdl_writer is not None:
tag = str(op_id) + '. ' + op.__class__.__name__ + '/' + str(step) tag = str(op_id) + '. ' + op.__class__.__name__ + '/' + str(step)
if op is None: if op is None:
tag = str(op_id) + '. OriginalImangeWithGTBox/' + str(step) tag = str(op_id) + '. OriginalImageWithGTBox/' + str(step)
vdl_writer.add_image(tag=tag, vdl_writer.add_image(tag=tag,
img=vdl_im, img=vdl_im,
step=0) step=0)
...@@ -233,7 +233,7 @@ def seg_compose(im, im_info=None, label=None, transforms=None, vdl_writer=None, ...@@ -233,7 +233,7 @@ def seg_compose(im, im_info=None, label=None, transforms=None, vdl_writer=None,
if not isinstance(label, np.ndarray): if not isinstance(label, np.ndarray):
label = np.asarray(Image.open(label)) label = np.asarray(Image.open(label))
if vdl_writer is not None: if vdl_writer is not None:
vdl_writer.add_image(tag='0. OriginalImange' + '/' + str(step), vdl_writer.add_image(tag='0. OriginalImage' + '/' + str(step),
img=im, img=im,
step=0) step=0)
op_id = 1 op_id = 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册