PeterH0323 / Smart_Construction

Base on YOLOv5 Head Person Helmet Detection on Construction Sites,基于目标检测工地安全帽和禁入危险区域识别系统,🚀😆附 YOLOv5 训练自己的数据集超详细教程🚀😆2021.3新增可视化界面❗❗
GNU General Public License v3.0
2.19k stars 464 forks source link

CUDA error #62

Open 827346462 opened 2 years ago

827346462 commented 2 years ago

ghts ./weights/helmet_head_person_m.pt Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.4, device='', img_size=640, iou_thres=0.5, output='inference/output', save_txt=False, source='000017.jpg', update=False, view_img=False, weights=['./weights/helmet_head_person_m.pt']) Using CUDA device0 _CudaDeviceProperties(name='NVIDIA GeForce RTX 3090', total_memory=24267MB)

Fusing layers... Traceback (most recent call last): File "detect.py", line 161, in detect() File "detect.py", line 23, in detect model = attempt_load(weights, map_location=device) # load FP32 model File "/home/sevnce/Smart_Construction/Smart_Construction-master/models/experimental.py", line 133, in attempt_load model.append(torch.load(w, map_location=map_location)['model'].float().fuse().eval()) # load FP32 model File "/home/sevnce/Smart_Construction/Smart_Construction-master/models/yolo.py", line 150, in fuse m.conv = torch_utils.fuse_conv_and_bn(m.conv, m.bn) # update conv File "/home/sevnce/Smart_Construction/Smart_Construction-master/utils/torch_utils.py", line 113, in fuse_conv_andbn fusedconv.weight.copy(torch.mm(w_bn, w_conv).view(fusedconv.weight.size())) RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)

我在ubuntu 18.04 cuda11.2 rtx3090 环境 虚拟环境是requirment.txt. 直接运行 python detect.py --source 000017.jpg --weights ./weights/helmet_head_person_m.pt 出现cuda 错误。 请问这个cuda版本和权重不适配的问题吗