Fix sorting when concatenating files
This commit is contained in:
@@ -204,6 +204,7 @@ def process_correction(root_dir, data, all_labels):
|
||||
margin_left = 200
|
||||
|
||||
for student_id, labels in data.items():
|
||||
|
||||
# Prepare output directory: Dir/Anot_CopieID
|
||||
output_dir = os.path.join(root_dir, f"Anot_Copie{student_id}")
|
||||
|
||||
@@ -412,6 +413,8 @@ def concat_anot_images(directory):
|
||||
if f.name != "Concat.jpg"
|
||||
])
|
||||
|
||||
images.sort(key=lambda f: [int(n) for n in re.findall(r'\d+', f)])
|
||||
|
||||
if not images:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user