Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Running Example #8

Open
ltejedor opened this issue Jan 7, 2024 · 1 comment
Open

Error Running Example #8

ltejedor opened this issue Jan 7, 2024 · 1 comment

Comments

@ltejedor
Copy link

ltejedor commented Jan 7, 2024

Hello! I'm trying to get the code from this paper running, and am getting the following error:


Traceback (most recent call last):
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 153, in get_centroids
    self.load_centroids()
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 105, in load_centroids
    self.centroids.points_and_normals = np.load(os.path.join(self.source_dir, "centroids_and_normals.npy"))
  File "/usr/local/lib/python3.10/dist-packages/numpy/lib/npyio.py", line 405, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'outputs/tmp/centroids_and_normals.npy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 113, in get_samples
    self.load_samples()
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 121, in load_samples
    self.samples.xyz = np.load(os.path.join(self.source_dir, 'samples.npy'))
  File "/usr/local/lib/python3.10/dist-packages/numpy/lib/npyio.py", line 405, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'outputs/tmp/samples.npy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/content/TextDeformer/main.py", line 92, in <module>
    main()
  File "/content/TextDeformer/main.py", line 88, in main
    loop(cfg)
  File "/content/TextDeformer/loop.py", line 111, in loop
    jacobian_source.load()
  File "/content/TextDeformer/NeuralJacobianFields/SourceMesh.py", line 130, in load
    self.__init_from_mesh_data()
  File "/content/TextDeformer/NeuralJacobianFields/SourceMesh.py", line 90, in __init_from_mesh_data
    centroids = self.mesh_processor.get_centroids()
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 155, in get_centroids
    self.compute_centroids()
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 162, in compute_centroids
    self.get_samples()# this is to compute WKS for centroids
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 115, in get_samples
    self.compute_samples()
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 143, in compute_samples
    pt_samples, normals_samples, wks_samples, bary = self.sample_points( self.num_samples)
  File "/content/TextDeformer/NeuralJacobianFields/MeshProcessor.py", line 292, in sample_points
    bary, found_faces = igl.random_points_on_mesh(n, self.vertices, self.faces)
ValueError: too many values to unpack (expected 2)

Any insights would be helpful, thank you!

@YudiZhangGithub
Copy link

@ltejedor Hi, I've met the same problem. It turned out that I've installed the newer version of libigl, which contains a different function 'igl.random_points_on_mesh'. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants