Skip to content

Commit

Permalink
fix #1 (change waymo_extractor to waymo_toolkit)
Browse files Browse the repository at this point in the history
  • Loading branch information
DapengFeng committed Apr 15, 2020
1 parent ca1896b commit 005b3a5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions waymo_toolkit/extractor/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions waymo_toolkit/extractor/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions waymo_toolkit/extractor/laser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions waymo_toolkit/viewer/viewer_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 005b3a5

Please sign in to comment.