dispflownet-tf
dispflownet-tf copied to clipboard
Correlation layer is not defined correctly
Hi, I am trying to implement this repository but I see that is a huge discripancy with the reported result on the paper. The result I am getting using this code provide bad result compared the the result reported in the paper. I believe the correlation layer is note defind correctly as below: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% def correlation_map( x, y, max_disp ): corr_tensors = [] for i in range(-max_disp, 0, 1): shifted = tf.pad(tf.slice(y, [0, 0, -i, 0], [-1]*4), [[0, 0], [0, 0], [-i, 0], [0, 0]], "CONSTANT") corr = tf.reduce_mean(tf.multiply(shifted, y), axis=3) corr_tensors.append(corr) for i in range(max_disp + 1): shifted = tf.pad(tf.slice(y, [0]*4, [-1, -1, y.shape[2].value - i, -1]), [[0, 0], [0, 0], [0, i], [0, 0]], "CONSTANT") corr = tf.reduce_mean(tf.multiply(shifted, y), axis=3) corr_tensors.append(corr) return tf.transpose(tf.stack(corr_tensors),perm=[1,2,3,0]) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I see that the x input is ignored while the y input is running over twice! Could you please clarify this issue because I believe that this is the reason behind this discrepancy.
With best regards,
Essa Anas Ph.D student
Why does the slow version have better result than the fast version?
@essaanas1 @umbraclet16 @fedor-chervinskii Any update on the corr1d layer? I searched online, this is the only repo with corr1d layer implementation. So for the native tensorflow version(slow), is it correct to use now? Thank you very much.
I think from your reported results, you already get better results than original paper, 2.28 compared to 2.37. Correct me if I am wrong.
I also don't understand why there is a huge gap between fast and slow version. Thanks.