MCPcopy Index your code
hub / github.com/Turing-Project/WriteGPT / model

Function model

RecognizaitonNetwork/ocr.py:77–86  ·  view source on GitHub ↗

@img: 图片 @adjust: 是否调整文字识别结果

(img, adjust=False)

Source from the content-addressed store, hash-verified

75 return results
76
77def model(img, adjust=False):
78 """
79 @img: 图片
80 @adjust: 是否调整文字识别结果
81 """
82 cfg_from_file('./ctpn/ctpn/text.yml')
83 text_recs, img_framed, img = text_detect(img)
84 text_recs = sort_box(text_recs)
85 result = charRec(img, text_recs, adjust)
86 return result, img_framed
87

Callers 4

trainFunction · 0.85
validateFunction · 0.85
recognitionFunction · 0.85
gen_bert_vectorFunction · 0.85

Calls 3

text_detectFunction · 0.90
sort_boxFunction · 0.85
charRecFunction · 0.85

Tested by

no test coverage detected