Update predict and track method return type (#12101)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Ayad 2024-05-11 17:38:47 +03:00 committed by GitHub
parent 65ecf1442e
commit b7b70c746b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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