Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magic factors when upsample flow #12

Open
ahangchen opened this issue Dec 23, 2021 · 1 comment
Open

magic factors when upsample flow #12

ahangchen opened this issue Dec 23, 2021 · 1 comment

Comments

@ahangchen
Copy link

There are some magic factors when upsample flow to higher resolution:
https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L140

https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L147

https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L154

https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L161

What's the meaninig of 0.625, 1.25, 2.5, 5? Is there any geometry motivation?

I think the factors should be 2, because when you upsample a flow to a resolution with double height and width, the flow is double due to double pixels between origin points and corresponding points.

@ltkong218
Copy link
Owner

ltkong218 commented Dec 27, 2021

Please note that each decoder of FastFlowNet estimates optical flow whose magnitude is 1/20 of ground truth flow, therefore, to convert to true displacement before warping, we should multiply a scale factor of 20/(2^l), where l belongs to {2, 3, 4, 5} means the pyramid level. We adopt the same scaling approach as PWC-Net and LiteFlowNet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants