Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sunjiahao1999 committed Oct 16, 2023
1 parent 114059e commit 0b42058
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
8 changes: 4 additions & 4 deletions demo/mono_det_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ def parse_args():
'--out-dir',
type=str,
default='outputs',
help='Output directory of prediction results.')
help='Output directory of prediction and visualization results.')
parser.add_argument(
'--show',
action='store_true',
help='Show online visualization results')
parser.add_argument(
'--wait_time',
'--wait-time',
type=float,
default=-1,
help='The interval of show (s). Demo will be blocked in showing'
'results, if wait_time is -1. Defaults to -1.')
parser.add_argument(
'--no-save-vis',
action='store_true',
help='Do not save detection vis results')
help='Do not save detection visualization results')
parser.add_argument(
'--no-save-pred',
action='store_true',
help='Do not save detection json results')
help='Do not save detection prediction results')
parser.add_argument(
'--print-result',
action='store_true',
Expand Down
10 changes: 5 additions & 5 deletions demo/multi_modality_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def parse_args():
parser.add_argument(
'--cam-type',
type=str,
default='CAM_BACK',
default='CAM_FRONT',
help='choose camera type to inference')
parser.add_argument(
'--pred-score-thr',
Expand All @@ -31,25 +31,25 @@ def parse_args():
'--out-dir',
type=str,
default='outputs',
help='Output directory of prediction results.')
help='Output directory of prediction and visualization results.')
parser.add_argument(
'--show',
action='store_true',
help='Show online visualization results')
parser.add_argument(
'--wait_time',
'--wait-time',
type=float,
default=-1,
help='The interval of show (s). Demo will be blocked in showing'
'results, if wait_time is -1. Defaults to -1.')
parser.add_argument(
'--no-save-vis',
action='store_true',
help='Do not save detection vis results')
help='Do not save detection visualization results')
parser.add_argument(
'--no-save-pred',
action='store_true',
help='Do not save detection json results')
help='Do not save detection prediction results')
parser.add_argument(
'--print-result',
action='store_true',
Expand Down
8 changes: 4 additions & 4 deletions demo/pcd_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ def parse_args():
'--out-dir',
type=str,
default='outputs',
help='Output directory of prediction results.')
help='Output directory of prediction and visualization results.')
parser.add_argument(
'--show',
action='store_true',
help='Show online visualization results')
parser.add_argument(
'--wait_time',
'--wait-time',
type=float,
default=-1,
help='The interval of show (s). Demo will be blocked in showing'
'results, if wait_time is -1. Defaults to -1.')
parser.add_argument(
'--no-save-vis',
action='store_true',
help='Do not save detection vis results')
help='Do not save detection visualization results')
parser.add_argument(
'--no-save-pred',
action='store_true',
help='Do not save detection json results')
help='Do not save detection prediction results')
parser.add_argument(
'--print-result',
action='store_true',
Expand Down
8 changes: 4 additions & 4 deletions demo/pcd_seg_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ def parse_args():
'--out-dir',
type=str,
default='outputs',
help='Output directory of prediction results.')
help='Output directory of prediction and visualization results.')
parser.add_argument(
'--show',
action='store_true',
help='Show online visualization results')
parser.add_argument(
'--wait_time',
'--wait-time',
type=float,
default=-1,
help='The interval of show (s). Demo will be blocked in showing'
'results, if wait_time is -1. Defaults to -1.')
parser.add_argument(
'--no-save-vis',
action='store_true',
help='Do not save detection vis results')
help='Do not save detection visualization results')
parser.add_argument(
'--no-save-pred',
action='store_true',
help='Do not save detection json results')
help='Do not save detection prediction results')
parser.add_argument(
'--print-result',
action='store_true',
Expand Down
2 changes: 1 addition & 1 deletion mmdet3d/apis/inferencers/base_3d_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def postprocess(
Defaults to False.
print_result (bool): Whether to print the inference result w/o
visualization to the console. Defaults to False.
pred_out_dir (str): Dir to save the inference results w/o
pred_out_dir (str): Directory to save the inference results w/o
visualization. If left as empty, no file will be saved.
Defaults to ''.
Expand Down
5 changes: 4 additions & 1 deletion mmdet3d/visualization/local_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,10 @@ def add_datasample(self,
gt_img_data = None
pred_img_data = None

if not hasattr(self, 'o3d_vis'):
if not hasattr(self, 'o3d_vis') and vis_task in [
'multi-view_det', 'lidar_det', 'lidar_seg',
'multi-modality_det'
]:
self.o3d_vis = self._initialize_o3d_vis(show=show)

if draw_gt and data_sample is not None:
Expand Down

0 comments on commit 0b42058

Please sign in to comment.