Open wuningaixiaoteng opened 11 months ago
Hello, I have the same problem as you. Have you solved it? Can you tell me why such an error occurs?
Hello, I have the same problem as you. Have you solved it? Can you tell me why such an error occurs?
metoo please tell me
@wuningaixiaoteng 配置mmdeploy-1.3.1-windows-amd64-cuda11.8开发环境
@wuningaixiaoteng 配置mmdeploy-1.3.1-windows-amd64-cuda11.8开发环境
下载他那个配置好的包吗? 在他github里那个
@wuningaixiaoteng 配置mmdeploy-1.3.1-windows-amd64-cuda11.8开发环境
下载他那个配置好的包吗? 在他github里那个
是的,配置include 和 lib 就行了
@wuningaixiaoteng 配置mmdeploy-1.3.1-windows-amd64-cuda11.8开发环境
下载他那个配置好的包吗? 在他github里那个
是的,配置include 和 lib 就行了
请问需要如何配置呀
Checklist
Describe the bug
运行以下脚本时, from mmdeploy_runtime import Detector import cv2
读取图片
img = cv2.imread('D:\yolov8\mm1\mmdeploy\demo\resources\det.jpg')
创建检测器
detector = Detector(model_path='D:\yolov8\mm1\work_dir\trt\resnet', device_name='cuda', device_id=0)
执行推理
bboxes, labels, _ = detector(img)
使用阈值过滤推理结果,并绘制到原图中
indices = [i for i in range(len(bboxes))] for index, bbox, label_id in zip(indices, bboxes, labels): [left, top, right, bottom], score = bbox[0:4].astype(int), bbox[4] if score < 0.3: continue cv2.rectangle(img, (left, top), (right, bottom), (0, 255, 0)) cv2.imwrite('output_detection.png', img)
出现 loading mmdeploy_ort_net.dll ... [2023-11-29 10:14:34.200] [mmdeploy] [info] [model.cpp:35] [DirectoryModel] Load model: "D:\yolov8\mm1\work_dir\trt\resnet" [2023-11-29 10:14:34.200] [mmdeploy] [error] [common.cpp:67] Device "cuda" not found Traceback (most recent call last): File "D:/yolov8/mm1/mmdeploy/detect.py", line 8, in
detector = Detector(model_path='D:\yolov8\mm1\work_dir\trt\resnet', device_name='cuda', device_id=0)
RuntimeError: failed to create detector错误,应该如何解决呢
Reproduction
运行的脚本: from mmdeploy_runtime import Detector import cv2
读取图片
img = cv2.imread('D:\yolov8\mm1\mmdeploy\demo\resources\det.jpg')
创建检测器
detector = Detector(model_path='D:\yolov8\mm1\work_dir\trt\resnet', device_name='cuda', device_id=0)
执行推理
bboxes, labels, _ = detector(img)
使用阈值过滤推理结果,并绘制到原图中
indices = [i for i in range(len(bboxes))] for index, bbox, label_id in zip(indices, bboxes, labels): [left, top, right, bottom], score = bbox[0:4].astype(int), bbox[4] if score < 0.3: continue cv2.rectangle(img, (left, top), (right, bottom), (0, 255, 0))
cv2.imwrite('output_detection.png', img)
只修改了图片路径和model_path路径
Environment
Error traceback
No response