diff --git a/ppstructure/table/predict_structure.py b/ppstructure/table/predict_structure.py index 01d4675943ee1cae1a793aa65869f3ad28937c63..c4a816fd87d5608460ad62041d994ec744f1b6f1 100755 --- a/ppstructure/table/predict_structure.py +++ b/ppstructure/table/predict_structure.py @@ -73,12 +73,14 @@ class TableStructurer(object): postprocess_params = { 'name': 'TableLabelDecode', "character_dict_path": args.table_char_dict_path, + 'merge_no_span_structure': args.merge_no_span_structure } else: postprocess_params = { 'name': 'TableMasterLabelDecode', "character_dict_path": args.table_char_dict_path, - 'box_shape': 'pad' + 'box_shape': 'pad', + 'merge_no_span_structure': args.merge_no_span_structure } self.preprocess_op = create_operators(pre_process_list) diff --git a/ppstructure/table/predict_table.py b/ppstructure/table/predict_table.py index b0c7ef589ffcfe4c3c3ec1fd43550813c9d27dcc..35ce8890cf3bafbeb02002773ebf5a4e22cb175a 100644 --- a/ppstructure/table/predict_table.py +++ b/ppstructure/table/predict_table.py @@ -101,6 +101,7 @@ class TableSystem(object): start = time.time() structure_res, elapse = self._structure(copy.deepcopy(img)) + result['cell_bbox'] = structure_res[1] time_dict['table'] = elapse dt_boxes, rec_res, det_elapse, rec_elapse = self._ocr( @@ -175,8 +176,23 @@ def main(args): image_file_list = image_file_list[args.process_id::args.total_process_num] os.makedirs(args.output, exist_ok=True) - text_sys = TableSystem(args) + table_sys = TableSystem(args) img_num = len(image_file_list) + + f_html = open( + os.path.join(args.output, 'show.html'), mode='w', encoding='utf-8') + f_html.write('\n
\n') + f_html.write('img name\n') + f_html.write(' | ori image | ') + f_html.write('table html | ') + f_html.write('cell box | ') + f_html.write("
{os.path.basename(image_file)} \n') + f_html.write(f' | \n') + f_html.write(' | \n') + f_html.write(" |