From f18a029705d650c1b3facccba0767fe9f7e55a5f Mon Sep 17 00:00:00 2001 From: SamWang0807 Date: Mon, 3 Jun 2024 00:49:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20[Fix]=20path=20error=20when?= =?UTF-8?q?=20preparing=20dataset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yolo/tools/dataset_preparation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yolo/tools/dataset_preparation.py b/yolo/tools/dataset_preparation.py index e0f06fc..ee5bd0f 100644 --- a/yolo/tools/dataset_preparation.py +++ b/yolo/tools/dataset_preparation.py @@ -61,7 +61,7 @@ def prepare_dataset(cfg): extract_to = os.path.join(data_dir, data_type) if data_type != "annotations" else data_dir final_place = os.path.join(extract_to, dataset_type) - os.makedirs(extract_to, exist_ok=True) + os.makedirs(final_place, exist_ok=True) if check_files(final_place, dataset_args.get("file_num")): logger.info(f"✅ Dataset {dataset_type: <12} already verified.") continue From 1abd1e16592d05aa87e9b56a97eff837885052de Mon Sep 17 00:00:00 2001 From: SamWang0807 Date: Mon, 3 Jun 2024 01:13:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20[Update]=20import=20ty?= =?UTF-8?q?pos=20in=20dataset=5Fpreparation.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yolo/tools/dataset_preparation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yolo/tools/dataset_preparation.py b/yolo/tools/dataset_preparation.py index ee5bd0f..842bc4b 100644 --- a/yolo/tools/dataset_preparation.py +++ b/yolo/tools/dataset_preparation.py @@ -78,7 +78,7 @@ def prepare_dataset(cfg): import sys sys.path.append("./") - from tools.log_helper import custom_logger + from utils.logging_utils import custom_logger custom_logger() prepare_dataset()