slothfulxtx / MBPTrack3D

[ICCV2023] MBPTrack: Improving 3D Point Cloud Tracking with Memory Networks and Box Priors
25 stars 8 forks source link

Question Regarding Bounding Box Orientation from KITTI Dataset Labels in Camera Coordinates #12

Open ujaejoon opened 1 week ago

ujaejoon commented 1 week ago

image This is code from https://github.com/slothfulxtx/MBPTrack3D/blob/main/datasets/kitti_mem.py

As I understand, in the KITTI dataset, the bounding box orientation is already annotated in the camera coordinate system (Reference: KITTI Coordinate Transformations).

Given this, why is there an additional rotation of π/2 applied along the x-axis? I’m having trouble understanding the reason behind this rotation.

slothfulxtx commented 1 week ago

Good question. We reuse the implementation code from Open3DSOT

https://github.com/Ghostish/Open3DSOT/blob/f08451ddf133d40c9bfadd6358040c569b5f71a9/datasets/kitti.py#L160

I'll check these lines at my convenience.

ujaejoon commented 4 days ago

image

Here’s what I’ve found so far. I investigated further into how point clouds are transformed in kitti_mem.py and discovered that a π/2 rotation along the x-axis converts the input point cloud from the camera coordinate system to the velodyne coordinate system. From what I understand, this aligns the axis conventions with other scripts, such as bounding_box.py, metrics.py, and others.

In short, even if cfg.coordinate_mode is set to 'camera,' the model’s input point cloud still follows the Velodyne coordinate system. Additional rotation of π/2 applied along the x-axis and the crop_and_center_pcd function in pcd_utils.py are responsible for this conversion.