-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am very curious about the element in your proposed adjacency matrix #67
Comments
Hi Wang, |
Thank you for your answer. From your code regarding data processing, step_rel[h] is just like the vector pointing from the previous absolute position to the current absolute position for a certain pedestrian. If this is form of using relative speed, why don't you use the finite difference to calculate since the frame rate is 0.4 for ETH/UCY dataset. I am looking forward to getting your explanation. |
There is no issue in using FD (computation cost?) |
When I see your code, why do you use the relative position to calculate the norm between two nodes in a graph under a frame, shown as follows (The related code has been bold):
def seq_to_graph(seq_,seq_rel,norm_lap_matr = True):
seq_ = seq_.squeeze()
seq_rel = seq_rel.squeeze()
seq_len = seq_.shape[2]
max_nodes = seq_.shape[0]
V = np.zeros((seq_len,max_nodes,2))
A = np.zeros((seq_len,max_nodes,max_nodes))
for s in range(seq_len):
step_ = seq_[:,:,s]
step_rel = seq_rel[:,:,s]
for h in range(len(step_)):
V[s,h,:] = step_rel[h]
A[s,h,h] = 1
for k in range(h+1,len(step_)):
l2_norm = anorm(step_rel[h],step_rel[k])
A[s,h,k] = l2_norm
A[s,k,h] = l2_norm
if norm_lap_matr:
G = nx.from_numpy_matrix(A[s,:,:])
A[s,:,:] = nx.normalized_laplacian_matrix(G).toarray()
return torch.from_numpy(V).type(torch.float),
torch.from_numpy(A).type(torch.float)
The text was updated successfully, but these errors were encountered: