OpenVINO one-time message (#20538)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Lakshantha Dissanayake <lakshantha@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Muhammad Rizwan Munawar <muhammadrizwanmunawar123@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Laughing-q <1185102784@qq.com>
Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
Co-authored-by: Lakshantha Dissanayake <lakshantha@ultralytics.com>
This commit is contained in:
Francesco Mattioli 2025-05-12 21:58:41 +02:00 committed by GitHub
parent 2c7888191e
commit c2bbdfa98f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 3 deletions

View File

@ -89,6 +89,7 @@ from ultralytics.utils import (
MACOS_VERSION,
RKNN_CHIPS,
ROOT,
SETTINGS,
WINDOWS,
YAML,
callbacks,
@ -106,7 +107,7 @@ from ultralytics.utils.downloads import attempt_download_asset, get_github_asset
from ultralytics.utils.export import export_engine, export_onnx
from ultralytics.utils.files import file_size, spaces_in_path
from ultralytics.utils.ops import Profile, nms_rotated
from ultralytics.utils.torch_utils import TORCH_1_13, get_latest_opset, select_device
from ultralytics.utils.torch_utils import TORCH_1_13, get_cpu_info, get_latest_opset, select_device
def export_formats():
@ -344,7 +345,6 @@ class Exporter:
"See https://docs.ultralytics.com/models/yolo-world for details."
)
model.clip_model = None # openvino int8 export error: https://github.com/ultralytics/ultralytics/pull/18445
if self.args.int8 and not self.args.data:
self.args.data = DEFAULT_CFG.data or TASK2DATA[getattr(model, "task", "detect")] # assign default data
LOGGER.warning(
@ -352,6 +352,14 @@ class Exporter:
)
if tfjs and (ARM64 and LINUX):
raise SystemError("TF.js exports are not currently supported on ARM64 Linux")
# Recommend OpenVINO if export and Intel CPU
if SETTINGS.get("openvino_msg"):
if "intel" in get_cpu_info().lower():
LOGGER.info(
"💡 ProTip: Export to OpenVINO format for best performance on Intel CPUs."
" Learn more at https://docs.ultralytics.com/integrations/openvino/"
)
SETTINGS["openvino_msg"] = False
# Input
im = torch.zeros(self.args.batch, model.yaml.get("channels", 3), *self.imgsz).to(self.device)

View File

@ -1312,7 +1312,8 @@ class SettingsManager(JSONDict):
"raytune": True, # Ray Tune integration
"tensorboard": False, # TensorBoard logging
"wandb": False, # Weights & Biases logging
"vscode_msg": True, # VSCode messaging
"vscode_msg": True, # VSCode message
"openvino_msg": True, # OpenVINO export on Intel CPU message
}
self.help_msg = (