zeke-chin 2 years ago
parent
commit
6ab9ce1694
4 changed files with 9 additions and 7 deletions
  1. 1 0
      .gitignore
  2. 1 1
      HR_OCR/TestAllOcr/test_interface.py
  3. 6 5
      HR_OCR/to_md/ocr_config.py
  4. 1 1
      HR_OCR/to_md/use.py

+ 1 - 0
.gitignore

@@ -1,5 +1,6 @@
 .DS_Store
 .idea
+.vscode
 __pycache__/
 *.json
 *.md

+ 1 - 1
HR_OCR/TestAllOcr/test_interface.py

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

+ 6 - 5
HR_OCR/to_md/ocr_config.py

@@ -1,4 +1,3 @@
-
 from dataclasses import dataclass
 from typing import List
 
@@ -14,6 +13,7 @@ class RequestConfig:
     url: str
     token: str
 
+
 @dataclass
 class Configs:
     request: RequestConfig
@@ -98,11 +98,12 @@ OCR_CONFIGS = {
 # 字段
 cet_field = ['orientation', 'name', 'id', 'language', 'level', 'exam_time', 'score']
 regbook_field = ['orientation', 'name', 'id', 'gender', 'birthplace', 'birthplace_province', 'birthplace_city',
-                          'birthplace_region', 'native_place', 'native_place_province', 'native_place_city',
-                          'native_place_region', 'blood_type', 'religion']
-business_license = ['orientation', 'social_code', 'company_name', 'legal_person', 'registered_capital', 'type', 'start_date', 'business_scope', 'expire_date', 'address', 'stamp']
+                 'birthplace_region', 'native_place', 'native_place_province', 'native_place_city',
+                 'native_place_region', 'blood_type', 'religion']
+business_license = ['orientation', 'social_code', 'company_name', 'legal_person', 'registered_capital', 'type',
+                    'start_date', 'business_scope', 'expire_date', 'address', 'stamp']
 Filed = {
     'cet': cet_field,
     'regbook': regbook_field,
     'business_license': business_license
-}
+}

+ 1 - 1
HR_OCR/to_md/use.py

@@ -17,7 +17,7 @@ image_path = Path('/Users/zeke/work/sx/OCR/image_data/户口本9.30/0/img/')
 image_type = 0
 # 是否旋转
 image_rotate = False
-ocr_address = 'local'  # 'local' 'TXtest' 'TXsb''DXtest' 'DXsb'
+ocr_address = 'local'  # 'local' 'TXtest' 'TXsb' 'DXtest' 'DXsb'
 
 ocr_name = 'regbook'  # 'cet' 'idcard' 'bankcard' 'regbook' 'schoolcert''business_license'
 md_name = 'RegBook'