Skip to content

Commit

Permalink
[Fix]: fix point type errors in function docstring (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuziyi616 authored Apr 8, 2021
1 parent ecd0d06 commit 3116518
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions mmdet3d/datasets/pipelines/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _remove_close(self, points, radius=1.0):
"""Removes point too close within a certain radius from origin.
Args:
points (np.ndarray): Sweep points.
points (np.ndarray | :obj:`BasePoints`): Sweep points.
radius (float): Radius below which points are removed.
Defaults to 1.0.
Expand Down Expand Up @@ -183,7 +183,8 @@ def __call__(self, results):
dict: The result dict containing the multi-sweep points data. \
Added key and value are described below.
- points (np.ndarray): Multi-sweep point cloud arrays.
- points (np.ndarray | :obj:`BasePoints`): Multi-sweep point \
cloud arrays.
"""
points = results['points']
points.tensor[:, 4] = 0
Expand Down Expand Up @@ -295,7 +296,7 @@ def __call__(self, results):
dict: The result dict containing the normalized points. \
Updated key and value are described below.
- points (np.ndarray): Points after color normalization.
- points (:obj:`BasePoints`): Points after color normalization.
"""
points = results['points']
assert points.attribute_dims is not None and \
Expand Down Expand Up @@ -393,7 +394,7 @@ def __call__(self, results):
dict: The result dict containing the point clouds data. \
Added key and value are described below.
- points (np.ndarray): Point clouds data.
- points (:obj:`BasePoints`): Point clouds data.
"""
pts_filename = results['pts_filename']
points = self._load_points(pts_filename)
Expand Down
16 changes: 8 additions & 8 deletions mmdet3d/datasets/pipelines/transforms_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def remove_points_in_boxes(points, boxes):
"""Remove the points in the sampled bounding boxes.
Args:
points (np.ndarray): Input point cloud array.
points (:obj:`BasePoints`): Input point cloud array.
boxes (np.ndarray): Sampled ground truth boxes.
Returns:
Expand Down Expand Up @@ -604,7 +604,7 @@ def points_random_sampling(self,
Sample points to a certain number.
Args:
points (np.ndarray): 3D Points.
points (np.ndarray | :obj:`BasePoints`): 3D Points.
num_samples (int): Number of samples to be sampled.
replace (bool): Whether the sample is with or without replacement.
Defaults to None.
Expand All @@ -613,7 +613,7 @@ def points_random_sampling(self,
Returns:
tuple[np.ndarray] | np.ndarray:
- points (np.ndarray): 3D Points.
- points (np.ndarray | :obj:`BasePoints`): 3D Points.
- choices (np.ndarray, optional): The generated random samples.
"""
if replace is None:
Expand Down Expand Up @@ -708,10 +708,10 @@ def _input_generation(self, coords, patch_center, coord_max, attributes,
attributes (np.ndarray): features of input points.
attribute_dims (dict): Dictionary to indicate the meaning of extra
dimension.
point_type (type): class of input points.
point_type (type): class of input points inherited from BasePoints.
Returns:
np.ndarray: The generated input data.
:obj:`BasePoints`: The generated input data.
"""
# subtract patch center, the z dimension is not centered
centered_coords = coords.copy()
Expand Down Expand Up @@ -742,15 +742,15 @@ def _patch_points_sampling(self, points, sem_mask, replace=None):
Then sample points within that patch to a certain number.
Args:
points (BasePoints): 3D Points.
points (:obj:`BasePoints`): 3D Points.
sem_mask (np.ndarray): semantic segmentation mask for input points.
replace (bool): Whether the sample is with or without replacement.
Defaults to None.
Returns:
tuple[np.ndarray] | np.ndarray:
tuple[:obj:`BasePoints`, np.ndarray] | :obj:`BasePoints`:
- points (BasePoints): 3D Points.
- points (:obj:`BasePoints`): 3D Points.
- choices (np.ndarray): The generated random samples.
"""
coords = points.coord.numpy()
Expand Down

0 comments on commit 3116518

Please sign in to comment.