Closed VerseWei closed 12 months ago
Hello, I have the same problem, how did you solve it?
Sorry for the late reply. This may be incompatible between different pytorch3d versions. Fragments (returned by meshRasterizer) have changed from NamedTuple
to dataclass
.
If you use recent pytorch3d version (>=0.7.0), you need to change the mesh_filtering.py line 43 as follows:
mesh_frag = meshRasterizer(meshes)
pix_to_face, zbuf, bar, pixd = mesh_frag.pix_to_face, mesh_frag.zbuf, mesh_frag.bary_coords, mesh_frag.dists
hello,
Thank you for this great work. I encountered some errors while using the pre trained model. Can you help me?
For dtu Scan24, I will ckpt 300000. pth is placed in./exp/dtu Scan24/neuda Under womask/checkpoints, add image, mask, and cameras Spheres. npz is placed in data/DTU/dtu Scan24, and then we encountered this problem.
(neuda) wxs@cvrs:~/3D_Recon/NeuDA$ python extract_mesh.py --case dtu_scan24 --conf ./conf/neuda_womask.conf --eval_metric /home/wxs/anaconda3/envs/neuda/lib/python3.9/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1682343997789/work/aten/src/ATen/native/TensorShape.cpp:3483.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] [INFO] SDF Network dims: [51, 256, 256, 256, 260] [extract_mesh.py:68 - extract_mesh() ] Find checkpoint: ckpt_300000.pth Load data: Begin [-1.01 -1.01 -1.01] [1.01 1.01 1.01] Load data: End dilation... Mask dilation: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 49/49 [00:05<00:00, 9.28it/s] Low resolution evaluation: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 93.25it/s] Rasterization: 0%| | 0/49 [00:00<?, ?it/s] Traceback (most recent call last): File "/home/wxs/3D_Recon/NeuDA/extract_mesh.py", line 154, in
extract_mesh(args)
File "/home/wxs/3D_Recon/NeuDA/extract_mesh.py", line 104, in extract_mesh
mesh = get_mesh.get_surface_high_res_mesh(
File "/home/wxs/3D_Recon/NeuDA/evaluation/get_mesh.py", line 99, in get_surface_high_res_mesh
face_mask = face_mask & mesh_filtering.visible_mask(mesh_low_res, cams, nb_visible=1).cpu().numpy()
File "/home/wxs/3D_Recon/NeuDA/evaluation/mesh_filtering.py", line 43, in visible_mask
pix_to_face, zbuf, bar, pixd = meshRasterizer(meshes)
TypeError: cannot unpack non-iterable Fragments object