facebookresearch / pifuhd

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

error cannot marching cubes (on CPU) #149

Closed fatihmtlm closed 2 years ago

fatihmtlm commented 2 years ago

I've 6GB RTX 3060 laptop GPU and it is not enough. So I want to use my CPU instead but I get this error with the test image:

Resuming from ./checkpoints/pifuhd.pt Warning: opt is overwritten. test data size: 1 initialize network with normal initialize network with normal generate mesh (test) ... 0%| | 0/1 [00:00<?, ?it/s]./results/pifuhd_final/recon/result_test_200.obj
error cannot marching cubes cannot unpack non-iterable int object 100%|██████████████████████████████████████████████████████████████████████████████| 1/1 [00:19<00:00, 19.62s/it]

How can I solve this problem?

VisionaryMind commented 2 years ago

You likely have a newer version of scikit-image installed, which does not implement marching_cubes_lewiner. If you will change line 77 of lib.mesh_util from marching_cubes_lewiner to simple marching_cubes, you will probably be able to get around this problem (if, in fact, the issue is your scikit-image package). I have 0.18.3, for example, and I had to implement this change.

fatihmtlm commented 2 years ago

Thank you, it worked!

yunfan258 commented 1 year ago

“verts, faces, normals, values = measure.marching_cubes(sdf, 0.5)“ line45,it works