Skip to content

Commit

Permalink
Merge pull request #319 from roboflow/fix-yolov10-version-deploy
Browse files Browse the repository at this point in the history
Fix yolov10 version deploy
  • Loading branch information
tonylampada authored Aug 26, 2024
2 parents c28cb01 + 53b94d5 commit e6829fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ workspace.upload_dataset(
# upload model weights
version.deploy(model_type="yolov8", model_path=f”{HOME}/runs/detect/train/”)
# upload model weights - yolov10
# Before attempting to upload YOLOv10 models install ultralytics like this:
# pip install git+https://github.com/THU-MIG/yolov10.git
version.deploy(model_type="yolov10", model_path=f”{HOME}/runs/detect/train/”, filename="weights.pt")
# run inference
model = version.model
Expand Down
2 changes: 1 addition & 1 deletion roboflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from roboflow.models import CLIPModel, GazeModel # noqa: F401
from roboflow.util.general import write_line

__version__ = "1.1.42"
__version__ = "1.1.43"


def check_key(api_key, model, notebook, num_retries=0):
Expand Down
2 changes: 1 addition & 1 deletion roboflow/core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best

if "yolov8" in model_type or "yolov10" in model_type:
# try except for backwards compatibility with older versions of ultralytics
if "-cls" in model_type:
if "-cls" in model_type or model_type.startswith("yolov10"):
nc = model["model"].yaml["nc"]
args = model["train_args"]
else:
Expand Down

0 comments on commit e6829fe

Please sign in to comment.