Skip to content

Commit

Permalink
Merge pull request #231 from roboflow/feature/yolov9-upload
Browse files Browse the repository at this point in the history
YOLOv9 Deploy
  • Loading branch information
paulguerrie authored Feb 27, 2024
2 parents ef6e3d9 + cb455d6 commit bd5f01a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion roboflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from roboflow.models import CLIPModel, GazeModel # noqa: F401
from roboflow.util.general import write_line

__version__ = "1.1.20"
__version__ = "1.1.21"


def check_key(api_key, model, notebook, num_retries=0):
Expand Down
6 changes: 3 additions & 3 deletions roboflow/core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def deploy(self, model_type: str, model_path: str) -> None:
model_path (str): File path to model weights to be uploaded
"""

supported_models = ["yolov5", "yolov7-seg", "yolov8"]
supported_models = ["yolov5", "yolov7-seg", "yolov8", "yolov9"]

if not any(supported_model in model_type for supported_model in supported_models):
raise (ValueError(f"Model type {model_type} not supported. Supported models are" f" {supported_models}"))
Expand All @@ -443,7 +443,7 @@ def deploy(self, model_type: str, model_path: str) -> None:

print_warn_for_wrong_dependencies_versions([("ultralytics", "==", "8.0.196")], ask_to_continue=True)

elif "yolov5" in model_type or "yolov7" in model_type:
elif "yolov5" in model_type or "yolov7" in model_type or "yolov9" in model_type:
try:
import torch
except ImportError:
Expand Down Expand Up @@ -493,7 +493,7 @@ def deploy(self, model_type: str, model_path: str) -> None:
"ultralytics_version": ultralytics.__version__,
"model_type": model_type,
}
elif "yolov5" in model_type or "yolov7" in model_type:
elif "yolov5" in model_type or "yolov7" in model_type or "yolov9" in model_type:
# parse from yaml for yolov5

with open(os.path.join(model_path, "opt.yaml"), "r") as stream:
Expand Down

0 comments on commit bd5f01a

Please sign in to comment.