DiscoBox
DiscoBox copied to clipboard
Error. Can you help?
I work in PyCharm on Windows-10-x64, CUDA=11.1, RTX-3060
#pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
#pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9/index.html
#git clone https://github.com/NVlabs/DiscoBox.git
#cd DiscoBox
#pip install -r requirements/build.txt
#git clone https://github.com/open-mmlab/mmdetection.git
#cd mmdetection
#pip install -r requirements/build.txt
# pip install -v -e .
from mmdetection.mmdet.apis import init_detector, inference_detector
config_file = 'mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'
checkpoint_file = 'faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth'
device = 'cuda:0'
# init a detector
model = init_detector(config_file, checkpoint_file, device=device)
# inference the demo image
inference_detector(model, 'mmdetection/demo/demo.jpg')
ERROR
D:\NVLabs_2.0\venv\Scripts\python.exe D:/NVLabs_2.0/main.py
load checkpoint from local path: faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
d:\nvlabs_2.0\mmdetection\mmdet\datasets\utils.py:70: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.
'data pipeline in your config file.', UserWarning)
Traceback (most recent call last):
File "D:/NVLabs_2.0/main.py", line 26, in <module>
inference_detector(model, 'mmdetection/demo/demo.jpg')
File "D:\NVLabs_2.0\mmdetection\mmdet\apis\inference.py", line 157, in inference_detector
results = model(return_loss=False, rescale=True, **data)
File "D:\NVLabs_2.0\venv\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "D:\NVLabs_2.0\venv\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "d:\nvlabs_2.0\mmdetection\mmdet\models\detectors\base.py", line 174, in forward
return self.forward_test(img, img_metas, **kwargs)
File "d:\nvlabs_2.0\mmdetection\mmdet\models\detectors\base.py", line 147, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "d:\nvlabs_2.0\mmdetection\mmdet\models\detectors\two_stage.py", line 179, in simple_test
proposal_list = self.rpn_head.simple_test_rpn(x, img_metas)
File "d:\nvlabs_2.0\mmdetection\mmdet\models\dense_heads\dense_test_mixins.py", line 130, in simple_test_rpn
proposal_list = self.get_bboxes(*rpn_outs, img_metas=img_metas)
File "D:\NVLabs_2.0\venv\lib\site-packages\mmcv\runner\fp16_utils.py", line 186, in new_func
return old_func(*args, **kwargs)
File "d:\nvlabs_2.0\mmdetection\mmdet\models\dense_heads\base_dense_head.py", line 105, in get_bboxes
**kwargs)
File "d:\nvlabs_2.0\mmdetection\mmdet\models\dense_heads\rpn_head.py", line 187, in _get_bboxes_single
img_shape)
File "d:\nvlabs_2.0\mmdetection\mmdet\models\dense_heads\rpn_head.py", line 231, in _bbox_post_process
dets, _ = batched_nms(proposals, scores, ids, cfg.nms)
File "D:\NVLabs_2.0\venv\lib\site-packages\mmcv\ops\nms.py", line 307, in batched_nms
dets, keep = nms_op(boxes_for_nms, scores, **nms_cfg_)
File "D:\NVLabs_2.0\venv\lib\site-packages\mmcv\utils\misc.py", line 340, in new_func
output = old_func(*args, **kwargs)
File "D:\NVLabs_2.0\venv\lib\site-packages\mmcv\ops\nms.py", line 172, in nms
score_threshold, max_num)
File "D:\NVLabs_2.0\venv\lib\site-packages\mmcv\ops\nms.py", line 27, in forward
bboxes, scores, iou_threshold=float(iou_threshold), offset=offset)
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Process finished with exit code 1
This repository has not been maintained for two years so the versions of some packages are too old to generate some compatibility issues. It would be easy to pull the docker image to run it.
This repository has not been maintained for two years so the versions of some packages are too old to generate some compatibility issues. It would be easy to pull the docker image to run it.
Can you tell me which docker command to install?
Or you might check this repo for DiscoBoxv2 . The performance is better and still maintained by us.
Or you might check this repo for DiscoBoxv2 . The performance is better and still maintained by us.
Can this repo also do segmentation from a dataset with boxes?
@blackcement yes