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 141 forks source link

Questions reagarding adjacency matrix and loss #39

Closed aktersnurra closed 3 years ago

aktersnurra commented 3 years ago

Hi,

Interesting project, but I would like to ask a couple of questions regarding the adjacency matrix and loss calculation that are unclear to me.

Why does the adjacency matrix not have a batch dimension? I thought it was dependent on the nodes in a scene(?)

https://github.com/abduallahmohamed/Social-STGCNN/blob/dbbb111a0f645e4002dd4885564da226c5e0b19f/model.py#L67

Could you also explain the if else statement when computing the loss, I find it rather confusing.

https://github.com/abduallahmohamed/Social-STGCNN/blob/dbbb111a0f645e4002dd4885564da226c5e0b19f/train.py#L178

Cheers,

aktersnurra

abduallahmohamed commented 3 years ago

Hi, Thanks for asking. for Why does the adjacency matrix not have a batch dimension? I thought it was dependent on the nodes in a scene(?) The graph are dynamic in size, in a scene there could be 3 pedestrians, in another it could be 30 pedestrians. Thus batching in our case requires a specific implementation which is not available for now. for Could you also explain the if else statement when computing the loss, I find it rather confusing. Also because batching isn't available in our case, in order to have a faster training, I backprop on each 128 individually passed batches. The turn_point variable is just an indicator for the last point in a non complete 128 samples, aka the fractions after taking a group of 128 samples.

aktersnurra commented 3 years ago

Hi Mohamed,

Ok, I understand. Thanks for the fast response!

Again, really cool work you guys have done.

Thanks for sharing!

Cheers,

aktersnurra