How to run only dmtet without initialization from nerf #36

Closed
opened 2023-09-30 17:32:38 +08:00 by infusion-zero-edit · 1 comment
infusion-zero-edit commented 2023-09-30 17:32:38 +08:00 (Migrated from github.com)

giving error

Traceback (most recent call last):
File "/home/jupyter/Magic123/main.py", line 622, in
trainer.train(train_loader, valid_loader, test_loader, max_epoch)
File "/home/jupyter/Magic123/nerf/utils.py", line 1049, in train
self.train_one_epoch(train_loader, max_epochs)
File "/home/jupyter/Magic123/nerf/utils.py", line 1278, in train_one_epoch
loss, losses_dict, outputs = self.train_step(data)
File "/home/jupyter/Magic123/nerf/utils.py", line 645, in train_step
outputs = self.model.render(rays_o, rays_d, mvp, H, W, staged=False, perturb=True, bg_color=bg_color, ambient_ratio=ambient_ratio, shading=shading, binarize=binarize)
File "/home/jupyter/Magic123/nerf/renderer.py", line 1521, in render
results = self.run_dmtet(rays_o, rays_d, mvp, h, w, **kwargs)
File "/home/jupyter/Magic123/nerf/renderer.py", line 1264, in run_dmtet
rast, rast_db = dr.rasterize(self.glctx, verts_clip, faces, (h, w))
File "/home/jupyter/Magic123/venv_magic123/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 310, in rasterize
return _rasterize_func.apply(glctx, pos, tri, resolution, ranges, grad_db, -1)
File "/home/jupyter/Magic123/venv_magic123/lib/python3.10/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "/home/jupyter/Magic123/venv_magic123/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 248, in forward
out, out_db = _get_plugin().rasterize_fwd_cuda(raster_ctx.cpp_wrapper, pos, tri, resolution, ranges, peeling_idx)
RuntimeError: instance mode - pos must have shape [>0, >0, 4]

giving error Traceback (most recent call last): File "/home/jupyter/Magic123/main.py", line 622, in <module> trainer.train(train_loader, valid_loader, test_loader, max_epoch) File "/home/jupyter/Magic123/nerf/utils.py", line 1049, in train self.train_one_epoch(train_loader, max_epochs) File "/home/jupyter/Magic123/nerf/utils.py", line 1278, in train_one_epoch loss, losses_dict, outputs = self.train_step(data) File "/home/jupyter/Magic123/nerf/utils.py", line 645, in train_step outputs = self.model.render(rays_o, rays_d, mvp, H, W, staged=False, perturb=True, bg_color=bg_color, ambient_ratio=ambient_ratio, shading=shading, binarize=binarize) File "/home/jupyter/Magic123/nerf/renderer.py", line 1521, in render results = self.run_dmtet(rays_o, rays_d, mvp, h, w, **kwargs) File "/home/jupyter/Magic123/nerf/renderer.py", line 1264, in run_dmtet rast, rast_db = dr.rasterize(self.glctx, verts_clip, faces, (h, w)) File "/home/jupyter/Magic123/venv_magic123/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 310, in rasterize return _rasterize_func.apply(glctx, pos, tri, resolution, ranges, grad_db, -1) File "/home/jupyter/Magic123/venv_magic123/lib/python3.10/site-packages/torch/autograd/function.py", line 506, in apply return super().apply(*args, **kwargs) # type: ignore[misc] File "/home/jupyter/Magic123/venv_magic123/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 248, in forward out, out_db = _get_plugin().rasterize_fwd_cuda(raster_ctx.cpp_wrapper, pos, tri, resolution, ranges, peeling_idx) RuntimeError: instance mode - pos must have shape [>0, >0, 4]
guochengqian commented 2023-10-13 16:44:00 +08:00 (Migrated from github.com)

Not the focus of this work. Thanks. You can look at the code of Fantansia3D.

Not the focus of this work. Thanks. You can look at the code of Fantansia3D.
Sign in to join this conversation.