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 017ea02 commit 79422e0Copy full SHA for 79422e0
paddlex/inference/pipelines/ocr/result.py
@@ -81,12 +81,10 @@ def _to_img(self) -> Dict[str, Image.Image]:
81
img_right = np.ones((h, w, 3), dtype=np.uint8) * 255
82
random.seed(0)
83
draw_left = ImageDraw.Draw(img_left)
84
+ vis_font = SIMFANG_FONT
85
+ if self["vis_fonts"]:
86
+ vis_font = self["vis_fonts"][0]
87
for idx, (box, txt) in enumerate(zip(boxes, txts)):
- vis_font = (
- self["vis_fonts"][idx]
- if self["vis_fonts"][idx] is not None
88
- else SIMFANG_FONT
89
- )
90
try:
91
color = (
92
random.randint(0, 255),
0 commit comments