Commit Graph
34 Commits
Author SHA1 Message Date
SWHL b64a46ffd4 fix: align the performance of the torch version of the PP-OCRv6 Rec tiny model 2026-07-04 22:42:55 +08:00
SWHL 370f01d0a8 feat: support PP-OCRv6 PyTor as the inference engine 2026-07-02 17:54:27 +08:00
SWHL c18432567f fix: adjust PP-OCRv6 Paddle model key names in YAML config 2026-06-26 16:52:53 +08:00
JinmingMei 29b812fcac feat(python): add PP-OCRv6 paddle backend support (#696)
* feat(python): add PP-OCRv6 paddle backend support

- init_predictor + device_config: add PPOCRV6 to PPOCRV5 branches (PIR format, enable_new_ir/new_executor)

- have_key + get_character_list: read character_dict from inference.yml instead of always returning False

- default_models.yaml: add paddle.PP-OCRv6 det+rec (tiny/small/medium), rec has no dict_url (dict from yml)

- test_engine.py: add EngineType.PADDLE to v6 det/rec parametrize

- Verified: v6 paddle tests pass; v4/v5 paddle regression tests pass

* refactor(python): revert have_key workaround, use dict_url for paddle v6 rec

Now that dict files are available on RapidAI/RapidOCR, revert the have_key/get_character_list workaround that read character_dict from inference.yml. Add dict_url to paddle v6 rec entries pointing to the official dict files.

- paddle/main.py: have_key returns False, get_character_list returns [], remove yml_path logic

- default_models.yaml: add dict_url to paddle v6 rec (tiny/small/medium)

- init_predictor and device_config v6 branches remain (required for PIR format)
2026-06-26 08:32:26 +08:00
SWHL 4f4d675a79 chore: update files 2026-06-23 09:54:53 +08:00
SWHL 52fdd1e21a chore: update files 2026-06-22 18:39:25 +08:00
JinmingMei 9fe06b676c feat(python): support PP-OCRv6 (onnxruntime + openvino, det + rec) (#692)
* feat(python): support PP-OCRv6 for onnxruntime and openvino

Add PP-OCRv6 rec and det models (tiny/small/medium) for onnxruntime and openvino engines. v6 ships no cls model; reuse PP-OCRv5 cls.

- typings.py: add OCRVersion.PPOCRV6 and ModelType.TINY/SMALL/MEDIUM

- default_models.yaml: add PP-OCRv6 blocks under onnxruntime/openvino with PaddlePaddle official ModelScope URLs, verified SHA256, and dict_url (PaddleOCR dict files)

Verified end-to-end on ch_en_num.jpg with v6 small det+rec + v5 cls (onnxruntime): 18 text lines recognized correctly.

* fix(python): use uniquely-named PP-OCRv6 model URLs to avoid cache collision

PP-OCRv6 official ONNX exports are all named inference.onnx, causing det and rec models to overwrite each other in RapidOCR's cache (cache_dir/Path(url).name). Switch model_dir/dict_url to a mirror with unique filenames (ch_PP-OCRv6_<task>_<size>.onnx) under modelscope.cn/models/jaminmei/PP-OCRv6-onnx@v1.0. SHA256 unchanged (byte-identical files, renamed only).

Verified onnxruntime + openvino: no more redownload-on-collision; second run is pure cache hit.

* test(python): add PP-OCRv6 det/rec unit tests for onnxruntime and openvino

Mirror the test_ppocrv5_det/rec_mobile pattern. v6 small det on ch_en_num.jpg -> 18 boxes; v6 small rec on text_rec.jpg -> '韩国小馆'. Parametrized over the two engines v6 supports (ONNXRUNTIME, OPENVINO). Existing 100 tests unaffected (verified via collect-only).

Verified: 4 new tests pass (onnxruntime + openvino x det/rec).

* chore(python): switch PP-OCRv6 model URLs to official RapidAI/RapidOCR repo

- det/rec x tiny/small/medium now point to modelscope.cn/RapidAI/RapidOCR (official SWHL conversion, not contributor mirror)

- update SHA256 to the official files' hashes

- drop rec dict_url: official ONNX embeds the character list in metadata (session.have_key() path), matching v4/v5 onnx convention

- verified: 4 v6 unit tests pass; det benchmark Hmean identical to prior mirror-based run (0.8263/0.8492/0.8421 for tiny/small/medium)
2026-06-18 21:18:58 +08:00
SWHL abaaeb3043 chore: update default_model version to v3.8.0 2026-04-08 21:26:32 +08:00
SWHL 143f46242d fix: update paddle/cls/v5 model url 2026-04-08 21:17:07 +08:00
SWHL c5d1ea7f4a chore: update model name 2026-04-08 10:05:46 +08:00
SWHL 9023589c86 feat: add PP-OCRv5 cls module 2026-04-07 17:34:15 +08:00
SWHL f7961d3d2c chore: update default_model url path 2026-03-04 23:17:44 +08:00
SWHL 9d12451b7b refactor(openvino): remove dict_url from model configs 2026-02-26 19:42:45 +08:00
SWHL 75d0d159d2 chore: update model list to direct version 2026-01-28 22:32:35 +08:00
SWHL 0ae0375710 feat(mnn): add mnn model list 2026-01-28 22:18:05 +08:00
SWHL 8487133fc5 feat: update five multi language files (#619)
* feat: update five multi language files

* feat(rec): enable RTL text display for Arabic

* test(rec): add arabic, cyrillic, devanagari, ta and te unit testings

* test(rec): remove duplicate cyrillic unit testing

* feat(rec): update url to v3.5.0
2025-12-26 21:24:58 +08:00
SWHL 017b8fd5c7 feat: add en/el/th ppocr_v5_rec_mobile paddle/onnx/openvino (#546)
* feat: add en/el/th ppocr_v5_rec_mobile paddle/onnx/openvino

* test: change to a more secure code
2025-09-06 17:50:05 +08:00
SWHL 66e00f4beb feat(rapidocr): update ppocrv5 minor language config and unit testings 2025-07-27 18:02:19 +08:00
SWHL c50038bc1e feat(rapidocr): add korean ppocrv5 config and update uniting testing 2025-07-27 17:54:35 +08:00
SWHL 78b39ca378 feat(rapidocr): support ppocr v5 minor language model(korean / latin / eslav) (#516)
* feat(rapidocr): add korean ppocrv5 config and update uniting testing

* feat: support latin ppocrv5 model(paddle/ort)

* feat: support eslav ppocrv5 model(paddle/ort)

* feat(rapidocr): update model version
2025-07-27 17:51:02 +08:00
SWHL 1797850c15 feat(rapidocr): add ppocr v5 torch version (#511)
* feat: support torch ppocrv5 det

* feat: support torch ppocrv5 rec

* chore: update files

* chore: update files

* test: add ppocrv5 torch unit testings

* fix: fix typos
2025-07-23 22:08:31 +08:00
SWHL e06d51f214 chore(rapidocr): update url of model 2025-06-10 21:55:59 +08:00
SWHL 5f86f514dd feat: support PP-OCRv5 (#437)
* chore: add v5 det model path

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files
2025-06-01 10:50:02 +08:00
SWHL 80c72f54e9 feat(rapidocr): integrated PP-OCRv4_dervr_rec-d oc model (#426)
* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files

* chore: update files
2025-05-16 09:27:01 +08:00
SWHL 30b2d644dd fix(rapidocr): fixed sha256 error 2025-04-25 22:29:50 +08:00
SWHL fbaaaba486 fix(rapidocr): fixed issue #394 (#411)
* chore(rapidocr): add model SHA256

* chore(rapidocr): add model SHA256

* docs: update online demo link

* chore: update model path

* chore: update files

* chore: update files

* chore: update files

* fix(rapidocr): fixed paramter of DownloadFile
2025-04-25 20:39:38 +08:00
SWHLandCopilot d48f31e815 fix(rapidocr): fixed issue #381 #377 (#384)
* chore: update files

* fix(rapidocr): fixed issue #381

* chore: update demo

* Update python/setup.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-03 22:01:34 +08:00
SWHL ff1c13c387 fix(rapidocr): fixed key error of torch det model 2025-03-31 10:12:13 +08:00
Joker1212 54570e63be feat(rapidocr): sup more lang model for torch inference (#374) 2025-03-30 10:02:09 +08:00
SWHL 202dfb91fc feat(rapidocr): support to other language ocr and update visualization (#369)
* fix(vis_result): support to download direct font file

* chore: update files

* feat(rapidocr): update vis

* feat(rapidocr): update vis
2025-03-26 09:41:23 +08:00
SWHL a7650f6ad8 chore: update files 2025-02-21 09:33:06 +08:00
SWHL f7c0ab1fc0 chore: update files 2025-02-18 09:42:44 +08:00
SWHL ee280115c1 chore: update files 2025-02-14 14:04:38 +08:00
SWHL 8ca484987e chore: update files 2025-02-14 09:35:55 +08:00