mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-11 05:20:49 +08:00
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)
This commit is contained in:
1 parent
7980d1887f
commit
29b812fcac
4 files changed
+40
-4
No files matched your search
@@ -143,7 +143,7 @@ def test_engine_tensorrt():
|
||||
|
||||
@mark.parametrize(
|
||||
"engine_type",
|
||||
[EngineType.ONNXRUNTIME, EngineType.OPENVINO],
|
||||
[EngineType.ONNXRUNTIME, EngineType.OPENVINO, EngineType.PADDLE],
|
||||
)
|
||||
def test_ppocrv6_det_small(engine_type):
|
||||
engine = RapidOCR(
|
||||
@@ -161,7 +161,7 @@ def test_ppocrv6_det_small(engine_type):
|
||||
|
||||
@mark.parametrize(
|
||||
"engine_type",
|
||||
[EngineType.ONNXRUNTIME, EngineType.OPENVINO],
|
||||
[EngineType.ONNXRUNTIME, EngineType.OPENVINO, EngineType.PADDLE],
|
||||
)
|
||||
def test_ppocrv6_rec_small(engine_type):
|
||||
engine = RapidOCR(
|
||||
|
||||
Reference in new issue
Block a user