maybeLx / MVSFormerPlusPlus

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

schedule_inverse_range will have negative depth value #8

Closed hjxwhy closed 3 months ago

hjxwhy commented 4 months ago

thanks for your code, i an using your code for training my own data, but i found the schedule_inverse_range will return negative depth hypo, i read the code carefully and found that split_itv is great than 1, if the depth_pred is closed to max_depth or min_depth, inverse_max_depth will be negative. Do you have some suggestions? Best wishes

thucz commented 4 months ago

Same question.

ewrfcas commented 4 months ago

This may be caused by a very large depth range of your data. You can simply clip the inverse depth range with >0 or shift the whole range to make sure the minimum one is larger than 0.

ewrfcas commented 3 months ago

Now we update the code for schedule_inverse_range in with a new parameter shift. https://github.com/maybeLx/MVSFormerPlusPlus/blob/97097d92cc633e8c507838e6521a6f0270af2f83/models/module.py#L707 You could set shift=True and manually set 1/max_depth (which is set as 0.002 in default, meaning max depth is 500) to prevent negative depth estimation. The reason to manually set this 1/max_depth is that max_depth is influenced by the extrinsic translation, which may be very different according to various datasets (DTU is 935, while Tanks and Temple is 50).

reynoldscem commented 1 month ago

@ewrfcas is this only relevant during training?