Skip to content

Commit

Permalink
fix: only consider 14 joints for 3DPW-3D
Browse files Browse the repository at this point in the history
  • Loading branch information
juxuan27 committed Jul 17, 2022
1 parent a93fb90 commit f34be06
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 91 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ Please refer to our supplementary materials to check the cross-model validation
| MPI-INF-3DHP | VIBE* | 92.39/87.57 | 22.37/6.5 | [checkpoint](data/checkpoints/pw3d_spin_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)|
| MuPoTS | TposeNet* | 103.33/100.78 | 12.7/7.23 | [checkpoint](data/checkpoints/aist_vibe_3D/checkpoint_32.pth.tar) / [config](configs/aist_vibe_3D.yaml) |
| MuPoTS | TposeNet+RefineNet* | 93.97/91.78 | 9.53/7.21 | [checkpoint](data/checkpoints/aist_vibe_3D/checkpoint_32.pth.tar) / [config](configs/aist_vibe_3D.yaml) |
| 3DPW | EFT | 81.60/79.48 | 29.03/5.44 | [checkpoint](data/checkpoints/pw3d_spin_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)|
| 3DPW | PARE | 71.80/71.11 | 22.77/5.31 | [checkpoint](data/checkpoints/pw3d_spin_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)|
| 3DPW | SPIN | 87.58/86.67 | 30.84/5.53 | [checkpoint](data/checkpoints/pw3d_spin_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)|
| 3DPW | EFT | 90.32/88.40 | 32.71/6.07 | [checkpoint](data/checkpoints/pw3d_spin_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)|
| 3DPW | EFT | 90.32/86.39 | 32.71/6.30 | [checkpoint](data/checkpoints/pw3d_eft_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)(additional training)|
| 3DPW | PARE | 78.91/78.11 | 25.64/5.91 | [checkpoint](data/checkpoints/pw3d_spin_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)|
| 3DPW | SPIN | 96.85/95.84 | 34.55/6.17 | [checkpoint](data/checkpoints/pw3d_spin_3D/checkpoint_32.pth.tar) / [config](configs/pw3d_spin_3D.yaml)|
| 3DPW | TCMR* | 86.46/86.48 | 6.76/5.95 | [checkpoint](data/checkpoints/h36m_fcn_3D/checkpoint_32.pth.tar) / [config](configs/h36m_fcn_3D.yaml)|
| 3DPW | VIBE* | 82.97/81.49 | 23.16/5.98 | [checkpoint](data/checkpoints/h36m_fcn_3D/checkpoint_32.pth.tar) / [config](configs/h36m_fcn_3D.yaml)|

Expand Down
6 changes: 3 additions & 3 deletions lib/core/evaluate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
cfg.DATASET.ROOT_MPIINF3DHP_VIBE_3D=[14]
cfg.DATASET.ROOT_MUPOTS_TPOSENET_3D=[14]
cfg.DATASET.ROOT_MUPOTS_TPOSENETREFINENET_3D=[14]
cfg.DATASET.ROOT_PW3D_EFT_3D=[0]
cfg.DATASET.ROOT_PW3D_PARE_3D=[0]
cfg.DATASET.ROOT_PW3D_SPIN_3D=[0]
cfg.DATASET.ROOT_PW3D_EFT_3D=[2,3]
cfg.DATASET.ROOT_PW3D_PARE_3D=[2,3]
cfg.DATASET.ROOT_PW3D_SPIN_3D=[2,3]
cfg.DATASET.ROOT_PW3D_TCMR_3D=[2,3]
cfg.DATASET.ROOT_PW3D_VIBE_3D=[2,3]
cfg.DATASET.ROOT_H36M_MIX_3D=[0]
Expand Down
6 changes: 3 additions & 3 deletions lib/core/train_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
cfg.DATASET.ROOT_MPIINF3DHP_VIBE_3D=[14]
cfg.DATASET.ROOT_MUPOTS_TPOSENET_3D=[14]
cfg.DATASET.ROOT_MUPOTS_TPOSENETREFINENET_3D=[14]
cfg.DATASET.ROOT_PW3D_EFT_3D=[0]
cfg.DATASET.ROOT_PW3D_PARE_3D=[0]
cfg.DATASET.ROOT_PW3D_SPIN_3D=[0]
cfg.DATASET.ROOT_PW3D_EFT_3D=[2,3]
cfg.DATASET.ROOT_PW3D_PARE_3D=[2,3]
cfg.DATASET.ROOT_PW3D_SPIN_3D=[2,3]
cfg.DATASET.ROOT_PW3D_TCMR_3D=[2,3]
cfg.DATASET.ROOT_PW3D_VIBE_3D=[2,3]
cfg.DATASET.ROOT_H36M_MIX_3D=[0]
Expand Down
6 changes: 3 additions & 3 deletions lib/core/visualize_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
cfg.DATASET.ROOT_MPIINF3DHP_VIBE_3D=[14]
cfg.DATASET.ROOT_MUPOTS_TPOSENET_3D=[14]
cfg.DATASET.ROOT_MUPOTS_TPOSENETREFINENET_3D=[14]
cfg.DATASET.ROOT_PW3D_EFT_3D=[0]
cfg.DATASET.ROOT_PW3D_PARE_3D=[0]
cfg.DATASET.ROOT_PW3D_SPIN_3D=[0]
cfg.DATASET.ROOT_PW3D_EFT_3D=[2,3]
cfg.DATASET.ROOT_PW3D_PARE_3D=[2,3]
cfg.DATASET.ROOT_PW3D_SPIN_3D=[2,3]
cfg.DATASET.ROOT_PW3D_TCMR_3D=[2,3]
cfg.DATASET.ROOT_PW3D_VIBE_3D=[2,3]
cfg.DATASET.ROOT_H36M_MIX_3D=[0]
Expand Down
12 changes: 11 additions & 1 deletion lib/dataset/pw3d_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import bisect
from lib.utils.geometry_utils import *


H36M_TO_J17 = [6, 5, 4, 1, 2, 3, 16, 15, 14, 11, 12, 13, 8, 10, 0, 7, 9]
J17_TO_J14 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
class PW3DDataset(BaseDataset):

def __init__(self, cfg, estimator='spin', return_type='3D', phase='train'):
Expand Down Expand Up @@ -153,6 +154,10 @@ def get_data(self, index):
pred_data = self.detected_data_joints_3d[position].reshape(
ground_truth_data_len, -1, 3)

if self.estimator in ["eft","spin","pare"]:
gt_data=gt_data[:, H36M_TO_J17, :][:, J17_TO_J14, :]
pred_data=pred_data[:, H36M_TO_J17, :][:, J17_TO_J14, :]

gt_data = gt_data.reshape(ground_truth_data_len, -1)
pred_data = pred_data.reshape(ground_truth_data_len, -1)

Expand Down Expand Up @@ -208,6 +213,11 @@ def get_test_data(self, index):
pred_data = self.detected_data_joints_3d[index].reshape(
ground_truth_data_len, -1, 3)

if self.estimator in ["eft","spin","pare"]:
gt_data=gt_data[:, H36M_TO_J17, :][:, J17_TO_J14, :]
pred_data=pred_data[:, H36M_TO_J17, :][:, J17_TO_J14, :]


gt_data = gt_data.reshape(ground_truth_data_len, -1)
pred_data = pred_data.reshape(ground_truth_data_len, -1)

Expand Down
138 changes: 60 additions & 78 deletions lib/visualize/visualize_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,124 +573,106 @@


PW3D_EFT_3D_EDGES = [
[0, 7, 0],
[7, 8, 0],
[8, 9, 0],
[9, 10, 0],
[8, 11, 0],
[11, 12, 0],
[12, 13, 0],
[0, 1, 0],
[1, 2, 0],
[2, 3, 0],
[8, 14, 1],
[14, 15, 1],
[15, 16, 1],
[0, 4, 1],
[4, 5, 1],
[5, 6, 1],

[1, 2, 0],
[2, 8, 0],
[3, 9, 1],
[4, 3, 1],
[5, 4, 1],
[6, 7, 0],
[7, 8, 0],
[8, 12, 0],
[9, 12, 1],
[10, 9, 1],
[11, 10, 1],
[12, 13, 1],

]

PW3D_EFT_3D_JOINTS = [
[0, 0],
[1, 0],
[2, 0],
[3, 0],
[3, 1],
[4, 1],
[5, 1],
[6, 1],
[6, 0],
[7, 0],
[8, 0],
[9, 0],
[10, 0],
[11, 0],
[12, 0],
[13, 0],
[14, 1],
[15, 1],
[16, 1],
[9, 1],
[10, 1],
[11, 1],
[12, 1],
[13, 1],
]


PW3D_PARE_3D_EDGES = [
[0, 7, 0],
[7, 8, 0],
[8, 9, 0],
[9, 10, 0],
[8, 11, 0],
[11, 12, 0],
[12, 13, 0],
[0, 1, 0],
[1, 2, 0],
[2, 3, 0],
[8, 14, 1],
[14, 15, 1],
[15, 16, 1],
[0, 4, 1],
[4, 5, 1],
[5, 6, 1],

[1, 2, 0],
[2, 8, 0],
[3, 9, 1],
[4, 3, 1],
[5, 4, 1],
[6, 7, 0],
[7, 8, 0],
[8, 12, 0],
[9, 12, 1],
[10, 9, 1],
[11, 10, 1],
[12, 13, 1],

]

PW3D_PARE_3D_JOINTS = [
[0, 0],
[1, 0],
[2, 0],
[3, 0],
[3, 1],
[4, 1],
[5, 1],
[6, 1],
[6, 0],
[7, 0],
[8, 0],
[9, 0],
[10, 0],
[11, 0],
[12, 0],
[13, 0],
[14, 1],
[15, 1],
[16, 1],
[9, 1],
[10, 1],
[11, 1],
[12, 1],
[13, 1],
]

PW3D_SPIN_3D_EDGES = [
[0, 7, 0],
[7, 8, 0],
[8, 9, 0],
[9, 10, 0],
[8, 11, 0],
[11, 12, 0],
[12, 13, 0],
[0, 1, 0],
[1, 2, 0],
[2, 3, 0],
[8, 14, 1],
[14, 15, 1],
[15, 16, 1],
[0, 4, 1],
[4, 5, 1],
[5, 6, 1],

[1, 2, 0],
[2, 8, 0],
[3, 9, 1],
[4, 3, 1],
[5, 4, 1],
[6, 7, 0],
[7, 8, 0],
[8, 12, 0],
[9, 12, 1],
[10, 9, 1],
[11, 10, 1],
[12, 13, 1],

]

PW3D_SPIN_3D_JOINTS = [
[0, 0],
[1, 0],
[2, 0],
[3, 0],
[3, 1],
[4, 1],
[5, 1],
[6, 1],
[6, 0],
[7, 0],
[8, 0],
[9, 0],
[10, 0],
[11, 0],
[12, 0],
[13, 0],
[14, 1],
[15, 1],
[16, 1],
[9, 1],
[10, 1],
[11, 1],
[12, 1],
[13, 1],
]


Expand Down

0 comments on commit f34be06

Please sign in to comment.