Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cv2.line error #67

Open
Huxwell opened this issue Mar 6, 2023 · 3 comments
Open

cv2.line error #67

Huxwell opened this issue Mar 6, 2023 · 3 comments

Comments

@Huxwell
Copy link

Huxwell commented Mar 6, 2023

When running
python kitti_dataloader.py --output-width 608
I get

Traceback (most recent call last):
  File "kitti_dataloader.py", line 163, in <module>
    bev_utils.drawRotatedBox(img_bev, x, y, w, l, yaw, cnf.colors[int(c)])
  File "/home/user/Complex-YOLOv4-Pytorch/src/data_process/../data_process/kitti_bev_utils.py", line 171, in drawRotatedBox
    cv2.line(img, (corners_int[0, 0], corners_int[0, 1]), (corners_int[3, 0], corners_int[3, 1]), (255, 255, 0), 2)
cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'line'
> Overload resolution failed:
>  - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
>  - Can't parse 'pt1'. Sequence item with index 0 has a wrong type

The solution seems to be adding .astype(int) in L167 of kitti_bev_utils.py. The int conversion is run at L165, but then discarded in L167.

@Huxwell
Copy link
Author

Huxwell commented Mar 6, 2023

#68 pr submitted

@AbdullahJirjees
Copy link

Hello,

I am having your same issue, did you got to a solution?

@mahdikhashan
Copy link

@Huxwell I used your solution and it fixed the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants