zeke-chin 2 years ago
parent
commit
950becf003
2 changed files with 13 additions and 5 deletions
  1. 2 2
      TestAllOcr/test_interface.py
  2. 11 3
      to_md/use.py

+ 2 - 2
TestAllOcr/test_interface.py

@@ -6,8 +6,8 @@ from config import send_request
 
 
 image_path = 'image'
 image_path = 'image'
 
 
-# DX_test, DX_sb, DX_test, DX_sb
-envl = 'DX_sb'
+# TX_test, TX_sb, DX_test, DX_sb
+envl = 'DX_test'
 url = config.URL[envl]
 url = config.URL[envl]
 token = config.TOKEN[envl]
 token = config.TOKEN[envl]
 
 

+ 11 - 3
to_md/use.py

@@ -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__':