MarilynKeller / OSSO

From a body shape, infer the anatomic skeleton.
Other
210 stars 32 forks source link

AttributeError: 'add' object has no attribute 'v' #3

Closed Zkjoker closed 2 years ago

Zkjoker commented 2 years ago

By some other algorithm, I got an ply file which is in smpl format. And I want to use your code to generate the skeleton. However, there is an error:


same topology as STAR or SMPL. Mesh has {skin_mesh.v.shape[0]} vertices, {sv.v.shape[0]} expected')
AttributeError: 'add' object has no attribute 'v'
``
Can you please tell me how can i use my own ply human surface to get the inside skeleton?
Thank you!
[test.zip](https://github.com/MarilynKeller/OSSO/files/8676334/test.zip)
MarilynKeller commented 2 years ago

Can you check the content of the variable skin_mesh just before this error occurs? Moreover, if you execute skin_mesh.show() it should show you your mesh.

Zkjoker commented 2 years ago

thank you , I have solved the problem. but there is another issue: /home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/scipy/sparse/linalg/_dsolve/linsolve.py:206: MatrixRankWarning: Matrix is exactly singular warn("Matrix is exactly singular", MatrixRankWarning) /home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/chumpy/optimization_internal.py:287: UserWarning: sparse solve failed, falling back to lsqr warnings.warn("sparse solve failed, falling back to lsqr") 2022-05-18 13-51-56 的屏幕截图

Does your algorithm require the orientation of characters? Thank you!

Zkjoker commented 2 years ago

This time I adjusted the character to face straight ahead, but it still reported an error and couldn't get the expected skeleton. image How can I solve this problem so that I can get the right bone? Thank you!

Zkjoker commented 2 years ago

/home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/scipy/sparse/linalg/_dsolve/linsolve.py:206: MatrixRankWarning: Matrix is exactly singular warn("Matrix is exactly singular", MatrixRankWarning) /home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/chumpy/optimization_internal.py:287: UserWarning: sparse solve failed, falling back to lsqr warnings.warn("sparse solve failed, falling back to lsqr") 1.46e-02 | ball_joint: 5.72e-11 | skin_spring: 1.46e-02 | stitching: 1.13e-09 | tendon_cost: 1.05e-10 /home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/scipy/sparse/linalg/_dsolve/linsolve.py:206: MatrixRankWarning: Matrix is exactly singular warn("Matrix is exactly singular", MatrixRankWarning) /home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/chumpy/optimization_internal.py:287: UserWarning: sparse solve failed, falling back to lsqr warnings.warn("sparse solve failed, falling back to lsqr") 1.46e-02 | ball_joint: 3.01e-11 | skin_spring: 1.46e-02 | stitching: 1.13e-09 | tendon_cost: 1.08e-10 /home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/scipy/sparse/linalg/_dsolve/linsolve.py:206: MatrixRankWarning: Matrix is exactly singular warn("Matrix is exactly singular", MatrixRankWarning) /home/anmo1/OSSO/osso_venv/lib/python3.8/site-packages/chumpy/optimization_internal.py:287: UserWarning: sparse solve failed, falling back to lsqr warnings.warn("sparse solve failed, falling back to lsqr")

MarilynKeller commented 2 years ago

This problem should be solved by the last commit. Can you pull and try again?

Basically you provided a mesh without faces, which the code did not support. Now the code supports input mesh without faces.

Zkjoker commented 2 years ago

Thank you for your assistance in solving the problem. Excellent work!