facebookresearch / pifuhd

High-Resolution 3D Human Digitization from A Single Image.
Other
9.51k stars 1.44k forks source link

obj file missing #182

Closed wellreadbae closed 1 year ago

wellreadbae commented 1 year ago

when i try to create a mesh it gives me the following error:

Bildschirm­foto 2023-03-07 um 18 55 45

Anyone know what could resolve the problem? in the results folder i only have the png but no obj. Thank you in advance

ecations commented 1 year ago

Same problem here, both on Colab and local installation..

MetalMantis commented 1 year ago

I am going to try to downgrade the google colab's cuda version. I will post updated results here. I think this just might work!

ecations commented 1 year ago

Thanks for working on a solution! I'm not sure if this is useful, but this is roughly what I had to do to get it working on my local environment:

Solution: -Had to install: pip install matplotlib -Had to open this file: "L:\pythonEnvironments\pifuhd\pifuhdEnv\pifuhd-main\lib\data\EvalWPoseDataset.py" and replace all instances of np.int with just int -Had to Open the sdf.py file, and change np.bool instances to just bool -Had to change line 77 of mesh_util.py from
verts, faces, normals, values = measure.marching_cubes_lewiner(sdf, thresh) to
verts, faces, normals, values = measure.marching_cubes(sdf, thresh, method="lewiner")

now the default image worked

MetalMantis commented 1 year ago

@ecations what cuda version are you running? I'm still getting the error with the rolled back cuda with pytorch3d

!pip install pytorch3d

is unable to find pytorch3d in https://pypi.org/simple EVEN THOUGH one can find it when looking at the page?? this is very bizarre indeed... I am going to try installing a specific pytorch3d directly from a URL, but at this point I have no idea what the problem is. I think pytorch3d is what is used for the marching cubes operation but I have yet to check if that's deprecated or not.

tl;dr I have no idea what is going on

aalikkilaa commented 1 year ago

Fancy ecation! I wonder how you pin down such obscure problem's location within a big project! So amazing!

MetalMantis commented 1 year ago

now I have gotten it working on my local machine with a lot of headaches but interestingly none of the changes @ecations made. The script that generates the mesh from the result file is apps\recon.py. I haven't actually gotten any output because of CUDA memory errors (I'm on my laptop at the moment and I am not sure how to switch pytorch to CPU (obviously torch.device("cpu")) but I'm sure it will be deeper than that but that's a separate issue), but for all intensive purposes it is working at the moment.

What I'm really interested in now is the fact that colab's pip is seemingly not relying at all upon pypi.org/simple, even though it says that it is. This is true even in a brand new colab session. pip will install many other packages (yt-dlp for example) is this a bug or a feature and how do I work around it?

MetalMantis commented 1 year ago

Update @ecations colab has already been resolved in other issues. I should have known. https://github.com/facebookresearch/pifuhd/issues/85#issuecomment-1336467047

shunsukesaito commented 1 year ago

The error should be fixed now. Please let me know if the error persists. I'll close the issue for now. But feel free to reopen.

diplomatist commented 1 year ago

Thanks for working on a solution! I'm not sure if this is useful, but this is roughly what I had to do to get it working on my local environment:

Solution: -Had to install: pip install matplotlib -Had to open this file: "L:\pythonEnvironments\pifuhd\pifuhdEnv\pifuhd-main\lib\data\EvalWPoseDataset.py" and replace all instances of np.int with just int -Had to Open the sdf.py file, and change np.bool instances to just bool -Had to change line 77 of mesh_util.py from verts, faces, normals, values = measure.marching_cubes_lewiner(sdf, thresh) to verts, faces, normals, values = measure.marching_cubes(sdf, thresh, method="lewiner")

now the default image worked

it works!Thanks for your help!