From 23cc2119f1c8d16c5e7ca8d3147c2d1c1bc2f184 Mon Sep 17 00:00:00 2001 From: HunMinKim <144449115+rlagnsals@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:36:22 +0900 Subject: [PATCH] sort by frame number. Robust performance on long length frames. --- Pose2Sim/Utilities/json_display_without_img.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Pose2Sim/Utilities/json_display_without_img.py b/Pose2Sim/Utilities/json_display_without_img.py index 437e45d..5802c7e 100644 --- a/Pose2Sim/Utilities/json_display_without_img.py +++ b/Pose2Sim/Utilities/json_display_without_img.py @@ -66,6 +66,8 @@ def json_display_without_img_func(**args): json_folder = os.path.realpath(args.get('json_folder')) json_fnames = [f for f in os.listdir(json_folder) if os.path.isfile(os.path.join(json_folder, f))] + json_fnames.sort(key=lambda f: int(f.split('_')[0])) # sort by frame number + output_img_folder = args.get('output_img_folder') if output_img_folder==None: output_img_folder = os.path.join(json_folder+'_img')