princeton-vl / RAFT-Stereo

MIT License
686 stars 131 forks source link

confused aboud Correlation Calculation #93

Open LiuXiang199x opened 11 months ago

LiuXiang199x commented 11 months ago

when calc correlation Pyramid, i dont understand why need to divided 2i; coords means flow prediction, when calc correlation in different resolution, why need to divide "2i"? i doesnt change shap, just change value of flow index. x0 = dx + coords.reshape(batch*h1*w1, 1, 1, 1) / 2**i

kartikmadhira1 commented 7 months ago

From what I understand, coords is not flow prediction but a grid map (torch.meshgrid output) containing the pixel coordinates. Flow prediction on the other is (coords1-coords0). This is also the correlation lookup that the authors talk about in the paper. So if we downsample the original correlation layer by 2, the corresponding pixel coordinates will also have to scale down by a factor of 2.