PIFu icon indicating copy to clipboard operation
PIFu copied to clipboard

error cannot marching cubes

Open sinAshish opened this issue 2 years ago • 7 comments

Hi @shunsukesaito, thanks for sharing the code for this work.

I have prepared the renderings of my own dataset as per the mentioned data preparation steps. But when I run the code for training shape/color, I get the error:

error cannot marching cubes
cannot unpack non-iterable int object
Can not create marching cubes at this time.

I know that this error might occur during the initial stages of training when the network has not learned properly, but in my case the error persists during the complete phase of training.

What do you think could be the reason for this? Or did I make any mistake during the creation of my dataset?

sinAshish avatar Jan 15 '22 20:01 sinAshish

maybe you can check the version of skimage. In my situation, when i replace the marching_cube_lewiner by marching_cube, the error is fixed

Ranqing avatar Feb 21 '22 11:02 Ranqing

maybe you can check the version of skimage. In my situation, when i replace the marching_cube_lewiner by marching_cube, the error is fixed

Hi, i wonder what's the version of your skimage and where is the marching_cube_lewiner to replace? Thanks!

IHe-KaiI avatar Feb 22 '22 16:02 IHe-KaiI

I meet the same problem and I check the predicted sdf, with values all 0, which means that all vertices are outside mesh, thus the threshold 0.5 fails to generate a surface. And I check my dataset and find that my meshes are not watertight, I'm trying to fill the holes and check if it works .

Jarvisss avatar Apr 04 '22 12:04 Jarvisss

This fixed for me. https://githubhot.com/repo/facebookresearch/pifuhd/issues/149

bernakabadayi avatar Apr 05 '22 15:04 bernakabadayi

I meet the same problem and I check the predicted sdf, with values all 0, which means that all vertices are outside mesh, thus the threshold 0.5 fails to generate a surface. And I check my dataset and find that my meshes are not watertight, I'm trying to fill the holes and check if it works .

so, Have you fixed the problem now? I meet the same problem.

Yuhuoo avatar May 16 '22 04:05 Yuhuoo

@Yuhuoo Yes, you may comment the try/catch to check where the error exactly occurs

Jarvisss avatar May 16 '22 07:05 Jarvisss

@Yuhuoo Yes, you may comment the try/catch to check where the error exactly occurs

Thank you for your reply, but I still don't kown how to do. Can you share the code?

Yuhuoo avatar May 18 '22 10:05 Yuhuoo

Open PIFu/lib/mesh_util.py and change line 45 to

verts, faces, normals, values = measure.marching_cubes(sdf, 0.5)

It will work since marching_cubes_lewiner is depreciated.

raj-gupta1 avatar Jan 02 '23 07:01 raj-gupta1

scikit-image==0.19.3

venv/Lib/site-packages/skimage/measure/init.py

maybe you can check the version of skimage. In my situation, when i replace the marching_cube_lewiner by marching_cubes, the error is fixed

warmilk avatar Mar 07 '23 07:03 warmilk

Open PIFu/lib/mesh_util.py and change line 45 to

verts, faces, normals, values = measure.marching_cubes(sdf, 0.5)

It will work since marching_cubes_lewiner is depreciated.

Thank you, this works for me!

IridescentJiang avatar Mar 12 '24 11:03 IridescentJiang