nutonomy / nuscenes-devkit

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

Wrong shape error with Lidar point cloud #980

Closed harborsarah closed 1 year ago

harborsarah commented 1 year ago

Hi, Could you tell me which part here contains data for scene 710? image

When I try to load lidar points for this scene, this error always appears, ValueError: cannot reshape array of size 32768 into shape (5) I checked other issues and you said this might happen because the data is corrupted.

Thanks a lot for your help. It might also be nice if there is a way for only downloading the data for this specific scene.

whyekit-motional commented 1 year ago

@harborsarah I think the first blob contains the first 85 scenes, the second blob contains the next 85 scenes and so on

We can then do a quick calculation like so:

from nuscenes.utils.splits import create_splits_scenes 

splits_scenes = create_splits_scenes()
trainvaltest_scenes = sorted(list(set(scenes['train'] + scenes['val'] + scenes['test'])))
print(trainvaltest_scenes.index('scene-0710') // 85)

So my guess is that scene 710 is in part 7

harborsarah commented 1 year ago

@harborsarah I think the first blob contains the first 85 scenes, the second blob contains the next 85 scenes and so on

We can then do a quick calculation like so:

from nuscenes.utils.splits import create_splits_scenes 

splits_scenes = create_splits_scenes()
trainvaltest_scenes = sorted(list(set(scenes['train'] + scenes['val'] + scenes['test'])))
print(trainvaltest_scenes.index('scene-0710') // 85)

So my guess is that scene 710 is in part 7

okay, I see. Now I know how it works. But it might be in part 8 :) Thanks a lot for your quick reply.

whyekit-motional commented 1 year ago

Oh yes, you are right - it is probably in part 8 (since I wrote the code with 0-indexing in mind :sweat_smile:)

harborsarah commented 1 year ago

Oh yes, you are right - it is probably in part 8 (since I wrote the code with 0-indexing in mind 😅)

Haha yes. Anyway, I hope this will solve the problem. Thanks for your time XD