ZikangZhou / QCNet

[CVPR 2023] Query-Centric Trajectory Prediction
https://openaccess.thecvf.com/content/CVPR2023/papers/Zhou_Query-Centric_Trajectory_Prediction_CVPR_2023_paper.pdf
Apache License 2.0
432 stars 70 forks source link

Multi-agent forecasting #12

Closed kennethweitzel closed 11 months ago

kennethweitzel commented 1 year ago

I read your paper and I have some questions about the multi-agent forecasting. I would like to apply your model to a real life use-case and forecast trajectories for multiple agents. Is this already possible with the code you provide? To my understanding, the decoder needs to know which target agent it should predict trajectories for. Can I just implement multiple decoder heads with shared encodings and how would I tell the decoder which agent it should predict trajectories for?

Thanks in advance!

ZikangZhou commented 1 year ago

The code is currently able to predict trajectories for multiple agents in a single forward pass. By default, the model predicts all agents' trajectories. But you can specify a subset of target agents by setting data['agent']['predict_mask'][non_target_indices, :] = False