Open julvanu opened 2 years ago
same issue, did you find a fix for this yet @julvanu?
same issue, did you find a fix for this yet @julvanu?
As written in the initial post, I changed the cv2.line() call, casting every corners_int parameter to int
That fixed it. Tysm. I skimmed through that part, my bad.
No problem, glad to help :)
Hello,
I changed the corners_int to int and I got new error
kitti_bev_utils.py", line 168, in drawRotatedBox cv2.line(img, (int[0, 0], int[0, 1]), (int[3, 0], int[3, 1]), (255, 255, 0), 2) TypeError: 'type' object is not subscriptable
Bug in src/data_process/kitti_bev_utils.py; function drawRotatedBox(); line 168
I had to cast every one of these values from "corners_int" variable to int as there were actually floats. cv2.line() then raised an Exception.
cv2.line(img, (corners_int[0, 0], corners_int[0, 1]), (corners_int[3, 0], corners_int[3, 1]), (255, 255, 0), 2)
changed to:cv2.line(img, (int(corners_int[0, 0]), int(corners_int[0, 1])), (int(corners_int[3, 0]), int(corners_int[3, 1])), (255, 255, 0), 2)
This error occurred whenever I tried to execute:
python kitti_dataloader.py --show-train-data --cutout_prob 1. --cutout_nholes 1 --cutout_fill_value 1. --cutout_ratio 0.3 --output-width 608