equationl/paddleocr4android

识别出现了很奇怪的错误

supertiger523 opened this issue · 3 comments

当我载入模型时,都会提示载入成功,但是对同一张图片,有时候会识别不一样的结果,例如我上传了一个社会主义核心价值的图片,第一次开启程序 会识别成其它乱七八糟的文字,但是重新打开程序,第二次可能就正常了,当然,我说的第二次是在举一个例子,有时候要重复开启多次程序才行,只要成功一次,只要不关闭程序不管换什么图片都是正确的。这是什么原因?

{"Message":"Success","RetCode":"0","Result":{"Words_data":[{"ind_x1":"93,87","ind_y2":"93,101","ind_y1":"243,102","ind_x2":"243,88","content":"社会主义核心价值观基本内容"},{"ind_x1":"98,118","ind_y2":"98,140","ind_y1":"286,139","ind_x2":"286,117","content":"富强**文明和谐"},{"ind_x1":"134,150","ind_y2":"134,169","ind_y1":"253,167","ind_x2":"253,148","content":"自由平等公"},{"ind_x1":"259,148","ind_y2":"259,167","ind_y1":"319,166","ind_x2":"319,147","content":"正法治"},{"ind_x1":"168,178","ind_y2":"168,199","ind_y1":"354,197","ind_x2":"354,176","content":"爱国敬业诚信友善"}]}}
上面时正常的,但有时候重启程序会识别成下面的内容:
{"Message":"Success","RetCode":"0","Result":{"Words_data":[{"ind_x1":"93,87","ind_y2":"93,101","ind_y1":"243,102","ind_x2":"243,88","content":""},{"ind_x1":"98,118","ind_y2":"98,140","ind_y1":"286,139","ind_x2":"286,117","content":""},{"ind_x1":"134,150","ind_y2":"134,169","ind_y1":"253,167","ind_x2":"253,148","content":"兰玉甲具"},{"ind_x1":"259,148","ind_y2":"259,167","ind_y1":"319,166","ind_x2":"319,147","content":"工"},{"ind_x1":"168,178","ind_y2":"168,199","ind_y1":"354,197","ind_x2":"354,176","content":"车不国"}]}}
一旦识别错误,那会一直错误,如果本次启动服务识别成功,那就会一直成功

你下官方的 demo 替换成这张图片看看能不能复现出这个问题:https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.7/deploy/fastdeploy/android

因为理论上来说,我这个项目只是二次封装了上述 demo ,没有更改其他任何参数配置,识别问题一般是原本项目的问题,但是也不排除可能是我封装时某些地方写的有问题,所以需要你使用上述原 demo 确认一下。

长时间未回复,有需要请重新打开