eth-igl / gp2024-Assignments

0 stars 0 forks source link

Context-Aware Deformation RBF Input #47

Closed HairongLuo closed 3 months ago

HairongLuo commented 3 months ago

Hi,

In the task description the input of the RBF function is the norm of the difference of two poses. This is a bit unclear to me. Does this mean we should directly compute the distance of two raw quaternions representing the relative rotations, or we should first do forward kinematics and compute the distance of the resulting quaternions?

Thanks!

FloorVerhoeven commented 3 months ago

Hi, You can compute the distance using the relative/raw quaternions directly.

HairongLuo commented 3 months ago

Thank you for explaining. I implemented it in this way and I saw some jittering effect on the shoulder part. Is that normal or this means there's still some issue in my implementation?

PeizhuoLi commented 3 months ago

Hi, one possible cause is when you calculating the distance between quaternions, you didn’t check if they are on the same hemisphere, just like interpolating, because of the double cover problem (i.e. q and -q represent the same rotation).

HairongLuo commented 3 months ago

Thanks, that solved the jittering problem!

However, another problem arises. At certain time step there is large deformation artifact appearing. After checking the weight values of each example, I find at these time steps weights of some examples go up to big positive values while weights of other examples may go down to big negative values. Their scale will not be fixed since we only require the sum of weights is 1 after normalization. I think this is either due to the fact that I used triharmonic kernel as the RBF kernel, which changes fast when the input value changes, or due to the way I compute the input to the RBF function, which is simply the frobenius norm of the difference of two pose matrices of shape (#bone x 4). These two factors together make RBF value changes abruptly.

Can I instead use another RBF kernel which changes slower? Or maybe there is a better way to fix this problem?

segaviv commented 3 months ago

Hi,

You can experiment with different RBF kernels and choose one that works well.

However, I'm not sure if that's the issue in your case. The output of the RBF function should always be positive, and so do the weights of the example poses. I'd check again that the input to the RBF function is positive (and it should be, since it's the distance between 2 poses), and that the RBF function you chose always gives positive values (for positive inputs).

Make sure the weights are also inversely correlated to the distance between the poses (smaller distance -> larger weight).

HairongLuo commented 3 months ago

Hi,

I don't know if I'm understanding the formula wrong or something, but according to

image

The weights of the example poses can be negative if the coefficients $c{j,t}$ are negative even though the results of RBF functions are positive, which is the case after solving for the $c{j,t}$ values in my program. But I tried another polyharmonic kernel with a lower order and it works fine. Should this be a feasible solution?

segaviv commented 3 months ago

Right sorry for misunderstanding, the final weights a_j(p) can indeed be negative. Choosing a different RBF kernel is a feasible solution. You should experiment and find one that produces good results.

HairongLuo commented 3 months ago

Thank you for the discussion, that helps a lot!