Initial support for automatic fixing of additional and wrong label

This commit is contained in:
2026-03-15 22:28:15 +01:00
parent 5f1613b8c1
commit f43c296e8a
11 changed files with 292 additions and 61 deletions
+3 -4
View File
@@ -163,6 +163,8 @@ def apply_actions_and_regenerate_grouped(root_dir, data, student_id, actions, la
return "\n".join(logs)
from utils import read_all_labels
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python reading_grouped_annotations.py <Dir>")
@@ -176,10 +178,7 @@ if __name__ == "__main__":
sys.exit(1)
try:
all_labels = sorted(list(filter(None,
(Path(root_dir) / "labels")
.read_text().splitlines())),
key=natural_key)
all_labels = read_all_labels(Path(root_dir))
except FileNotFoundError:
all_labels = []