Closed ghost closed 5 years ago
Hi, the normalization operation transforms sampled coordinates from [0, W-1][0, H-1] to [-1, 1] [-1,1]. The normalized flow certainly contains values less than -1, in which case the original coordinate should be less than 0 and the sampler would use border values as padding.
Thanks for replying quickly.
If the main purpose is normalizing coord into [-1, 1], will it be better to normalize coord and flow separately into the range first then, add them together? currently with the coord focused normalizing , it seems large negative flows like -10, -30 all become -1.x and lose their intensity by changed with padding value.
Is there any intention or benefit that i missed why "add an unnormalized [-x, x] flow into [0, h] coord then normalize together" instead of "normalize separately and then add together"?
Thanks
On Mon, Jul 22, 2019, 21:03 Zhichao Yin notifications@github.com wrote:
Hi, the normalization operation transforms sampled coordinates from [0, W-1][0, H-1] to [-1, 1] [-1,1]. The normalized flow certainly contains values less than -1, in which case the original coordinate should be less than 0 and the sampler which using border values as padding.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ucbdrive/hd3/issues/11?email_source=notifications&email_token=AMR5FVU3K4GZETT36CUHD5LQAWOZ3A5CNFSM4IFVMBJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2PWN4Q#issuecomment-513763058, or mute the thread https://github.com/notifications/unsubscribe-auth/AMR5FVXAKLGIGGCA3GPZ4CDQAWOZ3ANCNFSM4IFVMBJQ .
The purpose of the normalization is to make the sampling coordinates compatible with PyTorch's bilinear sampler API. I would suggest you figure out the mechanism of differentiable warping guided by optical flow first.
Thanks! I will read that. Could you help with one more guide for starter: what is an expected range of the flow when it given as input to the warping function?
Thanks! I will read that. Could you help with one more guide for starter: what is an expected range of the flow when it given as input to the warping function?
Hello, Could I ask why you normalize the flow by vgrid[:,0,:,:] = 2.0*vgrid[:,0,:,:].clone() / max(W-1,1)-1.0 in the warping function?
Due to minus value in flow, the vgrid could also have minus and then the result of that line could be less then -1. Isnt that out of purposed vgrid range [-1, 1]?
Can we assume that vgrid == sum(grid, flow) always stay larger than 0?