Update `predict` and `track` method return type (#12101)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
pull/12164/head^2
Ayad 7 months ago committed by GitHub
parent 65ecf1442e
commit b7b70c746b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      ultralytics/engine/model.py

@ -8,6 +8,7 @@ import numpy as np
import torch
from ultralytics.cfg import TASK2DATA, get_cfg, get_save_dir
from ultralytics.engine.results import Results
from ultralytics.hub.utils import HUB_WEB_ROOT
from ultralytics.nn.tasks import attempt_load_one_weight, guess_model_task, nn, yaml_model_load
from ultralytics.utils import (
@ -399,7 +400,7 @@ class Model(nn.Module):
stream: bool = False,
predictor=None,
**kwargs,
) -> list:
) -> list[Results]:
"""
Performs predictions on the given image source using the YOLO model.
@ -457,7 +458,7 @@ class Model(nn.Module):
stream: bool = False,
persist: bool = False,
**kwargs,
) -> list:
) -> list[Results]:
"""
Conducts object tracking on the specified input source using the registered trackers.

Loading…
Cancel
Save