Working state, with single images regeneration and better notes detection

This commit is contained in:
2026-02-15 14:46:40 +01:00
parent 5c25ed42a3
commit 2e1c519dce
3 changed files with 138 additions and 88 deletions
+2 -2
View File
@@ -332,7 +332,7 @@ def compose_label_image(base_img, label, result, hmin,
last_text_bottom = paste_y + txt_img.height
return final_img
return final_img, header_height
def natural_key(text):
return [int(c) if c.isdigit() else c.lower() for c in re.split(r'(\d+)', str(text))]
@@ -384,7 +384,7 @@ def process_correction(root_dir, data, all_labels, overwrite=False):
score = result.get('score', 0)
d_notes[label] = str(score)
final_img = compose_label_image(base_img, label, result, coordinates[0])
final_img, _ = compose_label_image(base_img, label, result, coordinates[0])
# 7. Save Image
save_path = os.path.join(output_dir, f"{label}.jpg")