|
@@ -40,7 +40,13 @@ table_engine1 = PPStructure(layout=False,
|
|
use_gpu=use_gpu,
|
|
use_gpu=use_gpu,
|
|
show_log=True,
|
|
show_log=True,
|
|
det_model_dir="./det_table_1012",
|
|
det_model_dir="./det_table_1012",
|
|
- able_model_dir="./SLAnet_1004")
|
|
|
|
|
|
+ table_model_dir="./SLAnet_1004")
|
|
|
|
+
|
|
|
|
+table_engine2 = PPStructure(layout=False,
|
|
|
|
+ table=True,
|
|
|
|
+ use_gpu=use_gpu,
|
|
|
|
+ show_log=True,
|
|
|
|
+ table_model_dir="./SLAnet_1011")
|
|
|
|
|
|
|
|
|
|
class TableInfo(BaseModel):
|
|
class TableInfo(BaseModel):
|
|
@@ -61,6 +67,8 @@ def table(image: TableInfo):
|
|
res = table_engine(img)
|
|
res = table_engine(img)
|
|
elif image.det == 'yes':
|
|
elif image.det == 'yes':
|
|
res = table_engine1(img)
|
|
res = table_engine1(img)
|
|
|
|
+ elif image.det == 'spe':
|
|
|
|
+ res = table_engine2(img)
|
|
return res[0]['res']
|
|
return res[0]['res']
|
|
|
|
|
|
|
|
|