Windows compatibility

This commit is contained in:
2026-08-20 12:01:31 +02:00
parent 7c366a9ca4
commit ac4ab782b2
20 changed files with 634 additions and 134 deletions
+4 -3
View File
@@ -186,7 +186,7 @@ args = parser.parse_args()
# input_arg = Path(args.input_path)
image_files = []
from utils import natural_key
from utils import natural_key, read_all_labels
for path_str in args.input_paths:
input_arg = Path(path_str)
@@ -222,8 +222,9 @@ for path_str in args.input_paths:
else:
print(f"Warning: No variants found for {target_file.stem} in {CUTLEFT_DIR}")
labels_txt = (INPUT_DIR / "labels").read_text()
valid_labels_set = set(line.strip() for line in labels_txt.splitlines() if line.strip())
all_labels = read_all_labels(INPUT_DIR)
labels_txt = "\n".join(all_labels) + "\n"
valid_labels_set = set(all_labels)
names_path = (INPUT_DIR / "names")
if not os.path.exists(names_path):
names_path = Path("names")