Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用CPU识别正常,使用gpu不报错但识别率为0 #11195

Closed
lyhliu1 opened this issue Nov 5, 2023 · 9 comments
Closed

使用CPU识别正常,使用gpu不报错但识别率为0 #11195

lyhliu1 opened this issue Nov 5, 2023 · 9 comments
Assignees
Labels
bug Something isn't working stale status/close

Comments

@lyhliu1
Copy link

lyhliu1 commented Nov 5, 2023

请提供下述完整信息以便快速定位问题:
使用官方例子,CPU模式能正常识别出文字,使用gpu模式没有报错,但文字识别率为零,无法识别。

  • 系统环境/win10,cuda11.7,cuddn8.9.4:显卡:960m
  • 版本号/Version:Paddle:gpu版本2.5 PaddleOCR: 2.7,系统自动使用pp—ocrv4模型
  • 运行指令/Command Code:
  • img="./data/11.jpg"
  • res=OCR.ocr(img,cls=trur)
  • print(res)
  • 完整报错/Complete Error Message:
  • ppocr debug:rec_res num:0,elapsed:0.0

我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答:yes

请尽量不要包含图片在问题中/Please try to not include the image in the issue.

@Gmgge
Copy link
Contributor

Gmgge commented Nov 6, 2023

通常来说是cuda、cudnn版本未正确匹配paddlepaddle,请尝试使用paddlepaddle2.4 gpu版本,并安装官方安装文档安装所需要的环境。

@loadingin
Copy link

兄弟,问题解决了吗?我也出现一样的问题 ,cpu正常识别,gpu识别内容是空,或者直接乱码
win10,cuda12.3,cuddn8.9.5:显卡:1060
Paddle:paddlepaddle-gpu:25.5.2.post120 PaddleOCR: 2.7.0.3,系统自动使用pp—ocrv4模型

初始化:
PaddleOCR(use_angle_cls=True,
lang="ch",
det_model_dir='../models/whl/det/ch/ch_PP-OCRv4_det_infer',
rec_model_dir='../models/whl/rec/ch/ch_PP-OCRv4_rec_infer',
cls_model_dir='../models/whl/cls/ch_ppocr_mobile_v2.0_cls_infer',
use_gpu=True,
show_log=True,
det_db_score_mode='slow')

@sssjc666
Copy link

可能cuda和cudnn和paddle版本不兼容的问题,我之前也是这样,cpu正常识别,gpu识别出现问题

@likenamehaojie
Copy link

我也遇到了同样的问题,paddlepaddle都是按照官网方式,版本匹配也是和官网一样,但是CPU能识别,GPU环境也是要么什么都识别不到,要么就是一堆乱码

@likenamehaojie
Copy link

有哥们在么?加个群共同讨论下这个问题吧我的微信号是13203902444

@sssjc666
Copy link

我也遇到了同样的问题,paddlepaddle都是按照官网方式,版本匹配也是和官网一样,但是CPU能识别,GPU环境也是要么什么都识别不到,要么就是一堆乱码

建议更改其它版本库在进行尝试。当时我遇见我这个问题是paddle-gpu版本要高于ocr版本。

@yuemengrui
Copy link

#11324 我也出现这种情况,我直接用的paddle官方的docker镜像,测试发现即使是官方镜像,你也要用测试一下安装成功了没有。1. paddle.utils.run_check()这个没用,都是返回正常。直接paddle.ones([3,3]),如果返回都是1,才是真的安装成功了

@SWHL SWHL added the bug Something isn't working label Jun 10, 2024
Copy link
Contributor

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Dec 31, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale status/close
Projects
None yet
Development

No branches or pull requests

8 participants