Complex-YOLOv3 icon indicating copy to clipboard operation
Complex-YOLOv3 copied to clipboard

Why change x and y position in function build_yolo_target?

Open usherbob opened this issue 5 years ago • 3 comments

First, I noticed we need to permute x and y label in build_yolo_target in kitti_bev_utils.py, which confuses me.

one_target.append(cl)
one_target.append(y1)
one_target.append(x1)

Besides, in test_detection.py,, w and l need to be permuted to get a correct visualization. Is this a bug, or it could be something wrong with my data.

bev_utils.drawRotatedBox(RGB_Map, x, y, w, l, yaw, cnf.colors[int(cls_pred)])

Are there connections between these two above questions? Any discussions are appreciated.

usherbob avatar Nov 03 '19 11:11 usherbob

hi @usherbob,

It seems some symbol mixup as kitti uses lidar front as width (w) and left-right direction as length(l). In our BEV 2d image case we use x - horizontal and y - vertical direction.

Probably this kitti util project will help you to clear the confusion.

https://github.com/ghimiredhikura/KITTI-Point-Cloud-Utils

Best, Deepak

ghimiredhikura avatar Dec 06 '19 02:12 ghimiredhikura

Thanks for your reply.

As for the first question, I'm with your opinion, the conversion between BEV and lidar points needs the permutation with x and y.

For the second question,

w and l need to be permuted to get a correct visualization

it turns out to be wrong with my input data. The transformation between camera coords and lidar coords is wrong. When I correct the transformation matrix, w and l don't need to be permuted anymore.

Best, Jiahua

usherbob avatar Dec 06 '19 02:12 usherbob

@usherbob,

I am glad your problem is solved. :)

ghimiredhikura avatar Dec 06 '19 02:12 ghimiredhikura