当前位置: 首页 > news >正文

做夺宝网站要办理什么意思搜索引擎营销方法主要有三种

做夺宝网站要办理什么意思,搜索引擎营销方法主要有三种,优秀企业展示网站,网站建设起到计划和指导作用在riscv编译安装飞桨PaddlePaddle参见: 算能RISC-V通用云编译飞桨paddlepaddleopenKylin留档_在riscv下进行paddlelite源码编译-CSDN博客 安装好飞桨,就可以用飞桨进行推理了。刚开始计划用ONNX推理,但是在算能云没有装上,所以最…

在riscv编译安装飞桨PaddlePaddle参见:

算能RISC-V通用云编译飞桨paddlepaddle@openKylin留档_在riscv下进行paddlelite源码编译-CSDN博客

安装好飞桨,就可以用飞桨进行推理了。刚开始计划用ONNX推理,但是在算能云没有装上,所以最终是用的飞桨推理。但是还是用到了Paddle2ONNX里的代码。

下载Paddle2ONNX源代码

git clone https://github.com/PaddlePaddle/Paddle2ONNX

ocr文字识别

下面是使用ONNX进行推理的示例,我没有弄成,希望有成功的朋友交流下经验。

安装需要的库

pip install shapely pyclipper

如果在riscv系统无法编译安装shapely,那么可以先安装包:

apt install libgeos-dev

下载相关模型文件

cd Paddle2ONNX/model_zoo/ocr# 下载det模型
wget https://bj.bcebos.com/paddle2onnx/model_zoo/ch_PP-OCRv2_det_infer.onnx# 下载rec模型
wget https://bj.bcebos.com/paddle2onnx/model_zoo/ch_PP-OCRv2_rec_infer.onnx# 下载cls模型
wget https://bj.bcebos.com/paddle2onnx/model_zoo/ch_ppocr_mobile_v2.0_cls_infer.onnx

进行识别

python3 infer.py  \
--det_model_dir=./ch_PP-OCRv2_det_infer.onnx  \
--rec_model_dir=./ch_PP-OCRv2_rec_infer.onnx  \
--cls_model_dir=./ch_ppocr_mobile_v2.0_cls_infer.onnx  \
--image_path=./images/lite_demo.png

使用飞桨推理进行文字识别

这个推理成功了。

下载和解压模型

wget -nc  -P ./inference https://bj.bcebos.com/paddle2onnx/model_zoo/ch_PP-OCRv2_det_infer.tar
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && cd ..wget -nc  -P ./inference https://bj.bcebos.com/paddle2onnx/model_zoo/ch_PP-OCRv2_rec_infer.tar
cd ./inference && tar xf ch_PP-OCRv2_rec_infer.tar && cd ..wget -nc  -P ./inference https://bj.bcebos.com/paddle2onnx/model_zoo/ch_ppocr_mobile_v2.0_cls_infer.tar
cd ./inference && tar xf ch_ppocr_mobile_v2.0_cls_infer.tar && cd ..

进行文字识别

python3 infer.py \
--cls_model_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer \
--rec_model_dir=./inference/ch_PP-OCRv2_rec_infer \
--det_model_dir=./inference/ch_PP-OCRv2_det_infer \
--image_path=./images/lite_demo.png \
--use_paddle_predict=True

推理识别结果

输出可紧致头发磷层,从而达到0.99444813即时持久改善头发光泽的效果,给干燥的头0.99019814发足够的滋养0.997668花费了0.457335秒

效果还不错

调试

ocr读取文件的时候报错:

Python 3.11.0rc2 (main, Sep  4 2023, 07:22:49) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/py311/lib/python3.11/site-packages/cv2/__init__.py", line 8, in <module>
    from .cv2 import *
ImportError: libtiff.so.6: cannot open shared object file: No such file or directory

安装libtiff

pip install pylibtiff

结果还是报错

找到libtiff.so.5文件在/lib/riscv64-linux-gnu,做了个链接。

  ln -s libtiff.so.5 libtiff.so.6

报错ImportError: libgtk-x11-2.0.so.0

SyntaxError: invalid syntax
(py311) root@863c89a419ec:~/github/Paddle2ONNX/model_zoo/ocr# python -c "import cv2"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/py311/lib/python3.11/site-packages/cv2/__init__.py", line 8, in <module>
    from .cv2 import *
ImportError: libtiff.so.6: cannot open shared object file: No such file or directory
(py311) root@863c89a419ec:~/github/Paddle2ONNX/model_zoo/ocr# python -c "import cv2"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/py311/lib/python3.11/site-packages/cv2/__init__.py", line 8, in <module>
    from .cv2 import *
ImportError: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

安装包:apt-get install libgtk2.0-dev

ok了

识别是numpy.int报错

    File "/root/github/Paddle2ONNX/model_zoo/ocr/utils/predict_det.py", line 210, in box_score_fast
    xmin = np.clip(np.floor(box[:, 0].min()).astype(np.int), 0, w - 1)

File "/usr/local/lib/python3.8/dist-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])

AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:

进入/root/github/Paddle2ONNX/model_zoo/ocr/utils/predict_det.py源码,把np.int都改成np.int32

http://www.tj-hxxt.cn/news/44430.html

相关文章:

  • 赣州万图网络科技有限公司网络优化app
  • 八方资源网做网站优化怎么样企业网站排名优化
  • 黄江镇做网站安卓优化大师下载安装
  • 哪个网站专门做邮轮旅游的重庆优化seo
  • 北京网站优化网上海网站seo
  • 如何管理建好的网站天津推广的平台
  • 成都 网站建设培训学校免费搭建个人网站
  • wordpress 关站贷款客户大数据精准获客
  • 怎么查询在建工地郑州网站优化公司
  • 学做网站制作常见的网站推广方式
  • wordpress装到哪里seo的含义
  • wordpress 加keyword郑州seo顾问培训
  • 中国十大设计院站长工具seo综合查询是什么
  • 如何使用腾讯云建网站手机建网站软件
  • 宜昌 网站建设动态网站设计
  • 网站建设通讯稿sem分析
  • 重庆哪家做网站好搜狗seo优化
  • 做动画的动作库网站网络销售平台排名前十
  • 相城区建设网站企业网站seo平台
  • 中山网站建设模板网络公司seo优化网站推广全域营销获客公司
  • 外贸网站模版湖北seo服务
  • 郑州妇科医院前十强排名搜索优化指的是什么
  • vue做的网站有什么搭建网站平台需要多少钱
  • 网站建设外包合同专业北京网站建设公司
  • 深圳市住房建设局网站首页东莞seo推广机构帖子
  • wordpress 仿百度文库优化大师app
  • 中国哪些网站做软装怎样制作网页新手自学入门
  • 如何在网站上做公示公司怎么推广网络营销
  • 网站后来功能广州网站建设方案维护
  • 东莞企业免费建站腾讯企点qq