标签: paddle-paddle

PaddleOCR 性能与 Tesseract 相比如何?

我最近遇到了 PaddleOCR,我想知道这个 OCR 系统与 Tesseract 相比如何。有可用的数据或基准吗?

paddle-paddle

9
推荐指数
2
解决办法
2万
查看次数

pyinstaller ModuleNotFoundError:没有名为“paddle”的模块

我正在使用 pyinstaller 在 Windows 上创建 exe 文件。我创建了基于 anaconda 的虚拟环境“py38”,在其中安装了所有软件包。我正在尝试转换 tkinter 文件,即“gui.py”。当我使用正常运行时

python gui.py
Run Code Online (Sandbox Code Playgroud)

命令,它工作得很好。但是使用 pyinstaller 似乎找不到我使用以下两个命令安装的模块“paddle”。

python -m pip download paddlepaddle==2.1.2 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/noavx/stable.html --no-index --no-deps
python -m pip install [name].whl
Run Code Online (Sandbox Code Playgroud)

我一直在使用python 3.8。我已经使用了几乎所有可以在网上找到的解决此问题的解决方案。

我尝试过的命令来修复它

pyinstaller --paths 'C:\\Users\\user\\anaconda3\\envs\\py38\\lib\\site-packages' --onefile --clean gui.py
pyinstaller --paths 'C:\\Users\\user\\anaconda3\\envs\\py38\\lib\\site-packages' --onedir gui.py
pyinstaller --hidden-import 'paddle' --onefile --clean gui.py
pyinstaller --hidden-import 'paddlepaddle' --onefile --clean gui.py
pyinstaller --hidden-import 'paddlepaddle' --onedir --clean gui.py

Run Code Online (Sandbox Code Playgroud)

当我使用时--onedir,生成的exe文件也会在启动后立即关闭。当我运行指定“--paths”的 pyinstaller 时,完整日志如下所示

>pyinstaller --paths 'C:\\Users\\user\\anaconda3\\envs\\py38\\lib\\site-packages' --onefile --clean gui.py
586 INFO: PyInstaller: 4.5.1
587 INFO: Python: …
Run Code Online (Sandbox Code Playgroud)

python tkinter pyinstaller paddle-paddle

8
推荐指数
2
解决办法
2万
查看次数

如何在seqToseq演示中加载矩阵来改变注意层? - 桨

在尝试复制3.1节中将离散翻译词典纳入神经MTpaddle-paddle

我试图有一个静态矩阵,我需要加载到seqToseq训练管道中,例如:

>>> import numpy as np
>>> x = np.random.rand(3,2)  
>>> x
array([[ 0.64077103,  0.03278357],
       [ 0.47133411,  0.16309775],
       [ 0.63986919,  0.07130613]])
# where there is 3 target words and 2 source words, 
# and each cell in the matrix represents some co-occurrence probabilities.
Run Code Online (Sandbox Code Playgroud)

通过seqToseq_net演示,这个矩阵需要乘以中的注意层输出gru_decoder_with_attention.原始演示:

def gru_decoder_with_attention(enc_vec, enc_proj, current_word):
    decoder_mem = memory(name='gru_decoder',
                         size=decoder_size,
                         boot_layer=decoder_boot)

    # This attention context layer would have been 
    # a vector of size |src_vocab| x 1
    context …
Run Code Online (Sandbox Code Playgroud)

python matrix deep-learning paddle-paddle attention-model

6
推荐指数
0
解决办法
164
查看次数

paddle ocr问题的文本检测

我正在尝试使用 paddlepaddle ocr 在图像处理后检测图像中的文本。但 paddle ocr 无法检测到文本。

from paddleocr import PaddleOCR,draw_ocr

ocr = PaddleOCR(use_angle_cls=True, lang='en')
img_path = '123.jpg'
result = ocr.ocr(img_path, cls=True)
r=[]
for line in result:
    r.append(line[1][0])

print(r)
Run Code Online (Sandbox Code Playgroud)

[![图片链接在这里][1]][1]

python ocr image image-processing paddle-paddle

6
推荐指数
1
解决办法
4912
查看次数

ImportError:无法从“paddle”导入名称“inference”

我正在尝试实施 paddleocr。我已经使用以下方式安装了它:

#Github repo installation for paddle
! python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

#install paddle ocr
!pip install paddleocr

!git clone https://github.com/PaddlePaddle/PaddleOCR.git

Run Code Online (Sandbox Code Playgroud)

但在导入时

from paddleocr import PaddleOCR,draw_ocr
Run Code Online (Sandbox Code Playgroud)

我收到此错误:ImportError:无法从“paddle”导入名称“inference”

python ocr paddle-paddle paddleocr

5
推荐指数
1
解决办法
7634
查看次数