Initial support for automatic fixing of additional and wrong label
This commit is contained in:
+3
-6
@@ -5,8 +5,7 @@ import ezodf
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
def natural_key(text):
|
||||
return [int(c) if c.isdigit() else c.lower() for c in re.split(r'(\d+)', str(text))]
|
||||
from utils import natural_key, read_all_labels
|
||||
|
||||
# Configuration
|
||||
ODS_PATH = "/home/sebastien/Rust/gestion_classe/Staging/current_eval.ods"
|
||||
@@ -19,10 +18,8 @@ def main():
|
||||
else:
|
||||
work_dir = os.path.abspath(sys.argv[1])
|
||||
|
||||
all_labels = sorted(list(filter(None,
|
||||
(Path(work_dir) / "labels")
|
||||
.read_text().splitlines())),
|
||||
key = natural_key)
|
||||
all_labels = read_all_labels(Path(work_dir))
|
||||
|
||||
a_rendre_path = os.path.join(work_dir, TARGET_DIR_NAME)
|
||||
|
||||
if not os.path.isdir(a_rendre_path):
|
||||
|
||||
Reference in New Issue
Block a user