Closed minsoo5403 closed 1 year ago
Hi I think this is a bug introduced in the recent release 0.3.0. You can use the 0.2.4 version which should be good:
pip install nerfacc==0.2.4
I will fix this bug tmr.
And the github commit that corresponds to nerfacc==0.2.4 is
https://github.com/KAIR-BAIR/nerfacc/tree/e7bd2074c583c287b9d0f575398b68a2517cb546
Thank you, the problem has been resolved.
Fixed in #109 : bump version to nerfacc==0.3.1
(nerfacc) user@user-System-Product-Name:~/nerfacc$ python examples/train_mlp_nerf.py --train_split train --scene lego elapsed_time=29.72s | step=0 | loss=0.07453 | alive_ray_mask=64 | n_rendering_samples=10405 | num_rays=64 | elapsed_time=246.25s | step=5000 | loss=0.00609 | alive_ray_mask=1902 | n_rendering_samples=67981 | num_rays=6039 | elapsed_time=526.09s | step=10000 | loss=0.00360 | alive_ray_mask=2662 | n_rendering_samples=65017 | num_rays=8508 | elapsed_time=810.97s | step=15000 | loss=0.00223 | alive_ray_mask=3250 | n_rendering_samples=63616 | num_rays=10536 | elapsed_time=1107.14s | step=20000 | loss=0.00186 | alive_ray_mask=3725 | n_rendering_samples=66230 | num_rays=11785 | elapsed_time=1407.04s | step=25000 | loss=0.00160 | alive_ray_mask=3746 | n_rendering_samples=65570 | num_rays=11769 | 0%| | 0/200 [00:00<?, ?it/s] Traceback (most recent call last): File "/home/user/nerfacc/examples/train_mlpnerf.py", line 233, in
rgb, acc, depth, = render_image(
File "/home/user/nerfacc/examples/utils.py", line 88, in render_image
ray_indices, t_starts, t_ends = ray_marching(
File "/home/user/anaconda3/envs/nerfacc/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, kwargs)
File "/home/user/anaconda3/envs/nerfacc/lib/python3.9/site-packages/nerfacc/ray_marching.py", line 208, in ray_marching
masks = render_visibility(
File "/home/user/anaconda3/envs/nerfacc/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, *kwargs)
File "/home/user/anaconda3/envs/nerfacc/lib/python3.9/site-packages/nerfacc/vol_rendering.py", line 511, in render_visibility
packed_info = pack_info(ray_indices, n_rays=n_rays)
File "/home/user/anaconda3/envs/nerfacc/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(args, kwargs)
File "/home/user/anaconda3/envs/nerfacc/lib/python3.9/site-packages/nerfacc/pack.py", line 67, in pack_info
n_rays = int(ray_indices.max()) + 1
RuntimeError: max(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument.
i'm using pytorch 1.12 / cuda 11.3 / ubuntu linux 22.04
Can anybody give me some help?