WesleyZhang1991 / Google_Landmark_Retrieval_2021_2nd_Place_Solution

MIT License
235 stars 29 forks source link

关于模型forward的疑惑 #4

Closed Wzj02200059 closed 2 years ago

Wzj02200059 commented 2 years ago

在make_model.py的第253行: return cls_score, global_feat # global feature for triplet loss 这里给triplet loss的global_feat是经过了bn之后的特征,请问作者这里用了bn之后的特征而不是之前的特征的原因。 我理解的是triplet更适用之前的欧式空间的特征进行度量、而bn后的特征近似球面、适用于arc而非triplet。 个人理解不一定准确、因此请教下作者,望解答,谢谢!

baihaozi12 commented 2 years ago

这个问题也困扰我很久了,感谢楼主提问~

WesleyZhang1991 commented 2 years ago

We did not use triplet loss for all models. Only Arcface loss was used. As for the after bn + triplet loss setting, we use L2-normed feature for triplet loss and for evaluation. After L2-norm, Euclidean distance equals Cosine distance as they give the same rank list. I think it makes little difference for large datasets.

DaFuNi777 commented 1 year ago

请问运行python eval_cbir.py时找不到GLDv2_search_label_competition_2021.pkl,您是怎么解决的