自动新建输出文件夹

This commit is contained in:
andrew 2023-09-17 09:56:30 +08:00
parent 2b45bd6d60
commit d5ba9b2cf4

View File

@ -60,6 +60,7 @@ def main(opt):
result = SA_Detect(model_path, data, opt.batch_size)
# result.to_csv(Path(opt.output) / (one_file.stem + "segment.csv"), index=False)
if opt.output:
Path(opt.output).mkdir(parents=True, exist_ok=True)
save_path = Path(opt.output) / (one_file.stem + ".csv")
else:
save_path = None