Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Bug for progressive_nerf_only #27

Open
zhanglonghao1992 opened this issue Apr 14, 2022 · 1 comment
Open

Bug for progressive_nerf_only #27

zhanglonghao1992 opened this issue Apr 14, 2022 · 1 comment

Comments

@zhanglonghao1992
Copy link

zhanglonghao1992 commented Apr 14, 2022

When setting prog_nerf_only to true, we should upsample x and img to resolution_vol:

if img is not None:
if self.progressive_nerf_only and (img.size(-1) < self.resolution_vol):
x = upsample(x, self.resolution_vol)
img = upsample(img, self.resolution_vol)

However, there is a bug in the function upsample:
def upsample(img_nerf, size, filter=None):
up = size // img_nerf.size(-1)
if up <= 1:
return img_nerf
if filter is not None:
from torch_utils.ops import upfirdn2d
for _ in range(int(math.log2(up))):
img_nerf = upfirdn2d.downsample2d(img_nerf, filter, up=2)
else:
img_nerf = F.interpolate(img_nerf, (size, size), mode='bilinear', align_corners=False)
return img_nerf

For example, when the img_size gradually increases to 65 and the resolution_vol is 128, the upsampling operation is not performed, which will lead to subsequent size errors.

@MultiPath
Copy link
Contributor

Thanks for pointing. This is an argument once I hoped to reproduce EG3D's operation. However, I could not get any good results and did not check carefully on this again. It might be incompatible now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants