Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

个别png图片报“识别异常”的错,转成jpg又可以了。啥原因,有更好的解决办法吗? #93

Open
bhyself opened this issue May 26, 2020 · 2 comments

Comments

@bhyself
Copy link

bhyself commented May 26, 2020

个别png图片报“识别异常”的错,转成jpg又可以了。啥原因,有更好的解决办法吗?
遇到过一些识别异常的。docker部署的,请问下具体的处理异常日志在哪个目录里面看?

@bhyself
Copy link
Author

bhyself commented May 26, 2020

日志打出来了。请大家帮看看什么原因

2020-05-26T02:46:53.627844347Z 132.228.75.51:58994 - - [26/May/2020 02:46:53] "HTTP/1.1 GET /text" - 200 OK
2020-05-26T02:47:22.230907913Z Traceback (most recent call last):
2020-05-26T02:47:22.230945799Z File "/usr/local/lib/python3.6/dist-packages/web/application.py", line 257, in process
2020-05-26T02:47:22.230969132Z return self.handle()
2020-05-26T02:47:22.230974368Z File "/usr/local/lib/python3.6/dist-packages/web/application.py", line 248, in handle
2020-05-26T02:47:22.230978681Z return self._delegate(fn, self.fvars, args)
2020-05-26T02:47:22.230982383Z File "/usr/local/lib/python3.6/dist-packages/web/application.py", line 488, in _delegate
2020-05-26T02:47:22.230986142Z return handle_class(cls)
2020-05-26T02:47:22.230989660Z File "/usr/local/lib/python3.6/dist-packages/web/application.py", line 466, in handle_class
2020-05-26T02:47:22.230993346Z return tocall(*args)
2020-05-26T02:47:22.230996880Z File "app.py", line 73, in POST
2020-05-26T02:47:22.231000618Z res = job(uuid,url,imgString,iscut,isclass,billModel,ip)
2020-05-26T02:47:22.231004128Z File "app.py", line 32, in job
2020-05-26T02:47:22.231007730Z data = text_ocr(image,scale,maxScale,TEXT_LINE_SCORE)
2020-05-26T02:47:22.231011536Z File "/root/darknet-ocr/dnn/main.py", line 68, in text_ocr
2020-05-26T02:47:22.231015294Z text = ocrModel(tmpImg)
2020-05-26T02:47:22.231102694Z File "/root/darknet-ocr/dnn/ocr.py", line 39, in predict
2020-05-26T02:47:22.231166654Z return predict_cpu(image)
2020-05-26T02:47:22.231183885Z File "/root/darknet-ocr/dnn/ocr.py", line 62, in predict_cpu
2020-05-26T02:47:22.231198789Z y_pred = ocrNet.forward()
2020-05-26T02:47:22.231211739Z cv2.error: OpenCV(4.0.1) /root/opencv-for-darknet/opencv-4.0.1/modules/dnn/src/dnn.cpp:778: error: (-215:Assertion failed) mapIt != reuseMap.end() in function 'numReferences'
2020-05-26T02:47:22.231223358Z
2020-05-26T02:47:22.231236125Z
2020-05-26T02:47:22.231246831Z 132.228.75.51:58994 - - [26/May/2020 02:47:22] "HTTP/1.1 POST /text" - 500 Internal Server Error

@ystyle
Copy link

ystyle commented May 27, 2020

很简单,你的图片格式是png的,但文件名写着xxx.jpg, 格式是按文件名判断的。。。
如果你是linux或用git bash ,可以用file xxxx来看文件真正的格式,而不是看文件名

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants