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
530 stars 81 forks source link

How to reuse information from the previous frame??? #40

Open xiaowuge1201 opened 6 months ago

xiaowuge1201 commented 6 months ago

How to solve the problem of dimensional misalignment caused by the inconsistency between the number of agents in the previous frame and the number in this frame??? How to cache the data from the previous frame??? If there is relevant code, I hope to open source the relevant code If there is no relevant code, please provide a detailed explanation of the solution to this problem. Thank you very much

HUXING8 commented 6 months ago

I have the question same as yours.

SunHaoOne commented 6 months ago

Based on our experimental validation, we have observed some critical insights regarding the usage of caching to ensure consistent inference results: Here's an example of how data is concatenated in the model to maintain alignment:

def forward(self, x_a_past, inputs):
    if x_a is not None:
        x_a = torch.cat([x_a, x_a_past])
    return x_a, x_a[1:]

Model Strategies:

Two model are used to handle cache.

Strategies for Effective Caching: