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
yaoyuping
nnDetection
Commits
96ed0bd7
Commit
96ed0bd7
authored
Mar 09, 2022
by
Michael Baumgartner
Browse files
make nms import optional
parent
abb61378
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
nndet/core/boxes/nms.py
nndet/core/boxes/nms.py
+6
-1
No files found.
nndet/core/boxes/nms.py
View file @
96ed0bd7
...
...
@@ -15,11 +15,16 @@ limitations under the License.
"""
import
torch
from
loguru
import
logger
from
torch
import
Tensor
from
torch.cuda.amp
import
autocast
from
torchvision.ops.boxes
import
nms
as
nms_2d
from
nndet._C
import
nms
as
nms_gpu
try
:
from
nndet._C
import
nms
as
nms_gpu
except
ImportError
:
logger
.
warning
(
"nnDetection was not build with GPU support!"
)
nms_gpu
=
None
from
nndet.core.boxes.ops
import
box_iou
...
...
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