zju3dv / LoFTR

Code for "LoFTR: Detector-Free Local Feature Matching with Transformers", CVPR 2021, T-PAMI 2022
https://zju3dv.github.io/loftr/
Apache License 2.0
2.26k stars 358 forks source link

Tensorboard visualization - are the indices correct? #283

Open wpacholarz opened 1 year ago

wpacholarz commented 1 year ago

In the snippet marked under the link: https://github.com/zju3dv/LoFTR/blob/c0546af290fe87aaa75f754afe2759e0b00412ea/src/utils/plotting.py#L78C5-L80C67, why are the indices at the end of the line [[1, 0]]?

If I understand the code correctly, assuming a specific b_id, both data['mkpts0_f'], data['mkpts1_f'] and data['scale0'], data['scale1'] have width-related values in the first column and height-related in the second column.

Shouldn't the indices be flipped i.e. isn't the indexing [[1, 0]] redundant? Or have I missed something here? In the current setup the difference is unattainable in visualizations as data['scale0'] and data['scale1'] have almost identical values. It becomes visible when the difference in the scales is significant.

Thank you!