nutonomy / nuscenes-devkit

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

how to check which scene one sample_token is in? #957

Closed GilgameshD closed 11 months ago

GilgameshD commented 11 months ago

Hi, after I get the sample_token, how can I check which scene it is in? Thanks.

whyekit-motional commented 11 months ago

With the sample token, you can retrieve the sample record via:

my_sample = nusc.get('sample', my_sample_token)

Within the sample record, there will be a scene token under scene_token

You can then retrieve the scene record via:

my_scene_token = my_sample['scene_token']
my_scene = nusc.get('sample', my_scene_token)
GilgameshD commented 11 months ago

Thanks for the quick response!