Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
1211b06b
Unverified
Commit
1211b06b
authored
May 28, 2022
by
gy77
Committed by
GitHub
May 28, 2022
Browse files
Add type hint in mmcv/ops/points_in_boxes.py (#2007)
* add type hint in mmcv/ops/points_in_boxes.py * fix lint
parent
50d15052
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
mmcv/ops/points_in_boxes.py
mmcv/ops/points_in_boxes.py
+4
-3
No files found.
mmcv/ops/points_in_boxes.py
View file @
1211b06b
import
torch
import
torch
from
torch
import
Tensor
from
..utils
import
ext_loader
from
..utils
import
ext_loader
...
@@ -8,7 +9,7 @@ ext_module = ext_loader.load_ext('_ext', [
...
@@ -8,7 +9,7 @@ ext_module = ext_loader.load_ext('_ext', [
])
])
def
points_in_boxes_part
(
points
,
boxes
)
:
def
points_in_boxes_part
(
points
:
Tensor
,
boxes
:
Tensor
)
->
Tensor
:
"""Find the box in which each point is (CUDA).
"""Find the box in which each point is (CUDA).
Args:
Args:
...
@@ -56,7 +57,7 @@ def points_in_boxes_part(points, boxes):
...
@@ -56,7 +57,7 @@ def points_in_boxes_part(points, boxes):
return
box_idxs_of_pts
return
box_idxs_of_pts
def
points_in_boxes_cpu
(
points
,
boxes
)
:
def
points_in_boxes_cpu
(
points
:
Tensor
,
boxes
:
Tensor
)
->
Tensor
:
"""Find all boxes in which each point is (CPU). The CPU version of
"""Find all boxes in which each point is (CPU). The CPU version of
:meth:`points_in_boxes_all`.
:meth:`points_in_boxes_all`.
...
@@ -94,7 +95,7 @@ def points_in_boxes_cpu(points, boxes):
...
@@ -94,7 +95,7 @@ def points_in_boxes_cpu(points, boxes):
return
point_indices
return
point_indices
def
points_in_boxes_all
(
points
,
boxes
)
:
def
points_in_boxes_all
(
points
:
Tensor
,
boxes
:
Tensor
)
->
Tensor
:
"""Find all boxes in which each point is (CUDA).
"""Find all boxes in which each point is (CUDA).
Args:
Args:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment