Skip to content

能否修改dict为只有数字的字典 #65

@AWASDERTFGH

Description

@AWASDERTFGH

作者您好,我现在想使用ONNXOCR识别只有数字的图像,为了提升识别速度,我能否修改dict文件为'0123456789.-'呢,我直接修改会报如下错误,

File "D:\Desktop\OCRCode\onnxocr\predict_rec.py", line 322, in call
rec_result = self.postprocess_op(preds)
File "D:\Desktop\OCRCode\onnxocr\rec_postprocess.py", line 105, in call
text = self.decode(preds_idx, preds_prob, is_remove_duplicate=True)
File "D:\Desktop\OCRCode\onnxocr\rec_postprocess.py", line 70, in decode
char_list = [
File "D:\Desktop\OCRCode\onnxocr\rec_postprocess.py", line 71, in
self.character[text_id] for text_id in text_index[batch_idx][selection]
IndexError: list index out of range

期待您的回复,非常感谢!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions