Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wenlihaoyu committed Aug 25, 2019
1 parent 7cfa280 commit 62fc462
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ def POST(self):
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,
Expand Down
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@
ocrModelOpencv = os.path.join(pwd,"models","ocr.pb")

######################OCR模型###################################################

TIMEOUT=30##超时时间

0 comments on commit 62fc462

Please sign in to comment.