OnderT / XoFTR

XoFTR is a cross-modal cross-view method for local feature matching between thermal infrared (TIR) and visible images.
Apache License 2.0
58 stars 0 forks source link

Batch processing #4

Closed 13559323996 closed 1 week ago

13559323996 commented 2 months ago

When the number of points extracted from a batch in the coarse matching stage is different, how are these vectors with different lengths stacked in the fine matching stage? Or is it batch_size=1? I don’t seem to see it in the XoFTR and LoFTR codes. Can I ask you for advice on the batch processing process?

OnderT commented 2 months ago

Since different image pairs in the batch produce different numbers of matches, the matches are concatenated along the same dimension. Additionally, a variable keeps track of which batch index each match corresponds to.

I have prepared a demo notebook for batch processing, and you can examine the code for a better understanding.

Demo notebook

Please note that results may vary in batch processing due to batch normalization and padding.