facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.81k stars 1.32k forks source link

Laplacian Loss does not smooth the shape #1887

Closed MartensCedric closed 3 weeks ago

MartensCedric commented 1 month ago

🐛 Bugs / Unexpected behaviors

The Laplacian Loss does not smooth the shape. I am referring to the laplacian loss: https://pytorch3d.readthedocs.io/en/latest/modules/loss.html

I started with a cow mesh, therefore I expected a sphere optimizing only for the Laplacian Loss. What I got is a very spiky cow.

image

image

I expected something similar to this: image

Instructions To Reproduce the Issue:

Starting with a code really similar to: https://pytorch3d.org/tutorials/fit_textured_mesh

I simply changed the starting mesh to be a cow too, and changed the losses to only use laplacian loss. I did not get what I expected.

Here is the code: ipynb_and_py.zip

Simply run and you should get the same results as me.

This used Pytorch 2.4.1+cu121 and pytorch3d-0.7.8 (latest) (ran in Google Colab)

bottler commented 3 weeks ago

This is a modelling question not a question about the library. We can't help.