xuelunshen/gim

Image intrinsics during resize & padding

qsisi opened this issue · 5 comments

Have you re-scale the intrinsics while resizing or padding the image?

Take example for ETH3D, looks like the image is resized when loading:
https://github.com/xuelunshen/gim/blob/main/TEST_GIM_LOFTR.sh#L10-L11
https://github.com/xuelunshen/gim/blob/main/datasets/eth3d/eth3d.py#L69-L72
But is the intrinsic K remains unchanged:
https://github.com/xuelunshen/gim/blob/main/datasets/eth3d/eth3d.py#L101-L102
Which is directly used for pose error computation:
https://github.com/xuelunshen/gim/blob/main/tools/metrics.py#L128-L139
Is that a bug or did I just misunderstand some part of the code?

Looking forward to your reply.

Thanks for your clarification.

What about in the LoFTR setting?

https://github.com/xuelunshen/gim/blob/main/trainer/lightning.py#L151

Looks like the scaling operation is not applied correspondingly?

Thanks for your clarification.

You're welcome, thank you for your attention. 🤝 @qsisi