Skip to content
Snippets Groups Projects
Commit a5099817 authored by Daniel CARRON's avatar Daniel CARRON :b: Committed by André Anjos
Browse files

[segmentation.scripts] Fix saved files extensions

parent ab19f65c
No related branches found
No related tags found
1 merge request!46Create common library
......@@ -364,7 +364,7 @@ def _evaluate_sample_worker(
retval = _sample_measures(prediction, target, mask, steps)
if output_folder is not None:
fullpath = output_folder / name / f"{stem}.csv"
fullpath = output_folder / name / f"{pathlib.Path(stem).stem}.csv"
tqdm.write(f"Saving {fullpath}...")
fullpath.parent.mkdir(parents=True, exist_ok=True)
retval.to_csv(fullpath)
......
......@@ -115,7 +115,7 @@ def predict(
for split_name, split in predictions.items():
pred_paths = []
for sample in split:
hdf5_path = output_folder / f"{sample[0]}.hdf5"
hdf5_path = output_folder / f"{pathlib.Path(sample[0]).stem}.hdf5"
_save_hdf5(sample[3], sample[1], sample[2], hdf5_path)
pred_paths.append([str(sample[0]), str(hdf5_path)])
json_predictions[split_name] = pred_paths
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment