visinf / irr

Iterative Residual Refinement for Joint Optical Flow and Occlusion Estimation (CVPR 2019)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About the Zoom coefficient and Rotation coefficient

lelelexxx opened this issue · comments

Hi!
Thanks for sharing such a excellent repo!
There are two questions after I read your paper and the code here.
a> in line 325 of augmentation.py
theta1 = self.apply_random_transforms_to_params(
theta0,
max_translate=0.2,
min_zoom=1.0, max_zoom=1.5,
min_squeeze=0.86, max_squeeze=1.16,
min_rotate=-0.2, max_rotate=0.2,
validate_size=[height, width])
in line 258
phi.uniform_(-min_rotate, max_rotate)
The rotation coefficient will be generated though the code above, but in this case, the rotation coefficient phi will be generated between [0.2, 0.2], which means the rotation coefficient will be constant 0.2. Did I miss something or you are meant to do so ?

b> According to the find_invalid() in file augmentation.py, the random generated affine params will be invalid when zoom < 1.0. When zoom < 1.0, the transformed images' border will lies out of source images. and marked invalid by find_invalid().
Expecting for your replies. Thanks again!

Hi,

Thank you very much for sharing what you found!

The first part is indeed a serious mistake, and what you said is totally right.
it should be phi.uniform_(min_rotate, max_rotate)
I will revise the augmentation.py and push them.
I guess then the accuracy would be more improved after fixing the bug due to having the better augmentation.

For the second part, yes, that's also true.
Thus, when zoom < 1.0, it will be ignored by the find_invalid() function.

Thanks for your comments again!

Hi,

Thank you very much for sharing what you found!

The first part is indeed a serious mistake, and what you said is totally right.
it should be phi.uniform_(min_rotate, max_rotate)
I will revise the augmentation.py and push them.
I guess then the accuracy would be more improved after fixing the bug due to having the better augmentation.

For the second part, yes, that's also true.
Thus, when zoom < 1.0, it will be ignored by the find_invalid() function.

Thanks for your comments again!

Sorry to bother again, Would you mind paste the detail configs which you used to train PWCNet here? Including the data augmentation setting and how many iteration it has been trained. I can't find the clearly augmentation settings in PWCNet's repo and paper. However, You said in your paper that IRR used the same data augmentation as PWCNet, and PWCNet's performance in your paper is quitely close to original one. So, I want to know how to reproduce the PWCNet's performance using your code. Thanks ~

Hi,

We used S_short training schedule denoted in the FlowNet paper, which is 600k iteration steps with learning rate decay at 300k, 400k, and 500k.
In our code, we convert it into a unit of epoch.

You can find our reproduced PWC-Net as well as its training config in our repository:

https://github.com/visinf/irr/blob/master/models/pwcnet.py
https://github.com/visinf/irr/blob/master/scripts/pwcnet.sh

For the augmentation, we used "RandomAffineFlowOcc" in the augmentation.py.
Due to the mistake in this line, phi.uniform_(min_rotate, max_rotate),
the actual reproduced number would be a little bit different from that in our paper, but it's shouldn't be too much significant.
(hopefully!)