DS09 : Conflict resolution, and other

This commit is contained in:
2026-06-29 13:29:28 +02:00
parent 27c0dae20e
commit 121bd0714a
6 changed files with 377 additions and 65 deletions
+11 -9
View File
@@ -73,6 +73,8 @@ def make_dictionary(root_dir, refaire=False, refaire_list=[]):
fb = result_obj.get("feedback", [])
for i in range(len(fb)):
el = fb[i]
if height == None or width == None:
print("?? height or width is None, for ", student_id, label)
if "box_2d" in el and el["box_2d"]:
el["box_2d"][0] = (el["box_2d"][0] * height)//1000
el["box_2d"][2] = (el["box_2d"][2] * height)//1000
@@ -102,15 +104,15 @@ def make_dictionary(root_dir, refaire=False, refaire_list=[]):
else:
print("Debug : asked to refaire", sid, lbl, "but pdf absent")
continue
result_data[sid][lbl] = {
"pdf_path": pdf_path,
"result": {
"score": 0.0,
"feedback": [],
"error": "non traité"
},
"coordinates": (0,0)
}
# result_data[sid][lbl] = {
# "pdf_path": pdf_path,
# "result": {
# "score": 0.0,
# "feedback": [],
# "error": "non traité"
# },
# "coordinates": (0,0)
# }
else: # Ce student id n'a jamais été corrigé
result_data[sid] = {}
for lbl in labels_to_redo: