maudzung / Complex-YOLOv4-Pytorch

The PyTorch Implementation based on YOLOv4 of the paper: "Complex-YOLO: Real-time 3D Object Detection on Point Clouds"
https://arxiv.org/pdf/1803.06199.pdf
GNU General Public License v3.0
1.24k stars 256 forks source link

Can't parse 'pt1'. Sequence item with index 0 has a wrong type #48

Open julvanu opened 2 years ago

julvanu commented 2 years ago

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.

image

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

tanay-o commented 2 years ago

same issue, did you find a fix for this yet @julvanu?

julvanu commented 2 years ago

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

tanay-o commented 2 years ago

That fixed it. Tysm. I skimmed through that part, my bad.

julvanu commented 2 years ago

No problem, glad to help :)

AbdullahJirjees commented 6 months ago

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