Skip to content

1.3.0 - Interactive Visualizations with Bokeh (+ Animations!) as well as a new SceneTimeBatcher batch sampler

Compare
Choose a tag to compare
@BorisIvanovic BorisIvanovic released this 22 Apr 00:07
· 13 commits to main since this release

This version brings with it a major visualization upgrade, now with HTML-based interactive plots and animations! Additionally, we provide trajdata.utils.batch_utils.SceneTimeBatcher, a batch_sampler that can be fed into a standard torch dataloader, for use cases where one wants to loop through a whole Agent-centric dataset, but calculate statistics grouped by individual timesteps in scenes.

See the notes below for more details.

  • Users can now create interactive plots via Bokeh's HTML-based visualization library. Beyond static figures, users can also create interactive animations! Take a look at examples/visualization_example.py to see how you can use these features too!
  • SceneTimeBatcher is a batch sampler that can be fed into a standard PyTorch dataloader, e.g.,
    dataset = UnifiedDataset(
        desired_data=["nusc_mini-mini_train"],
        centric="agent"
    )

    dataloader = DataLoader(
        dataset,
        batch_sampler=SceneTimeBatcher(dataset),
        collate_fn=dataset.get_collate_fn(),
        num_workers=4,
    )

Each batch from the resulting dataset is an AgentBatch, but with each element corresponding to each agent at a particular timestep in a particular scene. An example is provided at examples/scenetimebatcher_example.py.

  • Added information about the nuPlan dataset to DATASETS.md, additional tests related to the above additions, and bugfixes.