PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

求问ser_dict_path是什么

Open Lebron-Harden opened this issue 3 years ago • 4 comments

rt,想用ser和re的推理模型进行关键信息提取,但是参数里面有一个ser_dict_path不知道是什么,没有找到这个东西,也没有哪里有说明,求大佬解惑。

Lebron-Harden avatar Nov 09 '22 10:11 Lebron-Harden

这个是一个字典解析路径

jingsongliujing avatar Nov 10 '22 02:11 jingsongliujing

最后需要提供一个字典({word_dict_name}.txt),使模型在训练时,可以将所有出现的字符映射为字典的索引。

因此字典需要包含所有希望被正确识别的字符,详情看这里:https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/recognition.md#14-%E5%AD%97%E5%85%B8

jingsongliujing avatar Nov 10 '22 02:11 jingsongliujing

最后需要提供一个字典({word_dict_name}.txt),使模型在训练时,可以将所有出现的字符映射为字典的索引。

因此字典需要包含所有希望被正确识别的字符,详情看这里:

谢谢您,但是这里的ser_dict_path好像并不是包含所有希望被识别的字符的字典,因为运行出来的结果中,我发现字典的前两个字变成了ser结果的pred,因此造成了一些错误。

Lebron-Harden avatar Nov 10 '22 10:11 Lebron-Harden

你好,这个识别的字典结果,代码会根据BIO标注方式进行自动扩展,举个🌰,假设dict path如下所示。

other
key
value

那么,最终的类别数应该是5(包括other,即o,以及b-key,i-key,b-value,i-value)

littletomatodonkey avatar Nov 14 '22 13:11 littletomatodonkey