abduallahmohamed / Social-STGCNN

Code for "Social-STGCNN: A Social Spatio-Temporal Graph Convolutional Neural Network for Human Trajectory Prediction" CVPR 2020
MIT License
483 stars 140 forks source link

About some code in test.py #18

Closed buaafish closed 4 years ago

buaafish commented 4 years ago

In line 82 and 83 of test.py, why ues V_x[-1,:,:].copy() in line 83, but not use V_y?

V_y = seq_to_nodes(pred_traj_gt.data.cpu().numpy().copy())
V_y_rel_to_abs = nodes_rel_to_nodes_abs(V_tr.data.cpu().numpy().squeeze().copy(),
                                                 V_x[-1,:,:].copy())
abduallahmohamed commented 4 years ago

I think you refer to https://github.com/abduallahmohamed/Social-STGCNN/blob/master/test.py#L83

the nodes_rel_to_nodes_abs needs a ref point to transform relative locations to absolute location. As I recall, using last point of V_x is correct because these were the original basis I did transformation on before, unlike V_y which is the predicted trajectories. In another senses it's like change of basis or normalization/ de-normalization of the trajectories.

buaafish commented 4 years ago

Thanks, I got it wrong