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

Half_flow #7

Closed
ShrutheeshIR opened this issue Jan 30, 2020 · 4 comments
Closed

Half_flow #7

ShrutheeshIR opened this issue Jan 30, 2020 · 4 comments

Comments

@ShrutheeshIR
Copy link

For 'network-default.pytorch' weights, why are the flows divided by 2. I tried going through liteflownet and could not find any such computation. What is the reason for halving the output of the optical flow

@Huangying-Zhan
Copy link
Owner

Hi @ShrutheeshIR , for liteflownet-default, I was using the reimplemented model provided by
https://github.com/sniklaus/pytorch-liteflownet

When I was using this model, I found that I need to do this "half-flow" operation in order to get correct flow prediction. You can double check and let me know if there is any question.

@ShrutheeshIR
Copy link
Author

Hey, thanks!
There was another query that I had. In the deep_flow_forward() function, I noticed that the reference key points are assigned to current frame and current keypoints are assigned to the ref_data. Is this done on purpose? If so, why is that?

@Huangying-Zhan
Copy link
Owner

Hi @ShrutheeshIR , yes, the code was written on purpose previously.

I think you are refering to this section.

cur_data['kp_best'] = batch_kp_ref_best[0].copy() # cur_data save each kp at ref-view (i.e. regular grid)

However it is not necessary for this version.

The previous reason is about an experiment I conducted, which is not just two-frame tracking, but multi-frames.
suppose we have 3 frames: f1, f2, f3.
f2 is my cur_frame while f1 and f3 are the reference.
Flows for (f1->f2) and (f3->f2) are computed.
the kp on f1 and f3 are the same, on the regular grid
the kp on f2 are different w.r.t f1 and f3.
Therefore, I saved kp on both f1 and f3 (identical) on cur_data while kp got from (f1->f2) and (f3->f2) on ref_data.
However, you can change the names and the related parts if it confused you.

@Huangying-Zhan
Copy link
Owner

re-open if need

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