ultralytics 8.1.0 YOLOv8 Oriented Bounding Box (OBB) release (#7463)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Yakuho <Yakuho@foxmail.com> Co-authored-by: Oran <75175510+Acenath@users.noreply.github.com>
This commit is contained in:
parent
54e61963c8
commit
808984c6cf
95 changed files with 787 additions and 752 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
__version__ = "8.0.239"
|
||||
__version__ = "8.1.0"
|
||||
|
||||
from ultralytics.data.explorer.explorer import Explorer
|
||||
from ultralytics.models import RTDETR, SAM, YOLO
|
||||
|
|
|
|||
|
|
@ -262,9 +262,13 @@ class BasePredictor:
|
|||
self.model.warmup(imgsz=(1 if self.model.pt or self.model.triton else self.dataset.bs, 3, *self.imgsz))
|
||||
self.done_warmup = True
|
||||
|
||||
self.seen, self.windows, self.batch, profilers = 0, [], None, (ops.Profile(), ops.Profile(), ops.Profile())
|
||||
self.seen, self.windows, self.batch = 0, [], None
|
||||
profilers = (
|
||||
ops.Profile(device=self.device),
|
||||
ops.Profile(device=self.device),
|
||||
ops.Profile(device=self.device),
|
||||
)
|
||||
self.run_callbacks("on_predict_start")
|
||||
|
||||
for batch in self.dataset:
|
||||
self.run_callbacks("on_predict_batch_start")
|
||||
self.batch = batch
|
||||
|
|
|
|||
|
|
@ -155,7 +155,12 @@ class BaseValidator:
|
|||
model.warmup(imgsz=(1 if pt else self.args.batch, 3, imgsz, imgsz)) # warmup
|
||||
|
||||
self.run_callbacks("on_val_start")
|
||||
dt = Profile(), Profile(), Profile(), Profile()
|
||||
dt = (
|
||||
Profile(device=self.device),
|
||||
Profile(device=self.device),
|
||||
Profile(device=self.device),
|
||||
Profile(device=self.device),
|
||||
)
|
||||
bar = TQDM(self.dataloader, desc=self.get_desc(), total=len(self.dataloader))
|
||||
self.init_metrics(de_parallel(model))
|
||||
self.jdict = [] # empty before each val
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ def get_github_assets(repo="ultralytics/assets", version="latest", retry=False):
|
|||
return data["tag_name"], [x["name"] for x in data["assets"]] # tag, assets i.e. ['yolov8n.pt', 'yolov8s.pt', ...]
|
||||
|
||||
|
||||
def attempt_download_asset(file, repo="ultralytics/assets", release="v0.0.0", **kwargs):
|
||||
def attempt_download_asset(file, repo="ultralytics/assets", release="v8.1.0", **kwargs):
|
||||
"""
|
||||
Attempt to download a file from GitHub release assets if it is not found locally. The function checks for the file
|
||||
locally first, then tries to download it from the specified GitHub repository release.
|
||||
|
|
@ -405,7 +405,7 @@ def attempt_download_asset(file, repo="ultralytics/assets", release="v0.0.0", **
|
|||
Args:
|
||||
file (str | Path): The filename or file path to be downloaded.
|
||||
repo (str, optional): The GitHub repository in the format 'owner/repo'. Defaults to 'ultralytics/assets'.
|
||||
release (str, optional): The specific release version to be downloaded. Defaults to 'v0.0.0'.
|
||||
release (str, optional): The specific release version to be downloaded. Defaults to 'v8.1.0'.
|
||||
**kwargs (dict): Additional keyword arguments for the download process.
|
||||
|
||||
Returns:
|
||||
|
|
|
|||
|
|
@ -23,22 +23,24 @@ class Profile(contextlib.ContextDecorator):
|
|||
```python
|
||||
from ultralytics.utils.ops import Profile
|
||||
|
||||
with Profile() as dt:
|
||||
with Profile(device=device) as dt:
|
||||
pass # slow operation here
|
||||
|
||||
print(dt) # prints "Elapsed time is 9.5367431640625e-07 s"
|
||||
```
|
||||
"""
|
||||
|
||||
def __init__(self, t=0.0):
|
||||
def __init__(self, t=0.0, device: torch.device = None):
|
||||
"""
|
||||
Initialize the Profile class.
|
||||
|
||||
Args:
|
||||
t (float): Initial time. Defaults to 0.0.
|
||||
device (torch.device): Devices used for model inference. Defaults to None (cpu).
|
||||
"""
|
||||
self.t = t
|
||||
self.cuda = torch.cuda.is_available()
|
||||
self.device = device
|
||||
self.cuda = True if (device and str(device)[:4] == "cuda") else False
|
||||
|
||||
def __enter__(self):
|
||||
"""Start timing."""
|
||||
|
|
@ -57,7 +59,7 @@ class Profile(contextlib.ContextDecorator):
|
|||
def time(self):
|
||||
"""Get current time."""
|
||||
if self.cuda:
|
||||
torch.cuda.synchronize()
|
||||
torch.cuda.synchronize(self.device)
|
||||
return time.time()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue