
- 新建项目
- 文件内容
- 安装依赖
- 图片识别
新建项目
下面放这三个文件:
文件内容
1.requirements.txt
absl-py==1.0.0 astor==0.8.1 Babel==2.9.1 backports.entry-points-selectable==1.1.1 bce-python-sdk==0.8.62 boto3==1.20.5 botocore==1.23.5 bottle==0.12.19 cachetools==4.2.4 certifi==2021.10.8 cfgv==3.3.1 chardet==3.0.4 charset-normalizer==2.0.7 click==8.0.3 cma==2.7.0 colorama==0.4.4 colorlog==6.6.0 common==0.1.2 cssselect==1.1.0 cssutils==2.3.0 cycler==0.11.0 data==0.4 decorator==5.1.0 distlib==0.3.3 dual==0.0.10 dynamo3==0.4.10 et-xmlfile==1.1.0 filelock==3.3.2 flake8==4.0.1 Flask==2.0.2 Flask-Babel==2.0.0 flywheel==0.5.4 funcsigs==1.0.2 future==0.18.2 google-auth==2.3.3 google-auth-oauthlib==0.4.6 grpcio==1.41.1 identify==2.3.5 idna==3.3 imageio==2.10.4 imgaug==0.4.0 importlib-metadata==4.2.0 itsdangerous==2.0.1 Jinja2==3.0.3 jmespath==0.10.0 joblib==1.1.0 kiwisolver==1.3.2 lmdb==1.2.1 lxml==4.6.4 Markdown==3.3.4 MarkupSafe==2.0.1 matplotlib==3.4.3 mccabe==0.6.1 networkx==2.6.3 nltk==3.6.5 nodeenv==1.6.0 numpy==1.19.3 oauthlib==3.1.1 opencv-contrib-python==4.4.0.46 opencv-python==4.2.0.32 openpyxl==3.0.9 paddle==1.0.2 paddlehub==1.6.0 paddleocr==2.0.1 pandas==1.3.4 peewee==3.14.8 Pillow==8.4.0 platformdirs==2.4.0 pre-commit==2.15.0 premailer==3.10.0 protobuf==3.19.1 prox==0.0.17 pyasn1==0.4.8 pyasn1-modules==0.2.8 pyclipper==1.3.0 pycodestyle==2.8.0 pycryptodome==3.11.0 pyflakes==2.4.0 pyparsing==3.0.6 PySocks==1.7.1 python-dateutil==2.8.2 python-geoip-python3==1.3 python-Levenshtein==0.12.2 pytz==2021.3 PyWavelets==1.2.0 PyYAML==6.0 regex==2021.11.10 requests==2.26.0 requests-oauthlib==1.3.0 rsa==4.7.2 s3transfer==0.5.0 scikit-image==0.17.2 scipy==1.7.2 sentencepiece==0.1.96 Shapely==1.8.0 shellcheck-py==0.8.0.1 six==1.16.0 tb-paddle==0.4.0 tensorboard==2.7.0 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.0 tifffile==2021.11.2 tight==0.1.0 toml==0.10.2 tqdm==4.62.3 typing_extensions==4.0.0 urllib3==1.26.7 virtualenv==20.10.0 visualdl==2.2.2 Werkzeug==2.0.2 yapf==0.26.0 zipp==3.6.0
2.run.py
import os
if __name__ == '__main__':
cmd = 'paddleocr --image_dir ./test.jpg --use_angle_cls true --use_gpu false'
os.system(cmd)
3.test.jpg
任意一张带文字的图片
(此图为paddleocr自带的示例图)
安装依赖
pip install -r requirements.txt
python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
图片识别
右键运行 run.py
得到如下结果
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)