Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug problem with render_video.py: #26

Open
charmingmoe opened this issue Feb 12, 2024 · 1 comment
Open

Debug problem with render_video.py: #26

charmingmoe opened this issue Feb 12, 2024 · 1 comment

Comments

@charmingmoe
Copy link

Debug problem with render_video.py:

When I try to run render_video.py on pycharm, it produces the following error:

D:\NeRF\mipnerf\mipnerf_pl-dev> python render_video.py --ckpt results/ckpt/lego/multi-epoch=35-step=298835.ckpt --out_dir video --scale 4
Traceback (most recent call last):
File "D:\NeRF\mipnerf\mipnerf_pl-dev\render_video.py", line 197, in
run_render(args)
File "D:\NeRF\mipnerf\mipnerf_pl-dev\render_video.py", line 139, in run_render
_, (f_rgb, distance, acc) = model(batch_rays, False, args.white_bkgd)
^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)

I have not made any changes to the code. Is there any solution, please

@Ryan2ky
Copy link

Ryan2ky commented Apr 21, 2024

I have met the same error when I run eval.py and render_video.py. The problem is due to the fact that the second term in the output of the model is a list of 5-tuples, which we can see on the line 246 in the file mip_nerf.py, as following:

ret.append((comp_rgb, distance, acc, weights, t_samples))

But, on the line 179 (ret: list, [*(rgb, distance, acc)]) we know it should return a list of 3-tuples, and we expected 3, too.
In order to avoid other code using this module from being affected, I modified the code at the calling point(line 61 in eval.py and line 139 in render_video.py) to the following:

_, (f_rgb, distance, acc, _, _) = model(batch_rays, False, args.white_bkgd)

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

No branches or pull requests

2 participants