From 822a5316792f289fa87600f5d1a01406dfa32b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Wed, 1 Apr 2026 22:22:19 +0200 Subject: [PATCH] Detect missing first exercice --- plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotting.py b/plotting.py index 35d52ab..7ce12b1 100644 --- a/plotting.py +++ b/plotting.py @@ -78,7 +78,7 @@ def prepare_image(image_path: str, bounding_boxes, all_labels, nb_pages): label = bbox.get("label") if label and label in all_labels: 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" last_label_index = current_index