Reset with index jumps.

This commit is contained in:
Daniel
2024-10-10 12:47:41 +02:00
parent b80ad139e5
commit b958bc8bcf
2 changed files with 99 additions and 95 deletions

View File

@ -277,10 +277,13 @@ def main():
times = []
triangulator = spt.Triangulator(min_score=minscore, min_group_size=min_group_size)
old_scene = ""
old_index = -1
for label in tqdm.tqdm(labels):
images_2d = []
if old_scene != label.get("scene", "") or dataset_use == "human36m_wb":
if old_scene != label.get("scene", "") or (
old_index + datasets[dataset_use]["take_interval"] < label["index"]
):
# Reset last poses if scene changes
old_scene = label.get("scene", "")
triangulator.reset()
@ -328,6 +331,7 @@ def main():
time_3d = time.time() - start
print("3D time:", time_3d)
old_index = label["index"]
all_poses.append(np.array(poses3D))
all_ids.append(label["id"])
all_paths.append(label["imgpaths"])