-
Notifications
You must be signed in to change notification settings - Fork 72
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
更改评价标准的报错问题? #52
Comments
I guess this is related to the version of ot. OT has recently released a major update that enables multiple backends (e.g. torch and numpy). Your error message tells that it was a 'backend' problem. You can try to reverse to an older version of ot without multi-backend support. |
谢谢老师解答,我尝试了 def Emd_metric(l_pred, l_gt, size=(400, 400)):
这样可以在不更改ot版本情况下,解决我上述问题,但是运行python testsel.py文件的时候不会报错但运行时间很长,在训练的时候显示信息如下: |
Any thoughts on this? |
老师您好,在我测试您的代码的时候根据readme更换评价指标的时候,是否只需要更改hungarian_matching.py的判断语句:
for i in range(prediction_len):
for j in range(gt_len):
# if EA_metric(p_lines[i], g_lines[j]) >= threshold:
#if Chamfer_metric(p_lines[i], g_lines[j]) >= threshold:
if Emd_metric(p_lines[i], g_lines[j]) >= threshold:
G[i][j] = 1
return G
在我进行不同评价指标测试的时候发现Emd_metric的评价指标的时候会不出结果,而在Chamfer _metric的评价指标的时候会有如下报错:
Traceback (most recent call last):
File "/home/qiao/app/pycharm-community-2022.2.2/plugins/python-ce/helpers/pydev/pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/qiao/app/pycharm-community-2022.2.2/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/qiao/Desktop/deep-hough-transform-master/metric.py", line 83, in
emd_score = Emd_metric(l1, l2)
File "/home/qiao/Desktop/deep-hough-transform-master/metric.py", line 50, in Emd_metric
M = ot.dist(points1, points2, metric='euclidean')
File "/home/qiao/anaconda3/lib/python3.7/site-packages/ot/utils.py", line 219, in dist
return euclidean_distances(x1, x2, squared=False)
File "/home/qiao/anaconda3/lib/python3.7/site-packages/ot/utils.py", line 165, in euclidean_distances
nx = get_backend(X, Y)
File "/home/qiao/anaconda3/lib/python3.7/site-packages/ot/backend.py", line 82, in get_backend
raise ValueError("Unknown type of non implemented backend.")
ValueError: Unknown type of non implemented backend.
python-BaseException
请问老师,是我更改评价标准的程序步骤没有完全吗还是这个ot.dist函数的原因?
The text was updated successfully, but these errors were encountered: