在计算微调后模型的TEDS时报错,IndexError: list index out of range #12913
Unanswered
guoxiaoyue111111
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
命令:
python3 table/eval_table.py \
输出:
WARNING: OMP_NUM_THREADS set to 14, not 1. The computation speed will not be optimized if you use data parallel. It will fail if this PaddlePaddle binary is compiled with OpenBlas since OpenBlas does not support multi-threads.
PLEASE USE OMP_NUM_THREADS WISELY.
0%| | 0/758 [00:00<?, ?it/s]img_name zh_train_2_part1.jpg
[2023/12/09 15:54:47] ppocr DEBUG: dt_boxes num : 17, elapse : 2.9575107097625732
rec_result [('是', 0.9992949962615967), ('党员', 0.7541450262069702), ('一级', 0.9204568862915039), ('黄明', 0.9587429761886597), ('姓名', 0.992111325263977), ('5698', 0.8940942883491516)]
rec_result [('座机:', 0.943644106388092), ('涉密等级', 0.9983528852462769), ('政治面貌', 0.8774110078811646), ('工作证号', 0.9778869152069092), ('单位名称', 0.999062716960907), ('电子邮箱', 0.8983553647994995)]
rec_result [('联系方式', 0.8673622608184814), ('[email protected]', 0.943556547164917), ('手机:18936549874', 0.9280745387077332), ('北京航空航天大学', 0.9958963394165039), ('是否为涉密人员', 0.9645076990127563)]
[2023/12/09 15:54:47] ppocr DEBUG: rec_res num : 17, elapse : 0.03934144973754883
0%| | 0/758 [00:03<?, ?it/s]
Traceback (most recent call last):
File "table/eval_table.py", line 113, in
main(args.gt_path, args.image_dir, args)
File "table/eval_table.py", line 93, in main
structure_res, _ = text_sys._structure(img)
File "/root/PaddleOCR/ppstructure/table/predict_table.py", line 110, in _structure
structure_res, elapse = self.table_structurer(copy.deepcopy(img))
File "/root/PaddleOCR/ppstructure/table/predict_structure.py", line 147, in call
post_result = self.postprocess_op(preds, [shape_list])
File "/root/PaddleOCR/ppocr/postprocess/table_postprocess.py", line 56, in call
result = self.decode(structure_probs, bbox_preds, shape_list)
File "/root/PaddleOCR/ppocr/postprocess/table_postprocess.py", line 85, in decode
text = self.character[char_idx]
IndexError: list index out of range
可以看出,模型识别到17个文本框和17个文本内容,但是实际标注标注了16个文本框和16个文本。请问此处的IndexError: list index out of range报错是因为标注数目和模型识别数目不一致导致的吗?请问有什么办法可以解决呢?感谢~
Beta Was this translation helpful? Give feedback.
All reactions