初步支持 macOS (Apple Silicon)

升级至PP-OCRv5
Tested with Python 3.13
感谢用户 "期望" 提供的macOS设备用于开发测试
This commit is contained in:
Jason
2025-05-18 19:21:33 +08:00
parent c673b5ccd1
commit 7cf4e882cd
20 changed files with 56 additions and 62 deletions

View File

@@ -135,7 +135,7 @@ cd <源码所在目录>
#### 4. 安装合适的运行环境
本项目支持 CUDANVIDIA显卡加速、CPU无 GPU)和 DirectMLAMD、Intel等GPU/APU加速)三种运行模式。
本项目支持 CUDA (NVIDIA显卡加速)、CPU (无 GPU)、 DirectML (AMD、Intel等GPU/APU加速) 和 macOS (Apple Silicon) 四种运行模式。
##### (1) CUDANVIDIA 显卡用户)
@@ -198,7 +198,16 @@ cd <源码所在目录>
pip install torch==2.7.0 torchvision==0.22.0
pip install -r requirements.txt
```
##### (4) macOS 运行 (Apple Silicon)
- 适用于 macOS (Apple Silicon) 设备
- macOS (Intel) 请使用CPU, 强行使用GPU只会更慢
- macOS (Apple Silicon)上字幕检测精准模式的模型(ch_det_fast/model.onnx)精度似乎不太理想, 推荐使用快速模式
```shell
pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
pip install torch==2.7.0 torchvision==0.22.0
pip install -r requirements.txt
```
> 基于Python3.13版本测试
#### 4. 运行程序
- 运行图形化界面