文章目录
- 前言
- 一、使用MMDetection已有模型在标准数据集上进行推理时遇到的问题
-
- 1.Command 'nvcc' not found, but can be installed with:sudo apt install nvidia-cuda-toolkit
- 2. RuntimeError: CUDA error: no kernel image is available for execution on the device
- 3.ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory
- 4.ImportError: /home/hm/anaconda3/envs/openmmlab/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7is_cudaEv
前言
记录在学习使用mmdetection框架时,遇到的一些bug,随时补充。
本文初始环境配置为:
GPU:NVIDIA GeForce RTX 3080 (arch=8.6)
cuda:10.1
Pytorch:1.8.1
torchvision:0.9.1+cu101
torchaudio:0.8.1
一、使用MMDetection已有模型在标准数据集上进行推理时遇到的问题
问题来源:
在学习使用MMdetection已有模型在标准数据集上进行推理时,使用 DetInferencer来获得推理结果,运行代码如下:
from mmdet.apis import DetInferencer
# 初始化模型
inferencer = DetInferencer('rtmdet_tiny_8xb32-300e_coco')
# 推理示例图片
inferencer('demo/demo.jpg', show=True)
结果出现了错误信息1:
GeForce RTX 3080 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
可参考:https://blog.youkuaiyun.com/weixin_43751285/article/details/110651105
以及错误信息2:
RuntimeError: CUDA error: no kernel image is available for execution on the device
在解决如上两个问题的过程中,接连遇到一些错误提示信息如:
ImportError: libcudart.so.10.1: canno