Closed denabazazian closed 2 years ago
I could solve this issue by going to this file:
"/anaconda3/envs/neural_atlases/lib/python3.7/site-packages/detectron2/layers/nms.py"
and change these lines:
if TORCH_VERSION < (1, 7):
from detectron2 import _C
nms_rotated_func = _C.nms_rotated
else:
nms_rotated_func = torch.ops.detectron2.nms_rotated
to:
from detectron2 import _C
nms_rotated_func = _C.nms_rotated
I installed the pytorch=1.6.0
as mentioned in your conda environment installation, but probably the PyTorch version was upgraded by installing detectron2
since it requires a higher PyTorch version based on the detectron2 installation tutorial.
Thanks for sharing the solution.
Thanks for sharing your code. I have a problem with running
preprocess_mask_rcnn.py
. I get the following error:RuntimeError: No such operator detectron2::nms_rotated
. I followed all your instructions for creating the required environment, and it seems thatdetectron2
is installed successfully based on this line:Successfully installed antlr4-python3-runtime-4.8 detectron2-0.4+cu101 future-0.18.2 fvcore-0.1.3.post20210317 google-auth-1.35.0 iopath-0.1.9 omegaconf-2.1.2 portalocker-2.4.0 pycocotools-2.0.4 pydot-1.4.2 tabulate-0.8.9 termcolor-1.1.0 yacs-0.1.8
I can importdetectron2
without any problem, but after runningfrom detectron2 import model_zoo
, I get the error below:I am wondering to find out why this error happens and how I can solve it. Thank you.