`ultralytics 8.1.47` PNNX release 20240226 (#9954)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/10001/head v8.1.47
Glenn Jocher 7 months ago committed by GitHub
parent cd5fac773b
commit 42416bc608
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/__init__.py
  2. 16
      ultralytics/engine/exporter.py
  3. 3
      ultralytics/nn/autobackend.py

@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
__version__ = "8.1.46"
__version__ = "8.1.47"
from ultralytics.data.explorer.explorer import Explorer
from ultralytics.models import RTDETR, SAM, YOLO, YOLOWorld

@ -529,16 +529,12 @@ class Exporter:
f"or in {ROOT}. See PNNX repo for full installation instructions."
)
system = "macos" if MACOS else "windows" if WINDOWS else "linux-aarch64" if ARM64 else "linux"
# PNNX link fixed at 20240226 due to bug in 20240410
# try:
# _, assets = get_github_assets(repo="pnnx/pnnx", retry=True)
# url = [x for x in assets if f"{system}.zip" in x][0]
# except Exception as e:
# url = f"https://github.com/pnnx/pnnx/releases/download/20240226/pnnx-20240226-{system}.zip"
# LOGGER.warning(f"{prefix} WARNING ⚠ PNNX GitHub assets not found: {e}, using default {url}")
url = f"https://github.com/pnnx/pnnx/releases/download/20240226/pnnx-20240226-{system}.zip"
try:
_, assets = get_github_assets(repo="pnnx/pnnx", retry=True)
url = [x for x in assets if f"{system}.zip" in x][0]
except Exception as e:
url = f"https://github.com/pnnx/pnnx/releases/download/20240410/pnnx-20240410-{system}.zip"
LOGGER.warning(f"{prefix} WARNING ⚠ PNNX GitHub assets not found: {e}, using default {url}")
asset = attempt_download_asset(url, repo="pnnx/pnnx", release="latest")
if check_is_path_safe(Path.cwd(), asset): # avoid path traversal security vulnerability
unzip_dir = Path(asset).with_suffix("")

@ -540,7 +540,8 @@ class AutoBackend(nn.Module):
mat_in = self.pyncnn.Mat(im[0].cpu().numpy())
with self.net.create_extractor() as ex:
ex.input(self.net.input_names()[0], mat_in)
y = [np.array(ex.extract(x)[1])[None] for x in self.net.output_names()]
# WARNING: 'output_names' sorted as a temporary fix for https://github.com/pnnx/pnnx/issues/130
y = [np.array(ex.extract(x)[1])[None] for x in sorted(self.net.output_names())]
# NVIDIA Triton Inference Server
elif self.triton:

Loading…
Cancel
Save