✏️ [Fix] typo of downlaod -> download
Browse files
yolo/tools/dataset_preparation.py
CHANGED
@@ -81,11 +81,11 @@ def prepare_dataset(dataset_cfg: DatasetConfig, task: str):
|
|
81 |
logger.error(f"Error verifying the {dataset_type} dataset after extraction.")
|
82 |
|
83 |
|
84 |
-
def prepare_weight(
|
85 |
weight_name = os.path.basename(weight_path)
|
86 |
-
if
|
87 |
-
|
88 |
-
weight_link = f"{
|
89 |
|
90 |
if not os.path.isdir(os.path.dirname(weight_path)):
|
91 |
os.makedirs(os.path.dirname(weight_path))
|
|
|
81 |
logger.error(f"Error verifying the {dataset_type} dataset after extraction.")
|
82 |
|
83 |
|
84 |
+
def prepare_weight(download_link: Optional[str] = None, weight_path: str = "v9-c.pt"):
|
85 |
weight_name = os.path.basename(weight_path)
|
86 |
+
if download_link is None:
|
87 |
+
download_link = "https://github.com/WongKinYiu/yolov9mit/releases/download/v1.0-alpha/"
|
88 |
+
weight_link = f"{download_link}{weight_name}"
|
89 |
|
90 |
if not os.path.isdir(os.path.dirname(weight_path)):
|
91 |
os.makedirs(os.path.dirname(weight_path))
|