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
1de3aeff
Unverified
Commit
1de3aeff
authored
Mar 22, 2023
by
CokeDong
Committed by
GitHub
Mar 22, 2023
Browse files
Fix bbox_overlaps of parrots (#2684)
* Fix parrots bbox_overlaps * Fix
parent
4e8972fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
mmcv/ops/bbox.py
mmcv/ops/bbox.py
+4
-0
setup.py
setup.py
+1
-0
No files found.
mmcv/ops/bbox.py
View file @
1de3aeff
...
@@ -116,6 +116,10 @@ def bbox_overlaps(bboxes1: torch.Tensor,
...
@@ -116,6 +116,10 @@ def bbox_overlaps(bboxes1: torch.Tensor,
if
rows
*
cols
==
0
:
if
rows
*
cols
==
0
:
return
ious
return
ious
if
bboxes1
.
device
.
type
==
'cpu'
and
torch
.
__version__
==
'parrots'
:
return
_bbox_overlaps_cpu
(
bboxes1
,
bboxes2
,
mode
=
mode
,
aligned
=
aligned
,
offset
=
offset
)
ext_module
.
bbox_overlaps
(
ext_module
.
bbox_overlaps
(
bboxes1
,
bboxes2
,
ious
,
mode
=
mode_flag
,
aligned
=
aligned
,
offset
=
offset
)
bboxes1
,
bboxes2
,
ious
,
mode
=
mode_flag
,
aligned
=
aligned
,
offset
=
offset
)
...
...
setup.py
View file @
1de3aeff
...
@@ -212,6 +212,7 @@ def get_extensions():
...
@@ -212,6 +212,7 @@ def get_extensions():
glob
.
glob
(
'./mmcv/ops/csrc/pytorch/cpu/*.cpp'
)
+
\
glob
.
glob
(
'./mmcv/ops/csrc/pytorch/cpu/*.cpp'
)
+
\
glob
.
glob
(
'./mmcv/ops/csrc/parrots/*.cpp'
)
glob
.
glob
(
'./mmcv/ops/csrc/parrots/*.cpp'
)
op_files
.
remove
(
'./mmcv/ops/csrc/pytorch/cuda/iou3d_cuda.cu'
)
op_files
.
remove
(
'./mmcv/ops/csrc/pytorch/cuda/iou3d_cuda.cu'
)
op_files
.
remove
(
'./mmcv/ops/csrc/pytorch/cpu/bbox_overlaps_cpu.cpp'
)
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common'
))
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common'
))
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common/cuda'
))
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common/cuda'
))
cuda_args
=
os
.
getenv
(
'MMCV_CUDA_ARGS'
)
cuda_args
=
os
.
getenv
(
'MMCV_CUDA_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