Name Last Update
authorization_from Loading commit data...
classification Loading commit data...
.gitignore Loading commit data...
README.md Loading commit data...
requirements.txt Loading commit data...

Useage

分类

import cv2
from classification import classifier

img_path = 'xxx'
img = cv2.imread(img_path)

print(classifier.class_name_list)
res = classifier.predict(img)
print(res)  # {'label': '营业执照', 'confidence': 0.988462}

授权书信息提取

from authorization_from import retriever_individuals, retriever_companies

# 个人授权书
res = retriever_individuals.get_target_fields(go_res, signature_res)
print(res)
# {'words_result': 
#      {'姓名': {'words': 'xx', 'score': 1, 'location': {'left': 105, 'top': 277, 'width': 60, 'height': 28}}, 
#       '个人身份证件号码': {'words': 'xx', 'score': 1, 'location': {'left': 320, 'top': 278, 'widtght': 24}}, 
#       '签字': {'words': '有', 'score': 1, 'location': {'left': 540, 'top': 1293, 'width': 143, 'height': 91}}}
# }

# 公司授权书
# res = retriever_companies.get_target_fields(go_res, signature_res)
# print(res)

# {'words_result': {
#     '经销商名称': {'words': 'xxx', 'score': 1, 'location': {'left': 473, 'top': 440, 'width': 331, 'height': 27}}, 
#     '经销商代码-宝马中国': {'words': 'xx', 'score': 1, 'location': {'left': 1285, 'top': 414, 'width': 65, 'height': 26}},
#     '管理人员姓名-总经理': {'words': 'xx', 'score': 1, 'location': {'left': 703, 'top': 815, 'width': 44, 'height': 24}}, 
#     '公司公章': {'words': '有', 'score: 1, 'location': {'left': 239, 'top': 1548, 'width': 323, 'height': 329}}, 
#     '法定代表人签章': {'words': '有', 'score': 1, 'location': {'left': 621, 'top': 1657, 'width': 161, 'height': 164}}}
# }