Closed hubert0527 closed 5 years ago
Hi, thank you for your suggestion. I also think about this. I believe that adding epsilon to the denomitar may not be appropriate since this epsilon can be order of magnitude higher than the value itself. Instead I tried to add epsilon to a heatmap:
Which should potentially aliviete the issue of zero singular value, if this is not the case you can try to increase the epsilon.
In any case I found this variances problematic to work with and in follow up work, I eliminate them completely.
Hi,
Thanks for your response!
In any case I found this variances problematic to work with and in follow up work, I eliminate them completely.
Do you mean you only model the mean of the keypoints in this case?
Not only the mean. I also estimate affine transformation matrix near each keypoint.
I see, thanks for your suggestions :)
Hi,
Thanks for open-sourcing the code, really benefits my research a lot!
I found two small problems in the code that may cause numerical instability:
Didn't guarantee
s1 - s2
is positive before sqrt: https://github.com/AliaksandrSiarohin/monkey-net/blob/7c116b6591e45421f78d3ecdbc224445ada4ac63/modules/util.py#L254The singular value can sometimes become too small, causing the output explodes to
inf
. Adding an epsilon to the denominator can help to stabilize it: https://github.com/AliaksandrSiarohin/monkey-net/blob/7c116b6591e45421f78d3ecdbc224445ada4ac63/modules/keypoint_detector.py#L65