-
Notifications
You must be signed in to change notification settings - Fork 10k
Description
🔎 Search before asking
- I have searched the PaddleOCR Docs and found no similar bug report.
- I have searched the PaddleOCR Issues and found no similar bug report.
- I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
描述
我在使用 PaddleOCR==3.0.0 进行文本识别时遇到一个问题。将 ocr_version 从 "PP-OCRv4" 切换为 "PP-OCRv5" 后,对同一张图像的识别结果发生了明显变化。在 PP-OCRv5 中,识别结果为空字符串,分数为 0;而 PP-OCRv4 能正常识别出文本。
🏃♂️ Environment (运行环境)
💻 环境信息:
操作系统:Windows11
PaddleOCR:3.0.0 (CPU版本)
paddlepaddle:3.0.0
使用方式:通过 Python 代码调用 PaddleOCR(...)
图像是清晰、未旋转的截图
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
from paddleocr import PaddleOCR
ocr = PaddleOCR(
use_textline_orientation=False,
use_doc_unwarping=False,
ocr_version="PP-OCRv5", # Switch to PP-OCRv4 here to compare
lang='ch'
)
import pkg_resources
print("PaddleOCR version:", pkg_resources.get_distribution("paddleocr").version)
print("paddlepaddle version:", pkg_resources.get_distribution("paddlepaddle").version)
img_path = r"D:\LianTuYunData\AI\paddle_env\check_myself.jpg"
result = ocr.predict(img_path)
print("OCR result:", result)
使用参数 ocr_version="PP-OCRv5":
打印结果
'rec_texts': ['', ''], 'rec_scores': [0.0, 0.0]
使用参数 ocr_version="PP-OCRv4":
打印结果
'rec_texts': ['hello', 'liantuyun'], 'rec_scores': [0.9997302293777466, 0.9995326995849609]
感谢您抽出时间查看这个问题,也感谢 PaddleOCR 团队一直以来的工作!
