Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix yolov10 version deploy #319

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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