Consistent all_labels reading

This commit is contained in:
2026-02-26 09:02:08 +01:00
parent f384121e9b
commit 48327fbd27
3 changed files with 18 additions and 5 deletions
+3 -1
View File
@@ -319,7 +319,9 @@ if __name__ == "__main__":
files_to_process = sorted(cutleft_dir.glob("*.jpg"))
try:
all_labels = list(filter(None, (base_dir / "labels").read_text().splitlines()))
all_labels = sorted(list(filter(None,
(base_dir / "labels").read_text().splitlines())),
key = natural_key)
except FileNotFoundError:
all_labels = []