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

Miniconda创建paddlepaddle环境

1、conda env list

2、conda create --name paddle_env python=3.8 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

3、activate paddle_env

4、python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

5、pip install "paddleocr>=2.0.1"

6、deactivate

7、conda remove -n paddle_env --all

from paddleocr import PaddleOCR, draw_ocrocr = PaddleOCR(use_angle_cls=True, lang="ch")
img_path = 'D:/temp/test.png'
result = ocr.ocr(img_path, cls=True)
for idx in range(len(result)):res = result[idx]for line in res:print(line)from PIL import Image
result = result[0]
image = Image.open(img_path).convert('RGB')
boxes = [line[0] for line in result]
txts = [line[1][0] for line in result]
scores = [line[1][1] for line in result]
im_show = draw_ocr(image, boxes, txts, scores, font_path='D:/temp/simfang.ttf')
im_show = Image.fromarray(im_show)
im_show.save('D:/temp/result.jpg')
if __name__ == '__main__':print('finish')

http://www.lryc.cn/news/179766.html

相关文章:

  • postgresql实现单主单从
  • 提取PDF数据:Documents for PDF ( GcPdf )
  • adb连接切换到模拟器端口
  • 为何每个开发者都在谈论Go?
  • 【Leetcode】 501. 二叉搜索树中的众数
  • 怎样给Ubuntu系统安装vmware-tools
  • DDS信号发生器波形发生器VHDL
  • Python3操作SQLite3创建表主键自增长|CRUD基本操作
  • B. Comparison String
  • python端口扫描
  • 国庆第二天
  • Java安全之servlet内存马分析
  • 2023年第二十届中国研究生数学建模竞赛总结与分享
  • Web前端-Vue2+Vue3基础入门到实战项目-Day1(初始Vue, Vue指令, 小黑记事本)
  • Sentinel学习(2)——sentinel的使用,引入依赖和配置 对消费者进行流控 对生产者进行熔断降级
  • springboot 简单配置mongodb多数据源
  • 西门子S7-1200使用LRCF通信库与安川机器人进行EthernetIP通信的具体方法示例
  • pytorch第一天(tensor数据和csv数据的预处理)lm老师版
  • CSP-J第二轮试题-2021年-1.2题
  • 怒刷LeetCode的第16天(Java版)
  • 让大脑自由
  • Arcgis克里金插值报错:ERROR 010079: 无法估算半变异函数。 执行(Kriging)失败。
  • Docker Compose安装
  • 机器人过程自动化(RPA)入门 7. 处理用户事件和助手机器人
  • 在linux下预览markdown的方法,转换成html和pdf
  • AIOT入门指南:探索人工智能与物联网的交汇点
  • CCC数字钥匙设计【NFC】 --车主配对流程介绍
  • 一站式开源持续测试平台 MerterSphere 之测试跟踪操作详解
  • 自然语言处理状况简介
  • python爬虫基于管道持久化存储操作