Merge pull request #77 from rlagnsals/patch-1

sort by frame number.
This commit is contained in:
David PAGNON 2024-03-06 22:32:18 +01:00 committed by GitHub
commit 864f89c433
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,6 +66,8 @@ def json_display_without_img_func(**args):
json_folder = os.path.realpath(args.get('json_folder')) 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 = [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') output_img_folder = args.get('output_img_folder')
if output_img_folder==None: if output_img_folder==None:
output_img_folder = os.path.join(json_folder+'_img') output_img_folder = os.path.join(json_folder+'_img')