diff options
author | Vasil Zlatanov <vasko@e4-pattern-vm.europe-west4-a.c.electric-orbit-223819.internal> | 2018-12-08 17:37:25 +0000 |
---|---|---|
committer | Vasil Zlatanov <vasko@e4-pattern-vm.europe-west4-a.c.electric-orbit-223819.internal> | 2018-12-08 17:37:25 +0000 |
commit | aaee9b10aab7c78c7a02d5caec4ed37b85dff1bd (patch) | |
tree | 7118bd9062ecd63ec67fa224e95451d5d861dac3 | |
parent | f6ee52c3f7f424ab8e7ce972281f0f6199b8262d (diff) | |
download | vz215_np1915-aaee9b10aab7c78c7a02d5caec4ed37b85dff1bd.tar.gz vz215_np1915-aaee9b10aab7c78c7a02d5caec4ed37b85dff1bd.tar.bz2 vz215_np1915-aaee9b10aab7c78c7a02d5caec4ed37b85dff1bd.zip |
Use correct transpose for mahalanobis
-rwxr-xr-x | evaluate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/evaluate.py b/evaluate.py index e8468a2..38b20bb 100755 --- a/evaluate.py +++ b/evaluate.py @@ -84,7 +84,7 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam else: if args.mahalanobis: # metric = 'jaccard' is also valid - cov_inv = np.linalg.inv(np.cov(gallery_data.T)) + cov_inv = np.linalg.inv(np.cov(gallery_data.T)).T distances = cdist(probe_data, gallery_data, 'mahalanobis', VI=cov_inv) else: distances = cdist(probe_data, gallery_data, 'euclidean') |