Use Anot and Bnot directories
parent
c1451a7a99
commit
194e0c867b
|
|
@ -79,8 +79,6 @@ def make_dictionary(root_dir):
|
||||||
}
|
}
|
||||||
|
|
||||||
return result_data
|
return result_data
|
||||||
# output the resulting dictionary
|
|
||||||
# print(json.dumps(result_data, indent=2, ensure_ascii=False))
|
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import shutil
|
import shutil
|
||||||
|
|
@ -200,12 +198,13 @@ def render_latex_text(text, width_px, bg_color=(255, 255, 255, 255), max_lines=N
|
||||||
final_img.alpha_composite(img)
|
final_img.alpha_composite(img)
|
||||||
return final_img
|
return final_img
|
||||||
|
|
||||||
|
|
||||||
def process_correction(root_dir, data, all_labels):
|
def process_correction(root_dir, data, all_labels):
|
||||||
for student_id, labels in data.items():
|
for student_id, labels in data.items():
|
||||||
|
|
||||||
# Prepare output directory: Dir/Anot_CopieID
|
# Prepare output directory: Dir/Anot_CopieID
|
||||||
output_dir = os.path.join(root_dir, f"Anot_Copie{student_id}")
|
output_dir = os.path.join(root_dir, "Anot", f"Copie{student_id}")
|
||||||
|
|
||||||
|
# output_dir = os.path.join(root_dir, f"Anot_Copie{student_id}")
|
||||||
|
|
||||||
# Check if already processed (Concat.jpg exists)
|
# Check if already processed (Concat.jpg exists)
|
||||||
concat_path = os.path.join(output_dir, "Concat.jpg")
|
concat_path = os.path.join(output_dir, "Concat.jpg")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue