Fix Python 3.8 List[Results] compatibility (#12381)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
6f4a9cf557
commit
756a224bcd
1 changed files with 3 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union
|
from typing import List, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
|
@ -400,7 +400,7 @@ class Model(nn.Module):
|
||||||
stream: bool = False,
|
stream: bool = False,
|
||||||
predictor=None,
|
predictor=None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> list[Results]:
|
) -> List[Results]:
|
||||||
"""
|
"""
|
||||||
Performs predictions on the given image source using the YOLO model.
|
Performs predictions on the given image source using the YOLO model.
|
||||||
|
|
||||||
|
|
@ -458,7 +458,7 @@ class Model(nn.Module):
|
||||||
stream: bool = False,
|
stream: bool = False,
|
||||||
persist: bool = False,
|
persist: bool = False,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> list[Results]:
|
) -> 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.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue