From bb2c18b15383ed2f1ef838070ed7cf452884458d Mon Sep 17 00:00:00 2001 From: kshitijrajsharma Date: Thu, 31 Oct 2024 22:50:14 +0100 Subject: [PATCH] restored data path --- .../preprocessing/yolo_v8_v1/yolo_format.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hot_fair_utilities/preprocessing/yolo_v8_v1/yolo_format.py b/hot_fair_utilities/preprocessing/yolo_v8_v1/yolo_format.py index 30f4c09..df72c31 100644 --- a/hot_fair_utilities/preprocessing/yolo_v8_v1/yolo_format.py +++ b/hot_fair_utilities/preprocessing/yolo_v8_v1/yolo_format.py @@ -99,19 +99,16 @@ def yolo_format( "names": {i - 1: name for i, name in zip(classes, CLASS_NAMES[: len(classes)])}, "path": str(yolo_dir.absolute()), "train": ( - f"{yolo_dir.absolute()}/images/{str(preprocessed_dirs_stems[0])}/" + f"./images/{str(preprocessed_dirs_stems[0])}/" if len(preprocessed_dirs) == 1 - else [ - f"{yolo_dir.absolute()}/images/{str(d)}" - for d in preprocessed_dirs_stems - ] + else [f"./images/{str(d)}" for d in preprocessed_dirs_stems] ), } if len(val_dirs_stems) > 0: dataset["val"] = ( - f"{yolo_dir.absolute()}/images/{str(val_dirs_stems[0])}/" + f"./images/{str(val_dirs_stems[0])}/" if len(val_dirs_stems) == 1 - else [f"{yolo_dir.absolute()}/images/{str(d)}" for d in val_dirs_stems] + else [f"./images/{str(d)}" for d in val_dirs_stems] ) with open(yolo_dir / "dataset.yaml", "w") as handle: yaml.dump(dataset, handle, default_flow_style=False)