Egrt / yolov7-obb

在YOLOv7的基础上使用KLD损失修改为旋转目标检测yolov7-obb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CUDA报错,使用cpu可以正常运行,训练时也可以GPU加速,就是预测时使用CUDA会报错

wyk-study opened this issue · comments

| letterbox_image | True|
| cuda | True|

Input image filename:E:\python_file\yolov7-obb\img\test.jpg
Traceback (most recent call last):
File "e:/python_file/yolov7-obb/predict.py", line 91, in
r_image = yolo.detect_image(image, crop = crop, count=count)
File "e:\python_file\yolov7-obb\yolo.py", line 153, in detect_image
results = self.bbox_util.non_max_suppression(torch.cat(outputs, 1), self.num_classes, self.input_shape,
File "e:\python_file\yolov7-obb\utils\utils_bbox.py", line 174, in non_max_suppression
_, keep = obb_nms(
File "e:\python_file\yolov7-obb\utils\nms_rotated\nms_rotated_wrapper.py", line 41, in obb_nms
inds = nms_rotated_ext.nms_rotated(dets_th, scores, iou_thr)
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.
PS E:\python_file\yolov7-obb>

|letterbox_image |真|

|库达 |真|
输入图像文件名:E:\python_file\yolov7-obb\img\test.jpg 回溯(最近一次调用): 文件 “e:/python_file/yolov7-obb/predict.py”,第 91 行,r_image = yolo.detect_image(图像,裁剪 = 裁剪,计数=计数) 文件 “e:\python_file\yolov7-obb\yolo.py”,第 153 行,在 detect_image 结果 = self.bbox_util.non_max_suppression(torch.cat(outputs, 1), self.num_classes, self.input_shape, 文件 “e:\python_file\yolov7-obb\utils\utils_bbox.py”,第 174 行,在 non_max_suppression _ 中,keep = obb_nms( 文件 “e:\python_file\yolov7-obb\utils\nms_rotated\nms_rotated_wrapper.py”,第 41 行,在 obb_nms 中 inds = nms_rotated_ext.nms_rotated(dets_th, scores, iou_thr) 运行时错误: CUDA 错误:没有内核映像可供在设备上执行 CUDA 内核错误可能会在其他一些 API 调用中异步报告,因此下面的堆栈跟踪可能不正确。对于调试,请考虑传递 CUDA_LAUNCH_BLOCKING=1。 PS E:\python_file\yolov7-obb>

还是环境配置问题