nerfstudio
nerfstudio copied to clipboard
Viewer crash
Describe the bug
I am training splatfacto, during which I open the viewer. In the viewer, I tried to reset the resolution from default 512 to 1024, I got the above crash and the viewer basically freeze. It happens during early stage of training when coarse-to-fine training is active.
Exception in thread Thread-11:
Traceback (most recent call last):
File "/opt/conda/envs/nerfstudio/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
self.run()
File "/eames-efs/eames-nerf/jianboye/projects/nerfstudio/nerfstudio/viewer/render_state_machine.py", line 222, in run
outputs = self._render_img(action.camera_state)
File "/eames-efs/eames-nerf/jianboye/projects/nerfstudio/nerfstudio/viewer/render_state_machine.py", line 182, in _render_img
scale = min(desired_depth_pixels / current_depth_pixels, 1.0)
ZeroDivisionError: division by zero
@brentyi This seems related to the depth rendering scaling factor
Yeah, the error implies we're getting 0 from current_depth_pixels = outputs["depth"].shape[0] * outputs["depth"].shape[1]
. Probably there's an edge case in _calculate_image_res
, or how client camera aspect ratios are read/used?
It also happen to me with same exact error message...