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

关于match的过程 #6

Open
1171000410 opened this issue Mar 23, 2023 · 1 comment
Open

关于match的过程 #6

1171000410 opened this issue Mar 23, 2023 · 1 comment

Comments

@1171000410
Copy link

作者您好,根据您的代码,

cost = dist_junc - torch.log(loi_score)

  1. 在这前面会计算距离,从而match。

  2. 这一步cost加上了loi_score。

  3. 但是这里的cost,在后面只是会排序,然而排序结果不会筛选loi_pred。所以我理解,match过程完全是受距离的影响,loi_score似乎是不起作用。

不知道我理解的是不是有问题,感谢您的回复!

@lh9171338
Copy link
Owner

indeces = cost.argsort()
loi_pred = loi_pred[indeces]
loi_score = loi_score[indeces]
idx_junc = idx_junc[indeces]

idx_junc, unique_indices = np.unique(idx_junc.detach().cpu().numpy(), return_index=True, axis=0)

排序之后有一个np.unique的操作,去除重复的线段,如果有重复线段保留第一条,因此受排序结果影响。

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

2 participants