KAIST-Visual-AI-Group / APAP

The reference implementation of As-Plausible-As-Possible: Plausibility-Aware Mesh Deformation Using 2D Diffusion Priors (CVPR 2024).
42 stars 5 forks source link

Run error #3

Closed hhchen-create closed 2 weeks ago

hhchen-create commented 2 weeks ago

Hi, I am trying to use APAP to deform some of my meshes.

After I trained Lora, set control points, and finally ran the deform part, I encountered that

in PoissonSystem.py", line 109: return CholeskySolverD(self.n, self.inds[0,:], self.inds[1,:], self.vals, MatrixType.COO) ValueError: Matrix is not positive definite!

So, are there any requirements for the input mesh?

DveloperY0115 commented 2 weeks ago

Hi @hhchen-create,

Thank you for your interest in our work!

As we represent triangular meshes as Jacobian fields, we need to pre-factorize Laplacian matrices before SDS optimization. To do so, the matrices should be positive definite for Cholesky decomposition, which may not be the case for meshes with, for instance, duplicate vertices/faces, isolated components, etc.

We preprocessed some meshes used in our experiments using the utility function defined here. It would be good to give it a shot.

Thank you.

hhchen-create commented 2 weeks ago

Hi, @DveloperY0115

Thanks for your kind feedback and very useful suggestions.

It works for me now!

Thank you.