MengHao666 / Hand-BMC-pytorch

PyTorch reimplementation of hand-biomechanical-constraints (ECCV2020)
MIT License
72 stars 10 forks source link

fix an bug of PIP bones #1

Closed tomguluson92 closed 3 years ago

tomguluson92 commented 3 years ago

Hi Hao,

I am wonder a wrong index problem occurs, so I just modify it to align with Equation 4 as described below: image

MengHao666 commented 3 years ago

Sorry for the late response. The index mechanism of Python might be misleading here. The size of normals is [B, 4, 3], so the second index of normals should be limited to [0,3]. Following errors will occur when the code is run under your modification.

Traceback (most recent call last): File "/home/chen/PycharmProjects/2021/Hand-BMC-pytorch_/weakloss.py", line 370, in <module> loss_total, loss_dict = bmc.compute_loss(joints) File "/home/chen/PycharmProjects/2021/Hand-BMC-pytorch_/weakloss.py", line 304, in compute_loss PIP_X_axis[:, [0, 1, 4], :] = -normals[:, [0, 1, 4]] RuntimeError: CUDA error: device-side assert triggered Process finished with exit code 1