Closed MvWouden closed 1 year ago
Thank you for pointing out this potential problem. I think we better use indexing='ij'
here to have the correct coordinate system for the 3D mesh. Note that this is different from the np.meshgrid
in ray_utils.py
, which ensures the correct coordinate system for the 2D image pixels. Could you please change the indexing method to ij
?
Sure! I'll do that today.
@bennyguo I've changed it to be indexing='ij'
, so it should be good now. Note that I did not change np.meshgrid
in ray_utils.py
given your explanation.
Looks good! Merged.
Running the code with a recent version of PyTorch leads to:
Next to that, the default indexing mode of
np.meshgrid
andtorch.meshgrid
are different from each other (xy
vsij
), see the torch meshgrid documentation which also includes a warning for this.I've added the
xy
indexing parameter to thetorch.meshgrid
call which will:indexing='xy'
fornp.meshgrid
), even if future changes are made to the defaults (as suggested in the torch docs).UserWarning
that is thrown.This issue also describes the problem.
If we'd like to use e.g.
indexing='ij'
or something else needs to be changed, please let me know.