deep-person-reid
deep-person-reid copied to clipboard
use cosine_distance or euclidean_squared_distance will get the similar evaluation results?
use cosine_distance or euclidean_squared_distance will get the similar evaluation results?
No, cosine similarity
and euclidean_squared_distance
do not give the same evaluation results, why??
After the similarity scores /distances have been calculated for query and test/ gallery images, they are sorted in decreasing order, hence the perfect matches are the top ones. Now as there will be slight differences in the distances calculated by either distance metric, the CMC score and Ranks are different.
While evaluating with torchreid
, set dist_metric='euclidean'
or dist_metric='cosine'
in
engine.run(
save_dir='log/resnet50',
max_epoch=60,
eval_freq=10,
print_freq=10,
test_only=False,
fixbase_epoch=5,
open_layers='classifier'
)
and you will get to know the difference.
https://github.com/KaiyangZhou/deep-person-reid/issues/502