From 7ba48cc078c38b4bfe7c3645c668dec03045febb Mon Sep 17 00:00:00 2001 From: yeyangshuo <115603502+ye-yangshuo@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:58:59 +0800 Subject: [PATCH] Modified the parameter description of 'weights' in the AutoBackend class (#18059) Signed-off-by: Glenn Jocher Co-authored-by: Glenn Jocher --- ultralytics/nn/autobackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/nn/autobackend.py b/ultralytics/nn/autobackend.py index 17504b82..8e9b74eb 100644 --- a/ultralytics/nn/autobackend.py +++ b/ultralytics/nn/autobackend.py @@ -96,7 +96,7 @@ class AutoBackend(nn.Module): Initialize the AutoBackend for inference. Args: - weights (str): Path to the model weights file. Defaults to 'yolov8n.pt'. + weights (str | torch.nn.Module): Path to the model weights file or a module instance. Defaults to 'yolo11n.pt'. device (torch.device): Device to run the model on. Defaults to CPU. dnn (bool): Use OpenCV DNN module for ONNX inference. Defaults to False. data (str | Path | optional): Path to the additional data.yaml file containing class names. Optional.