win10下EasyOCR部署

2023-05-02  本文已影响0人  david9

安装Anaconda

下载并安装:Anaconda

部署EasyOCR

新建OCR环境,激活

conda create -n ocr python=3.6
conda activate ocr

安装pytorch(cpuonly 模式)

conda install pytorch torchvision torchaudio cpuonly -c pytorch

安装easyocr等依赖

pip install easyocr -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install packaging -i https://pypi.tuna.tsinghua.edu.cn/simple

安装EasyOCR

pip install git+https://github.com/JaidedAI/EasyOCR.git

测试

在ocr环境中,打开python命令行

conda activate ocr
python

验证

import easyocr
#this needs to run only once to load the model into memory
reader = easyocr.Reader(['ch_sim','en'])
result = reader.readtext('chinese.jpg')
print(result)
上一篇 下一篇

猜你喜欢

热点阅读