You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "./tools/infer_kie_token_ser_re.py", line 216, in <module>
result = ser_re_engine(data)
File "./tools/infer_kie_token_ser_re.py", line 147, in __call__
ser_results, ser_inputs = self.ser_engine(data)
File "/home/user/1_xsz_ocr/PaddleOCR/tools/infer_kie_token_ser.py", line 115, in __call__
batch = transform(data, self.ops)
File "/home/user/1_xsz_ocr/PaddleOCR/ppocr/data/imaug/__init__.py", line 72, in transform
data = op(data)
File "/home/user/1_xsz_ocr/PaddleOCR/ppocr/data/imaug/vqa/token/vqa_token_relation.py", line 31, in __call__
relations = data["relations"]
KeyError: 'relations'
我查看源码时发现,在infer时,data相关的代码段为
for idx, info in enumerate(infer_imgs):
if config["Global"].get("infer_mode", None) is False:
data_line = info.decode("utf-8")
substr = data_line.strip("\n").split("\t")
img_path = os.path.join(data_dir, substr[0])
data = {"img_path": img_path, "label": substr[1]}
print(substr)
else:
img_path = info
data = {"img_path": img_path}
🔎 Search before asking
🐛 Bug (问题描述)
我输入的命令是
然后遇到报错
我查看源码时发现,在infer时,data相关的代码段为
即data只有img_path和label字段.请问哪里出了问题
完整的输出如下
🏃♂️ Environment (运行环境)
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
完整的命令如下,在训练阶段没有异常,错误仅仅发生在推理阶段
The text was updated successfully, but these errors were encountered: