-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy patheval_keypoints3d.py
125 lines (119 loc) · 3.19 KB
/
eval_keypoints3d.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
type = 'BottomUpAssociationEvaluation'
__data_root__ = './xrmocap_data/Shelf'
__meta_path__ = __data_root__ + '/xrmocap_meta_testset'
logger = None
output_dir = './output/fourdag/shelf_fourdag_19_FourDAGOptimization/'
pred_kps3d_convention = 'fourdag_19'
eval_kps3d_convention = 'campus'
associator = dict(
type='FourDAGAssociator',
kps_convention=pred_kps3d_convention,
min_asgn_cnt=5,
use_tracking_edges=True,
keypoints3d_optimizer=dict(
type='FourDAGOptimizer',
triangulator=dict(type='JacobiTriangulator', ),
active_rate=0.1,
min_track_cnt=5,
bone_capacity=100,
w_bone3d=1.0,
w_square_shape=1e-2,
shape_max_iter=5,
w_kps3d=1.0,
w_regular_pose=1e-3,
pose_max_iter=20,
w_kps2d=1e-5,
w_temporal_trans=1e-1,
w_temporal_pose=1e-2,
min_triangulate_cnt=15,
init_active=0.9,
triangulate_thresh=0.05,
logger=logger,
),
graph_construct=dict(
type='GraphConstruct',
kps_convention=pred_kps3d_convention,
max_epi_dist=0.15,
max_temp_dist=0.2,
normalize_edges=True,
logger=logger,
),
graph_associate=dict(
type='GraphAssociate',
kps_convention=pred_kps3d_convention,
w_epi=2,
w_temp=2,
w_view=2,
w_paf=1,
w_hier=0.5,
c_view_cnt=1.5,
min_check_cnt=1,
logger=logger,
),
logger=logger,
)
dataset = dict(
type='BottomUpMviewMpersonDataset',
data_root=__data_root__,
img_pipeline=[
dict(type='LoadImagePIL'),
dict(type='ToTensor'),
],
meta_path=__meta_path__,
test_mode=True,
shuffled=False,
kps2d_convention=pred_kps3d_convention,
gt_kps3d_convention='campus',
cam_world2cam=True,
)
metric_list = [
dict(
type='PredictionMatcher',
name='matching',
),
dict(type='MPJPEMetric', name='mpjpe', unit_scale=1000),
dict(type='PAMPJPEMetric', name='pa_mpjpe', unit_scale=1000),
dict(
type='PCKMetric',
name='pck',
use_pa_mpjpe=True,
threshold=[50, 100],
),
dict(
type='PCPMetric',
name='pcp',
threshold=0.5,
show_table=True,
selected_limbs_names=[
'left_lower_leg', 'right_lower_leg', 'left_upperarm',
'right_upperarm', 'left_forearm', 'right_forearm', 'left_thigh',
'right_thigh'
],
additional_limbs_names=[['jaw', 'headtop']],
),
dict(
type='PrecisionRecallMetric',
name='precision_recall',
show_table=False,
threshold=list(range(25, 155, 25)) + [500],
)
]
pick_dict = dict(
mpjpe=['mpjpe_mean', 'mpjpe_std'],
pa_mpjpe=['pa_mpjpe_mean', 'pa_mpjpe_std'],
pck=['pck@50', 'pck@100'],
pcp=['pcp_total_mean'],
precision_recall=['recall@500'],
)
dataset_visualization = dict(
type='MviewMpersonDataVisualization',
data_root=__data_root__,
output_dir=output_dir,
meta_path=__meta_path__,
pred_kps3d_paths=None,
vis_percep2d=False,
kps2d_convention=pred_kps3d_convention,
vis_gt_kps3d=False,
vis_bottom_up=True,
gt_kps3d_convention=None,
)