Juyong / DHNN_BodyRepresentation

Source code for the paper "Disentangled Human Body Embedding Based on Deep Hierarchical Neural Network" (TVCG2020).
40 stars 5 forks source link

What does the pA_acap stand for? #5

Closed MaxMayya closed 4 years ago

MaxMayya commented 4 years ago

In the BodyTem folder, there is a npy file called _pAacap and imported to the model as pA. Being less intuitive than other file names, can you please tell what does it stand for?

jby1993 commented 4 years ago

To compute the vertex positions from ACAP, we need to solve a linear equation Ax=b. The A is the laplace-beltrami matrix of reference matrix. pA_acap saves the pseudo-inverse of matrix A to solve the equation faster.

MaxMayya commented 4 years ago

I see! So is this matrix case-specific? I mean does it relate to the number of points and/or their connections on the reference mesh? In other words, how would pA_acap be different if we were modelling something other than human body? And since we are talking about the ACAP to mesh conversion, could you please explain why do you transform the log(R) to a quaternion and then to a matrix R? Would it be simpler to go from log(R) to R directly (using the exponential form of a skew symmetric matrix)?

jby1993 commented 4 years ago

The matrix is determined by the reference mesh. You can find how to construct it in related papers. The code of transforming log(R) to matrix R is borrowed from some SMPL's code, you can certainly convert log(R) to R with your own method, as long as it's right.

MaxMayya commented 4 years ago

Thanks a lot for your collaboration! Could you please point me to these related papers?

jby1993 commented 4 years ago

You can check equation 6 of this paper and the original ACAP paper.

MaxMayya commented 4 years ago

Thanks for the pointers. I computed laplace-beltrami matrix and got a highly sparse matrix (which is normal) and so is its pseudo-inverse. However, the pA matrix is not sparse. Could you explain that please?

jby1993 commented 4 years ago

The inverse matrix of a sparse matrix is not necessary sparse matrix, yet tend to be a dense matrix.

MaxMayya commented 4 years ago

hmmm maybe it's because my A matrix is diagonal-like. In other words, it depends on the indexing when performing the calculations (i.e. related to how edge_index is constructed). One another question, did you use the same weights as in ACAP (i.e. sqrt(sqrt(exp(0.5xcij))))? Thank you again for your quick answers!

jby1993 commented 4 years ago

I'm not quite clear what the weights in ACAP mean. My calculation is clarified in the paper. The cij(laplace_beltrami weights) is precomputed for the template mesh.

MaxMayya commented 4 years ago

Yes! Not clear what does the weight mean. I borrowed the equation from their code anyway. Now I tried the laplace_beltrami weights and it worked! Thanks for the collaboration