Various performance improvements.

This commit is contained in:
Daniel
2024-07-02 11:29:25 +02:00
parent a311af38e9
commit 089fb0b41d
8 changed files with 1248 additions and 1197 deletions

View File

@ -352,13 +352,24 @@ def main():
time_2d = time.time() - start
print("2D time:", time_2d)
minscores = {
# Choose this depending on the fraction of invalid/missing persons
# A higher value reduces the number of proposals
"panoptic": 0.95,
"human36m": 0.96,
"mvor": 0.87,
"campus": 0.96,
"shelf": 0.96,
}
minscore = minscores.get(dataset_use, 0.95)
start = time.time()
if sum(np.sum(p) for p in poses_2d) == 0:
poses3D = np.zeros([1, len(joint_names_3d), 4])
poses2D = np.zeros([len(images_2d), 1, len(joint_names_3d), 3])
else:
poses3D = triangulate_poses.get_3d_pose(
poses_2d, label["cameras"], roomparams, joint_names_2d
poses_2d, label["cameras"], roomparams, joint_names_2d, minscore
)
poses2D = []
for cam in label["cameras"]: