Detect missing first exercice
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ def prepare_image(image_path: str, bounding_boxes, all_labels, nb_pages):
|
|||||||
label = bbox.get("label")
|
label = bbox.get("label")
|
||||||
if label and label in all_labels:
|
if label and label in all_labels:
|
||||||
current_index = all_labels.index(label)
|
current_index = all_labels.index(label)
|
||||||
if current_index < last_label_index:
|
if current_index < last_label_index or (last_label_index == -1 and current_index != 0):
|
||||||
color = "red"
|
color = "red"
|
||||||
last_label_index = current_index
|
last_label_index = current_index
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user