提交 b5f91fbe 编写于 作者: L lywen

通过配置文件启动对应的模型

上级 60383ca1
......@@ -61,13 +61,14 @@ class TextDetector:
text_proposals, scores=text_proposals[sorted_indices], scores[sorted_indices]
# nms for text proposals
keep_inds=nms(np.hstack((text_proposals, scores)), TEXT_PROPOSALS_NMS_THRESH)##nms 过滤重复的box
text_proposals, scores=text_proposals[keep_inds], scores[keep_inds]
if len(text_proposals)>0:
keep_inds=nms(np.hstack((text_proposals, scores)), TEXT_PROPOSALS_NMS_THRESH)##nms 过滤重复的box
text_proposals, scores=text_proposals[keep_inds], scores[keep_inds]
scores=normalize(scores)
scores=normalize(scores)
text_lines=self.text_proposal_connector.get_text_lines(text_proposals, scores, size)##合并文本行
return text_lines
text_lines=self.text_proposal_connector.get_text_lines(text_proposals, scores, size)##合并文本行
return text_lines
else:
return []
此差异已折叠。
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -246,9 +246,8 @@ def estimate_skew_angle(raw):
def eval_angle(im,detectAngle=False,ifadjustDegree=True):
"""
估计图片偏移角度
@@param:img,
@@param:model,选择的ocr模型,支持keras\pytorch版本
@@param:adjust 调整文字识别结果
@@param:im
@@param:ifadjustDegree 调整文字识别结果
@@param:detectAngle 是否检测文字朝向
"""
angle = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册