Skip to content

Commit

Permalink
Opt: cnocr output
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandler Lu committed Aug 24, 2022
1 parent 469f35c commit ae5b47e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@version: 4.9.1
@Author: Chandler Lu
@Date: 2019-11-26 23:52:36
LastEditTime: 2022-08-23 12:30:09
LastEditTime: 2022-08-24 08:07:18
'''
# -*- coding: UTF-8 -*-
import sys
Expand Down Expand Up @@ -63,9 +63,8 @@ def cnocr_ocr(pic_path):
from cnocr import CnOcr
ocr = CnOcr(det_model_name='naive_det')
res = ocr.ocr(pic_path)
for i in range(len(res)):
print(res[i]['text'], end='')

for i in res:
print(i['text'], end='')

'''
Baidu OCR
Expand Down

0 comments on commit ae5b47e

Please sign in to comment.