* chore: add pyproject toml configuration
* build: migrate RapidOCR wheel packaging to pyproject.toml
- add PEP 517 setuptools build configuration
- derive package version from git tags via setuptools-scm
- move wheel model preparation into an explicit tools script
- generate MANIFEST.in for default model assets before building
- avoid importing rapidocr during package metadata generation
* ci: build release wheels from validated git tags
* build: align package runtime support with Python 3.8
- set Requires-Python to >=3.8
- remove Python 3.6 and 3.7 classifiers
- make wheel asset preparation script type hints Python 3.8 compatible
- clarify split between build-time and wheel runtime support
* Update to_markdown.py
修改重排规则:
中文段落
表格/多栏
标题与正文混排
OCR 框轻微倾斜
* Potential fix for pull request finding
refactor: format function call for readability
- Wrap `cls.get_gap_text` call into multi-line format
- No functional changes, only code style improvement
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- pass --lang_type into RapidOCR recognition config
- skip CLI visualization when OCR or word results are empty
- validate parameter update keys before applying config updates
- add regression tests for CLI language, empty visualization, and invalid params
Replace the single legacy Dockerfile (rapidocr_api only) with 7
per-engine development images covering all supported inference backends:
- onnxruntime-cpu: ONNX Runtime on CPU (python:3.10-slim-bookworm)
- onnxruntime-gpu: ONNX Runtime with CUDA (nvidia/cuda:12.4.1)
- tensorrt: NVIDIA TensorRT (nvcr.io/nvidia/deepstream:7.0-gc-triton-devel)
- paddle: PaddlePaddle CPU
- openvino: Intel OpenVINO
- pytorch: PyTorch CPU
- mnn: Alibaba MNN
Infrastructure:
- Dockerfile.base: shared foundation for CPU variants
- docker-compose.yaml: all 7 services with shared model volume
- Makefile: make build-*/test-*/shell-* convenience commands
- .dockerignore: excludes .git, models, build artifacts
Key design decisions:
- PYTHONPATH-based imports (setup.py incompatible with pip editable install)
- Named volume (rapidocr-models) for persistent model cache across rebuilds
- Source bind-mounted at runtime for live editing
- tensorrt pinned to 8.6.x + cuda-python 12.x (matching DeepStream 7.0)
All 7 images built and tested with full OCR pipeline inference.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(inference_engine): add TensorRT engine support
- Add TensorRT inference session with dynamic shape support
- Implement automatic engine building and caching per GPU architecture
- Add pre-allocated buffers with pinned memory optimization
- Support FP16/FP32/INT8 precision modes
- Add optimization profiles for det/rec/cls models
- Include comprehensive error handling and resource cleanup
- Add unit tests for TensorRT engine (skipped when unavailable)
- Add TensorRT configuration section in config.yaml
* fix(tensorrt): dynamically allocate output buffers to prevent overflow
* Update test_engine.py with TensorRT support final version
* feat(tensorrt): add model_type to engine cache key
- Include model_type in TensorRT engine cache key generation
- Ensures proper cache differentiation based on model_type
* fix(tensorrt): update maximum shape configurations for input and output tensors
- Increased max_shape values in config.yaml and engine_builder.py to 2048 for both detection and recognition tasks.
- Updated default maximum shapes in memory_utils.py to reflect the new limits for input and output buffers.
* feat(tensorrt): implement square input handling for MULTI models
- Added functionality to check if the model requires square input based on configuration.
- Implemented padding of input to square shape and cropping of output back to original dimensions.
- Introduced methods to determine maximum profile size and handle square input requirements for TensorRT inference.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>