提交 62fc4625 编写于 作者: W wenlihaoyu

fix #339

上级 7cfa280c
......@@ -144,8 +144,11 @@ class OCR:
if textLine:
##单行识别
partImg = Image.fromarray(img)
text = ocr.predict(partImg.convert('L'))
text = crnn.predict(partImg.convert('L'))
res =[ {'text':text,'name':'0','box':[0,0,W,0,W,H,0,H]} ]
os.remove(filelock)
break
else:
detectAngle = textAngle
result,angle= model.model(img,
......
......@@ -51,3 +51,5 @@ ocrModelTorchEng = os.path.join(pwd,"models","ocr-english.pth")
ocrModelOpencv = os.path.join(pwd,"models","ocr.pb")
######################OCR模型###################################################
TIMEOUT=30##超时时间
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册