Files
Lin Manhui eeb12cd4de [Feat] Update for paddleocr 3.5 (#17820)
* Update for paddleocr 3.5

* Fix doc

* Add doc to nav

* Refine docs

* Fix PaddleOCR-VL doc

* Polish PaddleOCR-VL docs

* Polish docs

* Add notice

* Polish doc

* update docs

* update

* update

* update speed data

* add warning

* update warning

* update warning

* update warning

* update warning

* update

* update

* Fix bugs

* Update API docs

* Update API docs

* Update git ignore

* Update docs

* update pp_structure_v3 case

* update

* Allow specifying URLs for pdx and ppocr version

* docs: release-review fixes for 3.5 docs

Addresses issues surfaced during release-time review of #17820,
covering broken rendering, broken cross-language and anchor links,
expression and consistency nits, and the strict-mode docs-anchor CI.

Rendering fixes:
- Restore truncated/duplicated parameter-table rows in OCR.en.md,
  PP-DocTranslation.en.md, PP-StructureV3.en.md, and
  doc_understanding.en.md
- Fix mis-indented kwarg in the PP-DocTranslation.en.md transformers
  example (would SyntaxError on copy-paste)
- Fix 4-backtick closing fence and over-wide rowspan in
  chart_parsing.{en,zh}.md
- Fill in empty enable_hpi default (None) in PaddleOCR-VL.en.md

Link fixes:
- Point module_usage .en.md files at ../inference_engine.en.md
  instead of the Chinese ../inference_engine.md (11 files)
- Replace Chinese anchor #五推理引擎 with #5-inference-engine in
  eight module_usage .en.md files, and normalize the corresponding
  heading from "## V. Inference Engine" to "## 5. Inference Engine"
  in textline_orientation_classification.en.md
- Correct mislabeled PaddleX weight-conversion link text in
  text_detection.en.md and table_structure_recognition.en.md
- Align broken cross-file link in inference_engine.md with the
  actual slug (#3-paddlex) so it stops conflicting with
  high_performance_inference.md and serving.md

Chinese anchor resolution (CI fix):
- Attach explicit {#anchor} (attr_list) attributes to the zh
  headings for "推理引擎", "权重转换", and "流程导览" so the
  existing in-page Chinese anchors resolve under the default
  mkdocs slugify. Build now clean under `mkdocs-ci.yml` strict mode.

Expression and consistency:
- Drop duplicated "and vLLM" phrase in NVIDIA Blackwell WARNING
- Restore Chinese key "驾驶室准乘人数" in PP-ChatOCRv4.en.md
  transformers example (rest of the doc keeps it)
- Normalize "Paddle framework" to "PaddlePaddle framework" and
  align link text with target file title across affected docs
- Fix plural/singular mismatch ("examples"/"them" -> "example"/"it")
  in module_usage .en.md quick-start intros that show one command
- Add missing comma after hardware names in five hardware EN tutorials
- Add spacing in "PaddleX 产线 Python 脚本使用说明" link text in
  inference_engine.md
- Use uppercase CPU/GPU in paddlepaddle_installation.md comments

Navigation:
- Add missing English nav_translations entries so the English
  sidebar no longer shows raw Chinese labels:
    PP-DocTranslation产线 -> PP-DocTranslation Pipeline
    推理引擎与配置说明     -> Inference Engine and Configuration

Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>

* docs: clarify that engine=None preserves legacy PaddleOCR behavior

Addresses PR #17820 review feedback: the engine-parameter row lists
`paddle`, `paddle_static`, `paddle_dynamic`, and `transformers` as
supported values but doesn't mention that `None` is also valid (and
is the default). Add a short user-facing clarification to every engine
row's Description so readers who see `default=None` understand what
that means:

- EN: "If left as `None` (the default), PaddleOCR preserves the
  behavior of earlier versions, which in most configurations is
  equivalent to `paddle`."
- ZH: "保持为默认值 None 时,PaddleOCR 保留旧版本的行为,在大多数配置下
  等价于 paddle。"

48 files, 66 engine rows updated (33 EN + 33 ZH). No changes to
engine_config rows, which use a different description.

Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>

* Optimize docs

* Update docs

* docs: align CUDA 12.6 Docker driver version with pip section

Per review feedback from changdazhou on PR #17820 (L26), update the
CUDA 12.6 Docker GPU line to require driver >= 550.54.14, matching
the pip section already at L61 (both ZH and EN).

Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>

* docs: include None in engine supported-values list

Per follow-up review on PR #17820: from a completeness standpoint,
None belongs in the "Supports ..." enumeration rather than only in
the trailing clarification sentence. Move None into the list as the
default value and tighten the follow-on sentence accordingly.

- EN: "Supports None (the default), paddle, paddle_static,
  paddle_dynamic, and transformers. When left as None, PaddleOCR
  preserves the behavior of earlier versions..."
- ZH: "支持 None(默认值)、paddle、paddle_static、paddle_dynamic、
  transformers。保持为默认值 None 时..."

Applied to all three supported-value variants across the module_usage
and pipeline_usage pages — same 48 files / 66 rows as the previous
clarification commit.

Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>

* fix docs

* update

* update

* docs: revert PaddleOCR-VL.md to HTML and re-apply maintainer prose

Revert PaddleOCR-VL.md to the pre-a874bcb3e8 "Optimize docs" state,
then re-apply the PR's three edits and a small set of the
maintainer's prose-only changes from that commit.

Full revert rationale: a874bcb3e8 converted every HTML table in the
file to pipe-tables (17 tables) but the conversion had multiple
rendering problems — unescaped `|` inside `str|None` type cells
breaking column alignment, trailing rows collapsed into prose, a
corrupted `prompt_label` row. The commit also stripped every
`<details>/<summary>` wrapper (27 in total), so both the parameter
tables and the Docker Compose customization / multi-language
invocation examples stopped being collapsed, and it broke the YAML
frontmatter (`comments: true` → `## comments: true`), the tabbed
`=== "..."` blocks, and some HTML-entity escaping inside C++/PHP
code samples.

Edits preserved on top of the HTML baseline:
- This PR's three edits: {#流程导览} anchor, and the engine-row
  completeness / default-None clarification on both engine rows.
- Maintainer's prose edits from a874bcb3e8 that were clearly
  intentional and did not introduce rendering regressions:
  * Remove the paddleocr-vl-1.5_metrics.png image.
  * Expand the "镜像中仅预装飞桨框架" note with a recommendation to
    install other engines via 方法二.
  * Generalize the "latest-xxx" TIP wording.
  * Switch the paddlepaddle.org.cn quick-install URL from
    autolink to explicit Markdown link syntax.

Other prose/structure changes from a874bcb3e8 (list-indent reflow
inside tabs, `<details>` stripping, table conversions, frontmatter,
code-sample re-encoding) are rendering regressions rather than
intended edits and are rolled back here; maintainer can re-apply
any genuinely desired prose changes cleanly on top of this
baseline.

Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>

* Update docs

* Update doc

* Update docs

* Fix docs

* Add .worktrees to gitignore

* Fix doc bug

---------

Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
Co-authored-by: zhangyue66 <zhangyue66@baidu.com>
Co-authored-by: Bvicii <yizhanhuang2002@gmail.com>
2026-04-21 16:29:31 +08:00

1.6 KiB

comments
comments
true

日志

本文档主要介绍如何配置通过 PyPI 安装的 paddleocr 包的日志系统。需要注意的是,paddleocr 与训练脚本使用的是不同的日志系统,本文档不涉及训练脚本所使用的日志系统的配置方法。

PaddleOCR 构建了一个基于 Python logging 标准库 的集中式日志系统。换言之,PaddleOCR 使用唯一的日志记录器(logger),可通过 paddleocr.logger 访问和配置。

默认情况下,PaddleOCR 的日志级别设为 ERROR,这意味着仅当日志级别为 ERROR 或更高(如 CRITICAL)时,日志信息才会输出。PaddleOCR 同时为该日志记录器配置了一个 StreamHandler,将日志输出到标准错误流,并将记录器的 propagate 属性设为 False,以避免日志信息传递到其父记录器。

若希望禁止 PaddleOCR 对日志系统的自动配置行为,可将环境变量 DISABLE_AUTO_LOGGING_CONFIG 设为 1。此时,PaddleOCR 将不会对日志记录器进行任何额外配置。

如需更灵活地定制日志行为,可参考 logging 标准库的相关文档。以下是一个将日志写入文件的示例:

import logging
from paddleocr import logger

# 将日志写入文件 `paddleocr.log`
fh = logging.FileHandler("paddleocr.log")
logger.addHandler(fh)

请注意,PaddleOCR 依赖的其他库(如 PaddleX)拥有各自独立的日志系统,以上配置不会影响这些库的日志输出。