Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Rewarp open3d #323

Merged
merged 4 commits into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions mmdet3d/core/visualizer/open3d_vis.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import cv2
import numpy as np
import open3d as o3d
import torch
from matplotlib import pyplot as plt
from open3d import geometry

try:
import open3d as o3d
from open3d import geometry
except ImportError:
raise ImportError(
'Please run "pip install open3d" to install open3d first.')


def _draw_points(points,
Expand Down
8 changes: 6 additions & 2 deletions mmdet3d/core/visualizer/show_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import trimesh
from os import path as osp

from .open3d_vis import Visualizer


def _write_ply(points, out_filename):
"""Write points into ``ply`` format for meshlab visualization.
Expand Down Expand Up @@ -81,6 +79,12 @@ def show_result(points, gt_bboxes, pred_bboxes, out_dir, filename, show=True):
filename (str): Filename of the current frame.
show (bool): Visualize the results online.
"""
try:
ZwwWayne marked this conversation as resolved.
Show resolved Hide resolved
from .open3d_vis import Visualizer
except ImportError:
raise ImportError(
'Please run "pip install open3d" to install open3d first.')

if show:
vis = Visualizer(points)
if pred_bboxes is not None:
Expand Down
1 change: 1 addition & 0 deletions requirements/optional.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
open3d
waymo-open-dataset-tf-2-1-0==1.2.0
1 change: 0 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interrogate
isort
# Note: used for kwarray.group_items, this may be ported to mmcv in the future.
kwarray
open3d
pytest
pytest-cov
pytest-runner
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ line_length = 79
multi_line_output = 0
known_standard_library = setuptools
known_first_party = mmdet,mmdet3d
known_third_party = cv2,load_scannet_data,lyft_dataset_sdk,m2r,matplotlib,mmcv,nuimages,numba,numpy,nuscenes,open3d,pandas,plyfile,pycocotools,pyquaternion,pytest,recommonmark,scannet_utils,scipy,seaborn,shapely,skimage,tensorflow,terminaltables,torch,trimesh,waymo_open_dataset
known_third_party = cv2,load_scannet_data,lyft_dataset_sdk,m2r,matplotlib,mmcv,nuimages,numba,numpy,nuscenes,pandas,plyfile,pycocotools,pyquaternion,pytest,recommonmark,scannet_utils,scipy,seaborn,shapely,skimage,tensorflow,terminaltables,torch,trimesh,waymo_open_dataset
no_lines_before = STDLIB,LOCALFOLDER
default_section = THIRDPARTY