Closed zhangbaijin closed 3 years ago
The 'compute_distancematrix' is in here. You may not have installed torchreid correctly. Or you can add the __init__.py file into the torchreid/metrics/. The content of __init_\.py should be:
from __future__ import absolute_import
from .accuracy import accuracy
from .rank import evaluate_rank
from .distance import compute_distance_matrix
thanks for your time, i am trying!
Thanks for your contribution,it is a great step forward. But there is a problem when Computing distance matrix with metric=euclidean, as follows:
Traceback (most recent call last): File "scripts/main.py", line 168, in <module> main() File "scripts/main.py", line 164, in main engine.run(**engine_run_kwargs(cfg)) File "/run/IGOAS-main/torchreid/engine/engine.py", line 117, in run rank1 = self.test( File "/run/IGOAS-main/torchreid/engine/engine.py", line 204, in test rank1 = self._evaluate( File "/opt/conda/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/run/IGOAS-main/torchreid/engine/engine.py", line 272, in _evaluate distmat = metrics.compute_distance_matrix(qf, gf, dist_metric) AttributeError: module 'torchreid.metrics' has no attribute 'compute_distance_matrix'
Thanks for your time