Lazy loaded image
🗒️MacM2安装Paddleocr进行ocr文本识别
字数 365阅读时长 1 分钟
2024-1-3
2026-3-12
type
Post
status
Published
date
Jan 3, 2024
slug
ocr-3
summary
Mac M2 Pro芯片使用Anaconda以及python 安装paddleocr 进行文本识别
tags
工具
category
OCR
icon
password
Language
这里使用Anaconda来创建环境安装

安装Anaconda

用 Anaconda 新建一个虚拟环境

notion image
notion image
notion image

安装paddlepaddle

进入飞浆官网

notion image
通过 Open Terminal 打开对应虚拟环境终端输入下面命令
检查是否安装成功
notion image
如果出现PaddlePaddle is installed successfully!,说明已成功安装。

安装 paddleocr 库

💡
paddleocr 是paddle 下 的一个模块
在新建的虚拟环境中输入
如果出现 ERROR: Could not build wheels for PyMuPDF, which is required to install pyproject.toml-based projects 错误
解决办法 :

使用命令调用OCR

 

使用PythonFlask调用Paddleocr进行文本识别

安装Flask
pip install flask==3.0.0
代码

运行

运行之后会去下载对应的PP-OCR Series Model

测试

准备一张图片
notion image
调用接口
notion image
 
上一篇
使用PythonFlask调用Paddleocr进行文本识别
下一篇
使用OpenCV和Quarkus在Java中处理图像

评论
Loading...