Parskatt / RoMa

[CVPR 2024] RoMa: Robust Dense Feature Matching; RoMa is the robust dense feature matcher capable of estimating pixel-dense warps and reliable certainties for almost any image pair.
https://parskatt.github.io/RoMa/
MIT License
622 stars 51 forks source link

Disparity between Eq.(18) in the paper and code implementation #75

Open cailile opened 2 months ago

cailile commented 2 months ago

Dear authors, I notice there may be some disparities between Eq.(18) and implementation:

  1. In robust_loss.py, Ln.92, the robust regression loss is implemented as: image

Compared to what is defined in Eq.(18) of the paper:

image

there is an extra power term **2 on the cs term.

  1. The paper mentioned that c is chosen to be 0.03, but in train_roma_outdoor.py, Ln.220, the value passed to c is 1e-4:
image
  1. The first minus sign in Eq.(18) (indicated by the red circle above) should be removed.

Could you kindly help to clarify? Thanks!

Parskatt commented 3 weeks ago

1.(and 3) You are correct, eq. 16 is correct but forgot to flip the sign for the KL divergence, thanks.

  1. The value we mention in the paper is in pixels, while the codebase is in normalized coordinates. At a resolution of 560 we get $560/2 10^{-4} \approx 0.03 $