Yellow labels, and injected error for new spawned tasks.

This commit is contained in:
2026-05-04 14:13:48 +02:00
parent 81be54b5f7
commit 428692f6c8
3 changed files with 16 additions and 4 deletions
+2
View File
@@ -79,6 +79,8 @@ def prepare_image(image_path: str, bounding_boxes, all_labels, nb_pages, last_la
current_index = all_labels.index(label)
if current_index < last_label_index or (last_label_index == -1 and current_index != 0):
color = "red"
elif current_index > last_label_index + 1:
color = "yellow"
last_label_index = current_index
draw.rectangle(((abs_x_min, abs_y_min), (abs_x_max, abs_y_max)), outline=color, width=4)