Browse Source

fix: update table slanet

Zhang Li 1 year ago
parent
commit
4f1b1a8e0f
2 changed files with 6 additions and 2 deletions
  1. 1 1
      server.py
  2. 5 1
      testing/table_test.py

+ 1 - 1
server.py

@@ -39,7 +39,7 @@ table_engine = PPStructure(layout=False,
                            show_log=True,
                            # det_model_dir="models/det/det_table_v2",
                            # rec_model_dir="models/rec/rec_table_v1",
-                           table_model_dir="models/table/SLANet_829")
+                           table_model_dir="models/table/SLANet_904")
 
 # # 普通表格
 # table_engine = PPStructure(layout=False,

+ 5 - 1
testing/table_test.py

@@ -8,7 +8,11 @@ url = 'http://192.168.199.107:18099'
 def send_request(image_path):
     with open(image_path, 'rb') as f:
         img_str: str = base64.encodebytes(f.read()).decode('utf-8')
-        r = requests.post(f'{url}/ocr_system/table', json={'image': img_str, 'det': 'conv'})
+        payload = {'image': img_str, 'det': 'conv'}
+        print(payload)
+
+        r = requests.post(f'{url}/ocr_system/table', json=payload)
+
         print(r.json())
         return r.json()