Comments (7)
Hi @pramanc,
A good reference that I would recommend is the book "Numerical Methods for Least Squares Problems" by Ake Bjorck.
You can check two chapters:
- Constrained Least Squares Problems --> Linear Equality Constraints
- Constrained Least Squares Problems --> Linear Inequality Constraints
I wrote a little bit (not very completed) about my implementation here: https://uh-ir.tdl.org/handle/10657/1824
(in chapter 3.7 Skinning Weights Update)
from dem-bones.
Re: A is zero matrix problem
A in solveP function should not be zero. It is positive definite due to the construction, it is actually A^T*A (A transposed * A).
from dem-bones.
@binhhuyle Thank you for your reply!
zero matrix problem actually happens in
solveP function:
z=q2[np-2]*( //Re-project
(q2[np-2].transpose()*indexing_row_col(aTa, idx.head(np), idx.head(np))q2[np-2]).colPivHouseholderQr().solve( //A
q2[np-2].transpose()(indexing_vector(aTb, idx.head(np))-indexing_row(aTa, idx.head(np))*x) )); //b
the matrix (q2[np-2].transpose()*indexing_row_col(aTa, idx.head(np), idx.head(np))*q2[np-2]) sometimes will be zero matrix
=======================================================
I will read the reference to see why it happens
Thank you again! Really amazing work!
from dem-bones.
Hello, hope both of you are doing well.
I think I'm running into the same problem and wanted to double check to see if either of you have found a solution or the cause of the problem.
After solving p it contains nan values and zeros. Which results in iMin being -1.
_Scalar eps=std::abs(x(idx[iMin]));
Just debugged the values after the solve and I am doing something terribly wrong.
aTa:
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
aTb:
-nan(ind)
-nan(ind)
-nan(ind)
-nan(ind)
-nan(ind)
aTa:
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
-nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)
aTb:
-nan(ind)
-nan(ind)
-nan(ind)
-nan(ind)
-nan(ind)
x:
0.876707
0
0
0.123293
0
np:
2
affine:
1
p:
-nan(ind)
0
0
-nan(ind)
0
from dem-bones.
@robertjoosten Hi, Can you supply the data(aTa, aTb, x, idx, np, affine, p) passed in solveP?
from dem-bones.
Hello @pramanc
I've narrowed it down a bit further. I think it goes wrong because of nan values introduced in m during the computeTransformations step.
m looks fine when it comes in ( identity matrix )
When computing vuT nan values make their way into the vuT which propagate to m ( I am assuming, in over my head with this level of math )
Here are some debug values for values in the SparseMatrix::InnerIterator in compute_vuT
The height it value coming from the weights makes me thing that might be where the problem lies.
it row
5
it value
6.15434e+255
v
0.987688
-0.156434
0
u
0.987688 -0.156434 0 1
temp
0.975528 -0.154508 0 0.987688
-0.154508 0.0244717 -0 -0.156434
0 -0 0 0
0.987688 -0.156434 0 1
vuT
6.00373e+255 -9.50897e+254 0 6.07857e+255
-9.50897e+254 1.50607e+254 -0 -9.6275e+254
0 -0 0 0
6.07857e+255 -9.6275e+254 0 6.15434e+255
vutP
inf -inf -nan(ind) inf
-inf inf -nan(ind) -inf
-nan(ind) -nan(ind) -nan(ind) -nan(ind)
inf -inf -nan(ind) inf
I really doubt this is related to the original issue anymore, happy to take the discussion away from this thread
Edit: this was me populating the weights incorrectly causing the matrices to flip out... sorry for the inconvenience
from dem-bones.
6.15434e+255
well, definitely your sparse matrix w is wrong to make it value(6.15434e+255),you can check the fbxreader part to see if you get right weight matrix w
from dem-bones.
Related Issues (20)
- Could it be possible to transform joint scale? HOT 1
- how to compile in debug mode HOT 2
- Question about rigid transformation from covariance matrix HOT 2
- Question about transAffine and transAffineNorm regularizers HOT 4
- Question: Binaries HOT 2
- Can dem-bones work directly on a PLY or OBJ sequence? HOT 2
- The dem bones llvm library executable not working on M1 Macbooks HOT 2
- Question: Dembones Gui HOT 2
- Animation of the skeleton fitted to mesh animation with only rotation change in each keyframe HOT 8
- Question about lockW/lockM HOT 1
- Weird Composition Result
- Can it decompose multi sequences with the same initial pose in the meantime?
- Patience & Tolerance values hard-coded to 3 and 1e-3 respectively HOT 1
- 20 bones are generated in the setting, but 1 bone is actually generated
- Any plans for Maya 2023+ support?
- Err
- DemBones.exe is infected with Gen:Variant.Lazy.247481 HOT 1
- DemBones.exe instantly closes after opening
- compute joint scale
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dem-bones.