Parskatt / DKM

[CVPR 2023] DKM: Dense Kernelized Feature Matching for Geometry Estimation
https://parskatt.github.io/DKM/
Other
378 stars 28 forks source link

A small detail question about dense-flow #52

Open chen9run opened 5 months ago

chen9run commented 5 months ago

The work is very exciting! I ask about the scaling process in the following code. Why divide by 4 here? Isn't ins diaplacement[] supposed to restore to the original image, and /w is to normalize the result?
dense_flow = torch.stack( ( dense_flow[:, 0] + ins
displacement[:, 0] / (4 w), dense_flow[:, 1] + ins displacement[:, 1] / (4 * h), ), dim=1, )

Parskatt commented 5 months ago

Actually you can use any constant you want, as long as you use h,w. You could use 1.3 or 7.5 etc. If you want the model to output exactly in pixel coords you use 1/(0.5h). The 4 is simply that I thought it would make stuff about variance 1 (probably not true in practice).