The joint order and tip indices in Omid's MANO implementation differ from manotorch and Yana's implementation. To convert Omid's output to match the manotorch format, you must:
- Remove the tips from Omid's joint definition.
- Extract the specific tip vertices using the
manotorch tip indices. - Concatenate the original joints with the new tips.
- Reorder the resulting joint array using the
REORDER_IDX mapping.
manotorch Tip Indices:
thumb: 745index: 317middle: 444ring: 556pinky: 673
Reorder Mapping (REORDER_IDX):
[0, 13, 14, 15, 16, 1, 2, 3, 17, 4, 5, 6, 18, 10, 11, 12, 19, 7, 8, 9, 20]
# Assuming V3 and J3 are outputs from Omid's MANO model
REORDER_IDX = [0, 13, 14, 15, 16, 1, 2, 3, 17, 4, 5, 6, 18, 10, 11, 12, 19, 7, 8, 9, 20]
# 1. Remove the tips in Omid's definition (first 16 joints)
J3_ = J3[:, :16]
# 2. Get the tips from manotorch/Yana's definition using vertex indices
tips = V3[:, [745, 317, 444, 556, 673]]
# 3. Concatenate
J3_ = torch.cat([J3_, tips], 1)
# 4. Reorder to match manotorch
new_J3 = J3_[:, REORDER_IDX]