lyft / lyft/nuscenes-devkit

export_kitti.py - Camera and lidar do not have the same ego pose

Open
#73 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Jupyter Notebook
Stars
390
Forks
99
PR merge metrics
No merged PRs in 30d

Description

ISSUE

Currently in export_kitti.py the following transformation is incorrect:

            lid_to_ego = transform_matrix(
                cs_record_lid["translation"], Quaternion(cs_record_lid["rotation"]), inverse=False
            )
            ego_to_cam = transform_matrix(
                cs_record_cam["translation"], Quaternion(cs_record_cam["rotation"]), inverse=True
            )
            velo_to_cam = np.dot(ego_to_cam, lid_to_ego)

Unlike nuscenes (which I didn't check, but I believe to be correct), the camera and lidar ego poses for this dataset are not the same. The effect of the code is above is that if you use the RGB camera images with projected labels from lidar the boxes will be randomly off by 10-20 pixels, which is problematic for any sort of 2D learning.

To correct this, two additional transformations are needed to convert to / from world pose for both lidar and camera.

Additionally, if I recall, the render function does not have the same issue as this KITTI converter.

Related PR: https://github.com/lyft/nuscenes-devkit/pull/75

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in export_kitti.py at the transformation block around line 152 and compare its pose handling with the render function. Trace the lidar and camera transforms through world pose, and review related PR 75. Done means projected lidar labels align with the RGB camera images instead of showing the reported 10–20 pixel offsets.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.