unilm How to load a single image and get prediction

u5i3ibmn  于 2个月前  发布在  其他
关注(0)|答案(4)|浏览(47)

你好,
我想在一张单独的图片或未标记的数据上测试结果(没有 "test.txt" 文件),但我不知道如何做到这一点。
有人能帮我吗?你的帮助将不胜感激。

atmip9wb

atmip9wb1#

mohamedMO347,您可能需要先运行OCR,并在"test.txt"中使用相同的格式。

lrpiutwd

lrpiutwd2#

mohamedMO347,您可能需要先运行OCR,并在"test.txt"中使用相同的格式。
wolfshow,我认为您误解了我的问题。我没有标签,我只是想在没有评估步骤的情况下获得模型的输出,因为没有地面真实标签放入test.txt中,但模型在预测步骤中总是需要test.txt。有什么解决方案吗?

gojuced7

gojuced73#

你好@wolfshow
我正在进行收据理解。我可以获取text.txt和text_box.txt文件作为模型预测的输入。
在运行完代码run_seq_labelling.py(作为--do predict)后,我得到了text_prediction.txt,但它只有前16行带有标签。我不知道为什么我没有得到剩下的文本。
有什么解决方案吗?

oknrviil

oknrviil4#

@mohamedMO347 you may need to run the OCR first, and use the same format in "test.txt".
@wolfshow I think you misunderstood my question . I don't have labels , I just want to get the output of the model without evaluation step because there's no ground truth labels to put in test.txt but the model always need test.txt in the prediction step.
Is there any solution?
append 'O' with each word in test.txt and do call --do_predict it will be fine

相关问题