Initial support for automatic fixing of additional and wrong label
This commit is contained in:
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user