lzx551402 / tfmatch

TensorFlow implementation of GeoDesc (ECCV'18), ContextDesc (CVPR'19) and ASLFeat (CVPR'20)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mask in losses.py

BingCS opened this issue Β· comments

commented

Hi Zixin,

I noticed that you apply a mask (line.134 of losses.py) with a threshold of 0.008. May I know the rules to select this value?

Best,
Bing

Hi Bing,

This threshold is used to filter too hard negative samples, or to mitigate the noise (incorrect gt correspondences) in the training data, which might harm the performance. This is also used in hardnet.

commented

Hi Jiahui,

Many thanks for your kind reply. To safely remove such samples, "dist_mat_without_min_on_diag" (line 136) should plus "mask*10" as HardNet does instead of "mask". Have I got that right?

Best,
Bing

For normalized features, the maximum of dist mat is 1.0, so it is ok to plus "mask". "+mask*10" is indeed a more safe way.

commented

Hi Jiahui,

If β€–π‘₯β€–=‖𝑦‖=1, the triangle inequality gives β€–π‘₯βˆ’π‘¦β€–β‰€β€–π‘₯β€–+‖𝑦‖=2. Thus, the values in dist_mat should range from 0.0 to 2.0. It might not be safe to just plus "mask".

Best,
Bing

Sorry, you are right. But I think this might only have a slight impact. I will fix it.

thanks for the issue, fixed.