From 756a224bcd27d1db577c04de25fff9c79d0f2b8a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 11 May 2024 19:09:31 +0200 Subject: [PATCH] Fix Python 3.8 `List[Results]` compatibility (#12381) Signed-off-by: Glenn Jocher Co-authored-by: UltralyticsAssistant --- ultralytics/engine/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ultralytics/engine/model.py b/ultralytics/engine/model.py index 468917cd..e21a76b0 100644 --- a/ultralytics/engine/model.py +++ b/ultralytics/engine/model.py @@ -2,7 +2,7 @@ import inspect from pathlib import Path -from typing import Union +from typing import List, Union import numpy as np import torch @@ -400,7 +400,7 @@ class Model(nn.Module): stream: bool = False, predictor=None, **kwargs, - ) -> list[Results]: + ) -> List[Results]: """ Performs predictions on the given image source using the YOLO model. @@ -458,7 +458,7 @@ class Model(nn.Module): stream: bool = False, persist: bool = False, **kwargs, - ) -> list[Results]: + ) -> List[Results]: """ Conducts object tracking on the specified input source using the registered trackers.