Commit 96ed0bd7 authored by Michael Baumgartner's avatar Michael Baumgartner
Browse files

make nms import optional

parent abb61378
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment