nutonomy / nuscenes-devkit

The devkit of the nuScenes dataset.
https://www.nuScenes.org
Other
2.27k stars 628 forks source link

how to visualize detection result #501

Closed yustaub closed 3 years ago

yustaub commented 3 years ago

Hi, sir. I am a newbie in 3D detection. I have download the detection result from https://www.nuscenes.org/data/detection-pointpillars.zip and I read the pointpillars-test.json and found that the detection result is like this: {'sample_token': '557161e4e2374f42bac36c36b93a97fd', 'translation': [708.97, 1821.07, 1.491], 'size': [1.884, 4.223, 1.628], 'rotation': [-0.914, -0.016, -0.009, 0.405], 'velocity': [2.681, -3.124], 'detection_name': 'car', 'detection_score': 0.9408, 'attribute_name': 'vehicle.parked'} I can not figure it out, there is not 3D xyz and 2D bbox info,rotation_y, how can I visualize it? Very appreciate for your reply!!

holger-motional commented 3 years ago

There is a very basic rendering function in https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/eval/detection/evaluate.py#L183. Anything beyond that you have to write yourself. The fields are:

yustaub commented 3 years ago

thacks for your quick reply! why there are four roration_y value? @holger-nutonomy

oscar-nutonomy commented 3 years ago

Rotations are given as quaternions which have 4 components.

On Fri, Nov 20, 2020 at 7:39 AM yustaub notifications@github.com wrote:

thacks for your quick reply! why there are four roration_y value? @holger-nutonomy https://urldefense.com/v3/__https://github.com/holger-nutonomy__;!!OUh6yQBS5Rss!sVxbaPrt207m261eixAq8hqMeBchFS7g2RPQ8mwj08LI4_DennyHhlFpgIGZ7w$

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/nutonomy/nuscenes-devkit/issues/501*issuecomment-731241619__;Iw!!OUh6yQBS5Rss!sVxbaPrt207m261eixAq8hqMeBchFS7g2RPQ8mwj08LI4_DennyHhlHFr6EvvA$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AFK56XTBAL6BJDRXYPDEYODSQ2ETDANCNFSM4T4XVQCA__;!!OUh6yQBS5Rss!sVxbaPrt207m261eixAq8hqMeBchFS7g2RPQ8mwj08LI4_DennyHhlEX3WvA3g$ .

This email originated OUTSIDE the organization. Do not click any links or attachments unless you know the sender.

-- Oscar Beijbom Sr. Machine Learning Director, Motional

-- This email contains information belonging to Motional AD LLC or its affiliates and may contain confidential, proprietary, copyrighted and/or privileged information. Any unauthorized review, use, reliance, disclosure, distribution or copying is prohibited. If you are not the intended recipient, immediately destroy all copies of the original email and any attachments and contact the sender by reply email.

yustaub commented 3 years ago

what is the difference between rotation_y in kitti and quaternions in nuscnes? I can not find the definition of quaternions. @oscar-nutonomy

holger-motional commented 3 years ago

@yustaub Quaternions are a general way to express rotations: https://en.wikipedia.org/wiki/Quaternion This function can help you convert quaternions to the yaw angle: https://github.com/nutonomy/nuscenes-devkit/blob/13879c564d9f1d7919ae6b1ed2b623030d5decfe/python-sdk/nuscenes/eval/common/utils.py#L112 Finally, you can take a look at how we convert our annotations to KITTI format: https://github.com/nutonomy/nuscenes-devkit/blob/13879c564d9f1d7919ae6b1ed2b623030d5decfe/python-sdk/nuscenes/scripts/export_kitti.py#L127

yustaub commented 3 years ago

Thank you for your detailed answer! I will read this. @holger-nutonomy