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
- Repository root
- Repository root
- Likely public API
- Likely public API
- Likely start-up file
- Likely start-up file
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd 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.