Giter VIP home page Giter VIP logo

Comments (4)

joeylitalien avatar joeylitalien commented on July 22, 2024

Hi @RaresAmbrus,

Do you have a more descriptive error log? You don't need to trim the interior triangles of your mesh for NGLOD to work, it just helps a bit since the SDF to learn becomes "simpler". You can just return mesh.contiguous() in that function and the code should normalize properly. AFAIK, the Armadillo mesh is already a 2-manifold so compute_trimmesh() should return a dense vector of True in that case (i.e. no triangles are removed).

Hope this helps,
Joey

from nglod.

RaresAmbrus avatar RaresAmbrus commented on July 22, 2024

Thanks @joeylitalien for the quick response! This is the error I get when running the original code:

Traceback (most recent call last):
  File "app/main.py", line 62, in <module>
    model = Trainer(args, args_str, 'mesh')
  File "/workspace/nglod/sdf-net/lib/trainer.py", line 122, in __init__
    self.set_dataset()
  File "/workspace/nglod/sdf-net/lib/trainer.py", line 161, in set_dataset
    self.train_dataset = globals()[self.args.mesh_dataset](self.args)
  File "/workspace/nglod/sdf-net/lib/datasets/MeshDataset.py", line 71, in __init__
    self.ids, self.p, self.d, self.nrm = self._sample()
  File "/workspace/nglod/sdf-net/lib/datasets/MeshDataset.py", line 81, in _sample
    pts = point_sample(self.mesh, self.sample_mode, self.num_samples)
  File "/workspace/nglod/sdf-net/lib/torchgp/point_sample.py", line 39, in point_sample
    distrib = area_weighted_distribution(mesh)
  File "/workspace/nglod/sdf-net/lib/torchgp/area_weighted_distribution.py", line 40, in area_weighted_distribution
    return torch.distributions.Categorical(areas.view(-1))
  File "/usr/local/lib/python3.6/dist-packages/torch/distributions/categorical.py", line 64, in __init__
    super(Categorical, self).__init__(batch_shape, validate_args=validate_args)
  File "/usr/local/lib/python3.6/dist-packages/torch/distributions/distribution.py", line 53, in __init__
    raise ValueError("The parameter {} has invalid values".format(param))
ValueError: The parameter probs has invalid values

For some reason all the triangles are removed and data/armadillo_normalized.obj is just an empty file. Maybe just a local issue with my setup.

Returning directly mesh.contiguous() as you suggested seems to work - it's training now! Maybe as a follow-up, I'm getting very low losses:

[27/07 20:38:39] [INFO] Loaded mesh dataset
[27/07 20:38:39] [INFO] Total number of parameters: 10146213
[27/07 20:38:39] [INFO] Model configured and ready to go
[27/07 20:38:54] [INFO] EPOCH 1/251 | total loss: 6.702E-03 | l2 loss: 1.071E-03
[27/07 20:38:54] [INFO] Saving model checkpoint to: _results/models/armadillo.pth
[27/07 20:39:15] [INFO] EPOCH 2/251 | total loss: 5.059E-04 | l2 loss: 7.187E-05
[27/07 20:39:15] [INFO] Saving model checkpoint to: _results/models/armadillo.pth

Does that look good? Thanks again for the help!

from nglod.

joeylitalien avatar joeylitalien commented on July 22, 2024

Yes, these types of losses are typical. Honestly I wouldn't worry too much about the interior triangle trimming; in practice it does little to no difference if you have a high quality mesh.

from nglod.

RaresAmbrus avatar RaresAmbrus commented on July 22, 2024

Ok great, thanks again @joeylitalien!

from nglod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.