We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3010c22 commit e656b79Copy full SHA for e656b79
paddlex/inference/pipelines/formula_recognition/result.py
@@ -45,6 +45,15 @@
45
class FormulaRecognitionResult(BaseCVResult):
46
"""Formula Recognition Result"""
47
48
+ def _get_input_fn(self):
49
+ fn = super()._get_input_fn()
50
+ if (page_idx := self["page_index"]) is not None:
51
+ fp = Path(fn)
52
+ stem, suffix = fp.stem, fp.suffix
53
+ return f"{stem}_{page_idx}{suffix}"
54
+ else:
55
+ return fn
56
+
57
def _to_img(self) -> Dict[str, Image.Image]:
58
"""
59
Converts the internal data to a PIL Image with detection and recognition results.
0 commit comments