From bb9fc8804283abc564cb2ede05441cd24253485c Mon Sep 17 00:00:00 2001 From: MistEO Date: Fri, 9 Jan 2026 14:04:12 +0800 Subject: [PATCH] feat: Disable CoreML for detection and recognition on macOS Comment out CoreML usage for detection and recognition options due to precision issues reported by users. --- src/MaaCore/Config/Miscellaneous/OcrPack.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MaaCore/Config/Miscellaneous/OcrPack.cpp b/src/MaaCore/Config/Miscellaneous/OcrPack.cpp index ef1366ea16..bba8df913c 100644 --- a/src/MaaCore/Config/Miscellaneous/OcrPack.cpp +++ b/src/MaaCore/Config/Miscellaneous/OcrPack.cpp @@ -168,11 +168,15 @@ bool asst::OcrPack::check_and_load() Log.info("FastDeploy CPU mode with", cpu_threads, "threads"); } #elif defined(__APPLE__) + // rec 结果不对,先禁用 + // maafw那边用户反馈,det 貌似也不怎么对,疑似 coreml 丢精度了,拉倒 // https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h // COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE - det_option.UseCoreML(0x004); - // rec 结果不对,先禁用 + // det_option.UseCoreML(0x004); + // rec_option.UseCoreML(0x004); + det_option.UseCpu(); rec_option.UseCpu(); + det_option.SetCpuThreadNum(cpu_threads); rec_option.SetCpuThreadNum(cpu_threads); Log.info("FastDeploy macOS mode with rec", cpu_threads, "CPU threads"); #else