Skip to content

cv2.line error #67

@Huxwell

Description

@Huxwell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions