MCG-NKU/AMT

There seems to be some bugs

GSeanCDAT opened this issue · 0 comments

Hi,
Thanks for making your great work open-source.
When I come through your code, I find that there might be some bugs in the coorelation lookup function:

AMT/networks/AMT-G.py

Lines 61 to 74 in 70f988f

def _corr_scale_lookup(self, corr_fn, coord, flow0, flow1, embt, downsample=1):
# convert t -> 0 to 0 -> 1 | convert t -> 1 to 1 -> 0
# based on linear assumption
t1_scale = 1. / embt
t0_scale = 1. / (1. - embt)
if downsample != 1:
inv = 1 / downsample
flow0 = inv * resize(flow0, scale_factor=inv)
flow1 = inv * resize(flow1, scale_factor=inv)
corr0, corr1 = corr_fn(coord + flow1 * t1_scale, coord + flow0 * t0_scale)
corr = torch.cat([corr0, corr1], dim=1)
flow = torch.cat([flow0, flow1], dim=1)
return corr, flow

It seems that the values of t1_scale and t0_scale show be switched as:
t1_scale = 1. / (1. - embt)
t0_scale = 1. / embt
Although it doesn't affect your presented results at fixed timestep 0.5, it might harm the model's performance when interpolating frames at an arbitrary time.