sxyu / pixel-nerf

PixelNeRF Official Repository
https://alexyu.net/pixelnerf
BSD 2-Clause "Simplified" License
1.4k stars 198 forks source link

There may be one 'bug' in models.py ? #68

Open smallreed opened 1 year ago

smallreed commented 1 year ago

In the file 'models.py’, the following code seems wrong:

Grab encoder's latent code.

uv = -xyz[:, :, :2] / xyz[:, :, 2:] # (SB, B, 2)

The 'correct' one should be:

Grab encoder's latent code.

uv = -xyz[:, :, :2] / xyz[:, :, 2:] # (SB, B, 2)

h = xyz[:, :, 1:2] / xyz[:, :, 2:] w = -xyz[:, :, 0:1] / xyz[:, :, 2:] uv = torch.cat([h,w], dim = -1)

Looking forward to receiving a response from the author as soon as possible.