Skip to content

[Bug] Fix languages bug#173

Merged
Bobholamovic merged 5 commits intoPFCCLab:mainfrom
Sam-gsj:bug_ocr
Jun 13, 2025
Merged

[Bug] Fix languages bug#173
Bobholamovic merged 5 commits intoPFCCLab:mainfrom
Sam-gsj:bug_ocr

Conversation

@Sam-gsj
Copy link
Collaborator

@Sam-gsj Sam-gsj commented Jun 13, 2025

There will be an error when the user uses other language models.

PPOCRLabel.py Outdated
use_gpu=self.gpu,
lang=choose_lang,
)
if choose_lang in ["french", "german", "korean"]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新版本的PaddleOCR会自动根据语言确定模型,其实也可以不需要这样特殊判断

PPOCRLabel.py Outdated
# TODO the model will be automatically selected based on the language.
if choose_lang in ["french", "german", "korean"]:
self.ocr = PaddleOCR(
use_doc_orientation_classify=True,
Copy link
Collaborator

@GreatV GreatV Jun 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好把这两个参数设置为false, doc unwarping后的图和原图文字位置会有变化。下面的分支建议也改一下。

use_doc_unwarping=False,
use_doc_orientation_classify=False,

Copy link
Collaborator

@GreatV GreatV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Bobholamovic Bobholamovic merged commit 10bd545 into PFCCLab:main Jun 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants