Kaynağa Gözat

add max_profit

yan chuanli 1 yıl önce
ebeveyn
işleme
c751490c16
3 değiştirilmiş dosya ile 7 ekleme ve 8 silme
  1. 2 2
      HR_OCR/to_md/use.py
  2. 4 5
      HR_OCR/tools/convert_json.py
  3. 1 1
      HR_OCR/tools/suffix.py

+ 2 - 2
HR_OCR/to_md/use.py

@@ -5,8 +5,8 @@ from new import MD, Image, Dataset, parser_path
 
 # config
 # 图片路径
-image_path = Path('/Users/sxkj/Desktop/户口本9.8/img')
-image_type = 0
+image_path = Path('/Users/sxkj/Desktop/9.29/1/img')
+image_type = 1
 # 是否旋转
 image_rotate = False
 ocr_address = 'local'  # 'local' 'TXtest' 'TXsb''DXtest' 'DXsb'

+ 4 - 5
HR_OCR/tools/convert_json.py

@@ -5,15 +5,14 @@ import json
 import base64
 from itertools import chain
 
-url = 'http://192.168.199.27:18040'
-imgs_path = '../img'
+url = 'http://192.168.199.27:18060'
+imgs_path = '/Users/sxkj/to_md/img'
 
-def send_request(img_path, image_type = 0):
+def send_request(img_path):
     with open(img_path, 'rb') as f:
         img_str: str = base64.encodebytes(f.read()).decode('utf-8')
         data = {
-            'image': img_str,
-            'image_type': image_type
+            'image': img_str
         }
         # idc_header = {
         #     'Content-Type': 'application/json',

+ 1 - 1
HR_OCR/tools/suffix.py

@@ -4,7 +4,7 @@ from itertools import chain
 import sys
 
 # conf
-target_path = '../户口本/0'
+target_path = '/Users/sxkj/to_md/9.29/1'
 #suffix = sys.argv[2]
 suffix = 'jpg' if len(sys.argv) != 3 else sys.argv[2]