Speed up pair creation and matching.

This commit is contained in:
Daniel
2024-08-06 10:55:53 +02:00
parent 6002aeddde
commit 36c236b8d8
3 changed files with 605 additions and 520 deletions

View File

@ -319,6 +319,7 @@ def main():
all_ids = []
all_paths = []
times = []
last_poses_3d = np.array([])
for label in tqdm.tqdm(labels):
images_2d = []
@ -377,7 +378,7 @@ def main():
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, minscore
poses_2d, label["cameras"], roomparams, joint_names_2d, last_poses_3d, minscore
)
poses2D = []
for cam in label["cameras"]:
@ -392,6 +393,7 @@ def main():
drop_few_limbs=(dataset_use != "mvor"),
)
poses3D = add_missing_joints(poses3D, joint_names_3d)
last_poses_3d = poses3D
time_3d = time.time() - start
print("3D time:", time_3d)