Help with PaddleOCR KIE #15532
-
I am currently working on a project that requires the use of PaddleOCR KIE. But I failed on the run test and inference of how it works from this readme This is my version of the packages I installed (on Windows 11):
I try to run inference with a single image like the instruction, but can't get the result because of the following bug: python tools/infer_kie_token_ser.py -c configs/kie/vi_layoutxlm/ser_vi_layoutxlm_xfund_zh.yml -o Architecture.Backbone.checkpoints=./pretrained_model/ser_vi_layoutxlm_xfund_pretrained/best_accuracy Global.infer_img=./ppstructure/docs/kie/input/zh_val_42.jpg [2025/06/01 17:00:55] ppocr INFO: resume from ./pretrained_model/ser_vi_layoutxlm_xfund_pretrained/best_accuracy
Traceback (most recent call last):
File "D:\Document\learn_paddle_ocr\PaddleOCR\tools\infer_kie_token_ser.py", line 129, in <module>
ser_engine = SerPredictor(config)
File "D:\Document\learn_paddle_ocr\PaddleOCR\tools\infer_kie_token_ser.py", line 76, in __init__
self.ocr_engine = PaddleOCR(
File "D:\Document\learn_paddle_ocr\PaddleOCR\paddleocr\_pipelines\ocr.py", line 144, in __init__
super().__init__(**base_params)
File "D:\Document\learn_paddle_ocr\PaddleOCR\paddleocr\_pipelines\base.py", line 60, in __init__
self._common_args = parse_common_args(
File "D:\Document\learn_paddle_ocr\PaddleOCR\paddleocr\_common_args.py", line 43, in parse_common_args
raise ValueError(f"Unknown argument: {name}")
ValueError: Unknown argument: use_gpu I have been stuck with this bug for hours. Is there anyone who can help me with it? I appreciate any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Hello, PaddleOCR recently underwent an upgrade, resulting in significant changes to the inference code. Unfortunately, due to time constraints, the code related to KIE models has not been updated accordingly. You can switch to the PaddleOCR 2.8 branch and use the KIE-related features by running git checkout remotes/origin/release/2.8 and then python -m pip install paddleocr==2.8. |
Beta Was this translation helpful? Give feedback.
Hello, my Paddle environment is version 3.0.0, but older versions should also work. The key is to download and install the PaddleOCR 2.8 code.