XinzeLee / RotateObjectDetection

This repository is based on Ultralytics/yolov5, with adjustments to enable rotate prediction boxes.
113 stars 22 forks source link

training #6

Open sunriselqq opened 3 years ago

sunriselqq commented 3 years ago

Hello! When I training your sample dataset, it suffered an error. The printed information is as follow:

Traceback (most recent call last): File "rotate_train.py", line 557, in train(hyp, opt, device, tb_writer, rotate=opt.rotate) File "rotate_train.py", line 318, in train loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size File "E:\RotateObjectDetection\rotate-yolov5\utils\loss.py", line 269, in call iou = rotate_bbox_iou(pbox, tbox[i], CIoU=True, device=device) # iou(prediction, target) File "E:\RotateObjectDetection\rotate-yolov5\utils\general.py", line 1070, in rotate_bbox_iou boxes1_xyxyxyxy = xywhrm2xyxyxyxy(boxes1) File "E:\RotateObjectDetection\rotate-yolov5\utils\general.py", line 985, in xywhrm2xyxyxyxy xyxyxyxy = torch.matmul(xyxyxyxy, R).view(-1, 8).contiguous()+xywhrm[:, [0, 1, 0, 1, 0, 1, 0, 1]] RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling cublasCreate(handle)

I modified the device to cuda "0", it did not work.

XinzeLee commented 3 years ago

Hi, I think it has nothing to do with device id. You can specify CUDA_LAUNCH_BLOCKING=1 to view the underlying reason. If this cannot give you hint about how to solve it, you may need to follow the tutorials in README.md and Rotate-Tutorial1.ipynb again step by step to see where is the problem.