Parcourir la source

fix: update table slanet

Zhang Li il y a 1 an
Parent
commit
4f1b1a8e0f
2 fichiers modifiés avec 6 ajouts et 2 suppressions
  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()