lilanxiao / Rotated_IoU

Differentiable IoU of rotated bounding boxes using Pytorch
MIT License
415 stars 64 forks source link

Use on KITTI dataset labels #17

Open a-akram-98 opened 3 years ago

a-akram-98 commented 3 years ago

Hello, I've a question, You assumed the coordinates x to left y to forward z to up, but I want to use it on KITTI labels, where the labels coordinates are like: x to left y to down z to forward and the rotation ry is around y-axis, so can you help me to figure it out, will I switch the order of the input to the cal_iou_3d or what !?

lilanxiao commented 3 years ago

All you need is a coordinates transformation. Suppose the KITTI label is a tuple (x, y, z, a, b, c, alpha), the tuple for IoU calculation should be (x, z, -y, a, c, b, -alpha). You could write a wrapper to do the transformation.

vehxianfish commented 3 years ago

@lilanxiao ,hi.thanks for your great work,it's help me a lot. In the repository, Is the coordinates' orientation like@a-akram-98 said? x to left y to forward z to up,and rotation ry is around z axis and Clockwise. thank you!

lilanxiao commented 3 years ago

@lilanxiao ,hi.thanks for your great work,it's help me a lot. In the repository, Is the coordinates' orientation like@a-akram-98 said? x to left y to forward z to up,and rotation ry is around z axis and Clockwise. thank you!

hi! I use a right-handed coordinate system. x, y, z are left, forward and up, respectively. The rotation is around the z-axis. The rotation direction follows the right-hand rule.

turboxin commented 3 years ago

@lilanxiao ,hi.thanks for your great work,it's help me a lot. In the repository, Is the coordinates' orientation like@a-akram-98 said? x to left y to forward z to up,and rotation ry is around z axis and Clockwise. thank you!

hi! I use a right-handed coordinate system. x, y, z are left, forward and up, respectively. The rotation is around the z-axis. The rotation direction follows the right-hand rule.

Hi @lilanxiao, as you mentioned above a right-handed coordinate system is used, but x-left, y-forward , z-up seems not a right-handed coordinate system. I'm wondering if there is any mistake or misunderstanding here?

lilanxiao commented 3 years ago

hi @turboxin! Sorry, that's my mistake. The x-axis is actually right, not left.

linchunmian commented 3 years ago

Hi, everyone. I also want to apply it to KITTI labels.How to write the transformation script?

XiaoyanQian commented 3 years ago

Hi, everyone. I also want to apply it to KITTI labels.How to write the transformation script?