|
@@ -1,3 +1,11 @@
|
|
|
|
+'''
|
|
|
|
+Author: zeke-chin zeke-chin@icloud.com
|
|
|
|
+Date: 2022-09-26 14:58:10
|
|
|
|
+LastEditors: zeke-chin zeke-chin@icloud.com
|
|
|
|
+LastEditTime: 2022-09-26 20:28:55
|
|
|
|
+FilePath: /HROCR/to_md/to_md/use.py
|
|
|
|
+Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE`
|
|
|
|
+'''
|
|
|
|
|
|
from pathlib import Path
|
|
from pathlib import Path
|
|
|
|
|
|
@@ -5,10 +13,10 @@ from new import MD, Image, Dataset, parser_path
|
|
|
|
|
|
# config
|
|
# config
|
|
# 图片路径
|
|
# 图片路径
|
|
-image_path = Path('/Users/sxkj/Desktop/测试文档/四六级/9.8/身份证/img')
|
|
|
|
|
|
+image_path = Path('/Users/zeke/work/sx/OCR/image_data/户口本——9.11/首页')
|
|
image_type = 1
|
|
image_type = 1
|
|
# 是否旋转
|
|
# 是否旋转
|
|
-image_rotate = True
|
|
|
|
|
|
+image_rotate = False
|
|
ocr_address = 'local' # 'local' 'test' 'sb'
|
|
ocr_address = 'local' # 'local' 'test' 'sb'
|
|
|
|
|
|
ocr_name = 'regbook' # 'cet' 'idcard' 'bankcard' 'regbook' 'schoolcert'
|
|
ocr_name = 'regbook' # 'cet' 'idcard' 'bankcard' 'regbook' 'schoolcert'
|
|
@@ -19,7 +27,7 @@ filed = 'regbook'
|
|
# md_path = '/Users/zeke/work/sx/OCR/HROCR/to_md/example' or image_path.parent
|
|
# md_path = '/Users/zeke/work/sx/OCR/HROCR/to_md/example' or image_path.parent
|
|
md_path = None or image_path.parent
|
|
md_path = None or image_path.parent
|
|
|
|
|
|
-md_file = parser_path(Path(md_path) / Path(md_name), image_rotate)
|
|
|
|
|
|
+md_file = parser_path(Path(md_path) / Path(md_name + image_path.stem), image_rotate)
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|