Skip to content

Commit 026d1ec

Browse files
committed
chore: update files
1 parent 260b283 commit 026d1ec

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python/rapidocr/utils/typings.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ def __post_init__(self):
2222
def to_json(self):
2323
pass
2424

25-
def to_paddleocr_format(self):
25+
def to_paddleocr_format(self) -> List[List[List[float]], List[Tuple[str, float]]]:
2626
rec_res = list(zip(self.txts, self.scores))
27+
dt_boxes = [v.tolist() for v in self.boxes]
2728

28-
print("ok")
29+
final_res = []
30+
for box, rec in zip(dt_boxes, rec_res):
31+
final_res.append([box, list(rec)])
32+
return final_res

0 commit comments

Comments
 (0)