Windows compatibility
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user