forked from openxrlab/xrmocap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eval_keypoints3d.py
85 lines (80 loc) · 2.42 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
type = 'TopDownAssociationEvaluation'
__data_root__ = './xrmocap_data/CMU-panoptic'
__meta_path__ = __data_root__ + '/xrmocap_meta_band4'
__bbox_thr__ = 0.85
logger = None
output_dir = './output/mvpose/cmu-panoptic/band'
pred_kps3d_convention = 'coco'
eval_kps3d_convention = 'campus'
selected_limbs_name = [
'left_lower_leg', 'right_lower_leg', 'left_upperarm', 'right_upperarm',
'left_forearm', 'right_forearm', 'left_thigh', 'right_thigh'
]
additional_limbs_names = [['jaw', 'headtop']]
associator = dict(
type='MvposeAssociator',
triangulator=dict(
type='AniposelibTriangulator',
camera_parameters=[],
logger=logger,
),
affinity_estimator=dict(type='AppearanceAffinityEstimator', init_cfg=None),
point_selector=dict(
type='HybridKps2dSelector',
triangulator=dict(
type='AniposelibTriangulator', camera_parameters=[],
logger=logger),
verbose=False,
ignore_kps_name=['left_eye', 'right_eye', 'left_ear', 'right_ear'],
convention=pred_kps3d_convention),
multi_way_matching=dict(
type='MultiWayMatching',
use_dual_stochastic_SVT=True,
lambda_SVT=50,
alpha_SVT=0.5,
n_cam_min=2,
),
kalman_tracking=None,
identity_tracking=dict(
type='KeypointsDistanceTracking',
tracking_distance=1.5,
tracking_kps3d_convention=pred_kps3d_convention,
tracking_kps3d_name=[
'left_shoulder', 'right_shoulder', 'left_hip_extra',
'right_hip_extra'
]),
checkpoint_path='./weight/mvpose/' +
'resnet50_reid_camstyle-98d61e41_20220921.pth',
bbox_thr=__bbox_thr__,
device='cuda',
logger=logger,
)
dataset = dict(
type='MviewMpersonDataset',
data_root=__data_root__,
img_pipeline=[
dict(type='LoadImagePIL'),
dict(type='ToTensor'),
dict(type='BGR2RGB'),
],
meta_path=__meta_path__,
test_mode=True,
shuffled=False,
bbox_convention='xyxy',
bbox_thr=__bbox_thr__,
kps2d_convention=pred_kps3d_convention,
gt_kps3d_convention='panoptic',
cam_world2cam=False,
)
dataset_visualization = dict(
type='MviewMpersonDataVisualization',
data_root=__data_root__,
output_dir=output_dir,
meta_path=__meta_path__,
pred_kps3d_paths=None,
bbox_thr=__bbox_thr__,
vis_percep2d=False,
kps2d_convention=None,
vis_gt_kps3d=False,
gt_kps3d_convention=None,
)