Closed Leon0402 closed 1 year ago
@BorisIvanovic Friendly ping :)
Hi @Leon0402! Have you tried out the latest updated version? It includes the scene IDs in the SceneBatch
object: https://github.com/NVlabs/trajdata/blob/main/src/trajdata/data_structures/batch.py#L141
If you're looking to get specific Scene
s to work with, you can use https://github.com/NVlabs/trajdata/blob/main/src/trajdata/dataset.py#L628 or call __getitem__
with specific indices (which you could obtain by looping through the data index (https://github.com/NVlabs/trajdata/blob/main/src/trajdata/dataset.py#L645), although that's technically an internal object 🤔
For debugging purposes I wanted to plot the different scenes with their name, so I actually know which plot refers to which data in the original raw dataset.
I tried using the example here: https://github.com/nvr-avg/trajdata/blob/main/examples/scene_batch_example.py
But I saw no way how I get scene information (like the name) from the SceneBatch. So in the end I did a custom implementation like this:
I think I probably shouldn't use the cache class directly as these are implementation details? Is there any other way how I can get scene information when using the classical DataLoader Mechanism?