Closed InnovArul closed 3 years ago
@InnovArul Yes, I also find this problem. I guess that the author forgeted to append offset0 to a list. like following:
for ...
...
offset0 = (coarse_search_correlation * grid ).sum(1).sum(1) * dirates[searching_index] # 1,h,w,2
offsets.append(offset0). # change here.
...
im_col0 = [deform_im2col(qr[i], offsets[i], kernel_size=self.P) for i in range(nsearch)] # change here.
Thanks for pointing out! Not sure why I created the list but didn't use it, but I will correct the code.
Hi,
I could see that the variable
offset0
is used in this line: https://github.com/zlai0/MAST/blob/a57b043ca597b9b7ef6842b1fa965c9f1ee71526/models/colorizer.py#L101However, it is calculated from the last
for loop
overnsearch
. i.e., it won't contain the correct offset for each searched images. Here: https://github.com/zlai0/MAST/blob/a57b043ca597b9b7ef6842b1fa965c9f1ee71526/models/colorizer.py#L70-L80Ideally,
im_col0
could have been collected inside the samefor loop
for every image innsearch
to reflect correct offset for each image. Could you please clarify why is this not done?Thanks!