Bladeren bron

Fix bugs for table-rec-pipe v2 (#4430)

* Update paddlepaddle_install.md

* Update paddlepaddle_install_en.md

* fix bug

* fix bug
Liu Jiaxuan 3 maanden geleden
bovenliggende
commit
6819478e6f

+ 0 - 1
paddlex/inference/pipelines/table_recognition/pipeline_v2.py

@@ -1263,7 +1263,6 @@ class _TableRecognitionPipelineV2(BasePipeline):
                         new_x1, new_y1 = img_height - tby2, tbx1
                         new_x2, new_y2 = img_height - tby1, tbx2
                     table_box = [new_x1, new_y1, new_x2, new_y2]
-                layout_det_res = {}
                 single_table_rec_res = self.predict_single_table_recognition_res(
                     doc_preprocessor_image,
                     overall_ocr_res,

+ 2 - 0
paddlex/inference/pipelines/table_recognition/result.py

@@ -96,6 +96,8 @@ class TableRecognitionResult(BaseCVResult, HtmlMixin, XlsxMixin):
         super().__init__(data)
         HtmlMixin.__init__(self)
         XlsxMixin.__init__(self)
+        if self["layout_det_res"] is None:
+            self["layout_det_res"] = {}
 
     def _get_input_fn(self):
         fn = super()._get_input_fn()