Files
kotaemon/docs/integrations/paddle_ocr.md
Khoi-Nguyen Nguyen-Ngoc 9ad3e4e49a feat: integrate PaddleOCR as document loaders + enhance chat/index UX (#814)
* docs: typo

* fix: enhance mention @ (file, websearch) in chat

* fix: shorter placeholder guide in chat

* fix: enhance UI (file filter, chunks preview, lightrag reader settings)

* feat: feat: integrate paddleocr (PaddleOCR-VL, PP-StructureV3)

* fix: import

* fix: support both urls and mention files when chatting

* feat: restore the test connection panel in resources

* fix: paddleocr output adapter

* tests: update

* fix: parse image block content

* fix: docker gpu stage for paddleocr

* tests: update unit tests

* tests: add skip_when_paddleocr_not_installed

* fix: reset chunk preview filter when re-selecting file

* fix: paddleocr[all] -> paddleocr[doc-parser]

* fix: allow configure paddleocr device with env

* feat: parameterize CUDA version in Dockerfile for paddlepaddle installation

* docs: add integration guides for PaddleOCR and Docling

* fix: updating mcp server must reflect in the tool choice UI

* fix: disable enable_mkldnn for cpu inference

* docs: update installation doc with uv

* fix: use chat_input_text for llm input instead of the UI display message

* fix: render file mentions as HTML and support unquoted names

* fix: ensures proper cleanup of event listeners before replacing the Tribute instance.

* test: updae unit tests

---------

Co-authored-by: GSD Agent <kotaemon@example.com>
2026-05-30 21:02:58 +07:00

2.0 KiB
Raw Permalink Blame History

PaddleOCR

Kotaemon provides two PaddleOCR readers to enable document ingestion with full layout understanding, including multilingual text, tables, figures, formulas, and seals.

  • PaddleOCRVLReader: Wraps the PaddleOCR-VL 1.5 visual-language model for robust layout and VQA-based parsing.
  • PPStructureV3Reader: Uses the PPStructureV3 pipeline for structured layout analysis, including table and chart detection.

Both readers are located under kotaemon/loaders/paddleocr_loader.

Prerequisites

  • Install PaddlePaddle:
    • Ensure that the installed PaddlePaddle version matches your system configuration and hardware (CPU/GPU). For additional wheel options, refer to the PaddlePaddle official website.
    • Check device support for PaddleOCR-VL.
# CPU
uv pip install paddlepaddle==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

# gpurequires GPU driver version ≥550.54.14 (Linux) or ≥550.54.14 (Windows)
uv pip install paddlepaddle-gpu==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu130/
  • Install the PaddleOCR doc parser extras:
uv pip install -e "libs/kotaemon[paddleocr]"
  • Configure the device: You can set the PADDLE_DEVICE environment variable in your .env file to control the execution device.
PADDLE_DEVICE=gpu # cpu, gpu:0

Configure the loader

  1. Run Kotaemon and open the app UI.
  2. Navigate to Settings → File Loader (under indexing or ingestion settings).
  3. Select one of the PaddleOCR loaders:
    • PaddleOCR PPStructureV3 (table+figure extraction)
    • PaddleOCR-VL (VLM document parsing)
  4. Save the settings, then upload or ingest a document. Kotaemon will automatically use the selected PaddleOCR loader during indexing and convert extracted content into Document objects.