nmwsharp / learned-triangulation

Source code for "PointTriNet: Learned Triangulation of 3D Point Sets", by Nicholas Sharp and Maks Ovsjanikov at ECCV 2020
MIT License
104 stars 15 forks source link

Can't work #2

Open devildonkey1392 opened 3 years ago

devildonkey1392 commented 3 years ago

Can you write a detail build description?

I can't work when I follow the README.

Thanks !

nmwsharp commented 3 years ago

Hi!

Can you be any more specific about the issue you're having?

This repo follows a fairly typical python / pytorch workflow. You should be able to run the scripts as in the examples after downloading dependencies. You can either install these dependencies manually, or via the environment.yml file. I suggest using conda to manage dependencies.

devildonkey1392 commented 3 years ago

I build the code in colab.

I use conda to create an environment with environment.yml. Then I want to generate mesh. I use the command

"python src/main_generate_mesh.py path/to/points.ply --weights=saved_model/"

But it doesn't work, the error say that it needs input path.

I try to use command

"python src/main_generate_mesh.py saved_models/ Human_skeleton.ply"

It returns the error about RuntimeError: [polyscope] ERROR: Failed to initialize glfw.

How to fix it?

Thanks for response !

nmwsharp commented 3 years ago

Ah, I see. I have never used colab before, though I believe in theory it should work.

I think the error you're seeing is because that program tries to open a GUI window to show you the result. Of course, the GUI cannot be initialized in the colab environment.

A workaround should be to use the --output flag, like

python src/main_generate_mesh.py saved_models/Human_skeleton.ply --output result

this will skip visualization, and save the outputs to a couple of files with names like result_pred_mesh.ply.

devildonkey1392 commented 3 years ago

After using the --output result, the same error occurs.

nmwsharp commented 3 years ago

Hm okay, I'm not sure then. I'm confused, because that shouldn't be touching the GUI code at all. Perhaps there is some silly bug.

I'll have to try to get this running on colab myself to debug further... I'll let you know

lui-shex commented 3 years ago

Hello, When I use Miniconda3 to create env with environment.yml, the error happen. Many packages were not found.

My os is window 10.

ResolvePackageNotFound:

How can I fix it?

Thanks for response !

nmwsharp commented 3 years ago

@lui-shex

So it turns out, for some crazy reason by default conda includes build-hashes which are specific to your platform in the generated environment.yml. This means that when you try to install on a slightly-different platorm, there are no matching packages, leading to exactly the error you listed---all the packages with hashes have failed.

Apparently you can ask conda to not include the hashes by exporting the environment file with:

conda env export -f environment.yml --no-builds

I regenerated the environment file using that command in 1996e62aaff6d3e2b56c47e4828bc7298d75572a, and also removed a bunch of unneeded packages from the environment.

It should work for you now, let me know if not!

nmwsharp commented 3 years ago

@devildonkey1392

Sure enough, there was a silly bug in the script causing it to try to initialize the GUI even with --output specified :) Fixed in eb47e4e255b29442f644b7ac79af632532b27ed1.

It should work now, please give it a try and let me know if anything else seems off!

devildonkey1392 commented 3 years ago

@nmwsharp

It can work ! Thanks for your assistance !