Skip to content
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

Bugs in hdmap.py #1

Open
MccreeZhao opened this issue Dec 24, 2021 · 1 comment
Open

Bugs in hdmap.py #1

MccreeZhao opened this issue Dec 24, 2021 · 1 comment

Comments

@MccreeZhao
Copy link

MccreeZhao commented Dec 24, 2021

In https://github.com/zhaone/LaneGCN_ref/blob/main/data/LaneGCN/hdmap.py#L176

dist = np.expand_dims(ctrs, axis=1) - np.expand_dims(ctrs, axis=0)
dist = np.sqrt((dist ** 2).sum(2))

The motivation should be calculating a distance matrix of nodes which shape is $(M,M)$, where M is the number of nodes.
However, the code above will get a $(N,N,2)$ matrix, where N is the number of lanes.
Therefore, the index operation in #L199 left_dist[hi[mask], wi[mask]] = 1e6 will raise a out of range error.

@MccreeZhao
Copy link
Author

Also, the same error happens in https://github.com/zhaone/LaneGCN_ref/blob/main/data/LaneGCN/hdmap.py#L208.
The feats should be a tensor with the shape of (num of nodes, 2). However the code miss np.concatenate(feats, 0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant