Working state, with single images regeneration and better notes detection
This commit is contained in:
+2
-2
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user