RepoPilot

paddlepaddle / paddleocr

Search paddlepaddle/paddleocr

GitHub

Code

How paddlepaddle/paddleocr is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Likely start-up file
  6. Likely start-up file
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new text detection or recognition model

  • Create a new model class inheriting from paddleocr._models.base.BaseModel
  • Implement __init__, preprocess, forward, and postprocess methods following existing model patterns
  • Register the model name in paddleocr._constants.py with default URL and initialization parameters
  • Import and wire the model into the appropriate pipeline (ocr.py or doc_understanding.py)

Add support for a new output format (document conversion)

  • Create a new converter class in paddleocr._doc2md.converters/ inheriting from base converter
  • Implement the convert(ocr_result) -> output_bytes method mapping OCR data to target format
  • Register the converter in paddleocr._doc2md.registry.py
  • Update __init__.py in converters package to expose the new converter class

Add a new document processing pipeline

  • Create a new pipeline class inheriting from paddleocr._pipelines.base.BasePipeline
  • Implement __init__ to compose required models, and run() to orchestrate inference
  • Add pipeline registration and initialization in paddleocr.__init__.py or _constants.py
  • Export the pipeline class and update CLI argument parser to support the new workflow

Extend language support

  • Add language code and name mappings in paddleocr._utils.langs.py
  • Define language-specific model names in paddleocr._constants.py with download URLs
  • Test the language configuration by running OCR pipeline with the new language code

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.

Code quality and hotspots

Largest source files

  • Branch points24 per file on average
  • Code issues2 errors, 16 warnings
  • Largest file1,631 lines
  • Hotspot load0 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions9 workflows
  • Tests105 test filesGo test · Jest/Vitest · JUnit · Pytest · 0.14 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: paddleocr-js/packages/core/test · langchain-paddleocr/tests/unit_tests/document_loaders · langchain-paddleocr/tests/data

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.