Closed euncheolChoi closed 1 year ago
@StephenHausler - one for you, please
Hi @euncheolChoi
Sure, I can help with this. I've provided answers to your questions below.
1) The integral feature helps by aggregating patch features using the GPU, using standard pytorch functions like conv2d. But the main benefit, computationally, is when multiple patch sizes are used at the same time, since a single integral feature can be used for all patch sizes (without this, we would need to perform separate indexing per patch size and this would be slower).
2) I don't think it does, since their are no learnt parameters in the integral feature computation.
3) Hmm, I'm not sure if that is possible. In our code, any patch size can be recovering by changing the dilation parameter on line 68 of patchnetvlad.py. I think changing this would achieve what you need? Any scale can be recovered by changing the dilation parameter. Based on the mathematics of an integral feature, changing the kernel would not provide the desired effect (or at least, I don't think a larger kernel would be a neat mapping from kernel size to patch size), but changing the dilation parameter will provide the desired effect.
Hope this helps, let me know if you have any other questions.
First of all, thank you for sharing your great work.
I'd like to know why we do the cumulative sum in the get_integral_feature(feat_in) function of the patchNetvlad model. For example, when the Tensor Size ([5, 8192, 30, 40] comes in, we proceed with the cumulative sum in the direction of dim=-1, dim=-2, and I'd like to know why.
Referring to the paper, it is explained that these expressions help the subsequent operation of extracting Patch-Descriptor from multi-scale.
Thanks in advance.