DKM
DKM copied to clipboard
A small detail question about dense-flow
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,
)
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).