Skip to content

更改评价标准的报错问题? #52

@zhizhz

Description

@zhizhz

老师您好,在我测试您的代码的时候根据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函数的原因?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions