Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: nms is not compiled with GPU support #2882

Closed
Zhefan-Xu opened this issue Jun 2, 2020 · 3 comments
Closed

RuntimeError: nms is not compiled with GPU support #2882

Zhefan-Xu opened this issue Jun 2, 2020 · 3 comments
Labels
installation/env The problem about codebase installation or running environment.

Comments

@Zhefan-Xu
Copy link

When I ran "python tools/test.py configs/faster_rcnn_r50_fpn_1x_coco.py
checkpoints/faster_rcnn_r50_fpn_1x_20181010-3d1b3351.pth
--show" from getting started, I met this error:
loading annotations into memory...
Done (t=0.44s)
creating index...
index created!
[ ] 0/5000, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/test.py", line 149, in
main()
File "tools/test.py", line 127, in main
args.show_score_thr)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/apis/test.py", line 26, in single_gpu_test
result = model(return_loss=False, rescale=True, **data)
File "/home/zhefan1210/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/zhefan1210/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 153, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/zhefan1210/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/core/fp16/decorators.py", line 51, in new_func
return old_func(*args, **kwargs)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/models/detectors/base.py", line 148, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/models/detectors/base.py", line 129, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/models/detectors/two_stage.py", line 187, in simple_test
proposal_list = self.simple_test_rpn(x, img_metas)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/models/detectors/test_mixins.py", line 29, in simple_test_rpn
proposal_list = self.rpn_head.get_bboxes(*rpn_outs, img_metas)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/core/fp16/decorators.py", line 131, in new_func
return old_func(*args, **kwargs)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/models/dense_heads/anchor_head.py", line 493, in get_bboxes
scale_factor, cfg, rescale)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/models/dense_heads/rpn_head.py", line 119, in get_bboxes_single
dets, keep = batched_nms(proposals, scores, ids, nms_cfg)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/ops/nms/nms_wrapper.py", line 154, in batched_nms
torch.cat([bboxes_for_nms, scores[:, None]], -1), **nms_cfg
)
File "/home/zhefan1210/Desktop/mmdetection/mmdet/ops/nms/nms_wrapper.py", line 53, in nms
inds = nms_ext.nms(dets_th, iou_thr)
RuntimeError: nms is not compiled with GPU support

How to fix this, please let me know if you need any info.
THanks in advance!!

@ZwwWayne
Copy link
Collaborator

ZwwWayne commented Jun 3, 2020

This is because when you compile mmdet you did not use GPU. Remove build dir and compile it again with one.

@ZwwWayne ZwwWayne added the installation/env The problem about codebase installation or running environment. label Jun 3, 2020
@hellock hellock closed this as completed Jun 7, 2020
@jiafengshen
Copy link

This is because when you compile mmdet you did not use GPU. Remove build dir and compile it again with one.
Can you be more specific about how to make NMS support GPU

@Aaayue
Copy link

Aaayue commented Oct 28, 2020

@jiafengshen I've got the same issue, and i don't understand what does "Remove build dir and compile it again with one" mean... Did you finally solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation/env The problem about codebase installation or running environment.
Projects
None yet
Development

No branches or pull requests

5 participants