Skip to content

Commit 1fb6471

Browse files
ultralytics.nn.tasks.YOLOv10DetectionModel does not expose 'nc' property
1 parent c28cb01 commit 1fb6471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roboflow/core/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def deploy(self, model_type: str, model_path: str, filename: str = "weights/best
532532

533533
if "yolov8" in model_type or "yolov10" in model_type:
534534
# try except for backwards compatibility with older versions of ultralytics
535-
if "-cls" in model_type:
535+
if "-cls" in model_type or model_type.startswith("yolov10"):
536536
nc = model["model"].yaml["nc"]
537537
args = model["train_args"]
538538
else:

0 commit comments

Comments
 (0)