maybeLx / MVSFormerPlusPlus

Codes of MVSFormer++: Revealing the Devil in Transformer’s Details for Multi-View Stereo (ICLR2024)
Apache License 2.0
162 stars 5 forks source link

Dividing down the intrinsics` #25

Open reynoldscem opened 2 months ago

reynoldscem commented 2 months ago

Hi,

In some settings you divide your intrinsics down by 4 (because of rescaling?), and sometimes you don't. Why is this?

Examples:

intrinsics[:2, :] /= 4.0

https://github.com/maybeLx/MVSFormerPlusPlus/blob/971e7d90bf68b996153135786147e1fe0f1ba6f5/datasets/general_eval.py#L90

ewrfcas commented 2 months ago

The training intrinsic matrix of DTU is pre-saved with 1/4 scale. So we divide the original intrinsic with 4 to make sure they share the same scale as the training data.

Here the 1/4 intrinsic is only used for stage2 (line229-235).

stage0_pjmats = proj_matrices.copy()
stage0_pjmats[:, 1, :2, :] = proj_matrices[:, 1, :2, :] * 0.5
stage1_pjmats = proj_matrices.copy()
stage2_pjmats = proj_matrices.copy()
stage2_pjmats[:, 1, :2, :] = proj_matrices[:, 1, :2, :] * 2
stage3_pjmats = proj_matrices.copy()
stage3_pjmats[:, 1, :2, :] = proj_matrices[:, 1, :2, :] * 4
reynoldscem-oculo commented 2 months ago

So am I to understand when we test on our own data we do divide them similarly, or not?

ewrfcas commented 2 months ago

So am I to understand when we test on our own data we do divide them similarly, or not?

Yes, they will be correctly rescaled in line229-235.

reynoldscem-oculo commented 2 months ago

Ok thanks. And thank you for the quick responses and the repository.