mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-12-06 14:01:36 +08:00
main
403 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5cf9233040 |
vl 1.8 (#18444)
* Support PaddleOCR-VL 1.8 |
||
|
|
dab3fe3537 | docs: deduplicate images and streamline repository cloning (#18359) | ||
|
|
811e0c59e3 |
docs: organize research papers and unify multilingual citations (#18357)
* docs: organize research papers and unify multilingual citations * ci: retry PaddleX installation and stop GPU tests on setup failure Retry PaddleX installation up to three times with 10s and 20s backoff. Stop the container script when environment setup fails so pytest does not run without required dependencies. Preserve the explicit diagnostic for an unrecognized PaddleX requirement. Validation: YAML parsing, bash syntax, git diff --check, and six simulated setup scenarios including retry success, retry exhaustion, early dependency failure, and import failure. * ci: build PaddleX wheel on hosted runner for GPU tests The GPU container repeatedly fails to clone PaddleX from GitHub even after retries. Build the same release-branch source as a wheel on ubuntu-latest, transfer it within the workflow using an artifact, and mount it read-only into the GPU container for installation. Preserve dependency resolution, retries, fail-fast behavior, and the required GPU check. Validation: built paddlex-3.7.2-py3-none-any.whl from release/3.7; checked wheel metadata, YAML and shell syntax, artifact wiring, three preparation scenarios, and five GPU setup scenarios. Full GPU validation runs in CI. |
||
|
|
422ce151ee |
[Feat] Support HPD-Parsing (#18262)
* Support HPD-Parsing * Fix doc * Fix docs |
||
|
|
6d2110b743 | fix v6 docs (#18209) | ||
|
|
1af0448a20 |
docs: fix formula rendering issue and optimize ci ignore rule (#18184)
* docs: fix formula rendering issue * ci: add paths-ignore * ci: optimize ignore rule * ci: optimize ignore rule * ci: fix paddlex version error * chore: add new line |
||
|
|
f0bef31f67 | fix inference_engine doc (#18153) | ||
|
|
83c5b7ba2f | fix v6 docs (#18149) | ||
|
|
b03f46425e |
[Feat] Support PP-OCRv6 (#18104)
* Fix bugs * Fix for python3.8 * Fix mcp server * Optimize * Fix bugs * Refactor * Fix MCP * Bump MCP to 0.8.1 * Fix bugs * Bump version to 0.8.2 * Fix bugs and update docs * Update docs and fix bugs * Fix bugs * update pp-ocrv6 * update pp-ocrv6 # Conflicts: # docs/version3.x/module_usage/text_detection.md # docs/version3.x/module_usage/text_recognition.md # docs/version3.x/pipeline_usage/OCR.md # paddleocr/_api_client/models.py # paddleocr/_pipelines/ocr.py * Bump paddleocr version * update PP-OCRv6 docs: add model metrics, fix sizes, update language count to 50 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * update PP-OCRv6: add model metrics/sizes to docs, support az/ku languages - Add PP-OCRv6 model precision, sizes, descriptions to doc tables - Add OCR pipeline introduction for PP-OCRv6 - Remove az/ku from unsupported latin langs (dict covers them) - Update language count: 48->50 (medium/small), 47->49 (tiny) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Change languages * Bump js version * add PP-OCRv6 English docs: algorithm doc + update model tables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Use default model * Update doc * Update mcp docs * update PP-OCRv6 algorithm docs and mkdocs nav: sync speed table with paper Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Support more params * Fix MCP * update READMEs and index docs: PP-OCRv5 -> PP-OCRv6 features Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update sdk * Fix bugs * Fix unsaved * Bump versions * Fix bugs * updata readme --------- Co-authored-by: weixin_46524038 <weixin_46524038@noreply.gitcode.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: zhangyubo0722 <zhangyubo0722@163.com> |
||
|
|
6a8b8f1e32 |
[Feat] Add PP-OCRv6 iOS Demo (#17933)
* 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
* docs: initialize project
* Init
* feat(02-02): port Clipper polygon offset algorithm to pure Swift
- Implement ClipperOffset class with addPath/execute API
- Support JT_ROUND + ET_CLOSEDPOLYGON for DB postprocessing
- Add static offsetPolygon() convenience for DBPostProcess
- Arc tolerance calculation matches pyclipper's Clipper 6.x
- Pure Swift, no external dependencies
* feat(02-01): add Yams dependency and InferenceConfig YAML parser
- Add Yams ~> 5.0 pod to Podfile for inference.yml parsing
- Create InferenceConfig.swift with typed parsing of inference.yml
- Support TransformOp enum: DetResizeForTest, NormalizeImage, ToCHWImage, RecResizeImg
- PostProcessConfig handles both det (DBPostProcess) and rec (CTCLabelDecode) configs
- Python-style scale string '1./255.' parsed via string splitting (not eval)
- Register InferenceConfig.swift in Xcode project
* feat(02-01): implement pure-Swift detection preprocessing operators
- Create Preprocessing.swift with DetPreprocessor and PreprocessResult
- Port DetResizeForTest: resize longest side to resize_long, ceil to 128 stride
- Port NormalizeImage: config-driven scale/mean/std normalization
- Port ToCHWImage: HWC-to-CHW layout conversion producing [1,3,H,W] tensor
- Image padding for tiny images (h+w < 64) matching Python reference
- Pure Swift using CoreGraphics + Accelerate (no OpenCV dependency)
- All transform parameters read from InferenceConfig (zero hardcoded values)
- Register Preprocessing.swift in Xcode project
* feat(02-02): implement DB text detection postprocessing pipeline
- Add DBPostProcessor with full pipeline: threshold -> contours -> minAreaRect -> score -> expand -> scale
- Implement Suzuki-Abe contour finding with CHAIN_APPROX_SIMPLE compression
- Implement rotating calipers minAreaRect + convex hull (Andrew's monotone chain)
- Add scanline polygon fill for box_score_fast computation
- Integrate ClipperOffset for polygon expansion (unclip)
- All parameters configurable via DBPostProcessConfigurable protocol
- Pure Swift, no OpenCV dependency
* docs(02-02): create SUMMARY.md for ClipperOffset + DBPostProcess plan
* feat(02-03): expose runDetection method on ORTSessionManager
- Add runDetection(inputData:shape:) for real inference with preprocessed data
- Returns output tensors as [String: (data: [Float], shape: [Int])] dictionary
- Includes NaN validation on output tensors
- All existing methods (loadModels, validateDetModel, validateRecModel) preserved unchanged
* feat(02-03): create DetectionEngine orchestrating full detection pipeline
- DetectionEngine wires DetPreprocessor -> ORTSessionManager.runDetection -> DBPostProcessor
- DetectionResult struct with boxes and per-stage timing metrics (preprocess/inference/postprocess)
- All parameters loaded from inference.yml via InferenceConfig.load()
- PostProcessConfig conforms to DBPostProcessConfigurable for type-safe init bridging
- DetectionEngineError for noOutputTensor and unexpectedOutputShape cases
- Registered in Xcode project pbxproj
* docs(02-03): complete detection engine integration plan
- SUMMARY.md documenting DetectionEngine pipeline integration
- STATE.md updated with position, decisions, metrics
- REQUIREMENTS.md: POST-01, POST-02 marked complete
* docs(phase-02): verification complete — human_needed for runtime numerical exactness
* docs(phase-02): complete phase execution
* docs(phase-02): evolve PROJECT.md after phase completion
* feat(03-01): add runRecognition to ORTSessionManager with shared inference method
- Extract private runInference() from runDetection to eliminate code duplication
- Add public runRecognition() method that uses recSession for recognition model inference
- Both runDetection and runRecognition guard their respective sessions and delegate to runInference
- Recognition model supports dynamic-width input tensors [1, 3, 48, W]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(03-01): create RecPreprocessor implementing OCRResizeNormImg
- Implement OCRResizeNormImg algorithm matching PaddleX text_recognition/processors.py
- Read imgC/imgH/imgW from inference.yml RecResizeImg.image_shape (config-driven, not hardcoded)
- Aspect-ratio-aware resize with ceil() width computation matching Python math.ceil()
- Recognition normalization: pixel/127.5 - 1.0 mapping [0,255] to [-1,1] (not ImageNet mean/std)
- HWC-to-CHW transpose and right-pad with zeros to target width
- Bilinear interpolation via CGContext (pure Swift, no OpenCV)
- Register RecPreprocessor.swift in Xcode project (PBXBuildFile, PBXFileReference, PBXGroup, Sources)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(03-01): complete recognition preprocessing & inference plan
- Create 03-01-SUMMARY.md documenting plan execution
- Update STATE.md: advance to Phase 3 Plan 1 complete, add decisions
- Update ROADMAP.md: Phase 3 progress 1/2
- Update REQUIREMENTS.md: mark PREP-04 and PREP-05 as complete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(03-02): create CTCDecoder implementing CTC label decode with character dictionary
- CTCDecoder struct ported from ppocr/postprocess/rec_postprocess.py CTCLabelDecode
- Reads character_dict from inference.yml PostProcess config
- Prepends blank token at index 0 (CTC convention)
- Decoding: argmax + consecutive duplicate removal + blank filtering + char mapping
- Confidence: mean probability of selected timesteps
- Registered in Xcode project (Engine group)
* feat(03-02): create RecognitionEngine orchestrating full recognition pipeline
- RecognitionEngine class mirrors DetectionEngine pattern
- Composes RecPreprocessor + ORTSessionManager.runRecognition + CTCDecoder
- Returns RecognitionEngineResult with text, confidence, and per-stage timing
- Config-driven: reads inference.yml for preprocessing dims and character dictionary
- Registered in Xcode project (Engine group)
* docs(03-02): complete CTC decoding and recognition engine integration plan
- 03-02-SUMMARY.md with frontmatter, accomplishments, and self-check
- STATE.md updated with position, decisions, metrics
- ROADMAP.md Phase 3 marked 2/2 complete
- REQUIREMENTS.md POST-03, POST-04 marked complete
* docs(03): create gap closure plan for CTCDecoder missing space character
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(03-03): append ASCII space to CTCDecoder dictionary for 18,385-element parity
- Add chars.append(" ") after dict chars to match PaddleX use_space_char=True default
- Update doc comments to document full 18,385-element character list layout
- Fixes model output class index 18384 being silently dropped during decode
* docs(03-03): complete CTC decoder space character fix plan
- Created 03-03-SUMMARY.md with execution results
- Updated STATE.md with plan completion and metrics
- Updated ROADMAP.md with plan 03-03 completion status
* merge: integrate phase 03-03 gap closure from worktree
* docs(phase-03): complete phase execution — 7/7 must-haves verified
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(phase-03): evolve PROJECT.md after phase completion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(04): create phase plan for Pipeline Orchestration & Validation
3 plans in 2 waves:
- Plan 01 (Wave 1): BoxSorter + PerspectiveCrop algorithms
- Plan 02 (Wave 1): Python validation scripts (generate_reference.py + validate.py)
- Plan 03 (Wave 2): OCREngine orchestrator + ValidationExport JSON serializer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(04-02): add PaddleX reference output generator for iOS validation
- generate_reference.py runs PaddleOCR on test images, exports per-image
JSON with polygon coordinates, text, and confidence scores
- Creates test_images/ directory with .gitkeep for developer-provided images
- .gitignore excludes generated reference/ directory from version control
- Supports PP-OCRv5 mobile det/rec models with all optional processors disabled
* feat(04-01): implement BoxSorter reading-order sort
- Port PaddleX SortQuadBoxes algorithm to Swift
- Two-phase sort: initial y/x sort + backward insertion for same-line reorder
- yThreshold=10 matching PaddleX hardcoded value
- Consumes DetectionBox type from DBPostProcess.swift
* feat(04-02): add iOS vs reference validation script and README
- validate.py compares iOS JSON output against PaddleX reference JSON
with exact polygon/text match and 1e-4 confidence tolerance
- Prints per-image PASS/FAIL and overall summary with box match counts
- Exit codes: 0=pass, 1=fail, 2=missing files (CI-friendly)
- README.md documents complete validation workflow (generate -> export -> validate)
* feat(04-01): implement PerspectiveCrop with DLT warp and tall-narrow rotation
- Port PaddleX get_rotate_crop_image algorithm to pure Swift
- DLT perspective matrix solve via 8x8 Gaussian elimination
- Backward-mapping bilinear warp with BORDER_REPLICATE clamping
- 90-degree CCW rotation when height/width >= 1.5
- Float64 precision for matrix computation, Float for pixel sampling
- CoreGraphics-only: no OpenCV dependency
* docs(04-02): complete validation scripts plan
- SUMMARY.md documenting plan execution (2 tasks, 5 files, 4min)
- STATE.md updated with position, decisions, metrics
- ROADMAP.md updated with Phase 04 progress (1/3 plans)
- REQUIREMENTS.md marks VALID-01, VALID-02, PIPE-05 complete
* docs(04-01): complete pipeline bridge algorithms plan
- SUMMARY.md with BoxSorter and PerspectiveCrop execution results
- STATE.md updated with Phase 04 position and decisions
- ROADMAP.md updated with plan progress (1/3)
- REQUIREMENTS.md marked PIPE-02, PIPE-03 complete
* feat(04-03): add OCREngine pipeline orchestrator with per-stage timing
- Composes DetectionEngine, BoxSorter, PerspectiveCrop, RecognitionEngine
- Async run() method: detect -> sort -> crop -> recognize flow
- OCRResult and OCRPipelineResult types with per-stage timing breakdown
- Zero hardcoded params; all config-driven via inference.yml
* feat(04-03): add ValidationExport JSON serializer for pipeline output
- Serializes OCRPipelineResult to JSON matching Python validation schema
- Schema: {image, box_count, boxes: [{polygon, text, confidence}]}
- writeJSON writes to Documents/validation_output/ for device extraction
- Sorted keys for deterministic output diffs
* docs(04-03): complete pipeline orchestration plan
- OCREngine + ValidationExport implemented and committed
- STATE.md, ROADMAP.md, REQUIREMENTS.md updated
- PIPE-01, PIPE-04, CONF-02, CONF-03, CONF-04, CONF-05 marked complete
* docs(phase-04): complete phase execution — 10/10 must-haves verified
* docs(phase-04): evolve PROJECT.md after phase completion
* docs(05-user-interface): create phase plan
Two plans for Phase 5 UI: Plan 01 (wave 1) establishes OCRViewModel
state machine, PhotosPicker integration, sample images, and ContentView
coordinator. Plan 02 (wave 2) adds ResultImageView with Canvas polygon
overlay, TimingView, ResultsListView with clipboard copy, ErrorView,
and a human verification checkpoint.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(05-01): create OCRViewModel with full lifecycle state machine
- Add AppState enum with 5 states: loadingModels, ready, processing, results, error
- Add AppError enum with modelLoadFailed, inferenceFailed, imageLoadFailed cases
- Add OCRViewModel @MainActor class managing full app lifecycle via single @Published state
- Implement loadModels, processImage, selectSampleImage, copyResultsToClipboard, retry, reset
- Add normalizeOrientation helper for EXIF rotation flattening
- Fix missing pbxproj entries for OCREngine, BoxSorter, PerspectiveCrop, ValidationExport (Rule 3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(05-01): create ImagePickerSection and bundle sample images
- Add ImagePickerSection.swift with PhotosPicker + sample thumbnail row
- Bundle 3 sample images: English (book.jpg), Chinese (PP-OCRv3-pic001), multiline (table.jpg)
- Add SampleImages as folder reference in Xcode project Resources build phase
- Add Views group and Resources group to Xcode project structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(05-01): rewrite ContentView as state coordinator, retire AppViewModel
- Rewrite ContentView to use OCRViewModel with state-driven rendering
- Add NavigationStack with inline title "PaddleOCR Demo"
- Implement 5 state views: loadingModels, ready, processing, results, error
- Wire PhotosPicker via onChange binding with Data loadTransferable
- Integrate ImagePickerSection in ready, results, and non-model-error states
- Show processing overlay spinner on selected image
- Add placeholder results view with text list and timing (Plan 02 replaces)
- Error view with context-specific heading and Retry button
- Replace AppViewModel.swift contents with empty stub comment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(05-01): complete view model + image selection plan
- Create 05-01-SUMMARY.md with execution results and self-check
- Update STATE.md: Phase 5 Plan 1 complete, add decisions
- Update ROADMAP.md: Phase 5 progress (1/2 plans)
- Mark requirements UI-01, UI-02, UI-07, UI-08 as complete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* merge: resolve STATE.md conflict after 05-01 execution
* feat(05-02): add ResultImageView with Canvas polygon overlay and TimingView
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(05-02): add ResultsListView, ErrorView, and wire all views into ContentView
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* update docs
* update
* update
* Fix and update
* update speed data
* Optimize UI
* add warning
* update warning
* update warning
* update warning
* update warning
* update
* update
* Remove cached inference.yml files
* Fix bugs
* Update API docs
* Update API docs
* Fix
* Update
* Update git ignore
* Update docs
* Refactor and align with Python
* Fix config settting
* Optimize code
* Allow engine selection
* Restructure folders
* Support batch inference
* update pp_structure_v3 case
* update
* Init validation toolkit
* Hack paddleocr
* 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>
* Remove planning files
* Fix code style
* 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 benchmark
* Add icon and fix validation
* ci,docs: align PaddleX install branch and document py3.8 extras boundary (#17954) (#17961)
* ci,docs: align PaddleX install branch and document py3.8 extras boundary
- CI: derive the PaddleX install branch from the paddlex constraint in
pyproject.toml (release/X.Y) so PR/GPU tests stay in sync as the
paddleocr series advances; apply to both tests.yml and test_gpu.yml
- CI: install only paddleocr[doc2md] on py3.8 since several paddlex
transitive deps require py3.9+; add a py38_incompatible pytest marker
and gate affected tests behind it
- CI: pin paddlepaddle==3.0.0 on py3.8 / 3.1.0 on py3.9+ (match GPU CI)
- CI: standardize workflow filenames (.yaml -> .yml, dashes -> underscores)
- deps: pin lmdb<1.5 on py3.8 (newer lmdb wheels reference Py_SET_REFCNT,
a py3.9 stdlib C API)
- docs: note Python 3.8+ for base paddleocr/doc2md; py3.9+ for
doc-parser/ie/trans/all extras (safetensors>=0.7 dropped py3.8)
- docs: update PaddleOCR-VL manual-install Python range to 3.9-3.13
across all hardware variants (VL pipelines use doc-parser)
- tests: tag tests that require py3.9+ extras/deps with py38_incompatible
* ci: mark /workspace as git safe.directory in GPU runner
setuptools_scm runs git to derive the package version during
pip install -e .; inside the GPU CI container /workspace is owned
by the host user, which trips git's dubious-ownership check and
aborts the paddleocr install.
---------
(cherry picked from commit
|
||
|
|
30c312b906 | add onnxruntime installation desc (#18133) | ||
|
|
71c7fefbf5 |
add speed data (#18124)
* add speed data * fix link * update * update inference_engine doc * update * fix |
||
|
|
77ddbafccd | [Feat] Add PP-OCRv6 Android Demo (#18121) | ||
|
|
1e5aa0ad31 |
[Feat] Refactor MCP server to use Python SDK (#18098)
* refactor(mcp): add Executor base class and module structure Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(code quality): rename TimeoutError and remove unnecessary pass statements - Rename TimeoutError to ExecutionTimeoutError to avoid shadowing built-in exception - Remove unnecessary pass statements from exception classes and abstract methods Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(mcp): add HTTPExecutor base class for synchronous HTTP APIs * feat(mcp): add AIStudioExecutor using AsyncPaddleOCRClient Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(mcp): add LocalExecutor for local inference - Add LocalExecutor class for local PaddleOCR inference - Add _EngineWrapper to run synchronous engine in async context - Support all pipeline types: OCR, PP-StructureV3, PaddleOCR-VL series - Handle file path, URL, and Base64 input formats Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(mcp): add QianfanExecutor and SelfHostedExecutor - QianfanExecutor: Bearer token authentication, "paddleocr" endpoint - SelfHostedExecutor: No authentication, "ocr"/"layout-parsing" endpoints - Both inherit HTTPExecutor with unified response parsing Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(mcp): add executor factory function Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(mcp): add capabilities module with OCR and layout parsing Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(mcp): fix type hints and remove pass statements in capabilities * refactor(mcp): update __main__.py to use new architecture * refactor(mcp): update copyright year to 2026 * refactor(mcp): add type hint to main() function * chore(mcp): bump version to 0.7.0 * refactor(mcp): remove old pipelines.py * docs(mcp): update docs for v0.7.0 SDK-based architecture - Remove PADDLEOCR_MCP_SERVER_URL for aistudio mode (SDK has built-in default) - Add optional PADDLEOCR_MCP_BASE_URL for custom AI Studio base URL - Update parameter reference table * Update code * fix(mcp): fix AIStudioExecutor SDK integration - Use PPStructureV3Options for PP-StructureV3 pipeline - Use PaddleOCRVLOptions for PaddleOCR-VL series - Fix DocParsingPage attribute names (markdown_text, markdown_images) * refactor(mcp): rename layout to doc_parsing - Rename layout.py to doc_parsing.py - Rename LayoutParsingCapability to DocParsingCapability - Rename _parse_layout_response_http to _parse_doc_parsing_response_http - Rename _parse_layout_result to _parse_doc_parsing_result - Remove file path comments from all Python files * docs(mcp): make DocParsingCapability docstring more generic - Change from listing specific pipelines to "e.g." style - Make tool_name description more generic for future extensibility * remove unused files * docs(mcp): update terminology and remove obsolete URL configuration - Change '工作模式' to '推理方式' / 'Inference methods' - Unify with SDK docs: use '官方 API' / 'Official API' - Update options: 本地推理、官方API、千帆API、自建API - Remove obsolete manual URL configuration (SDK has built-in defaults) - Update token acquisition instructions * docs(mcp): unify English doc terminology - working modes/mode → inference methods/method/API - Update TOC: 'Working Modes Explained' → 'Inference Methods' - Change 'Mode 1: Local Python Library' → 'Method 1: Local Inference' - Update parameter table: 'mode' → 'source', 'service' → 'API' - 'local Python library' → 'local inference' - 'PaddleOCR official service' → 'Official API' - 'Qianfan platform service' → 'Qianfan API' - 'self-hosted service' → 'Self-hosted API' - Update example command comments - Update 'Local mode' → 'Local Inference' in uvx section - Update Known Limitations section * fix(mcp): correct inaccuracies and unify terminology in docs and code - Remove incorrect Qianfan pipeline validation (OCR is supported) - Fix broken anchor link in Chinese doc 2.4 section - Unify Chinese doc terminology: - 千帆平台服务/自托管服务 → 千帆 API/自建 API - PaddleOCR 官方服务 → 官方 API - 本地 Python 库模式 → 本地推理 - 模式/方式 → 推理方式 - Fix Chinese doc numbered list error (5 → 4) - Remove incorrect Qianfan pipeline limitation note from English doc - Update example command comments to use consistent terminology * docs(mcp): simplify pipeline documentation and remove hardcoded lists - Replace Chinese docstrings with English in base.py - Remove hardcoded pipeline enumeration from AIStudioExecutor docstring - Simplify pipeline table: merge PaddleOCR-VL series into single entry - Add 'etc.' to parameter options to indicate extensibility * Fix bugs * refactor(mcp): let SDK use service-side defaults - Remove hardcoded parameter defaults (use_doc_orientation_classify=False, etc.) - Only set visualize=False (MCP tool never returns visualizations) - Pass-through all optional parameters from user options dict - This allows server-side optimizations and better future compatibility * feat(mcp): add reasonable default options - All pipelines: use_doc_orientation_classify=False, use_doc_unwarping=False - PP-StructureV3: use_chart_recognition=True - PaddleOCR-VL series: use_chart_recognition=True, use_seal_recognition=True - Users can override these defaults via options dict * refactor(mcp): move default options to MCPCapability - Move default options from AIStudioExecutor to MCPCapability._process - All executors now receive same default behavior via capability layer - User options override defaults - Add pipeline parameter to MCPCapability and subclasses * refactor(mcp): redesign capabilities as pipeline-level classes - MCPCapability: add PIPELINE class attribute, remove constructor param - BaseDocParsingCapability: new base class for doc parsing pipelines - PPStructureV3Capability: dedicated class for PP-StructureV3 - PaddleOCRVLCapability: handles PaddleOCR-VL series with pipeline param - OCRCapability: define PIPELINE as class attribute - Remove old DocParsingCapability (replaced by specific classes) - Factory simplified: no need to pass pipeline to constructors * refactor(mcp): use method for default options instead of hardcoded logic - MCPCapability: add DEFAULT_OPTIONS constant and get_default_options method - BaseDocParsingCapability: override get_default_options for chart recognition - PaddleOCRVLCapability: override get_default_options for seal recognition - Move default logic from hardcoded if/else to method inheritance - PaddleOCRVLCapability: set PIPELINE dynamically in __init__ * Big refactor * Fix bugs * Remove tests * Remove unused comments * Fix doc bugs --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> |
||
|
|
d4b5b09865 |
docs(serving): document returnMarkdownImages and image URL return mode (#18060)
* docs(serving): document returnMarkdownImages and image URL return mode
Mirror the PaddleX-side schema change in the version3.x VL and
PP-StructureV3 docs (zh/en):
- Add returnMarkdownImages to the request parameter tables (both VL
endpoints).
- Note that markdown.images is "null or omitted" when the flag is false
— PaddleX serving uses response_model_exclude_none, so the field is
actually absent rather than explicitly null.
- Above each LayoutParsingResult element schema, add a one-paragraph
note explaining that response image fields (outputImages, inputImage,
markdown.images) switch from base64 strings to pre-signed URLs when
the server is configured to return URLs.
Also add an image-URL-return-mode section to docs/version3.x/deployment/
serving.{md,en.md}, which previously did not explain how to configure
the server to return images as pre-signed BOS URLs instead of inline
base64.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): address review feedback on URL-return scope and field descriptions
Refining the docs added in the previous commit based on review feedback
on this PR (#18060):
- Response field descriptions for outputImages, inputImage, exports, and
markdown.images previously hard-coded "Base64-encoded". They now read
"Base64 by default; pre-signed URL when URL-return mode is enabled"
(or the zh equivalent), so the field-level descriptions match what the
server actually returns once return_img_urls is enabled.
- The URL-return section in docs/version3.x/deployment/serving.{md,
en.md} is renamed from "Returning Images as URLs" to "Returning
Response Files as URLs" and now covers exports (docx, ...) — the same
return_urls / file_storage chain is used by build_pipeline_exports,
so the previous image-only framing was misleading. A note also points
out that the configuration key is historically named return_img_urls
but currently controls every Base64-inlined file field in the
response, not just images.
- BOS configuration wording is aligned with the existing PaddleOCR-VL.md
guidance: ak/sk are no longer expanded to "Access Key" / "Secret Key"
(those expansions are not the Baidu Cloud terminology), and the
section now links to the official Baidu Intelligent Cloud BOS docs.
- The preamble above each LayoutParsingResult element schema in the VL
and PP-StructureV3 pipeline docs (zh/en) is updated from "image
fields" to "image and file fields", lists exports alongside the image
fields, and points to the renamed serving section.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): align BOS AK/SK wording with PaddleOCR-VL
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): generalize return-URL section in PaddleOCR-VL pipeline doc
Broaden the section from image-only to all binary response content (images and exported files such as docx), and align the title with the serving deployment doc. Config field and YAML are unchanged.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): note URL-return mode in remaining OCR pipeline schemas
Add the reference-style URL-return note (pointing at the serving deployment doc's "以 URL 形式返回响应文件" section) to the serving response schemas of OCR, formula_recognition, seal_recognition, table_recognition_v2, PP-ChatOCRv4, and PP-DocTranslation, matching PP-StructureV3. Binary fields that fall back to Base64 are annotated as becoming pre-signed URLs when URL-return mode is on.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): broaden VL URL-return config section beyond images
The §4.4.2 'Configure ... URLs' config example still framed URL return as
image-only ('配置返回图像 URL', visualization/Markdown images). return_urls
covers all Base64-inlined response fields (outputImages, inputImage,
markdown.images, and exports), so reword the title/scope to match the
response-field note above it and the serving guide section. Review feedback.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): rename URL-return section to 二进制内容 / Binary Content
Per review r3308333339: the section covers returning binary response
content (images and files such as exports) as URLs, so rename the title
from '响应文件 / Response Files' to '二进制内容 / Binary Content' and update
all cross-references (and the VL config subsection) to match.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
* docs(serving): address URL-return review feedback
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
---------
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
|
||
|
|
9f704bc6ab |
refactor(skills): simplify skills to use PaddleOCR CLI directly (#18090)
* refactor(skills): simplify skills to use PaddleOCR CLI directly Simplify PaddleOCR Skills by removing custom scripts and using the official `paddleocr api` CLI directly. This reduces maintenance burden and aligns with the 3.6.0 release which includes async API support. **Changes:** - Remove scripts/ and references/ directories from both skills - Rewrite SKILL.md files to document CLI usage - Update environment variables from PADDLEOCR_OCR_API_URL / PADDLEOCR_DOC_PARSING_API_URL to PADDLEOCR_BASE_URL (optional) - Update skills.md and skills.en.md documentation **Environment Variables:** - Required: PADDLEOCR_ACCESS_TOKEN - Optional: PADDLEOCR_BASE_URL (defaults to official service) **Installation:** Users now install PaddleOCR 3.6.0+ and use the CLI directly: pip install "paddleocr>=3.6.0" paddleocr api --model_type ocr --file_url "..." * fix: add missing newline at end of SKILL.md * Fix and polish --------- Co-authored-by: Bobholamovic <bob1998425@hotmail.com> |
||
|
|
4205657795 | add PaddleOCR-VL-1.6 docs (#18095) | ||
|
|
f30379406a |
docs: make GitHub source links version aware (#18080)
* docs: make GitHub source links version aware Co-authored-by: Cursor <cursoragent@cursor.com> * Update dockerfile --------- Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
d1d7504b17 |
Fix docs anchor links (#18073)
Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
edb8d09f1b |
docs(serving): sync return_img_urls -> Serving.return_urls rename (#18067)
Mirrors the schema change in PaddleX (Serving.extra.return_img_urls
deprecated in favor of top-level Serving.return_urls). Updates the BOS
config yaml in PaddleOCR-VL.{md,en.md} only — old key still works via
backcompat shim, so no urgent action needed for downstream users.
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
|
||
|
|
74bdc41608 |
feat: add multi-language API SDK (Python/Go/TypeScript) (#18049)
* feat: add multi-language API SDK for PaddleOCR async API Add Python/Go/TypeScript SDKs that wrap the PaddleOCR async job API (submit → poll → fetch result) into simple blocking interfaces. Python SDK: - Integrated into paddleocr/_api_client/ as internal subpackage - APIClient (sync) + AsyncAPIClient (asyncio) dual interfaces - CLI subcommand: paddleocr api --model_type ocr/doc_parsing - Supports PP-OCRv5, PP-StructureV3, PaddleOCR-VL, PaddleOCR-VL-1.5 Go SDK (api_sdk/go/): - Zero dependencies (stdlib only) - Functional options pattern + context.Context cancellation - Operation object with Wait(ctx)/Poll(ctx) methods TypeScript SDK (api_sdk/typescript/): - Zero dependencies (native fetch, Node>=18) - AbortSignal cancellation support - ESM + CJS dual output All SDKs share: - Exponential backoff polling (3s initial, 1.5x, 15s max, configurable timeout) - Typed error hierarchy (Auth/API/JobFailed/Timeout/Network/FileNotFound) - URL and local file upload support - Convenience methods + manual control (submit/wait/poll) interfaces * fix: address PR review feedback - Rename PaddleOCRError to PaddleOCRAPIError across all three SDKs - Replace custom FileNotFoundError with Python builtin in Python SDK - Expand OCROptions/DocParsingOptions with all API parameters (Python/Go/TS) - CLI: use Model enum values instead of hardcoded strings - CLI: allow --model for both ocr and doc_parsing tasks - Update license header year to 2026 - Simplify TypeScript defaultPayload to empty object * fix: harden multi-language API SDK Co-authored-by: Cursor <cursoragent@cursor.com> * fix(sdk): jsonl fetch without auth, poll timeout, abort parity Co-authored-by: Cursor <cursoragent@cursor.com> * feat: harden PaddleOCR official API SDK Align Python, TypeScript, and Go SDKs around typed jobs, model-aware document parsing, request/poll timeouts, strict errors, resource saving, and integrated release docs for the PaddleOCR official API. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: complete API SDK remediation and default doc parsing to PaddleOCR-VL-1.5 Consolidate SDK hardening, docs, tests, and cross-language default model behavior for document parsing. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix bugs * Fix bugs and optimize sdks * Fix bugs * Fix bugs * Update skills * Fix bugs * Update docs * Fix docs * Fix doc * Fix --------- Co-authored-by: Bobholamovic <bob1998425@hotmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
5e16cb361f | Support multi-page tiff serving (#18048) | ||
|
|
1903e73d52 |
Update description for relevel_titles parameter (#18014)
* Update description for relevel_titles parameter typo * Update meaning for relevel_titles parameter typo |
||
|
|
4f34817f53 |
[Docs] Split data annotation nav from synthesis & datasets (#18032)
* [Docs] Split data annotation nav from synthesis & datasets Splits the prior "数据标注与合成&数据集" nav entry into two siblings: - 数据标注: X-AnyLabeling 文档解析 + 其它数据标注工具 - 数据合成 & 数据集: 其它数据合成工具 + dataset pages Folds the two links from data_anno_synth/overview.md into data_annotation.md (PPOCRLabel) and data_synthesis.md (Style-Text), then removes overview.md and its English counterpart. Updates i18n translation table accordingly. Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Reunify data annotation/synthesis/datasets under one tab Reverts the prior split and instead keeps a single top-level tab "数据标注与合成&数据集" with three nested sections — 数据标注, 数据合成, 数据集 — to group related pages without forcing readers into separate tabs. Enables the navigation.sections theme feature so the inner sections render as non-collapsible group headers in the sidebar. Also drops the "其它" prefix from 数据合成工具 since it is now the sole entry under 数据合成. Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> --------- Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> |
||
|
|
058b89b5e7 |
[Docs] Add X-AnyLabeling annotation guide for PaddleOCR-VL (#18016)
* [Docs] Add X-AnyLabeling annotation guide for PaddleOCR-VL Add a new top-level "数据标注 / Data Annotation" section under the mkdocs nav, placed before "多硬件使用 / Multi-Devices Usage", with a bilingual guide for using X-AnyLabeling with PaddleOCR-VL-1.5 via the official API. - docs/data_anno_synth/x_anylabeling.md (Chinese) - docs/data_anno_synth/x_anylabeling.en.md (English) - mkdocs.yml: new nav entry and i18n translations Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Address review comments on X-AnyLabeling guide - Reframe intro with PaddleOCR-VL-1.5 as the subject; X-AnyLabeling is presented as the integration partner. - Drop the misleading "并从源码启动" clause from the pip install alternative (Chinese only; the English version was already correct). - Update the API_KEY acquisition flow to the official PaddleOCR site www.paddleocr.com (right-corner API → PaddleOCR-VL-1.5 → copy TOKEN). Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Remove time-sensitive challenge references from X-AnyLabeling guide Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Clarify model switching between PaddleOCR-VL and PaddleOCR-VL-1.5 Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Add screenshots to X-AnyLabeling guide Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Add toolbar selection screenshot to X-AnyLabeling guide Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Refine X-AnyLabeling guide screenshots with annotations Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Move X-AnyLabeling screenshots to image host; refine wording - Move 6 screenshots out of the PaddleOCR repo and reference them via cuicheng01/PaddleX_doc_images, per reviewer feedback (avoids binary bloat in the doc repo). See PaddleX_doc_images PR for the upload. - Drop "智能文字识别 / OCR" from the doc title and intro tagline; the guide focuses on document/layout parsing. - Generalize references from PaddleOCR-VL-1.5 to the PaddleOCR-VL series so the doc does not silently rot when a newer version ships. - Section 4: replace the "latest version" blurb for PaddleOCR-VL-1.5 with concrete capability points (OmniDocBench v1.5 94.5%, polygon localization, robustness across scanning/tilt/curving/screen-capture/ complex-lighting, seal + text detection capabilities). - mkdocs.yml: update nav title and i18n entry to match. Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * [Docs] Update PaddleOCR website link in references to www.paddleocr.com Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> --------- Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> Co-authored-by: Lin Manhui <mhlin425@whu.edu.cn> |
||
|
|
4d653b148a |
Fix docs links from link checker report (#18011)
Co-authored-by: tdashelby-cmyk <253610080+tdashelby-cmyk@users.noreply.github.com> |
||
|
|
999ce37841 |
Docs: fix the url of image and change the url of gpu to Nvidia-gpu (#18009)
* docs: fix process step descriptions in PaddleOCR-VL documentation * test: why? * docs: fix incorrect change * restore .gitignore |
||
|
|
0835767eeb |
Fix docs (#17952)
* Fix pipeline dockerfile * Fix OCR doc * Fix paddleocr-vl doc * docs: lock PaddleOCR-VL routing support truth * docs: replace PaddleOCR-VL global route with hardware entry Made-with: Cursor * docs: localize workflow routing in English VL hardware guides Made-with: Cursor * docs: localize workflow routing in Chinese VL hardware guides * docs: fix Ascend and Intel Arc routing exceptions Made-with: Cursor * docs: record PaddleOCR-VL routing validation Capture the final structural, artifact, and walkthrough checks for the routing rewrite, including the Ascend and Intel Arc exception consistency validation. Made-with: Cursor * docs: refine PaddleOCR-VL routing validation Make the Ascend and Intel Arc exception evidence explicitly bilingual and record the targeted cross-guide link and anchor sanity checks for the new routing paths. Made-with: Cursor * Update PaddleOCR-VL docs * Reset paramter list * Fix doc * Fix doc * Fix bug * Fix bug * 英伟达->NVIDIA * Update docs * Add illustration figure Co-authored-by: alialiaaa0712-cell <alialiaaa0712@gmail.com> * support structurev3 inference with transformers * update * Update docs/version3.x/inference_engine.md Co-authored-by: Bvicii <98971614+scyyh11@users.noreply.github.com> --------- Co-authored-by: alialiaaa0712-cell <alialiaaa0712@gmail.com> Co-authored-by: zhangyue66 <zhangyue66@baidu.com> Co-authored-by: Bvicii <98971614+scyyh11@users.noreply.github.com> |
||
|
|
6ad50d824a |
docs(PaddleOCR-VL): describe manual-install Python range as the verified range (#17936)
Reword the repeated PaddleOCR-VL manual-install Python version sentence so it describes 3.9-3.13 as the documented verification range rather than as a hard "required" statement, applied consistently across the main PaddleOCR-VL guide and all hardware variants (EN and ZH). This keeps the docs conservative without expanding the official support promise, while staying aligned with the 3.9-3.13 lower-bound bump from PR #17954. Fixes #17935 |
||
|
|
09e8700fe6 |
ci,docs: align PaddleX install branch and document py3.8 extras boundary (#17954)
* ci,docs: align PaddleX install branch and document py3.8 extras boundary - CI: derive the PaddleX install branch from the paddlex constraint in pyproject.toml (release/X.Y) so PR/GPU tests stay in sync as the paddleocr series advances; apply to both tests.yml and test_gpu.yml - CI: install only paddleocr[doc2md] on py3.8 since several paddlex transitive deps require py3.9+; add a py38_incompatible pytest marker and gate affected tests behind it - CI: pin paddlepaddle==3.0.0 on py3.8 / 3.1.0 on py3.9+ (match GPU CI) - CI: standardize workflow filenames (.yaml -> .yml, dashes -> underscores) - deps: pin lmdb<1.5 on py3.8 (newer lmdb wheels reference Py_SET_REFCNT, a py3.9 stdlib C API) - docs: note Python 3.8+ for base paddleocr/doc2md; py3.9+ for doc-parser/ie/trans/all extras (safetensors>=0.7 dropped py3.8) - docs: update PaddleOCR-VL manual-install Python range to 3.9-3.13 across all hardware variants (VL pipelines use doc-parser) - tests: tag tests that require py3.9+ extras/deps with py38_incompatible Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> * ci: mark /workspace as git safe.directory in GPU runner setuptools_scm runs git to derive the package version during pip install -e .; inside the GPU CI container /workspace is owned by the host user, which trips git's dubious-ownership check and aborts the paddleocr install. Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> --------- Signed-off-by: Bvicii <yizhanhuang2002@gmail.com> |
||
|
|
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: |
||
|
|
a96f1371be |
docs: fix broken Chinese anchor in skills.md (#17945)
The default mkdocs toc slugifier strips Chinese characters, so the
heading `## 配置环境变量` does not produce the anchor `#配置环境变量`
that is referenced later in the same file. This makes the anchor-link
CI check fail in strict mode.
Add an explicit attr_list id to the heading, matching the pattern
already used elsewhere in the docs (e.g. `{#五推理引擎}`).
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
|
||
|
|
d9dce42d0e | [Docs] Update README and skill docs (#17944) | ||
|
|
1fc8b98180 |
[Feat] PaddleOCR.js (#17861)
* chore: import paddleocr-js subproject skeleton Made-with: Cursor * refactor: rename internal paddleocr-js workspaces Made-with: Cursor * fix: remove stale paddleocr-js workspace lock entries Made-with: Cursor * docs: rewrite paddleocr-js subproject docs Made-with: Cursor * test: fix ocr shared lint regression Made-with: Cursor * chore: add low-coupling paddleocr-js host integration Made-with: Cursor * Update docs * Add langchain-paddleocr to skip gpu condition * Skip subprojects * Update lock * docs(paddleocr-js): add TypeScript migration design spec Made-with: Cursor * docs(paddleocr-js): add TypeScript migration implementation plan Made-with: Cursor * build(paddleocr-js): add TypeScript toolchain and build infrastructure Set up the TypeScript migration foundation: - Add TypeScript, vite-plugin-dts, and type definitions as devDependencies - Create tsconfig.json files (core, test, root project references) - Configure Vite library build with ES/CJS/UMD outputs and .d.ts generation - Update package.json entry points from src/ to dist/ with proper exports map - Replace plain JS ESLint config with typescript-eslint strict type-checked rules - Update Vitest coverage to target .ts files - Add typecheck script, engines, keywords across workspace packages Made-with: Cursor * fix(paddleocr-js): exclude config files from strict TS lint, reorder exports types-first Made-with: Cursor * refactor(paddleocr-js): add third-party type declarations for clipper-lib and opencv Minimal .d.ts files covering only the APIs actually used by the project. Made-with: Cursor * refactor(paddleocr-js): convert Layer 0-1 modules to TypeScript Converts utils/common, worker/protocol, pipelines/ocr/default-config, pipelines/ocr/runtime-params, runtime/opencv, runtime/ort, runtime/index, and models/common from .js to .ts with full type annotations. Made-with: Cursor * refactor(paddleocr-js): convert Layer 2 modules to TypeScript Converts models/det, models/rec, models/index, resources/tar, resources/cache, resources/registry, resources/standard-model, resources/index, platform/browser, and platform/worker from .js to .ts with interfaces for all model configs, results, and platform types. Made-with: Cursor * refactor(paddleocr-js): convert Layer 3-4 modules to TypeScript Converts worker/client, worker/entry, pipelines/ocr/config, pipelines/ocr/shared, pipelines/ocr/core, pipelines/ocr/worker-backed, and pipelines/ocr/worker-entry from .js to .ts with full type annotations for pipeline options, results, and initialization state. Made-with: Cursor * refactor(paddleocr-js): convert Layer 5 modules to TypeScript and add types/index.ts Converts pipelines/ocr/index, pipelines/index, and src/index from .js to .ts. Creates src/types/index.ts re-exporting all public-facing types. Fixes all TypeScript errors (strict mode + verbatimModuleSyntax clean). Made-with: Cursor * refactor(paddleocr-js): convert test files to TypeScript - Renamed all 29 test files from .js to .ts - Added type annotations to test helpers and mocks - Fixed barrel import in core.ts to maintain mock interceptability - Restored createWorker: null in resolveWorkerOptions for API contract - Updated public-api test to import from source directly All 154 tests pass. Made-with: Cursor * fix(paddleocr-js): fix Vite build worker format and demo alias - Add worker.format: 'es' to core vite config (fixes UMD build conflict) - Add resolve alias in demo vite config to resolve paddleocr-js to source Made-with: Cursor * fix(paddleocr-js): resolve all ESLint strict type-checked errors - Remove unnecessary optional chains, type assertions, and type conversions - Remove unused type imports - Fix floating promises, non-Error throws, and catch variable types - Widen SourceToMatFn to accept sync or async returns - Update tests to match sync dispose() and sourcePayloadToMat() 96 lint errors -> 0. All 154 tests pass. Made-with: Cursor * Update docs * Remove AI docs * Update node version bound * Polish typing * Fix bugs * Fix doc * Rename paddleocr-js to @paddleocr/paddleocr-js * FIx CI * Fix CI bug * Fix git workflow * Add viz utility design spec for paddleocr-js Design document for an optional visualization module exported via @paddleocr/paddleocr-js/viz subpath. Renders side-by-side composite images (source + detection boxes | white panel + recognized text) with custom font support and Blob export for browser download. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(viz): add implementation plan for viz utility 11-task TDD plan covering types, color generation, canvas factory, font management, box drawing, text drawing, side-by-side assembly, OcrVisualizer class, subpath entry, build config, and final check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(viz): add foundational types for viz utility Define RgbColor, FontConfig, BoxStyleOptions, and OcrVisualizerOptions interfaces that will be shared across all viz module files. Include type-level test coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(viz): add deterministic color generation via LCG Extract the Linear Congruential Generator color function from the demo app into the core viz utility so all consumers produce visually consistent box colors for the same detection index. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add canvas factory abstraction for viz module Provides createCanvas, getContext2D, and canvasToBlob that abstract over OffscreenCanvas vs HTMLCanvasElement differences, enabling the viz module to work in both main-thread and web worker contexts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add font management utilities for viz (Task 4) Implement loadFontFace/removeFontFace wrappers around the browser FontFace API, with full test coverage using jsdom mocks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add draw-boxes panel for viz module (Task 5) Draws the left panel of the side-by-side OCR visualization: source image overlaid with colored detection box polygons. Uses save/restore for clean state management and supports custom color functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(viz): add right-panel text drawing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(viz): add side-by-side composite assembly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(viz): add OcrVisualizer class and renderOcrToBlob Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(viz): add subpath entry point and public exports Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * build(viz): add viz subpath entry to Vite build and package.json exports Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(viz): fix lint and formatting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(viz): update demo app and docs for viz module - Replace demo's local deterministicColor with viz module import - Add "Download Result" button to demo using OcrVisualizer.toBlob() - Document viz subpath in README.md and README_cn.md - Add viz to Package Layout and API sections Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: improve viz module, core SDK internals, and test coverage - Refine draw-boxes rendering and font loading in viz module - Improve type exports and internal module organization across models, pipelines, resources, runtime, platform, and worker layers - Update test suite for cache, models, pipeline, runtime, worker-backed, and worker-client modules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: fix documentation accuracy across 6 files and add changeset - Move visualization section before API reference in SDK READMEs (EN/CN) - Add deterministicColor usage description to viz docs - Add src/viz, src/types, src/utils to package layout sections - Fix ESLint rule level: test files use recommendedTypeChecked - Remove non-existent index.umd.js; add viz.mjs/viz.cjs to build outputs - Correct worker WASM inflation size from ~78 MB to ~50 MB - Add changeset for 0.2.0 minor release Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: release @paddleocr/paddleocr-js v0.2.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add paths mapping to tsconfig.eslint.json and demo tsconfig Add @paddleocr/paddleocr-js and @paddleocr/paddleocr-js/viz paths to tsconfig.eslint.json so IDE ESLint can resolve SDK types without depending on workspace symlinks. Also add the viz subpath mapping to apps/demo/tsconfig.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add viz subpath alias to demo Vite dev config Vite resolve.alias needs an explicit entry for the viz subpath — tsconfig paths only affect TypeScript, not Vite's module resolution. The more specific path is listed first to avoid prefix matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(demo): replace canvas rendering with viz module side-by-side output Use OcrVisualizer.toBlob() to render detection boxes and recognized text as a composite image displayed via <img>, replacing the manual canvas drawing and removing the Download Result button. Configure PingFang SC font from CDN for proper CJK text rendering in visualizations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix bugs * Remove superpowers docs * Fix bugs * Fix bug * Refactor * Fix bugs * refactor: move cropByPoly from models/det to pipelines/ocr/crop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: unify DetModel interface to predict(cv, mats, overrides) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: unify RecModel interface to predict(cv, mats, overrides) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: restructure getOcrRuntimeParams return into { det, rec, pipeline } Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: simplify OcrPipelineRunner.predict to pure orchestration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Refactor * Fix code style * Fix and update * Fix and update * Bump to 0.3.0 * Remove v6 * Bump to v0.3.1 * Fix default paramter * variant -> preset * Add to mkdocs * Update docs and add license headers * Remove unused --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
0715ed937d |
feat: support to convert office document (docx/xlsx/pptx) to Markdown (#17884)
* feat: integrate Any2MD as paddleocr._doc2md for office document conversion Add `paddleocr/_doc2md/` subpackage that converts .docx/.xlsx/.pptx to Markdown directly, without requiring OCR. Features include heading detection, list/table handling, merged cells, and image extraction. - New `paddleocr/_doc2md/` subpackage adapted from Any2MD source - CLI subcommand `paddleocr doc2md -i <file> [-o <output>] [--formats]` - Python API: `doc2md_convert`, `doc2md_convert_bytes`, `doc2md_supported_formats` - Optional dependency group `doc2md` in pyproject.toml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: clean up doc2md integration based on code review - Fix eager import: doc2md_convert/convert_bytes/supported_formats are now lazy wrappers so importing paddleocr does not load docx/pptx/xlsx deps - Translate remaining Chinese strings in _cli.py (docstring, help text, log messages) to English - Add missing --input validation in doc2md CLI (clear error instead of crash) - Remove duplicate `import time` and inline `from pathlib import Path` from _execute_doc2md - Extract _merge_runs() helper to eliminate duplicate run-merging logic shared by _runs_to_markdown and _runs_to_html in converters/docx.py - Change output encoding from utf-8-sig to utf-8 (consistent with the rest of PaddleOCR) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: replace custom exception classes with Python built-ins in _doc2md PaddleOCR convention uses Python built-in exceptions directly rather than defining custom exception hierarchies. Align _doc2md with this convention: - Remove exceptions.py and the Any2MDError / UnsupportedFormatError / ConversionError custom classes - UnsupportedFormatError -> ValueError (invalid input argument) - ConversionError -> RuntimeError (runtime failure, matches how DependencyError is wrapped in _pipelines/base.py) - Update all raise/except/import sites across registry.py, core.py, and converters/docx.py, pptx.py, xlsx.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: remove convert_bytes from _doc2md convert_bytes has no callers in the current codebase (CLI and Python API both use convert()). Internally it wrote to a temp file anyway since the underlying libraries only accept file paths, so it provided no real benefit. - Remove convert_bytes() from core.py - Remove BaseConverter.convert_bytes() from base.py - Remove doc2md_convert_bytes from paddleocr.__init__ and __all__ - Remove from _doc2md/__init__.py exports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: remove .xls support from XlsxConverter openpyxl only supports .xlsx (OOXML format), not .xls (legacy BIFF binary format). Registering .xls caused confusing openpyxl internal errors instead of a clear "unsupported format" message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: narrow exception catch to ImportError in converter __init__ Catching bare Exception silently hides bugs (SyntaxError, NameError, etc.) in converter modules. Only ImportError (and its subclass ModuleNotFoundError) should be suppressed, as the intent is to handle missing optional dependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: add Apache 2.0 license header to all _doc2md modules Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add hyperlink support to docx/xlsx/pptx converters - docx: add _escape_md_url, _parse_field_hyperlinks (w:fldChar state machine), _iter_paragraph_items; extend _merge_runs/_runs_to_markdown/_runs_to_html to carry URL and emit [text](url) / <a href> accordingly - xlsx: wrap cell text in <a href> when cell.hyperlink.target is present - pptx: add _escape_md_url; iterate runs in TextFrame and table cells to emit [text](url) in lists and <a href> in HTML tables Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add underline and strikethrough support to docx/pptx/xlsx converters - docx: extend run tuple from 4-tuple to 6-tuple (bold, italic, underline, strikethrough, text, url); render underline as <u> and strikethrough as ~~ in Markdown, <u>/<del> in HTML tables; suppress hyperlink underline to avoid Word's default Hyperlink style false-positives - pptx: add bold/italic/underline/strikethrough rendering in TextFrame and table cells; read strike via XML (a:rPr/@a:strike) since python-pptx Font has no .strike attribute - xlsx: wrap cell text with <b>/<i>/<u>/<del> from cell.font before hyperlink Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add OMML math formula (LaTeX) support to docx and pptx converters - Add paddleocr/_doc2md/math/ module with OMML→LaTeX converter (omml.py, latex_dict.py) - docx.py: detect and convert m:oMath elements to inline ($...$) and display ($$...$$) LaTeX - pptx.py: detect and convert a14:m/m:oMath elements in text frames, tables, and mc:AlternateContent blocks - pyproject.toml: add pylatexenc>=2.10,<3 to doc2md optional dependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add TOC rendering with multi-generation anchor support to docx converter - Extract TOC paragraphs (styles "TOC 1"–"TOC 9", "table of figures") into a buffered list and render them as a Markdown nested list before the first non-TOC paragraph. - TOC entry links are extracted via w:hyperlink[@w:anchor] or PAGEREF field instructions (_extract_toc_anchor). - Body headings emit <a id="..."> tags for ALL _Toc bookmarks found, not just the first. This handles documents where multiple TOC sections (main, figure, table) were updated at different times and therefore reference different generations of _Toc bookmarks on the same heading. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add textbox extraction to docx converter and expose converter kwargs via CLI - docx: extract text box content (mc:AlternateContent/wps:txbx) as blockquotes, controlled by extract_textboxes kwarg (default True) - cli: add --no-textboxes, --sheet-name, --max-rows flags to doc2md subcommand, transparently forwarded to the underlying converter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add header/footer extraction to docx converter Extract page headers and footers from all document sections, deduplicate content, filter page-number-only text, and output headers at document top and footers after a horizontal rule. Supports extract_headers_footers=False kwarg and --no-headers-footers CLI flag to skip extraction. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: preserve pure-whitespace underline runs as fill-in lines in docx converter Pure whitespace text with underline formatting (common Word fill-in line pattern) was silently dropped because inner.strip() == "" caused the underline wrapper to be skipped. Now renders as <u> ... </u> using NBSP to preserve visual width in Markdown renderers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: use tblHeader XML flag to determine table header rows instead of hardcoding first row as <th> Single-row tables (e.g. fixed-content rows) were incorrectly rendered as <th> causing unintended bold styling. Now checks w:tblHeader element first; falls back to first-row heuristic only for multi-row tables. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: inherit paragraph style bold/italic/underline when run-level format is unset Add _effective_bold/italic/underline() helpers that resolve the effective format by walking the inheritance chain: run-level > character style > paragraph style. Replace all bool(run.bold/italic/underline) call sites with these helpers. Fixes Caption-style paragraphs (and other styled paragraphs) whose runs carry no direct formatting but inherit bold/italic/underline from the paragraph style — previously rendered as plain text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: preserve pure-whitespace underline runs as fill-in lines in pptx converter Same fix as commit 7255b2e for docx: pure whitespace text with underline format was stripped to empty string and discarded. Now replaced with NBSP characters wrapped in <u> to preserve fill-in line width. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: handle soft line breaks (<w:br/>) in docx and pptx converters Split runs containing \n (from Shift+Enter / <w:br/>) into per-line items with <br> separators, so CommonMark does not collapse them into continuous text. Also fixes cross-line bold/italic markers that would otherwise be invalid Markdown. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * style: add newline after <br> in soft line breaks for Markdown readability 普通段落中每个 <br> 标签后附加真实换行符,让 Markdown 源码多行可读; heading 和列表项路径回退为 <br>(无 \n),避免 CommonMark 解析异常。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: map Word Title/Subtitle styles to H1/H2 in docx converter Word built-in "Title" and "Subtitle" paragraph styles were not recognized as headings, causing documents with these styles to lose their top-level heading structure. Map Title → H1 and Subtitle → H2 alongside the existing Heading N detection logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add superscript/subscript support in xlsx converter Read cell.font.vertAlign via openpyxl and wrap cell text with <sup> or <sub> tags when the value is 'superscript' or 'subscript'. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: use val axis title as series header fallback in chart tables When a chart series has no <c:tx> element, the series column header was rendered as empty <th></th>. Now falls back to the value axis title (e.g. "下载量") so the header carries semantic meaning. Also omits <thead> entirely when neither axis titles nor series names provide any header content, avoiding rows of empty <th> tags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add superscript/subscript support in pptx converter Detect DrawingML baseline attribute on <a:rPr>: positive value → <sup>, negative value → <sub>. Applies to both regular slide text and table cell content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: fix pptx chart type names, date axis conversion, and series header fallback - Fix _CHART_TYPE_NAMES dict to use actual XL_CHART_TYPE enum values (e.g. 51→Column Chart, -4120→Doughnut Chart instead of wrong mappings) - Convert Excel date serials to YYYY-MM-DD when chart has a dateAx element - Use valAx title as series name fallback when series.tx is None - Replace GFM Markdown table output with HTML <table> (per CLAUDE.md §6) - Rename _chart_to_md → _chart_to_html Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: remove redundant chart type label before HTML table in pptx chart output Chart title is already conveyed via <caption>; the "**Column Chart**" label is a leftover from the old GFM Markdown table approach and has no place in an HTML <table> output. Aligns with docx converter behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: remove injected Slide N metadata headers from pptx output Title shapes are now processed through the normal shape pipeline instead of being extracted and rendered as forced H2 headings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add xlsx drawing-layer math formula extraction and rename extract_textboxes to extract_drawings - xlsx: parse drawing XML via zipfile to extract OMML math formulas, output as $$ ... $$ blocks after the table (extract_drawings=True by default) - Rename extract_textboxes → extract_drawings across docx.py, xlsx.py, _cli.py to better reflect the shared semantics (textboxes in docx, drawing layer in xlsx) - CLI: --no-textboxes → --no-drawings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: fix duplicate math formula output caused by incorrect oMathPara dedup When structure is a14:m → oMathPara → oMath, the oMathPara loop was checking oMath's parent (oMathPara) instead of oMathPara's parent (a14:m), so the formula was emitted twice. Fix: skip oMathPara if its own parent is a14:m. Affects both pptx.py and xlsx.py _extract_math_from_paragraph. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: deduplicate OMML math helpers across docx/pptx/xlsx converters Extract shared DrawingML math functions (convert_omath, paragraph_has_math, extract_math_from_paragraph) into math/__init__.py and replace duplicates in pptx.py/xlsx.py with imports. In docx.py, merge _paragraph_math_to_markdown and _paragraph_math_to_html via shared _iter_math_paragraph_parts. Net -98 lines. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: promote constants/closures to module level and remove dead imports - docx.py: extract _WPD/_A/_R as module-level constants (eliminate per-call local defs in _extract_images_from_paragraph and _extract_chart_tables); remove duplicate WP local vars in _build_numbering_map/_get_list_info, use module-level _W instead; move Run/Hyperlink imports above loop in _iter_math_paragraph_parts - pptx.py: promote _A/_MC/_C namespaces and _CHART_TYPE_NAMES dict to module level; extract _classify_part and _format_run_segment as module-level functions (were per-call closures); move Picture/MSO_SHAPE_TYPE imports to convert_file; remove unused convert_omath and Emu imports - xlsx.py: remove unused convert_omath import Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: replace Chinese comments with English in docx and xlsx converters Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add doc2md user guide (Chinese) Add docs/version3.x/pipeline_usage/doc2md.md covering: - Feature overview with capability matrix for docx/xlsx/pptx - Quick start: installation, CLI usage, Python API - Per-format supported features - FAQ section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add doc2md user guide (English) Add docs/version3.x/pipeline_usage/doc2md.en.md, the English counterpart of doc2md.md, covering the same structure: feature overview, quick start (CLI + Python API), per-format supported features, and FAQ. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * doc: move * docs: add save_to_word() method to PP-StructureV3 and PaddleOCR-VL pipeline docs Add save_to_word() code example and method reference table entry to both Chinese and English versions of PP-StructureV3 and PaddleOCR-VL pipeline usage tutorials, syncing with PaddleX PR #5092. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
740a04dc4b |
[Feat] Add intel and amd docker images (#17710)
* Add intel and amd docker images * Optimize doc * Fix bugs * Enhance doc * Fix API ref links * Fix bug * Update dockerfile |
||
|
|
7d33035a6b | fix docs (#17881) | ||
|
|
daaf041492 |
add amd and intel support (#17743)
* add amd and intel support * update * update * update links * update links |
||
|
|
004e6031c7 | fix index.md (#17875) | ||
|
|
149cdaf317 | add PaddleOCR OCEAN (#17874) | ||
|
|
56165f7da6 |
Add Python 3.13 and 3.14 support (#17826)
* Add Python 3.13 support - Replace distutils imports with sysconfig/shutil/logging in ultra-infer setup - Replace pkg_resources with importlib.metadata in ultra-infer __init__ - Remove np.unicode_ usage (removed in NumPy 2.0, crashes on Python 3.13+) - Remove dead inspect.getargspec fallback (removed in 3.11) - Add python_requires=">=3.8" and Python 3.13 classifier to setup.py - Update Python version badges and docs from 3.8~3.12 to 3.8~3.13 - Pin PaddlePaddle to ==3.3.0 in install docs (first version with cp313 wheels) * CI: test Python bounds (3.8, 3.13) and revert HPI docs - CI matrix: test lower bound (3.8) and upper bound (3.13) per reviewer suggestion, with version-conditional PaddlePaddle install (3.2.0 for cp38, 3.3.0 for cp313) - Revert HPI docs to Python 3.8-3.12 since the package is separately compiled and does not yet support 3.13 * CI: add Python 3.9 to test matrix Test 3.9 as the lower bound for PaddlePaddle 3.3.0 (cp39-cp313). * Revert PaddlePaddle version bumps in docs due to 3.3.0 CPU inference bug Keep Python version range updates (3.8-3.13) but revert paddlepaddle install versions to their originals since 3.3.0 CPU native inference has a bug for paddleocr models. * Bump langchain-paddleocr version to 0.1.1 for Python 3.13+ support --------- Co-authored-by: Lin Manhui <mhlin425@whu.edu.cn> |
||
|
|
565c9cd6a3 |
fix typo in readme (#17788)
* Update PaddlePaddle version in installation guide Update installation instructions to reflect PaddlePaddle version 3.2.0. * Update installation output version to 3.2.0 --------- Co-authored-by: Lin Manhui <mhlin425@whu.edu.cn> |
||
|
|
acfd89b126 | update gguf url (#17779) | ||
|
|
d075f6ce31 |
Add CI check for broken anchor links in documentation (#17757)
Prevent regressions of broken anchor links by running `mkdocs build --strict` with anchor-only validation in CI. - Create mkdocs-ci.yml that inherits from mkdocs.yml with strict mode and `anchors: warn` (other link types demoted to info) - Add GitHub Actions workflow triggered on PRs touching docs - Add `enabled: !ENV [ENABLE_GIT_PLUGINS, true]` to git-committers and git-revision-date-localized plugins so CI can skip them - Add English translation of community_contribution.md with correct anchor links to code_and_doc.en.md |
||
|
|
e1e5c65315 |
fix(docs): correct broken anchor links across documentation (#17749)
mkdocs strips Chinese characters from heading anchor IDs, causing links with Chinese text in anchors to fail. For example, heading "## 2. 快速开始" generates anchor "#2" not "#2-快速开始". This fixes ~170 broken anchor links across 57 documentation files including PaddleOCR-VL guides, deployment docs, pipeline usage docs, and legacy v2.x docs. |
||
|
|
b6a561da6c |
[Feat] PaddleOCR-VL HPS Deployment (#17545)
* Add high-performance server * Update docs * Add error handling * Enhance gateway server * Record log IDs * [Feat] Add async gateway with concurrency support for HPS - Replace sync Triton client with async tritonclient.grpc.aio - Add FastAPI lifespan for proper client lifecycle management - Add asyncio.Semaphore for concurrency control - Enable multi-worker support in Uvicorn (configurable) - Add environment variable configuration (HPS_MAX_CONCURRENT_REQUESTS, HPS_INFERENCE_TIMEOUT, UVICORN_WORKERS, etc.) - Add /health/ready endpoint for Triton connectivity check - Add global exception handlers for standardized error responses - Update compose.yaml with configurable environment variables - Add .env.example with documented configuration options - Update README with architecture diagram, configuration guide, and troubleshooting section * [Docs] Remove unnecessary comments * [Feat] Add comprehensive error handling for HPS gateway - Add RequestValidationError handler (422) for malformed requests - Add JSONDecodeError handler (400) for invalid JSON payloads - All error responses use standardized AIStudio format * Update HPS README with configuration and troubleshooting guide * style: apply black formatting to gateway app * fix: address PR review comments for HPS gateway - Rename exception handlers with underscore prefix (not publicly exposed) - Simplify HTTP status code handling (trust underlying service alignment) - Fix architecture diagram alignment in README - Update gateway description to emphasize unified access point - Document rationale for HPS_MAX_CONCURRENT_REQUESTS default value of 16 * refactor: use paddlex-hps-client for Triton requests in gateway Remove duplicated Triton request logic and use triton_request_async from paddlex-hps-client library instead. This consolidates the Triton communication code in one place for easier maintenance. * feat(hps): add restructure-pages Triton Python backend model Add CPU-only Triton Python backend for restructure-pages operation: - model_repository/restructure-pages/config.pbtxt: Triton model config - model_repository/restructure-pages/1/model.py: Python backend using merge_tables_across_pages() and assign_levels_to_parsing_res() - tritonserver.Dockerfile: add build args for hardware flexibility (BASE_IMAGE, DEVICE_TYPE) and copy new model Schema changes are handled by PaddleX PR #4857. Gateway changes not needed (auto-registers from PRIMARY_OPERATIONS). TODO: Remove model_repository/restructure-pages once SDK includes it. * docs(hps): add restructure-pages API documentation - Update architecture section with Triton models table - Add API documentation for /restructure-pages endpoint * fix(hps): address PR review comments for gateway - Rename lifespan and HealthEndpointFilter to private (_prefix) - Add health check timeout with HPS_HEALTH_CHECK_TIMEOUT env var - Add model readiness check for layout-parsing and restructure-pages - Make health access log filtering configurable via HPS_FILTER_HEALTH_ACCESS_LOG - Fix README table alignment and update gateway description - Document new environment variables * fix(hps): change external logId log level from warning to debug External logId is a valid use case, not an error condition. * fix(hps): address PR #17545 review comments and upgrade to 3.4 - Extract model name constants to module top for reuse - Refactor generic _add_primary_operations into explicit endpoint handlers - Add VLM server readiness check to /health/ready endpoint - Add HPS_VLM_URL env var to compose.yaml, .env.example, and README - Upgrade SDK, base image, and dependencies to 3.4 - Update VLM server image to latest-nvidia-gpu for VL-1.5 - Remove local restructure-pages model, use v3.4 SDK builtin * feat(hps): separate concurrency control for GPU and CPU operations Use independent semaphores for GPU-bound (layout-parsing) and CPU-bound (restructure-pages) operations, allowing higher CPU concurrency without risking GPU overload. * style(hps): fix code formatting in gateway app * docs: add HPS high-performance deployment to PaddleOCR-VL tutorial Add method 3 (HPS) to the serving deployment section, documenting the FastAPI + Triton + vLLM architecture that supports concurrent requests for production use. Update section numbering and internal references. * fix(hps): address PR #17545 latest review comments - Rename GPU/CPU naming to inference/non-inference for hardware-agnostic extensibility (env vars, semaphores, docs) - Remove redundant "HPS" prefix from "高性能服务化部署" naming - Add single-request limitation notes to methods 1 & 2 - Simplify section 4.3 in PaddleOCR-VL docs to link to HPS README instead of duplicating content - Add English HPS README (README_en.md) and update PaddleOCR-VL.en.md with high-performance service deployment section * fix(hps): rename GPU_DEVICE_ID, simplify API docs, adjust doc structure - Rename GPU_DEVICE_ID to DEVICE_ID for hardware-agnostic extensibility - Replace GPU/CPU labels with inference/non-inference in Triton model table and architecture description - Simplify API section in HPS README: keep health check only, link to main tutorial for other API usage and pipeline configuration - Clarify dev section covers gateway only, needs Triton/VLM running - Restructure PaddleOCR-VL docs: keep original 2 methods, mention concurrent support separately with link to HPS README * docs: note single-request limitation upfront in service deployment overview * fix(hps): update readme and docs per review comments * fix(hps): split long sentence in service deployment overview * fix(hps): address PR #17545 latest review comments * fix(hps): separate env var note and add export example --------- Co-authored-by: Bobholamovic <bob1998425@hotmail.com> Co-authored-by: Lin Manhui <mhlin425@whu.edu.cn> |
||
|
|
5711acc40a |
fix PaddleOCR-VL docs (#17739)
* fix PaddleOCR-VL docs * update * update * update --------- Co-authored-by: Lin Manhui <mhlin425@whu.edu.cn> |
||
|
|
5b15abbe06 |
[Feat][MCP] Support PaddleOCR-VL-1.5 (#17717)
* Fix MCP docs * Support PaddleOCR-VL-1.5 * Accommodate fastmcp 3.0 |
||
|
|
46bfd1ef04 |
SiliconFlow supports PaddleOCR-VL-1.5 (#17699)
Co-authored-by: cuicheng01 <45199522+cuicheng01@users.noreply.github.com> |
||
|
|
09b071c3ea |
[Docs] Polish PaddleOCR-VL documentation (#17713)
* Refactor docs * Fix titles * Rename files |