amundra15 / livehand

Official PyTorch implementation of the ICCV '23 paper LiveHand
MIT License
58 stars 5 forks source link

Is pts differentiable with respect to the barycentric weights? #5

Closed charley077 closed 8 months ago

charley077 commented 8 months ago

Hi, thanks for the great work! I'm interested in the 'uvh' representation which makes the model faster. I have one question in the process to get 'uvh'. In the following function: https://github.com/amundra15/livehand/blob/7ba95ce657f97924e9a49dc672ab4bd9ea29a0ff/input_encoder.py#L88 I notice that you only calculated the derivative of pts with respect to min_dis. I want to know if pts is differentiable with respect to w0, w1 and w2? If so, how can I calculate the derivative of pts with respect to the barycentric weights?

amundra15 commented 8 months ago

Hi,

Thanks for your interest.

With the current implementation, the function is not differentiable with respect to w0, w1 and w2. Moreover, for our use case, we use need only the forward pass through this layer and do not use the differentiability with respect to min_dis either.

More generally, making the uvd conversion truly differentiable is non-trivial, and worth investigating.

Hope that answers your question.

charley077 commented 8 months ago

Hi,

Thanks for your interest.

With the current implementation, the function is not differentiable with respect to w0, w1 and w2. Moreover, for our use case, we use need only the forward pass through this layer and do not use the differentiability with respect to min_dis either.

More generally, making the uvd conversion truly differentiable is non-trivial, and worth investigating.

Hope that answers your question.

It really helps. Thanks for your reply!