Pin numpy 1.23.5 for JetPack 4 on NVIDIA Jetson Nano (#18783)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
a2430d0478
commit
fb3e5adfd7
2 changed files with 6 additions and 2 deletions
|
|
@ -104,7 +104,6 @@ export = [
|
|||
"tensorstore>=0.1.63; platform_machine == 'aarch64' and python_version >= '3.9'", # for TF Raspberry Pi exports
|
||||
"keras", # not installed automatically by tensorflow>=2.16
|
||||
"flatbuffers>=23.5.26,<100; platform_machine == 'aarch64'", # update old 'flatbuffers' included inside tensorflow package
|
||||
"numpy==1.23.5; platform_machine == 'aarch64'", # fix error: `np.bool` was a deprecated alias for the builtin `bool` when using TensorRT models on NVIDIA Jetson
|
||||
"h5py!=3.11.0; platform_machine == 'aarch64'", # fix h5py build issues due to missing aarch64 wheels in 3.11 release
|
||||
]
|
||||
solutions = [
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import torch
|
|||
import torch.nn as nn
|
||||
from PIL import Image
|
||||
|
||||
from ultralytics.utils import ARM64, IS_JETSON, IS_RASPBERRYPI, LINUX, LOGGER, ROOT, yaml_load
|
||||
from ultralytics.utils import ARM64, IS_JETSON, IS_RASPBERRYPI, LINUX, LOGGER, PYTHON_VERSION, ROOT, yaml_load
|
||||
from ultralytics.utils.checks import check_requirements, check_suffix, check_version, check_yaml
|
||||
from ultralytics.utils.downloads import attempt_download_asset, is_url
|
||||
|
||||
|
|
@ -262,6 +262,11 @@ class AutoBackend(nn.Module):
|
|||
# TensorRT
|
||||
elif engine:
|
||||
LOGGER.info(f"Loading {w} for TensorRT inference...")
|
||||
|
||||
if IS_JETSON and PYTHON_VERSION <= "3.8.0":
|
||||
# fix error: `np.bool` was a deprecated alias for the builtin `bool` for JetPack 4 with Python <= 3.8.0
|
||||
check_requirements("numpy==1.23.5")
|
||||
|
||||
try:
|
||||
import tensorrt as trt # noqa https://developer.nvidia.com/nvidia-tensorrt-download
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue