Skip to content

Commit

Permalink
modify local_visualizer.py: apply pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
404Vector committed Feb 8, 2023
1 parent 4a39789 commit 3b25986
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mmdet3d/visualization/local_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ def _draw_instances_3d(self, data_input: dict, instances: InstanceData,
dict: the drawn point cloud and image which channel is RGB.
"""

if not len(instances) > 0: # Only visualize when there is at least one instance
# Only visualize when there is at least one instance
if not len(instances) > 0:
return None

bboxes_3d = instances.bboxes_3d # BaseInstance3DBoxes
Expand Down Expand Up @@ -789,7 +790,7 @@ def add_datasample(self,
drawn_img_3d = gt_data_3d['img']
elif pred_data_3d is not None:
drawn_img_3d = pred_data_3d['img']
else: # both instances of gt and pred are empty
else: # both instances of gt and pred are empty
drawn_img_3d = None
else:
drawn_img_3d = None
Expand Down

0 comments on commit 3b25986

Please sign in to comment.