diff --git a/mmdet3d/visualization/local_visualizer.py b/mmdet3d/visualization/local_visualizer.py index ff4c87396..97362cd47 100644 --- a/mmdet3d/visualization/local_visualizer.py +++ b/mmdet3d/visualization/local_visualizer.py @@ -5,6 +5,7 @@ import mmcv import numpy as np +from mmengine import mkdir_or_exist from mmengine.dist import master_only from torch import Tensor @@ -605,6 +606,8 @@ def add_datasample(self, win_name=name, wait_time=wait_time) + mkdir_or_exist(out_file) + if out_file is not None: if drawn_img_3d is not None: mmcv.imwrite(drawn_img_3d[..., ::-1], out_file + '.jpg')