Skip to content

Commit d8a20b1

Browse files
authored
fix: replace rec_image_shape when manually set (#14371)
1 parent ae67d96 commit d8a20b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paddleocr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ def __init__(self, **kwargs):
664664
params.rec_image_shape = "3, 48, 320"
665665
else:
666666
params.rec_image_shape = "3, 32, 320"
667+
if kwargs.get("rec_image_shape") is not None:
668+
params.rec_image_shape = kwargs.get("rec_image_shape")
667669
# download model if using paddle infer
668670
if not params.use_onnx:
669671
maybe_download(params.det_model_dir, det_url)

0 commit comments

Comments
 (0)