From 005b3a5de804e3933271cdb1d7bd90b62fa82ed7 Mon Sep 17 00:00:00 2001 From: DapengFeng Date: Wed, 15 Apr 2020 11:13:25 +0800 Subject: [PATCH] fix #1 (change waymo_extractor to waymo_toolkit) --- waymo_toolkit/extractor/image.py | 4 ++-- waymo_toolkit/extractor/label.py | 4 ++-- waymo_toolkit/extractor/laser.py | 6 +++--- waymo_toolkit/viewer/viewer_3d.py | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/waymo_toolkit/extractor/image.py b/waymo_toolkit/extractor/image.py index d7b81d9..fbcc6bc 100644 --- a/waymo_toolkit/extractor/image.py +++ b/waymo_toolkit/extractor/image.py @@ -4,8 +4,8 @@ import numpy as np import tensorflow as tf -from waymo_extractor.protos import dataset_pb2 as open_dataset -from waymo_extractor.utils.logger import setup_logger +from waymo_toolkit.protos import dataset_pb2 as open_dataset +from waymo_toolkit.utils.logger import setup_logger from .extractor import Extractor diff --git a/waymo_toolkit/extractor/label.py b/waymo_toolkit/extractor/label.py index 3eddfa7..d476098 100644 --- a/waymo_toolkit/extractor/label.py +++ b/waymo_toolkit/extractor/label.py @@ -2,8 +2,8 @@ import tensorflow as tf -from waymo_extractor.protos import annotation_pb2 as annotation -from waymo_extractor.utils.logger import setup_logger +from waymo_toolkit.protos import annotation_pb2 as annotation +from waymo_toolkit.utils.logger import setup_logger from .extractor import Extractor diff --git a/waymo_toolkit/extractor/laser.py b/waymo_toolkit/extractor/laser.py index 6fdae4c..dcedf75 100644 --- a/waymo_toolkit/extractor/laser.py +++ b/waymo_toolkit/extractor/laser.py @@ -4,9 +4,9 @@ import tensorflow as tf from waymo_open_dataset.utils.frame_utils import parse_range_image_and_camera_projection -from waymo_extractor.protos import dataset_pb2 as open_dataset -from waymo_extractor.utils.frame_utils import convert_range_image_to_point_cloud -from waymo_extractor.utils.logger import setup_logger +from waymo_toolkit.protos import dataset_pb2 as open_dataset +from waymo_toolkit.utils.frame_utils import convert_range_image_to_point_cloud +from waymo_toolkit.utils.logger import setup_logger from .extractor import Extractor diff --git a/waymo_toolkit/viewer/viewer_3d.py b/waymo_toolkit/viewer/viewer_3d.py index d7a2fb9..06566a0 100644 --- a/waymo_toolkit/viewer/viewer_3d.py +++ b/waymo_toolkit/viewer/viewer_3d.py @@ -21,8 +21,7 @@ def __init__(self, args): def _keep(self, pcl: np.ndarray, plane: np.ndarray, threshold: float) -> np.ndarray: z_min = np.percentile(pcl[:, -1], 10) - z_max = np.percentile(pcl[:, -1], 90) - z_mask = np.logical_and(pcl[:, -1] > z_min, pcl[:, -1] < z_max) + z_mask = pcl[:, -1] > z_min pcla = np.ones((len(pcl), 4), dtype=np.float32) pcla[:, :3] = pcl plane_mask = np.abs(pcla @ plane) > threshold