Commit bfb35d09 authored by liyinhao's avatar liyinhao Committed by zhangwenwei
Browse files

Fix visualize

parent f09e8c62
...@@ -78,16 +78,17 @@ def show_result(points, gt_bboxes, pred_bboxes, out_dir, filename): ...@@ -78,16 +78,17 @@ def show_result(points, gt_bboxes, pred_bboxes, out_dir, filename):
out_dir (str): Path of output directory out_dir (str): Path of output directory
filename (str): Filename of the current frame. filename (str): Filename of the current frame.
""" """
mmcv.mkdir_or_exist(out_dir) result_path = osp.join(out_dir, filename)
mmcv.mkdir_or_exist(result_path)
if gt_bboxes is not None: if gt_bboxes is not None:
gt_bboxes[:, 6] *= -1 gt_bboxes[:, 6] *= -1
_write_oriented_bbox(gt_bboxes, osp.join(out_dir, _write_oriented_bbox(gt_bboxes,
f'{filename}_gt.ply')) osp.join(result_path, f'{filename}_gt.ply'))
if points is not None: if points is not None:
_write_ply(points, osp.join(out_dir, f'{filename}_points.obj')) _write_ply(points, osp.join(result_path, f'{filename}_points.obj'))
if pred_bboxes is not None: if pred_bboxes is not None:
pred_bboxes[:, 6] *= -1 pred_bboxes[:, 6] *= -1
_write_oriented_bbox(pred_bboxes, _write_oriented_bbox(pred_bboxes,
osp.join(out_dir, f'{filename}_pred.ply')) osp.join(result_path, f'{filename}_pred.ply'))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment